summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2012-11-24 00:40:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-24 01:05:51 +0100
commit1d7c26ec39fdfcfb49c9fc2a5fa1938f62351df0 (patch)
tree6081dce81d389841cee193877c5e34469e472acf /examples
parent9aca40cd8dd4380131fdf411e4cc6402a4735477 (diff)
downloadqtscript-1d7c26ec39fdfcfb49c9fc2a5fa1938f62351df0.tar.gz
Compile fix for example after changes to QApplication constructor
As QCoreApplication::Type is no longer public then change this to use QCoreApplication instead as the example does not need a GUI application. Change-Id: I24f98ec6538fc3f4bfc8612defbb6e7bb4dbf9aa Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/script/qscript/main.cpp10
-rw-r--r--examples/script/qscript/qscript.pro2
2 files changed, 2 insertions, 10 deletions
diff --git a/examples/script/qscript/main.cpp b/examples/script/qscript/main.cpp
index 016fb56..85932ce 100644
--- a/examples/script/qscript/main.cpp
+++ b/examples/script/qscript/main.cpp
@@ -138,15 +138,7 @@ static QScriptValue loadScripts(QScriptContext *context, QScriptEngine *engine)
int main(int argc, char *argv[])
{
- QApplication *app;
- if (argc >= 2 && !qstrcmp(argv[1], "-tty")) {
- ++argv;
- --argc;
- app = new QApplication(argc, argv, QApplication::Tty);
- } else {
- app = new QApplication(argc, argv);
- }
-
+ QCoreApplication *app = new QCoreApplication(argc, argv);
QScriptEngine *eng = new QScriptEngine();
QScriptValue globalObject = eng->globalObject();
diff --git a/examples/script/qscript/qscript.pro b/examples/script/qscript/qscript.pro
index 02f2cd9..4efe686 100644
--- a/examples/script/qscript/qscript.pro
+++ b/examples/script/qscript/qscript.pro
@@ -1,5 +1,5 @@
-QT += widgets script
+QT += script
win32:CONFIG += console no_batch
mac:CONFIG -= app_bundle