summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp33
-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
8 files changed, 47 insertions, 11 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 730809431a..365167eeab 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -241,7 +241,8 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "CE_CRT" ] = "no";
dictionary[ "CETEST" ] = "auto";
dictionary[ "CE_SIGNATURE" ] = "no";
- dictionary[ "SCRIPTTOOLS" ] = "yes";
+ dictionary[ "SCRIPT" ] = "auto";
+ dictionary[ "SCRIPTTOOLS" ] = "auto";
dictionary[ "XMLPATTERNS" ] = "auto";
dictionary[ "PHONON" ] = "auto";
dictionary[ "PHONON_BACKEND" ] = "yes";
@@ -874,6 +875,10 @@ void Configure::parseCmdLine()
dictionary[ "DBUS" ] = "yes";
} else if( configCmdLine.at(i) == "-dbus-linked" ) {
dictionary[ "DBUS" ] = "linked";
+ } else if( configCmdLine.at(i) == "-no-script" ) {
+ dictionary[ "SCRIPT" ] = "no";
+ } else if( configCmdLine.at(i) == "-script" ) {
+ dictionary[ "SCRIPT" ] = "yes";
} else if( configCmdLine.at(i) == "-no-scripttools" ) {
dictionary[ "SCRIPTTOOLS" ] = "no";
} else if( configCmdLine.at(i) == "-scripttools" ) {
@@ -1553,9 +1558,8 @@ bool Configure::displayHelp()
"[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n"
"[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n"
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
- "[-no-multimedia] [-multimedia]\n"
- "[-no-webkit] [-webkit]\n"
- "[-no-scripttools] [-scripttools]\n"
+ "[-no-multimedia] [-multimedia] [-no-webkit] [-webkit]\n"
+ "[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1738,6 +1742,8 @@ bool Configure::displayHelp()
desc("MULTIMEDIA", "yes","-multimedia", "Compile in multimedia module");
desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module");
desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)");
+ desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module.");
+ desc("SCRIPT", "yes", "-script", "Build the QtScript module.");
desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module.");
desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module.");
@@ -2024,10 +2030,8 @@ bool Configure::checkAvailability(const QString &part)
}
} else if (part == "MULTIMEDIA") {
available = true;
- } else if (part == "WEBKIT") {
+ } else if (part == "WEBKIT" || part == "SCRIPT" || part == "SCRIPTTOOLS") {
available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
- } else if (part == "SCRIPTTOOLS") {
- available = true;
}
return available;
@@ -2104,6 +2108,8 @@ void Configure::autoDetection()
dictionary["OPENSSL"] = checkAvailability("OPENSSL") ? "yes" : "no";
if (dictionary["DBUS"] == "auto")
dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no";
+ if (dictionary["SCRIPT"] == "auto")
+ dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no";
if (dictionary["SCRIPTTOOLS"] == "auto")
dictionary["SCRIPTTOOLS"] = checkAvailability("SCRIPTTOOLS") ? "yes" : "no";
if (dictionary["XMLPATTERNS"] == "auto")
@@ -2472,8 +2478,17 @@ void Configure::generateOutputVars()
if (dictionary[ "CETEST" ] == "yes")
qtConfig += "cetest";
- if (dictionary[ "SCRIPTTOOLS" ] == "yes")
+ if (dictionary[ "SCRIPT" ] == "yes")
+ qtConfig += "script";
+
+ if (dictionary[ "SCRIPTTOOLS" ] == "yes") {
+ if (dictionary[ "SCRIPT" ] == "no") {
+ cout << "QtScriptTools was requested, but it can't be built due to QtScript being "
+ "disabled." << endl;
+ dictionary[ "DONE" ] = "error";
+ }
qtConfig += "scripttools";
+ }
if (dictionary[ "XMLPATTERNS" ] == "yes")
qtConfig += "xmlpatterns";
@@ -2873,6 +2888,7 @@ void Configure::generateConfigfiles()
if(dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON";
if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA";
if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS";
+ if(dictionary["SCRIPT"] == "no") qconfigList += "QT_NO_SCRIPT";
if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS";
if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE";
if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60";
@@ -3140,6 +3156,7 @@ void Configure::displayConfig()
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
cout << "Multimedia support.........." << dictionary[ "MULTIMEDIA" ] << endl;
cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl;
+ cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;
cout << "Qt3 compatibility..........." << dictionary[ "QT3SUPPORT" ] << endl << endl;
diff --git a/tools/designer/src/components/lib/lib.pro b/tools/designer/src/components/lib/lib.pro
index 92cf387cf8..8d0e69266a 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 aa6850c3bb..2050c72964 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 454439eba5..5e3a9b6c45 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 64e690f342..3c7f0322ac 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 f46c40a927..340bc826f4 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 8ed051a5a2..570b2080a0 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 cbf415b08c..2072fbce8f 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 += \