Commits

zjes committed 9ee2084

Migrate to qt5

Comments (0)

Files changed (100)

-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.3)
 
-PROJECT(pynoto)
-SET(CMAKE_BUILD_TYPE "Debug")
+project(pynoto)
+set(CMAKE_BUILD_TYPE Debug)
 
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/plugins)
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/plugins)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
 
+add_definitions(-Wall -std=c++0x)
 
-FIND_PACKAGE(Qt4 REQUIRED)
-SET(CMAKE_COLOR_MAKEFILE ON)
-SET(QT_USE_QTGUI TRUE)
-SET(QT_USE_QTNETWORK TRUE)
-SET(QT_USE_QTXML TRUE)
-
-INCLUDE(${QT_USE_FILE})
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-ADD_DEFINITIONS(-g -Wall)
-set(CMAKE_CXX_FLAGS "-g -Wall")
-
-ADD_SUBDIRECTORY(src)
+add_subdirectory(src)

bin/pynoto.desktop

+[Desktop Entry]
+Name=pyNoto
+Exec=/home/jes/workspace/qtpynoto2/bin/pynoto
+Type=Application
+Terminal=false
+Icon=/home/jes/workspace/qtpynoto2/src/Main/pynoto.svgz
+Categories=Qt;Python;Development

bin/python3/srv.zip

Binary file modified.

src/CMakeLists.txt

-PROJECT(pynoto)
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/Include)
-
-
-ADD_SUBDIRECTORY(Core)
-ADD_SUBDIRECTORY(Main)
-ADD_SUBDIRECTORY(IconProvider)
-ADD_SUBDIRECTORY(Project)
-ADD_SUBDIRECTORY(Editors)
-ADD_SUBDIRECTORY(Designer)
-ADD_SUBDIRECTORY(EditorsManager)
-ADD_SUBDIRECTORY(TextEditor)
-ADD_SUBDIRECTORY(PythonEditor)
-ADD_SUBDIRECTORY(Theme)
-ADD_SUBDIRECTORY(Python)
-ADD_SUBDIRECTORY(PythonCode)
-ADD_SUBDIRECTORY(Preferences)
-
-SET(pynoto_srcs
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${PROJECT_SOURCE_DIR}/Include)
+
+find_package(Qt5Core)
+find_package(Qt5Gui)
+find_package(Qt5Widgets)
+
+
+add_subdirectory(Core)
+add_subdirectory(Main)
+add_subdirectory(IconProvider)
+add_subdirectory(Project)
+add_subdirectory(Editors)
+add_subdirectory(Designer)
+add_subdirectory(EditorsManager)
+add_subdirectory(TextEditor)
+add_subdirectory(PythonEditor)
+add_subdirectory(Theme)
+add_subdirectory(Python)
+add_subdirectory(PythonCode)
+add_subdirectory(Preferences)
+
+set(SRC
     main.cpp
 )
 
