aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-06-12 16:35:19 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-06-12 16:35:19 +0200
commit9b1732baae6e0a31c463c9a0791ece789a87bb2d (patch)
treec1a8aca94634baee0aca0c38b2077bb085aad127 /src/qt/guiutil.cpp
parentb6ef8d5a40066fedb771c68cd4a8088b06d3b665 (diff)
downloadbitcoin-9b1732baae6e0a31c463c9a0791ece789a87bb2d.tar.xz
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/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index e8df8ad7b0..5dedc90d69 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) :