diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/app/qmmpstarter.cpp | 20 |
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; } } |
