From 1d1d2f0b748e33caaa78d9b14fb34847cd0323f7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint <Friedemann.Kleint@nokia.com> Date: Wed, 8 Feb 2012 14:44:30 +0100 Subject: [PATCH] Compile with Qt 5. - QtQuick1 renaming. - Start on qtconcurrent split (pending renaming of Qt Creator's qtconcurrent library). - QWinEventNotifier is a public class in Qt 5. - Metatype system: Classes need to be known. Change-Id: I5582e7cc2777bf791a08b049262217055769c80f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> --- qtcreator.pri | 2 +- src/libs/cplusplus/cplusplus-lib.pri | 2 ++ src/libs/qtcomponents/styleitem/styleitem.pro | 7 +++++-- src/libs/qtconcurrent/qtconcurrent.pro | 2 ++ src/libs/utils/consoleprocess_p.h | 9 ++++++--- src/libs/utils/utils.pro | 13 ++++++------- .../coreplugin/actionmanager/commandmappings.cpp | 1 + src/plugins/coreplugin/coreplugin.pro | 2 +- src/plugins/locator/locator.pro | 1 + src/plugins/updateinfo/updateinfo.pro | 1 + src/shared/symbianutils/virtualserialdevice_win.cpp | 6 +++++- 11 files changed, 31 insertions(+), 15 deletions(-) diff --git a/qtcreator.pri b/qtcreator.pri index f0599b63350..23777db090f 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -157,5 +157,5 @@ win32-msvc* { qt:greaterThan(QT_MAJOR_VERSION, 4) { contains(QT, gui): QT += widgets - contains(QT, declarative): QT += qtquick1 + contains(QT, declarative): QT += quick1 } diff --git a/src/libs/cplusplus/cplusplus-lib.pri b/src/libs/cplusplus/cplusplus-lib.pri index d4e12f05999..57b2e2ffdf8 100644 --- a/src/libs/cplusplus/cplusplus-lib.pri +++ b/src/libs/cplusplus/cplusplus-lib.pri @@ -8,6 +8,8 @@ INCLUDEPATH += $$PWD include(../3rdparty/cplusplus/cplusplus.pri) +greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent + contains(QT, gui) { HEADERS += \ $$PWD/Icons.h \ diff --git a/src/libs/qtcomponents/styleitem/styleitem.pro b/src/libs/qtcomponents/styleitem/styleitem.pro index c7a44f09a01..59f892d6490 100644 --- a/src/libs/qtcomponents/styleitem/styleitem.pro +++ b/src/libs/qtcomponents/styleitem/styleitem.pro @@ -1,8 +1,11 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative QT += script -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets qtquick1 +greaterThan(QT_MAJOR_VERSION, 4) { + QT += widgets quick1 +} else { + QT += declarative +} TARGET = styleplugin include(../../../../qtcreator.pri) diff --git a/src/libs/qtconcurrent/qtconcurrent.pro b/src/libs/qtconcurrent/qtconcurrent.pro index b80e4ffd92f..f6a84499cc3 100644 --- a/src/libs/qtconcurrent/qtconcurrent.pro +++ b/src/libs/qtconcurrent/qtconcurrent.pro @@ -4,6 +4,8 @@ DEFINES += BUILD_QTCONCURRENT include(../../qtcreatorlibrary.pri) +greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent + HEADERS += \ qtconcurrent_global.h \ multitask.h \ diff --git a/src/libs/utils/consoleprocess_p.h b/src/libs/utils/consoleprocess_p.h index dabce8547a3..36c5281acba 100644 --- a/src/libs/utils/consoleprocess_p.h +++ b/src/libs/utils/consoleprocess_p.h @@ -41,9 +41,12 @@ #include <QtNetwork/QLocalServer> #ifdef Q_OS_WIN -#include <QtCore/private/qwineventnotifier_p.h> - -#include <windows.h> +# if QT_VERSION >= 0x050000 +# include <QtCore/QWinEventNotifier> +# else +# include <QtCore/private/qwineventnotifier_p.h> +# endif +# include <windows.h> #endif namespace Utils { diff --git a/src/libs/utils/utils.pro b/src/libs/utils/utils.pro index 5762de36313..2d8ef2be45f 100644 --- a/src/libs/utils/utils.pro +++ b/src/libs/utils/utils.pro @@ -7,13 +7,12 @@ include(../../qtcreatorlibrary.pri) include(utils_dependencies.pri) include(utils-lib.pri) -# Needed for QtCore/private/qwineventnotifier_p.h -win32 { - greaterThan(QT_MAJOR_VERSION, 4) { - QT += core-private - } else { - include(../../private_headers.pri) - } + +greaterThan(QT_MAJOR_VERSION, 4) { + QT += concurrent +} else { +# Needed for QtCore/private/qwineventnotifier_p.h + win32:include(../../private_headers.pri) } HEADERS += \ diff --git a/src/plugins/coreplugin/actionmanager/commandmappings.cpp b/src/plugins/coreplugin/actionmanager/commandmappings.cpp index 1934f280f0e..69060ff2c9e 100644 --- a/src/plugins/coreplugin/actionmanager/commandmappings.cpp +++ b/src/plugins/coreplugin/actionmanager/commandmappings.cpp @@ -31,6 +31,7 @@ **************************************************************************/ #include "commandmappings.h" +#include "shortcutsettings.h" #include "ui_commandmappings.h" #include "actionmanager_p.h" #include "actionmanager/command.h" diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index fe78c4b5588..af115d56a0a 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -4,7 +4,7 @@ DEFINES += CORE_LIBRARY QT += network \ script \ sql -greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport +greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport concurrent CONFIG += help include(../../qtcreatorplugin.pri) diff --git a/src/plugins/locator/locator.pro b/src/plugins/locator/locator.pro index fab92816fc9..e1e3ed5b05e 100644 --- a/src/plugins/locator/locator.pro +++ b/src/plugins/locator/locator.pro @@ -2,6 +2,7 @@ TEMPLATE = lib TARGET = Locator DEFINES += LOCATOR_LIBRARY include(../../qtcreatorplugin.pri) +greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent include(locator_dependencies.pri) HEADERS += locatorplugin.h \ commandlocator.h \ diff --git a/src/plugins/updateinfo/updateinfo.pro b/src/plugins/updateinfo/updateinfo.pro index fb3a2b31182..25f686dfcbf 100644 --- a/src/plugins/updateinfo/updateinfo.pro +++ b/src/plugins/updateinfo/updateinfo.pro @@ -1,6 +1,7 @@ TARGET = UpdateInfo TEMPLATE = lib QT += network xml +greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent HEADERS += updateinfoplugin.h \ updateinfobutton.h diff --git a/src/shared/symbianutils/virtualserialdevice_win.cpp b/src/shared/symbianutils/virtualserialdevice_win.cpp index fd6df6061fa..edc55f19aad 100644 --- a/src/shared/symbianutils/virtualserialdevice_win.cpp +++ b/src/shared/symbianutils/virtualserialdevice_win.cpp @@ -32,7 +32,11 @@ #include "virtualserialdevice.h" #include <windows.h> -#include <QtCore/private/qwineventnotifier_p.h> +#if QT_VERSION >= 0x050000 +# include <QtCore/QWinEventNotifier> +#else +# include <QtCore/private/qwineventnotifier_p.h> +#endif #include <QtCore/QThread> #include <QtCore/QWaitCondition> -- GitLab