aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-02-11 18:23:45 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-02-11 18:23:45 +0000
commitabfbd83fffa2da41d3d95c4ba3a77a14e2554d4a (patch)
tree81279b89af327803bcf9d9a8c7981d1f57f79cce /src/app
parent0e82b4d571a308c454e8c8ca577d82f4115ad1c0 (diff)
downloadqmmp-abfbd83fffa2da41d3d95c4ba3a77a14e2554d4a.tar.gz
qmmp-abfbd83fffa2da41d3d95c4ba3a77a14e2554d4a.tar.bz2
qmmp-abfbd83fffa2da41d3d95c4ba3a77a14e2554d4a.zip
do not show empty help dialog
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8707 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/app')
-rw-r--r--src/app/qmmpstarter.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/app/qmmpstarter.cpp b/src/app/qmmpstarter.cpp
index e78796783..efa5e6c48 100644
--- a/src/app/qmmpstarter.cpp
+++ b/src/app/qmmpstarter.cpp
@@ -120,18 +120,22 @@ QMMPStarter::QMMPStarter() : QObject()
{
m_exit_code = EXIT_SUCCESS;
m_finished = true;
- //show dialog with command line documentation under ms windows
+ QString out = CommandLineManager::executeCommand(key, commands.value(key)).trimmed();
+ if(!out.isEmpty())
+ {
+ //show dialog with command line documentation under ms windows
#ifdef Q_OS_WIN
- stringstream tmp_stream;
- tmp_stream.copyfmt(cout);
- streambuf* old_stream = cout.rdbuf(tmp_stream.rdbuf());
+ stringstream tmp_stream;
+ tmp_stream.copyfmt(cout);
+ streambuf *old_stream = cout.rdbuf(tmp_stream.rdbuf());
#endif
- cout << qPrintable(CommandLineManager::executeCommand(key, commands.value(key)).trimmed()) << endl;
+ cout << qPrintable(CommandLineManager::executeCommand(key, commands.value(key)).trimmed()) << endl;
#ifdef Q_OS_WIN
- string text = tmp_stream.str();
- QMessageBox::information(nullptr, tr("Command Line Help"), QString::fromLocal8Bit(text.c_str()));
- cout.rdbuf(old_stream); //restore old stream buffer
+ string text = tmp_stream.str();
+ QMessageBox::information(nullptr, tr("Command Line Help"), QString::fromLocal8Bit(text.c_str()));
+ cout.rdbuf(old_stream); //restore old stream buffer
#endif
+ }
return;
}
}