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
......@@ -10,16 +10,45 @@ INCLUDEPATH += $$PWD
contains(DEFINES, QMLOBSERVER) {
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) {
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) {
warning()
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( qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qml/qmljsdebugger)
warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
warning("Please specify its location on the qmake command line, eg")
warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
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
} else {
include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
......
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