diff options
Diffstat (limited to 'tools/qmlprofiler/main.cpp')
-rw-r--r-- | tools/qmlprofiler/main.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/qmlprofiler/main.cpp b/tools/qmlprofiler/main.cpp index b16706c3a9..2a85b72f1e 100644 --- a/tools/qmlprofiler/main.cpp +++ b/tools/qmlprofiler/main.cpp @@ -40,13 +40,15 @@ int main(int argc, char *argv[]) app.parseArguments(); - CommandListener listener; - QObject::connect(&listener, SIGNAL(command(QString)), &app, SLOT(userCommand(QString))); - listener.start(); - - int exitValue = app.exec(); - // wait for listener to exit - listener.wait(); - - return exitValue; + if (app.isInteractive()) { + CommandListener listener; + QObject::connect(&listener, SIGNAL(command(QString)), &app, SLOT(userCommand(QString))); + listener.start(); + int exitValue = app.exec(); + // wait for listener to exit + listener.wait(); + return exitValue; + } else { + return app.exec(); + } } |