summaryrefslogtreecommitdiffstats
path: root/tools/designer
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-21 07:23:33 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-21 07:23:33 (GMT)
commit45357546c29240b95300f392084a2fe901073d85 (patch)
treeaca89043c1bd80a3a7515402ee0fbb55b9cbf6ee /tools/designer
parent2e645960930442e895f887f1ef5e226d14eabcc7 (diff)
parentf11fc8f62558543dac1eca9d52a4801196c55221 (diff)
downloadQt-45357546c29240b95300f392084a2fe901073d85.zip
Qt-45357546c29240b95300f392084a2fe901073d85.tar.gz
Qt-45357546c29240b95300f392084a2fe901073d85.tar.bz2
Merge commit 'qt/master'
Conflicts: configure.exe examples/examples.pro qmake/Makefile.unix qmake/Makefile.win32 qmake/Makefile.win32-g++ qmake/Makefile.win32-g++-sh qmake/qmake.pro src/script/api/qscriptable.h src/script/api/qscriptclasspropertyiterator.h src/script/api/qscriptcontext.h src/script/api/qscriptengineagent.cpp src/script/api/qscriptstring.cpp src/script/api/qscriptstring.h src/script/api/qscriptvalueiterator.cpp src/script/api/qscriptvalueiterator.h src/script/qscriptclass.cpp src/script/qscriptcontext.cpp src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptvalue.cpp src/script/qscriptvalue_p.h src/script/qscriptvalueimplfwd_p.h src/script/script.pro src/src.pro tests/auto/auto.pro tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp tools/configure/configureapp.cpp
Diffstat (limited to 'tools/designer')
-rw-r--r--tools/designer/src/components/lib/lib.pro5
-rw-r--r--tools/designer/src/designer/designer.pro3
-rw-r--r--tools/designer/src/lib/shared/qdesigner_formbuilder.cpp6
-rw-r--r--tools/designer/src/lib/shared/qsimpleresource.cpp2
-rw-r--r--tools/designer/src/lib/shared/scriptdialog.cpp6
-rw-r--r--tools/designer/src/lib/shared/shared.pri2
-rw-r--r--tools/designer/src/lib/uilib/uilib.pri1
7 files changed, 22 insertions, 3 deletions
diff --git a/tools/designer/src/components/lib/lib.pro b/tools/designer/src/components/lib/lib.pro
index 92cf387..8d0e692 100644
--- a/tools/designer/src/components/lib/lib.pro
+++ b/tools/designer/src/components/lib/lib.pro
@@ -64,7 +64,10 @@ PRECOMPILED_HEADER= lib_pch.h
include(../../sharedcomponents.pri)
include(../component.pri)
-unix:QMAKE_PKGCONFIG_REQUIRES = QtCore QtDesigner QtGui QtScript QtXml
+unix {
+ QMAKE_PKGCONFIG_REQUIRES = QtCore QtDesigner QtGui QtXml
+ contains(QT_CONFIG, script): QMAKE_PKGCONFIG_REQUIRES += QtScript
+}
target.path=$$[QT_INSTALL_LIBS]
INSTALLS += target
diff --git a/tools/designer/src/designer/designer.pro b/tools/designer/src/designer/designer.pro
index aa6850c..2050c72 100644
--- a/tools/designer/src/designer/designer.pro
+++ b/tools/designer/src/designer/designer.pro
@@ -1,6 +1,7 @@
DESTDIR = ../../../../bin
-QT += xml network script
+QT += xml network
+contains(QT_CONFIG, script): QT += script
build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
diff --git a/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp b/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp
index 454439e..5e3a9b6 100644
--- a/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_formbuilder.cpp
@@ -83,6 +83,7 @@
QT_BEGIN_NAMESPACE
+#ifndef QT_FORMBUILDER_NO_SCRIPT
static QString summarizeScriptErrors(const QFormScriptRunner::Errors &errors)
{
QString rc = QCoreApplication::translate("QDesignerFormBuilder", "Script errors occurred:");
@@ -92,6 +93,7 @@ static QString summarizeScriptErrors(const QFormScriptRunner::Errors &errors)
}
return rc;
}
+#endif
namespace qdesigner_internal {
@@ -108,6 +110,7 @@ QDesignerFormBuilder::QDesignerFormBuilder(QDesignerFormEditorInterface *core,
m_mainWidget(true)
{
Q_ASSERT(m_core);
+#ifndef QT_FORMBUILDER_NO_SCRIPT
// Disable scripting in the editors.
QFormScriptRunner::Options options = formScriptRunner()->options();
switch (m_mode) {
@@ -120,6 +123,7 @@ QDesignerFormBuilder::QDesignerFormBuilder(QDesignerFormEditorInterface *core,
break;
}
formScriptRunner()-> setOptions(options);
+#endif
}
QString QDesignerFormBuilder::systemStyle() const
@@ -400,6 +404,7 @@ QWidget *QDesignerFormBuilder::createPreview(const QDesignerFormWindowInterface
WidgetFactory::applyStyleToTopLevel(wf->getStyle(styleToUse), widget);
}
}
+#ifndef QT_FORMBUILDER_NO_SCRIPT
// Check for script errors
*scriptErrors = builder.formScriptRunner()->errors();
if (!scriptErrors->empty()) {
@@ -407,6 +412,7 @@ QWidget *QDesignerFormBuilder::createPreview(const QDesignerFormWindowInterface
delete widget;
return 0;
}
+#endif
// Fake application style sheet by prepending. (If this doesn't work, fake by nesting
// into parent widget).
if (!appStyleSheet.isEmpty()) {
diff --git a/tools/designer/src/lib/shared/qsimpleresource.cpp b/tools/designer/src/lib/shared/qsimpleresource.cpp
index 64e690f..3c7f032 100644
--- a/tools/designer/src/lib/shared/qsimpleresource.cpp
+++ b/tools/designer/src/lib/shared/qsimpleresource.cpp
@@ -81,8 +81,10 @@ QSimpleResource::QSimpleResource(QDesignerFormEditorInterface *core) :
workingDirectory += QDir::separator();
workingDirectory += QLatin1String(".designer");
setWorkingDirectory(QDir(workingDirectory));
+#ifndef QT_FORMBUILDER_NO_SCRIPT
// Disable scripting in the editors.
formScriptRunner()-> setOptions(QFormScriptRunner::DisableScripts);
+#endif
}
QSimpleResource::~QSimpleResource()
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
diff --git a/tools/designer/src/lib/shared/shared.pri b/tools/designer/src/lib/shared/shared.pri
index 8ed051a..570b208 100644
--- a/tools/designer/src/lib/shared/shared.pri
+++ b/tools/designer/src/lib/shared/shared.pri
@@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
-QT += script
+contains(QT_CONFIG, script): QT += script
include($$QT_SOURCE_TREE/tools/shared/qtpropertybrowser/qtpropertybrowser.pri)
include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri)
diff --git a/tools/designer/src/lib/uilib/uilib.pri b/tools/designer/src/lib/uilib/uilib.pri
index cbf415b..2072fbc 100644
--- a/tools/designer/src/lib/uilib/uilib.pri
+++ b/tools/designer/src/lib/uilib/uilib.pri
@@ -2,6 +2,7 @@
INCLUDEPATH += $$PWD
DEFINES += QT_DESIGNER
+!contains(QT_CONFIG, script): DEFINES += QT_FORMBUILDER_NO_SCRIPT
# Input
HEADERS += \