diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-16 07:58:32 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-16 07:58:32 +0200 |
commit | 17198e03ab36e5f579a1477b09cc3e601975eb5f (patch) | |
tree | 61ba826e9edd53469abdc1e1f58b1223d0336c56 /src/corelib/tools/qcommandlineparser.cpp | |
parent | a5e89005445ac8ca18ac046eaf55fe2230e47cd6 (diff) | |
parent | 2e2b32a9ab459f6618d02e4b454c75a787172def (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
qmake/doc/src/qmake-manual.qdoc
src/corelib/global/qglobal.cpp
src/corelib/tools/qstring.cpp
src/network/socket/qabstractsocket.cpp
src/network/socket/qnativesocketengine_unix.cpp
src/plugins/platforms/eglfs/api/qeglfsglobal.h
Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
Diffstat (limited to 'src/corelib/tools/qcommandlineparser.cpp')
-rw-r--r-- | src/corelib/tools/qcommandlineparser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/tools/qcommandlineparser.cpp b/src/corelib/tools/qcommandlineparser.cpp index 2450484ce9..4c55880915 100644 --- a/src/corelib/tools/qcommandlineparser.cpp +++ b/src/corelib/tools/qcommandlineparser.cpp @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE +extern void Q_CORE_EXPORT qt_call_post_routines(); + typedef QHash<QString, int> NameHash_t; class QCommandLineParserPrivate @@ -588,6 +590,7 @@ void QCommandLineParser::process(const QStringList &arguments) { if (!d->parse(arguments)) { showParserMessage(errorText() + QLatin1Char('\n'), ErrorMessage); + qt_call_post_routines(); ::exit(EXIT_FAILURE); } @@ -1011,6 +1014,7 @@ Q_NORETURN void QCommandLineParser::showVersion() showParserMessage(QCoreApplication::applicationName() + QLatin1Char(' ') + QCoreApplication::applicationVersion() + QLatin1Char('\n'), UsageMessage); + qt_call_post_routines(); ::exit(EXIT_SUCCESS); } @@ -1028,6 +1032,7 @@ Q_NORETURN void QCommandLineParser::showVersion() Q_NORETURN void QCommandLineParser::showHelp(int exitCode) { showParserMessage(d->helpText(), UsageMessage); + qt_call_post_routines(); ::exit(exitCode); } |