Browse Source
Merge pull request #4659
c4bae53
[Qt] move SubstituteFonts() above ToolTipToRichTextFilter (Philip Kaufmann)
pull/145/head
Wladimir J. van der Laan
10 years ago
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
2 changed files with
10 additions and
10 deletions
-
src/qt/guiutil.cpp
-
src/qt/guiutil.h
|
@ -381,12 +381,6 @@ void openDebugLogfile() |
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug))); |
|
|
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : |
|
|
|
|
|
QObject(parent), size_threshold(size_threshold) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void SubstituteFonts() |
|
|
void SubstituteFonts() |
|
|
{ |
|
|
{ |
|
|
#if defined(Q_OS_MAC) |
|
|
#if defined(Q_OS_MAC) |
|
@ -407,6 +401,13 @@ void SubstituteFonts() |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : |
|
|
|
|
|
QObject(parent), |
|
|
|
|
|
size_threshold(size_threshold) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) |
|
|
bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) |
|
|
{ |
|
|
{ |
|
|
if(evt->type() == QEvent::ToolTipChange) |
|
|
if(evt->type() == QEvent::ToolTipChange) |
|
|
|
@ -102,14 +102,13 @@ namespace GUIUtil |
|
|
// Open debug.log
|
|
|
// Open debug.log
|
|
|
void openDebugLogfile(); |
|
|
void openDebugLogfile(); |
|
|
|
|
|
|
|
|
|
|
|
// Replace invalid default fonts with known good ones
|
|
|
|
|
|
void SubstituteFonts(); |
|
|
|
|
|
|
|
|
/** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
|
|
|
/** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
|
|
|
representation if needed. This assures that Qt can word-wrap long tooltip messages. |
|
|
representation if needed. This assures that Qt can word-wrap long tooltip messages. |
|
|
Tooltips longer than the provided size threshold (in characters) are wrapped. |
|
|
Tooltips longer than the provided size threshold (in characters) are wrapped. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
// Replace invalid default fonts with known good ones
|
|
|
|
|
|
void SubstituteFonts(); |
|
|
|
|
|
|
|
|
|
|
|
class ToolTipToRichTextFilter : public QObject |
|
|
class ToolTipToRichTextFilter : public QObject |
|
|
{ |
|
|
{ |
|
|
Q_OBJECT |
|
|
Q_OBJECT |
|
|