diff options
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 |