diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-19 11:47:26 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-19 11:47:26 (GMT) |
commit | a1e9064df37b4d82a239d86d1c4822b37d47f4d6 (patch) | |
tree | a5fce220dc6d533563b83368d0b2495c7252757f /tools/designer/src/lib/shared/scriptdialog.cpp | |
parent | 660a11df364615b390fc18d6e7c601eb24476948 (diff) | |
download | Qt-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.cpp | 6 |
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 |