Commit 7caeb1d6 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix compilation with Qt5.



- Add missing QtScript module (pulled by json in utils
- Include type definitions for Q_DECLARE_METATYPE
- Unconditionally include QtSvg in Qt5

Change-Id: If298dd98fb660a6ba701f1ba36ced2d2027ea3e8
Reviewed-by: default avatarMiikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 622cac50
...@@ -2,6 +2,7 @@ TEMPLATE = lib ...@@ -2,6 +2,7 @@ TEMPLATE = lib
TARGET = QmlJS TARGET = QmlJS
DEFINES += QMLJS_BUILD_DIR QT_CREATOR DEFINES += QMLJS_BUILD_DIR QT_CREATOR
QT +=script
include(../../qtcreatorlibrary.pri) include(../../qtcreatorlibrary.pri)
include(qmljs-lib.pri) include(qmljs-lib.pri)
include(../utils/utils.pri) include(../utils/utils.pri)
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#include <cplusplus/Overview.h> #include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.h> #include <cplusplus/TypeOfExpression.h>
#include <cplusplus/CppDocument.h> #include <cplusplus/CppDocument.h>
#if QT_VERSION >= 0x050000
// Qt 5 requires the types to be defined for Q_DECLARE_METATYPE
# include <cplusplus/Symbol.h>
#endif
#include <texteditor/codeassist/completionassistprovider.h> #include <texteditor/codeassist/completionassistprovider.h>
#include <texteditor/codeassist/iassistprocessor.h> #include <texteditor/codeassist/iassistprocessor.h>
......
...@@ -26,7 +26,11 @@ RESOURCES += \ ...@@ -26,7 +26,11 @@ RESOURCES += \
OTHER_FILES += \ OTHER_FILES += \
ImageViewer.mimetypes.xml ImageViewer.mimetypes.xml
contains(QT_CONFIG, svg):QT += svg greaterThan(QT_MAJOR_VERSION, 4) {
!isEmpty(QT.svg.name): QT += svg
} else {
contains(QT_CONFIG, svg):QT += svg
}
FORMS += \ FORMS += \
imageviewertoolbar.ui imageviewertoolbar.ui
...@@ -35,11 +35,18 @@ ...@@ -35,11 +35,18 @@
#include <QtCore/QMetaType> #include <QtCore/QMetaType>
#if QT_VERSION >= 0x050000
// Qt 5 requires the types to be defined.
# include "iprojectmanager.h"
# include "session.h"
# include "project.h"
#else
namespace ProjectExplorer { namespace ProjectExplorer {
class IProjectManager; class IProjectManager;
class SessionManager; class SessionManager;
class Project; class Project;
} }
#endif // QT_VERSION < 0x050000
Q_DECLARE_METATYPE(QList<ProjectExplorer::Project*>) Q_DECLARE_METATYPE(QList<ProjectExplorer::Project*>)
Q_DECLARE_METATYPE(ProjectExplorer::SessionManager*) Q_DECLARE_METATYPE(ProjectExplorer::SessionManager*)
......
...@@ -2,6 +2,7 @@ TEMPLATE = lib ...@@ -2,6 +2,7 @@ TEMPLATE = lib
TARGET = QmlJSEditor TARGET = QmlJSEditor
include(../../qtcreatorplugin.pri) include(../../qtcreatorplugin.pri)
include(qmljseditor_dependencies.pri) include(qmljseditor_dependencies.pri)
QT += script
DEFINES += \ DEFINES += \
QMLJSEDITOR_LIBRARY \ QMLJSEDITOR_LIBRARY \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment