Changeset View
Changeset View
Standalone View
Standalone View
src/qt/guiutil.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
#include <QKeyEvent> | #include <QKeyEvent> | ||||
#include <QLineEdit> | #include <QLineEdit> | ||||
#include <QList> | #include <QList> | ||||
#include <QMouseEvent> | #include <QMouseEvent> | ||||
#include <QProcess> | #include <QProcess> | ||||
#include <QProgressDialog> | #include <QProgressDialog> | ||||
#include <QScreen> | #include <QScreen> | ||||
#include <QSettings> | #include <QSettings> | ||||
#include <QShortcut> | |||||
#include <QSize> | #include <QSize> | ||||
#include <QString> | #include <QString> | ||||
#include <QTextDocument> // for Qt::mightBeRichText | #include <QTextDocument> // for Qt::mightBeRichText | ||||
#include <QThread> | #include <QThread> | ||||
#include <QUrlQuery> | #include <QUrlQuery> | ||||
#include <QtGlobal> | #include <QtGlobal> | ||||
#if defined(Q_OS_MAC) | #if defined(Q_OS_MAC) | ||||
▲ Show 20 Lines • Show All 319 Lines • ▼ Show 20 Lines | if (w) { | ||||
} else { | } else { | ||||
w->show(); | w->show(); | ||||
} | } | ||||
w->activateWindow(); | w->activateWindow(); | ||||
w->raise(); | w->raise(); | ||||
} | } | ||||
} | } | ||||
void handleCloseWindowShortcut(QWidget *w) { | |||||
QObject::connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), w), | |||||
&QShortcut::activated, w, &QWidget::close); | |||||
} | |||||
void openDebugLogfile() { | void openDebugLogfile() { | ||||
fs::path pathDebug = GetDataDir() / "debug.log"; | fs::path pathDebug = GetDataDir() / "debug.log"; | ||||
/* Open debug.log with the associated application */ | /* Open debug.log with the associated application */ | ||||
if (fs::exists(pathDebug)) { | if (fs::exists(pathDebug)) { | ||||
QDesktopServices::openUrl( | QDesktopServices::openUrl( | ||||
QUrl::fromLocalFile(boostPathToQString(pathDebug))); | QUrl::fromLocalFile(boostPathToQString(pathDebug))); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |