Skip to content

Commit

Permalink
[Qt] move SubstituteFonts() above ToolTipToRichTextFilter
Browse files Browse the repository at this point in the history
- doesn't belong to the ToolTipToRichTextFilter class so move it up
  • Loading branch information
Philip Kaufmann committed Aug 8, 2014
1 parent fffe947 commit c4bae53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
13 changes: 7 additions & 6 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,6 @@ void openDebugLogfile()
QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
}

ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
QObject(parent), size_threshold(size_threshold)
{

}

void SubstituteFonts()
{
#if defined(Q_OS_MAC)
Expand All @@ -403,6 +397,13 @@ void SubstituteFonts()
#endif
}

ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
QObject(parent),
size_threshold(size_threshold)
{

}

bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
{
if(evt->type() == QEvent::ToolTipChange)
Expand Down
7 changes: 3 additions & 4 deletions src/qt/guiutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,13 @@ namespace GUIUtil
// Open debug.log
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
representation if needed. This assures that Qt can word-wrap long tooltip messages.
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
{
Q_OBJECT
Expand Down

0 comments on commit c4bae53

Please sign in to comment.