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: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint
2012-02-09 10:33:49 +01:00
parent 622cac50f4
commit 7caeb1d627
5 changed files with 18 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ TEMPLATE = lib
TARGET = QmlJS
DEFINES += QMLJS_BUILD_DIR QT_CREATOR
QT +=script
include(../../qtcreatorlibrary.pri)
include(qmljs-lib.pri)
include(../utils/utils.pri)

View File

@@ -37,6 +37,10 @@
#include <cplusplus/Overview.h>
#include <cplusplus/TypeOfExpression.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/iassistprocessor.h>

View File

@@ -26,7 +26,11 @@ RESOURCES += \
OTHER_FILES += \
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 += \
imageviewertoolbar.ui

View File

@@ -35,11 +35,18 @@
#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 {
class IProjectManager;
class SessionManager;
class Project;
}
#endif // QT_VERSION < 0x050000
Q_DECLARE_METATYPE(QList<ProjectExplorer::Project*>)
Q_DECLARE_METATYPE(ProjectExplorer::SessionManager*)

View File

@@ -2,6 +2,7 @@ TEMPLATE = lib
TARGET = QmlJSEditor
include(../../qtcreatorplugin.pri)
include(qmljseditor_dependencies.pri)
QT += script
DEFINES += \
QMLJSEDITOR_LIBRARY \