diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2009-11-26 10:39:48 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2009-11-26 10:44:23 (GMT) |
commit | 2f00c76081f261e6f357c279206a6a18fdadc472 (patch) | |
tree | 95f4110d63567a57800858eafa73faa08be77b69 | |
parent | 1d55c88b66013f86be9c7ef069f0f8cdb598d1e2 (diff) | |
download | Qt-2f00c76081f261e6f357c279206a6a18fdadc472.zip Qt-2f00c76081f261e6f357c279206a6a18fdadc472.tar.gz Qt-2f00c76081f261e6f357c279206a6a18fdadc472.tar.bz2 |
create application object in qsdbg example
Since 4.6, it's required that the Q(Core)Application object is
constructed before QScriptEngine objects.
Reviewed-by: TrustMe
-rw-r--r-- | examples/script/qsdbg/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/script/qsdbg/main.cpp b/examples/script/qsdbg/main.cpp index fdcc7cb..2a86c3d 100644 --- a/examples/script/qsdbg/main.cpp +++ b/examples/script/qsdbg/main.cpp @@ -39,12 +39,15 @@ ** ****************************************************************************/ +#include <QtCore/QCoreApplication> #include <QtScript> #include "scriptdebugger.h" int main(int argc, char **argv) { + QCoreApplication app(argc, argv); + if (argc < 2) { fprintf(stderr, "*** you must specify a script file to evaluate (try example.js)\n"); return(-1); |