-SET(pynoto_moc_srcs
+add_executable(pynoto
+    ${SRC}
 )
 
-SET(pynoto_moc_hdrs
+qt5_use_modules(pynoto Core Widgets Gui)
+
+target_link_libraries(pynoto
+    core
 )
 
-QT4_WRAP_CPP(pynoto_moc_srcs ${pynoto_moc_hdrs})
 
-ADD_EXECUTABLE(pynoto
-    ${pynoto_srcs}
-    ${pynoto_moc_srcs}
-)
 
-TARGET_LINK_LIBRARIES(pynoto ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(pynoto ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(pynoto core)
 
-INSTALL(TARGETS pynoto DESTINATION bin)
 
 }
 
-PynotoApplication::PynotoApplication(int &argc, char **argv, int flag):
-    QApplication(argc, argv, flag)
-{
-    pluginManager = new Core::PluginManager();
-    pluginManager->initPlugins();
-
-    iconProvider = pluginManager->plugin<IconProvider::IIconProvider*>("iconprovider");
-}
-
-PynotoApplication::~PynotoApplication()
-{
-    delete pluginManager;
-}
-
-void PynotoApplication::emitPreferencesChanged(const QString& name)
-{
-    emit preferencesChanged(name);
-}
-
-void PynotoApplication::emitPreferencesChanged(const QString& name, const QVariant& value)
-{
-    emit preferencesChanged(name, value);
-}
 
+#ifndef _AUX_H_
+#define _AUX_H_
+
+#include "PynotoApplication.h"
+
+namespace Aux {
+
+template<class T>
+T plugin(const QString& name)
+{
+    return static_cast<PynotoApplication*>(QApplication::instance())->pluginManager->plugin<T>(name);
+}
+
+IconProvider::IIconProvider* icons();
+Core::PluginManager * manager();
+PynotoApplication* app();
+void emitPreferencesChanged(const QString& name);
+void emitPreferencesChanged(const QString& name, const QVariant& value);
+
+}
+
+#endif

src/Core/CMakeLists.txt

-PROJECT(core)
+find_package(Qt5Core)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${PROJECT_SOURCE_DIR}/src)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
 
-SET(hdrs
-    Environment.h
+set(hdrs
 )
 
-SET(src
+set(src
+    Aux.h
+    Aux.cpp
+    Environment.h
     Environment.cpp
-)
-
-SET(moc_hdrs
-    IPlugin.h
     PynotoApplication.h
+    PynotoApplication.cpp
     PluginManager.h
-    ColorChooser.h
-    IPreferencesPage.h
-    FileNameSelect.h
-    FileNameInput.h
-)
-
-SET(moc
-    IPlugin.cpp
     PluginManager.cpp
-    Aux.cpp
+    ColorChooser.h
     ColorChooser.cpp
-    IPreferencesPage.cpp
+    FileNameSelect.h
     FileNameSelect.cpp
+    FileNameInput.h
     FileNameInput.cpp
+    IPreferencesPage.cpp
+    IPreferencesPage.h
+    IPlugin.cpp
+    IPlugin.h
 )
 
-SET(res
-)
-
-SET(ui
-)
-
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
-
-ADD_LIBRARY(core
-    ${moc}
+add_library(core
     ${src}
-    ${uic}
-    ${qrc}
 )
 
-TARGET_LINK_LIBRARIES(core ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(core ${QT_QTGUI_LIBRARY})
+qt5_use_modules(core Core Widgets)

src/Core/IPreferencesPage.cpp

-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "IPreferencesPage.h"
 
 

src/Core/PluginManager.cpp

 #include <QDebug>
-#include <QApplication>
+#include <QCoreApplication>
 #include <QLibraryInfo>
 #include <QDir>
 #include <QPluginLoader>
 
     _pluginFiles.clear();
     foreach(QString path, pathes){
-        QApplication::addLibraryPath(path);
+        QCoreApplication::addLibraryPath(path);
 
         QDir pl(path);
         foreach(QFileInfo file, pl.entryInfoList(QStringList()))

src/Core/PynotoApplication.cpp

+#include "PynotoApplication.h"
+
+PynotoApplication::PynotoApplication(int &argc, char **argv, int flag):
+    QApplication(argc, argv, flag)
+{
+    pluginManager = new Core::PluginManager();
+    pluginManager->initPlugins();
+
+    iconProvider = pluginManager->plugin<IconProvider::IIconProvider*>("iconprovider");
+}
+
+PynotoApplication::~PynotoApplication()
+{
+    delete pluginManager;
+}
+
+void PynotoApplication::emitPreferencesChanged(const QString& name)
+{
+    emit preferencesChanged(name);
+}
+
+void PynotoApplication::emitPreferencesChanged(const QString& name, const QVariant& value)
+{
+    emit preferencesChanged(name, value);
+}
+

src/Core/PynotoApplication.h

     IconProvider::IIconProvider *iconProvider;
 };
 
-namespace Aux {
-
-template<class T>
-T plugin(const QString& name)
-{
-    return static_cast<PynotoApplication*>(QApplication::instance())->pluginManager->plugin<T>(name);
-}
-
-IconProvider::IIconProvider* icons();
-Core::PluginManager * manager();
-PynotoApplication* app();
-void emitPreferencesChanged(const QString& name);
-void emitPreferencesChanged(const QString& name, const QVariant& value);
-
-}
 #endif

src/Designer/CMakeLists.txt

-PROJECT(designer)
+find_package(Qt5Widgets)
+find_package(Qt5Designer)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
 
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
+set(SRC
     DesignerHeader.h
-    DesignerPlugin.h
-    DesignerImpl.h
-    DesignerWidget.h
-    IDesignerPlugin.h
-)
-
-SET(moc
     DesignerHeader.cpp
+    DesignerPlugin.h
     DesignerPlugin.cpp
+    DesignerImpl.h
     DesignerImpl.cpp
+    DesignerWidget.h
     DesignerWidget.cpp
+    IDesignerPlugin.h
     IDesignerPlugin.cpp
 )
 
-SET(res
-)
-
-SET(ui
+set(UI
     DesignerHeader.ui
     DesignerWidget.ui
 )
 
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_wrap_ui(UIC ${UI})
 
-ADD_LIBRARY(designer
+add_library(designer
     SHARED
-    ${moc}
-    ${uic}
-    ${qrc}
+    ${SRC}
+    ${UIC}
+)
+
+target_link_libraries(designer
+    core
+    editors
+    ${_qt5Designer_install_prefix}/lib/libQt5DesignerComponents.so
 )
 
-TARGET_LINK_LIBRARIES(designer ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(designer ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(designer core)
-TARGET_LINK_LIBRARIES(designer editors)
-TARGET_LINK_LIBRARIES(designer QtDesignerComponents)
-TARGET_LINK_LIBRARIES(designer QtDesigner)
+qt5_use_modules(designer Widgets Designer)

src/Designer/DesignerHeader.cpp

 #include "Include/IProject.h"
 #include "Include/PynotoApplication.h"
 #include "ui_DesignerHeader.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 
 namespace Designer {
 

src/Designer/DesignerPlugin.cpp

 
 }
 
-Q_EXPORT_PLUGIN2(designer, Designer::DesignerPlugin)

src/Designer/DesignerPlugin.h

 class DesignerPlugin: public Designer::IDesignerPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IDesignerPlugin")
     Q_INTERFACES(Designer::IDesignerPlugin)
 public:
     virtual ~DesignerPlugin(){}

src/Designer/DesignerWidget.cpp

 #include <QScrollBar>
 #include <QTextCodec>
 #include <QApplication>
+
 #include <QtDesigner/QDesignerFormEditorInterface>
 #include <QtDesigner/QDesignerComponents>
 #include <QtDesigner/QDesignerWidgetBoxInterface>
 
 #include <QStringBuilder>
 #include <QProcess>
+#if QT_VERSION >= 0x050000
+#include <QtDesigner/QDesignerFormWindowManagerInterface>
+#include <QtDesigner/QDesignerIntegration>
+#else
 #include "internals/qdesigner_integration_p.h"
 #include "internals/pluginmanager_p.h"
 #include "internals/formwindowbase_p.h"
-#include "DesignerHeader.h"
+#endif
 
-#include "Include/PynotoApplication.h"
+#include "DesignerHeader.h"
+#include "Include/Aux.h"
 #include "Include/IProjectPlugin.h"
 #include "Include/IProject.h"
 
 #include "DesignerWidget.h"
 #include "ui_DesignerWidget.h"
 
-class PyNotoIntegration: public qdesigner_internal::QDesignerIntegration
+class PyNotoIntegration:
+#if QT_VERSION >= 0x050000
+    public QDesignerIntegration
+#else
+    public qdesigner_internal::QDesignerIntegration
+#endif
 {
 public:
     PyNotoIntegration(QDesignerFormEditorInterface *core, QObject *parent = 0):
+#if QT_VERSION >= 0x050000
+        QDesignerIntegration(core, parent)
+#else
         qdesigner_internal::QDesignerIntegration(core, parent)
+#endif
     {
+#if QT_VERSION >= 0x050000
+        Feature f = features();
+        f |= SlotNavigationFeature;
+        f &= ~ResourceEditorFeature;
+        setFeatures(f);
+#else
         setSlotNavigationEnabled(true);
+#endif
     }
 };
 
     _iface->setIntegration(_designer);
 
     QList<QObject*> plugins = QPluginLoader::staticInstances();
+#if QT_VERSION >= 0x050000
+    plugins += _iface->pluginInstances();
+#else
     plugins += _iface->pluginManager()->instances();
+#endif
 
     foreach (QObject *plugin, plugins) {
         if (QDesignerFormEditorPluginInterface *formEditorPlugin = qobject_cast<QDesignerFormEditorPluginInterface*>(plugin)) {
     if (!QFile::exists(_fileName))
         return false;
 
-    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#if QT_VERSION >= 0x050000
+    _form = _iface->formWindowManager()->createFormWindow(this);
+#else
     _form = qobject_cast<qdesigner_internal::FormWindowBase *>(_iface->formWindowManager()->createFormWindow(this));
+#endif
     _form->setFileName(_fileName);
 
     QFile f(_fileName);
     _form->setContents(f.readAll());
     f.close();
 
+#if QT_VERSION < 0x050000
     _form->setDesignerGrid(qdesigner_internal::FormWindowBase::defaultDesignerGrid());
     qdesigner_internal::FormWindowBase::setupDefaultAction(_form);
+#endif
     _designer->setupFormWindow(_form);
 
     QMdiSubWindow *wnd = _ui->formPlace->addSubWindow(_form, Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);

src/Designer/DesignerWidget.h

     class DesignerWidget;
 }
 
+#if QT_VERSION >= 0x050000
+    class QDesignerFormWindowInterface;
+    class QDesignerIntegration;
+#else
 namespace qdesigner_internal {
     class QDesignerIntegration;
     class FormWindowBase;
 }
-
 class QDesignerFormWindowInterface;
 class QDesignerFormEditorInterface;
+#endif
+
 class QAbstractTableModel;
 class StatusBar;
 class QDesignerWidgetBoxInterface;
     void activated(QDesignerFormWindowInterface*);
 private:
     Ui::DesignerWidget *_ui;
+#if QT_VERSION >= 0x050000
+    QDesignerIntegration *_designer;
+#else
     qdesigner_internal::QDesignerIntegration *_designer;
+#endif
     QAction *_editTabAction;
     QAction *_editBuddies;
     QString _fileName;
-    qdesigner_internal::FormWindowBase * _form;
+#if QT_VERSION >= 0x050000
+    QDesignerFormWindowInterface *_form;
+#else
+    qdesigner_internal::FormWindowBase *_form;
+#endif
     QObject * _menu;
 
     QDesignerWidgetBoxInterface *_wb;

src/Designer/IDesignerPlugin.h

 };
 
 }
-Q_DECLARE_INTERFACE(Designer::IDesignerPlugin, "Pynoto.IDesignerPlugin/1.0")
+Q_DECLARE_INTERFACE(Designer::IDesignerPlugin, "Pynoto.IDesignerPlugin")
 #endif

src/Designer/internals/formwindowbase_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G
 
 #include "shared_global_p.h"
 
-#include <QtDesigner/QDesignerFormWindowInterface>
+#include <QDesignerFormWindowInterface>
 
 #include <QVariantMap>
 #include <QList>
 private:
     void syncGridFeature();
 
-    FormWindowBasePrivate *m_d;    
+    FormWindowBasePrivate *m_d;
 };
 
 }  // namespace qdesigner_internal

src/Designer/internals/pluginmanager_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G

src/Designer/internals/qdesigner_formwindowmanager_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G
 // We mean it.
 //
 
-#ifndef QDESIGNER_FORMWINDOMANAGER_H
-#define QDESIGNER_FORMWINDOMANAGER_H
+#ifndef QDESIGNER_FORMWINDOWMANAGER_H
+#define QDESIGNER_FORMWINDOWMANAGER_H
 
 #include "shared_global_p.h"
-#include <QtDesigner/QDesignerFormWindowManagerInterface>
+#include <QDesignerFormWindowManagerInterface>
 
 QT_BEGIN_NAMESPACE
 
 
 QT_END_NAMESPACE
 
-#endif // QDESIGNER_FORMWINDOMANAGER_H
+#endif // QDESIGNER_FORMWINDOWMANAGER_H

src/Designer/internals/qdesigner_integration_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G
 #define QDESIGNER_INTEGRATION_H
 
 #include "shared_global_p.h"
-#include <QtDesigner/QDesignerIntegrationInterface>
+#include <QDesignerIntegrationInterface>
 
 #include <QObject>
 

src/Designer/internals/shared_enums_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G

src/Designer/internals/shared_global_p.h

-/**************************************************************************
+/****************************************************************************
 **
-** This file is part of Qt Creator
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
 **
-** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
-**
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** This file is part of Qt Creator.
 **
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
 **
 ** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 **
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this file.
-** Please review the following information to ensure the GNU Lesser General
-** Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
 **
-** Other Usage
-**
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**************************************************************************/
+****************************************************************************/
 
 //
 //  W A R N I N G

src/Editors/CMakeLists.txt

-PROJECT(editors)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-
-SET(moc_hdrs
+set(SRC
     IEditorPlugin.h
-    IEditor.h
     ITextEditor.h
-    FileProperty.h
-)
 
-SET(moc
+    IEditor.h
     IEditor.cpp
+    FileProperty.h
     FileProperty.cpp
 )
 
-SET(res
-)
-
-SET(ui
-)
-
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
-
-ADD_LIBRARY(editors
-    ${moc}
-    ${uic}
-    ${qrc}
+add_library(editors
+    ${SRC}
 )
 
-TARGET_LINK_LIBRARIES(editors ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(editors ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(editors core)
+target_link_libraries(editors core)
+qt5_use_modules(editors Widgets)
 

src/Editors/IEditor.h

     virtual void checkIssues() = 0;
 };
 }
-Q_DECLARE_INTERFACE(Editors::IEditor, "Pynoto.IEditor/1.0")
+Q_DECLARE_INTERFACE(Editors::IEditor, "Pynoto.IEditor")
 
 #endif

src/Editors/IEditorPlugin.h

 
 }
 
-Q_DECLARE_INTERFACE(Editors::IEditorPlugin, "Pynoto.IEditorPlugin/1.0")
+Q_DECLARE_INTERFACE(Editors::IEditorPlugin, "Pynoto.IEditorPlugin")
 #endif

src/Editors/ITextEditor.h

 };
 
 }
-Q_DECLARE_INTERFACE(Editors::ITextEditor, "Pynoto.ITextEditor/1.0")
+Q_DECLARE_INTERFACE(Editors::ITextEditor, "Pynoto.ITextEditor")

src/EditorsManager/CMakeLists.txt

-PROJECT(editorsmanager)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
+set(SRC
     IEditorsManagerPlugin.h
     EditorsManagerPlugin.h
-    EditorsContainer.h
-    FindDialog.h
-    HistoryNavigate.h
-    OpenedDocuments.h
-    FocusLineEdit.h
-    Settings.h
-    Preferences/MimeTypes.h
-)
-
-SET(moc
     EditorsManagerPlugin.cpp
+    EditorsContainer.h
     EditorsContainer.cpp
+    FindDialog.h
     FindDialog.cpp
+    HistoryNavigate.h
     HistoryNavigate.cpp
+    OpenedDocuments.h
     OpenedDocuments.cpp
+    FocusLineEdit.h
     FocusLineEdit.cpp
+    Settings.h
     Settings.cpp
+    Preferences/MimeTypes.h
     Preferences/MimeTypes.cpp
 )
 
-SET(res
-)
-
-SET(ui
+SET(UI
     FindDialog.ui
     Preferences/MimeTypes.ui
 )
 
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_wrap_ui(UIC ${UI})
 
-ADD_LIBRARY(editorsmanager
+add_library(editorsmanager
     SHARED
-    ${moc}
-    ${uic}
-    ${qrc}
+    ${SRC}
+    ${UIC}
 )
 
-TARGET_LINK_LIBRARIES(editorsmanager ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(editorsmanager ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(editorsmanager core)
-TARGET_LINK_LIBRARIES(editorsmanager editors)
+target_link_libraries(editorsmanager
+    core
+    editors
+)
+qt5_use_modules(editorsmanager Widgets)

src/EditorsManager/EditorsContainer.cpp

 #include "Include/ITextEditor.h"
 #include "Include/IEditorPlugin.h"
 #include "Include/IDesignerPlugin.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IProjectPlugin.h"
 #include "Include/IProject.h"
 #include "FindDialog.h"

src/EditorsManager/EditorsManagerPlugin.cpp

 }
 
 }
-
-Q_EXPORT_PLUGIN2(editorsmanager, EditorsManager::EditorsManagerPlugin)

src/EditorsManager/EditorsManagerPlugin.h

 class EditorsManagerPlugin : public IEditorsManagerPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IEditorsManagerPlugin")
     Q_INTERFACES(EditorsManager::IEditorsManagerPlugin)
 public:
     virtual ~EditorsManagerPlugin(){}

src/EditorsManager/FindDialog.cpp

 #include "FindDialog.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "EditorsContainer.h"
 #include "ui_FindDialog.h"
 

src/EditorsManager/IEditorsManagerPlugin.h

 
 }
 
-Q_DECLARE_INTERFACE(EditorsManager::IEditorsManagerPlugin, "Pynoto.IEditorsManagerPlugin/1.0")
+Q_DECLARE_INTERFACE(EditorsManager::IEditorsManagerPlugin, "Pynoto.IEditorsManagerPlugin")
 
 #endif

src/EditorsManager/Preferences/MimeTypes.cpp

     connect(_ui->btnAdd, SIGNAL(clicked()), SLOT(addNewItem()));
     connect(_ui->btnDelete, SIGNAL(clicked()), SLOT(deleteItem()));
     _ui->editBox->setEnabled(false);
-    _ui->table->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+    _ui->table->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
     init();
 }
 

src/EditorsManager/Preferences/MimeTypes.h

 #ifndef _MIMETYPES_H_
 #define _MIMETYPES_H_
 #include <QAbstractTableModel>
-#include "IPreferencesPage.h"
+#include "Include/IPreferencesPage.h"
 #include "Settings.h"
 
 namespace Ui {

src/IconProvider/CMakeLists.txt

-PROJECT(iconprovider)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
+set(SRC
     IIconProvider.h
     IconProvider.h
-)
-
-SET(moc
     IconProvider.cpp
 )
 
-SET(res
+set(RES
     IconProvider.qrc
 )
 
-SET(ui
-)
-
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_add_resources(QRC ${RES})
 
-ADD_LIBRARY(iconprovider
+add_library(iconprovider
     SHARED
-    ${moc}
-    ${uic}
-    ${qrc}
+    ${SRC}
+    ${QRC}
 )
 
-TARGET_LINK_LIBRARIES(iconprovider ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(iconprovider ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(iconprovider core)
+qt5_use_modules(iconprovider Widgets)
+target_link_libraries(iconprovider core)

src/IconProvider/IIconProvider.h

 
 }
 
-Q_DECLARE_INTERFACE(IconProvider::IIconProvider, "Pynoto.IIconProvider/1.0")
+Q_DECLARE_INTERFACE(IconProvider::IIconProvider, "Pynoto.IIconProvider")
+
 #endif

src/IconProvider/IconProvider.cpp

 #include <QDebug>
-#include <QtPlugin>
 #include <QApplication>
 #include <QStyle>
 #include <QtPlugin>
 
 }
 
-Q_EXPORT_PLUGIN2(iconprovider, IconProvider::IconProvider)
+

src/IconProvider/IconProvider.h

-#ifndef ICONPROVIDER_H
-#define ICONPROVIDER_H
+#ifndef _ICONPROVIDER_H_
+#define _ICONPROVIDER_H_
 
 #include <QObject>
 #include <QMap>
 class IconProvider : public IIconProvider
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IIconProvider")
     Q_INTERFACES(IconProvider::IIconProvider)
 public:
     IconProvider();
 }
 
 
-#endif // ICONPROVIDER_H
+#endif

src/Include/Aux.h

+#include "Core/Aux.h"

src/Main/BottomDockTitleWidget.cpp

 #include <QDebug>
 #include <QAbstractTableModel>
 #include "BottomDockTitleWidget.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "ui_BottomDockTitleWidget.h"
 
 BottomDockTitleWidget::BottomDockTitleWidget(QWidget *parent) :

src/Main/CMakeLists.txt

-PROJECT(main)
+find_package(Qt5Core)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
-    PynotoWindow.h
-    IMainPlugin.h
-    MainPlugin.h
-    BottomDockTitleWidget.h
-    Console.h
-    SearchResult.h
-    Settings.h
-    #Preferences.h
-    PynotoStyle.h
+add_definitions(-DQT_PLUGIN -DQT_SHARED)
 
+set(CONSOLES
     ConsoleWidget.h
+    ConsoleWidget.cpp
 
     Consoles/IssuesConsole.h
+    Consoles/IssuesConsole.cpp
     Consoles/IssuesTable.h
+    Consoles/IssuesTable.cpp
     Consoles/IssuesConsoleHeader.h
+    Consoles/IssuesConsoleHeader.cpp
 
     Consoles/ApplicationConsole.h
+    Consoles/ApplicationConsole.cpp
     Consoles/ApplicationOutput.h
+    Consoles/ApplicationOutput.cpp
     Consoles/IApplicationOutput.h
+    Consoles/IApplicationOutput.cpp
     Consoles/ApplicationConsoleHeader.h
+    Consoles/ApplicationConsoleHeader.cpp
 
     Consoles/LogConsole.h
+    Consoles/LogConsole.cpp
     Consoles/LogOutput.h
+    Consoles/LogOutput.cpp
     Consoles/LogConsoleHeader.h
-
-    Preferences/GeneralPrefs.h
+    Consoles/LogConsoleHeader.cpp
 )
 
-SET(moc
+set(SRC
+    IMainPlugin.h
+    PynotoWindow.h
     PynotoWindow.cpp
+    MainPlugin.h
     MainPlugin.cpp
+    BottomDockTitleWidget.h
     BottomDockTitleWidget.cpp
+    Console.h
     Console.cpp
+    SearchResult.h
     SearchResult.cpp
+    Settings.h
     Settings.cpp
-    #Preferences.cpp
+    PynotoStyle.h
     PynotoStyle.cpp
-
-    ConsoleWidget.cpp
-
-    Consoles/IssuesConsole.cpp
-    Consoles/IssuesTable.cpp
-    Consoles/IssuesConsoleHeader.cpp
-
-    Consoles/ApplicationConsole.cpp
-    Consoles/ApplicationOutput.cpp
-    Consoles/ApplicationConsoleHeader.cpp
-    Consoles/IApplicationOutput.cpp
-
-    Consoles/LogConsole.cpp
-    Consoles/LogOutput.cpp
-    Consoles/LogConsoleHeader.cpp
-
+    Preferences/GeneralPrefs.h
     Preferences/GeneralPrefs.cpp
 )
 
-SET(res
+set(RES
     Pynoto.qrc
 )
 
-SET(ui
+set(UI
     PynotoWindow.ui
     BottomDockTitleWidget.ui
     ConsoleWidget.ui
     Consoles/IssuesConsoleHeader.ui
     Consoles/ApplicationConsoleHeader.ui
     Consoles/LogConsoleHeader.ui
-
     Preferences/GeneralPrefs.ui
 )
 
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_add_resources(QRC ${RES})
+qt5_wrap_ui(UIC ${UI})
 
-ADD_LIBRARY(main
+add_library(main
     SHARED
-    ${moc}
-    ${uic}
-    ${qrc}
+    ${SRC}
+    ${CONSOLES}
+    ${UIC}
+    ${QRC}
 )
 
-TARGET_LINK_LIBRARIES(main ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(main ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(main core)
+qt5_use_modules(main Widgets)
+
+target_link_libraries(main
+    core
+)

src/Main/ConsoleWidget.cpp

 #include "Consoles/IssuesConsole.h"
 #include "Consoles/ApplicationConsole.h"
 #include "Consoles/LogConsole.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 #include "ConsoleWidget.h"
 #include "ui_ConsoleWidget.h"

src/Main/Consoles/ApplicationConsoleHeader.cpp

 #include "ApplicationConsoleHeader.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 #include "ui_ApplicationConsoleHeader.h"
 

src/Main/Consoles/IssuesConsoleHeader.cpp

 #include "IssuesConsoleHeader.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 #include "ui_IssuesConsoleHeader.h"
 

src/Main/Consoles/LogConsoleHeader.cpp

 #include "LogConsoleHeader.h"
 #include "ui_LogConsoleHeader.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 
 namespace Main {

src/Main/Consoles/LogOutput.cpp

 #include <QDebug>
 #include "LogOutput.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IProjectPlugin.h"
 #include "Include/IPythonCode.h"
 

src/Main/IMainPlugin.h

 };
 
 }
-Q_DECLARE_INTERFACE(Main::IMainPlugin, "Pynoto.IMainPlugin/1.0")
+Q_DECLARE_INTERFACE(Main::IMainPlugin, "Pynoto.IMainPlugin")
 #endif

src/Main/MainPlugin.cpp

 }
 }
 
-Q_EXPORT_PLUGIN2(main, Main::MainPlugin)

src/Main/MainPlugin.h

 class MainPlugin: public IMainPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IMainPlugin")
     Q_INTERFACES(Main::IMainPlugin)
 public:
     MainPlugin();

src/Main/PynotoStyle.cpp

 #include <QComboBox>
 #include <QPainter>
 #include <QTimer>
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 #include "PynotoStyle.h"
 #include "Settings.h"

src/Main/PynotoWindow.cpp

 #include <QToolButton>
 #include "PynotoWindow.h"
 #include "ui_PynotoWindow.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/PluginManager.h"
 #include "Include/IProjectPlugin.h"
 #include "Settings.h"

src/Preferences/CMakeLists.txt

-PROJECT(preferences)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
-    PreferencesWindow.h
+set(SRC
     IPreferencesPlugin.h
-    PreferencesPlugin.h
-)
-
-SET(moc
+    PreferencesWindow.h
     PreferencesWindow.cpp
+    PreferencesPlugin.h
     PreferencesPlugin.cpp
 )
 
-SET(res
-)
-
-SET(ui
+set(UI
     PreferencesWindow.ui
 )
 
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_wrap_ui(UIC ${UI})
 
-ADD_LIBRARY(preferences
+add_library(preferences
     SHARED
-    ${moc}
-    ${uic}
-    ${qrc}
+    ${SRC}
+    ${UIC}
 )
 
-TARGET_LINK_LIBRARIES(preferences ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(preferences ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(preferences core)
+target_link_libraries(preferences core)
+qt5_use_modules(preferences Widgets)

src/Preferences/IPreferencesPlugin.h

 
 }
 
-Q_DECLARE_INTERFACE(Preferences::IPreferencesPlugin, "Pynoto.IPreferencesPlugin/1.0")
+Q_DECLARE_INTERFACE(Preferences::IPreferencesPlugin, "Pynoto.IPreferencesPlugin")
 
 #endif

src/Preferences/PreferencesPlugin.cpp

 #include <QtPlugin>
 #include <QApplication>
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "PreferencesPlugin.h"
 #include "PreferencesWindow.h"
 
 }
 
 }
-
-Q_EXPORT_PLUGIN2(preferences, Preferences::PreferencesPlugin)

src/Preferences/PreferencesPlugin.h

 class PreferencesPlugin: public IPreferencesPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IPreferencesPlugin")
     Q_INTERFACES(Preferences::IPreferencesPlugin)
 public:
     virtual ~PreferencesPlugin(){}

src/Preferences/PreferencesWindow.cpp

 #include <QDebug>
 #include <QAbstractButton>
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IIconProvider.h"
 #include "PreferencesWindow.h"
 #include "ui_PreferencesWindow.h"

src/Project/CMakeLists.txt

-PROJECT(project)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
-
-SET(moc_hdrs
-    IProject.h
-    IProjectPlugin.h
-    ProjectPlugin.h
-    ProjectManagerWidget.h
-    ProjectFile.h
-    ProjectTreeModel.h
-    Node.h
-    ProjectRunner.h
-    Properties/ProjectProperties.h
-    Properties/General.h
-    Properties/CodeCheck.h
-    CreateProjectDlg.h
-    Properties/PathesModel.h
+set(NEWITEMS
     NewItems/Template.h
+    NewItems/Template.cpp
     NewItems/CreateNewPage.h
+    NewItems/CreateNewPage.cpp
     NewItems/AddNewWizard.h
+    NewItems/AddNewWizard.cpp
     NewItems/SelectTypePage.h
+    NewItems/SelectTypePage.cpp
     NewItems/PythonClassPage.h
+    NewItems/PythonClassPage.cpp
     NewItems/PythonFilePage.h
+    NewItems/PythonFilePage.cpp
     NewItems/PythonModulePage.h
+    NewItems/PythonModulePage.cpp
     NewItems/PythonQtClassPage.h
+    NewItems/PythonQtClassPage.cpp
     NewItems/QtDesignerPage.h
-    RenameDialog.h
+    NewItems/QtDesignerPage.cpp
 )
 
-SET(moc
+set(SRC
+    IProject.h
+    IProjectPlugin.h
+
+    ProjectPlugin.h
     ProjectPlugin.cpp
+    ProjectManagerWidget.h
     ProjectManagerWidget.cpp
+    ProjectFile.h
     ProjectFile.cpp
+    ProjectTreeModel.h
     ProjectTreeModel.cpp
+    Node.h
     Node.cpp
+    ProjectRunner.h
     ProjectRunner.cpp
+    CreateProjectDlg.h
+    CreateProjectDlg.cpp
+    RenameDialog.h
+    RenameDialog.cpp
+
+    Properties/ProjectProperties.h
     Properties/ProjectProperties.cpp
+    Properties/General.h
     Properties/General.cpp
+    Properties/CodeCheck.h
     Properties/CodeCheck.cpp
-    CreateProjectDlg.cpp
+    Properties/PathesModel.h
     Properties/PathesModel.cpp
-    NewItems/Template.cpp
-    NewItems/CreateNewPage.cpp
-    NewItems/AddNewWizard.cpp
-    NewItems/SelectTypePage.cpp
-    NewItems/PythonClassPage.cpp
-    NewItems/PythonFilePage.cpp
-    NewItems/PythonModulePage.cpp
-    NewItems/PythonQtClassPage.cpp
-    NewItems/QtDesignerPage.cpp
-    RenameDialog.cpp
-)
-
-SET(res
 )
 
-SET(ui
+set(ui
     Properties/ProjectProperties.ui
     Properties/General.ui
     Properties/CodeCheck.ui
     RenameDialog.ui
 )
 
-QT4_ADD_RESOURCES(qrc ${res})
-QT4_WRAP_UI(uic ${ui})
-QT4_WRAP_CPP(moc ${moc_hdrs})
+qt5_add_resources(qrc ${res})
+qt5_wrap_ui(uic ${ui})
 
-ADD_LIBRARY(project
+add_library(project
     SHARED
-    ${moc}
+    ${SRC}
+    ${NEWITEMS}
     ${uic}
-    ${qrc}
 )
 
-TARGET_LINK_LIBRARIES(project ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(project ${QT_QTGUI_LIBRARY})
-TARGET_LINK_LIBRARIES(project core)
+target_link_libraries(project core)
+qt5_use_modules(project Widgets)

src/Project/IProjectPlugin.h

 
 }
 
-Q_DECLARE_INTERFACE(Project::IProjectPlugin, "Pynoto.IProjectPlugin/1.0")
+Q_DECLARE_INTERFACE(Project::IProjectPlugin, "Pynoto.IProjectPlugin")
 
 #endif

src/Project/ProjectFile.cpp

 #include <QDir>
 #include <QTimer>
 #include "ProjectFile.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IPythonCodePlugin.h"
 #include "Include/IPythonCode.h"
 #include "Include/IPythonPlugin.h"

src/Project/ProjectManagerWidget.cpp

 #include "NewItems/AddNewWizard.h"
 #include "RenameDialog.h"
 #include "Include/IDesignerPlugin.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 
 namespace Project {
 

src/Project/ProjectPlugin.cpp

 }
 
 }
-
-Q_EXPORT_PLUGIN2(project, Project::ProjectPlugin)

src/Project/ProjectPlugin.h

 class ProjectPlugin: public IProjectPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "Pynoto.IProjectPlugin")
     Q_INTERFACES(Project::IProjectPlugin)
 public:
     ProjectPlugin();

src/Project/ProjectTreeModel.cpp

 #include "IProject.h"
 #include "ProjectTreeModel.h"
 #include "Node.h"
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 
 namespace Project {
 

src/Project/Properties/General.cpp

 #include <QFileDialog>
-#include "Include/PynotoApplication.h"
+#include "Include/Aux.h"
 #include "Include/IPythonPlugin.h"
 #include "General.h"
 #include "PathesModel.h"

src/Python/CMakeLists.txt

-PROJECT(python)
+find_package(Qt5Widgets)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-
-ADD_DEFINITIONS(-DQT_PLUGIN)
-ADD_DEFINITIONS(-DQT_SHARED)
+set(SRC
+    IPythonPlugin.h
 
-SET(hdrs
     PythonInfo.h
-)
-
-SET(src
     PythonInfo.cpp
-)
-
-SET(moc_hdrs
-    IPythonPlugin.h
     PythonPlugin.h
-    Preferences/SetupPyVersions.h
-    Preferences/PathesModel.h
-    Preferences/PyVersionsModel.h
-    Settings.h
-)
-
-SET(moc
     PythonPlugin.cpp
+    Settings.h
+    Settings.cpp
+    Preferences/SetupPyVersions.h
     Preferences/SetupPyVersions.cpp
+    Preferences/PathesModel.h
     Preferences/PathesModel.cpp
+    Preferences/PyVersionsModel.h
     Preferences/PyVersionsModel.cpp
-    Settings.cpp
 )
 
-SET(res
-)
 
-SET(ui
+set(UI