summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/shared/scriptdialog.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-19 11:47:26 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-19 11:47:26 (GMT)
commita1e9064df37b4d82a239d86d1c4822b37d47f4d6 (patch)
treea5fce220dc6d533563b83368d0b2495c7252757f /tools/designer/src/lib/shared/scriptdialog.cpp
parent660a11df364615b390fc18d6e7c601eb24476948 (diff)
downloadQt-a1e9064df37b4d82a239d86d1c4822b37d47f4d6.zip
Qt-a1e9064df37b4d82a239d86d1c4822b37d47f4d6.tar.gz
Qt-a1e9064df37b4d82a239d86d1c4822b37d47f4d6.tar.bz2
make Qt Designer compile when Qt is configured with -no-script
Diffstat (limited to 'tools/designer/src/lib/shared/scriptdialog.cpp')
-rw-r--r--tools/designer/src/lib/shared/scriptdialog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/designer/src/lib/shared/scriptdialog.cpp b/tools/designer/src/lib/shared/scriptdialog.cpp
index f46c40a..340bc82 100644
--- a/tools/designer/src/lib/shared/scriptdialog.cpp
+++ b/tools/designer/src/lib/shared/scriptdialog.cpp
@@ -49,7 +49,9 @@
#include <QtGui/QHBoxLayout>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QMessageBox>
+#ifdef QT_SCRIPT_LIB
#include <QtScript/QScriptEngine>
+#endif
QT_BEGIN_NAMESPACE
@@ -112,12 +114,16 @@ variables <i>widget</i> and <i>childWidgets</i>, respectively.");
const QString script = trimmedScript();
if (script.isEmpty())
return true;
+#ifdef QT_SCRIPT_LIB
QScriptEngine scriptEngine;
if (scriptEngine.canEvaluate(script))
return true;
m_dialogGui->message(this, QDesignerDialogGuiInterface::ScriptDialogMessage, QMessageBox::Warning,
windowTitle(), tr("Syntax error"), QMessageBox::Ok);
return false;
+#else
+ return true;
+#endif
}
} // namespace qdesigner_internal