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.
This commit is contained in:
parent
b6ef8d5a40
commit
9b1732baae
2 changed files with 2 additions and 10 deletions
|
@ -241,11 +241,9 @@ void openDebugLogfile()
|
||||||
{
|
{
|
||||||
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
|
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
if (boost::filesystem::exists(pathDebug))
|
|
||||||
/* Open debug.log with the associated application */
|
/* Open debug.log with the associated application */
|
||||||
ShellExecuteA((HWND)0, (LPCSTR)"open", (LPCSTR)pathDebug.string().c_str(), NULL, NULL, SW_SHOWNORMAL);
|
if (boost::filesystem::exists(pathDebug))
|
||||||
#endif
|
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string())));
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
|
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
|
||||||
|
|
|
@ -114,12 +114,6 @@ RPCConsole::RPCConsole(QWidget *parent) :
|
||||||
ui->showCLOptionsButton->setIcon(QIcon(":/icons/options"));
|
ui->showCLOptionsButton->setIcon(QIcon(":/icons/options"));
|
||||||
#endif
|
#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
|
// Install event filter for up and down arrow
|
||||||
ui->lineEdit->installEventFilter(this);
|
ui->lineEdit->installEventFilter(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue