diff options
| author | Wladimir J. van der Laan <[email protected]> | 2012-06-12 16:35:19 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2012-06-12 16:35:19 +0200 |
| commit | 9b1732baae6e0a31c463c9a0791ece789a87bb2d (patch) | |
| tree | c1a8aca94634baee0aca0c38b2077bb085aad127 /src | |
| parent | Merge pull request #1412 from Diapolo/string_wait_mature (diff) | |
| download | discoin-9b1732baae6e0a31c463c9a0791ece789a87bb2d.tar.xz discoin-9b1732baae6e0a31c463c9a0791ece789a87bb2d.zip | |
Cross-platform "Open debug logfile"
The option to open the debug logfile from the debug window was implemented only for
windows. By using `QDesktopServices::openUrl` it now works on any platform.
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/guiutil.cpp | 6 | ||||
| -rw-r--r-- | src/qt/rpcconsole.cpp | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index e8df8ad7b..5dedc90d6 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -241,11 +241,9 @@ void openDebugLogfile() { boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; -#ifdef WIN32 + /* Open debug.log with the associated application */ if (boost::filesystem::exists(pathDebug)) - /* Open debug.log with the associated application */ - ShellExecuteA((HWND)0, (LPCSTR)"open", (LPCSTR)pathDebug.string().c_str(), NULL, NULL, SW_SHOWNORMAL); -#endif + QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string()))); } ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index f7b06b5b9..7b40db076 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -114,12 +114,6 @@ RPCConsole::RPCConsole(QWidget *parent) : ui->showCLOptionsButton->setIcon(QIcon(":/icons/options")); #endif -#ifndef WIN32 - // Hide Debug logfile label and Open button for non Windows-OSes - ui->labelDebugLogfile->setVisible(false); - ui->openDebugLogfileButton->setVisible(false); -#endif - // Install event filter for up and down arrow ui->lineEdit->installEventFilter(this); |