Skip to content
Snippets Groups Projects
Commit 3e080e08 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlJSDebugger: Check for Qt 4.7.1 or newer before enabling qml debugging

Reviewed-by: Christiaan Janssen
parent 6929d66f
No related branches found
No related tags found
No related merge requests found
...@@ -10,16 +10,45 @@ INCLUDEPATH += $$PWD ...@@ -10,16 +10,45 @@ INCLUDEPATH += $$PWD
contains(DEFINES, QMLOBSERVER) { contains(DEFINES, QMLOBSERVER) {
DEFINES *= QMLJSDEBUGGER DEFINES *= QMLJSDEBUGGER
} }
defineTest(minQtVersion) {
maj = $$1
min = $$2
patch = $$3
isEqual(QT_MAJOR_VERSION, $$maj) {
isEqual(QT_MINOR_VERSION, $$min) {
isEqual(QT_PATCH_VERSION, $$patch) {
return(true)
}
greaterThan(QT_PATCH_VERSION, $$patch) {
return(true)
}
}
greaterThan(QT_MINOR_VERSION, $$min) {
return(true)
}
}
return(false)
}
contains(DEFINES, QMLJSDEBUGGER) { contains(DEFINES, QMLJSDEBUGGER) {
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {
!minQtVersion(4, 7, 1) {
warning()
warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
warning("This library requires Qt 4.7.1 or newer.")
warning()
error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.")
}
isEmpty(QMLJSDEBUGGER_PATH) { isEmpty(QMLJSDEBUGGER_PATH) {
warning() warning()
warning(Debugging QML requires the qmljsdebugger library that ships with Qt Creator.) warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
warning(Please specify its location on the qmake command line, e.g.) warning("Please specify its location on the qmake command line, eg")
warning( qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qml/qmljsdebugger) warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
warning() warning()
error(QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.) error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.")
DEFINES -= QMLJSDEBUGGER DEFINES -= QMLJSDEBUGGER
} else { } else {
include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment