diff options
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index b738d13840..5ff40ae924 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -30,6 +30,7 @@ #include <shlwapi.h> #endif +#include <QAbstractButton> #include <QAbstractItemView> #include <QApplication> #include <QClipboard> @@ -56,7 +57,6 @@ #include <QShortcut> #include <QSize> #include <QString> -#include <QStringBuilder> #include <QTextDocument> // for Qt::mightBeRichText #include <QThread> #include <QUrlQuery> @@ -123,6 +123,11 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) widget->setCheckValidator(new BitcoinAddressCheckValidator(parent)); } +void AddButtonShortcut(QAbstractButton* button, const QKeySequence& shortcut) +{ + QObject::connect(new QShortcut(shortcut, button), &QShortcut::activated, [button]() { button->animateClick(); }); +} + bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) { // return if URI is not valid or is no bitcoin: URI @@ -401,7 +406,7 @@ void handleCloseWindowShortcut(QWidget* w) void openDebugLogfile() { - fs::path pathDebug = GetDataDir() / "debug.log"; + fs::path pathDebug = gArgs.GetDataDirNet() / "debug.log"; /* Open debug.log with the associated application */ if (fs::exists(pathDebug)) @@ -710,7 +715,7 @@ QString formatServicesStr(quint64 mask) } if (strList.size()) - return strList.join(" & "); + return strList.join(", "); else return QObject::tr("None"); } @@ -938,7 +943,7 @@ QString MakeHtmlLink(const QString& source, const QString& link) { return QString(source).replace( link, - QLatin1String("<a href=\"") % link % QLatin1String("\">") % link % QLatin1String("</a>")); + QLatin1String("<a href=\"") + link + QLatin1String("\">") + link + QLatin1String("</a>")); } void PrintSlotException( |