diff options
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r-- | src/qt/guiutil.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index b1cd2f77d0..2fc166b0c5 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -47,6 +47,7 @@ #include <QDoubleValidator> #include <QFileDialog> #include <QFont> +#include <QFontDatabase> #include <QKeyEvent> #include <QLineEdit> #include <QSettings> @@ -55,11 +56,6 @@ #include <QUrlQuery> #include <QMouseEvent> - -#if QT_VERSION >= 0x50200 -#include <QFontDatabase> -#endif - #if defined(Q_OS_MAC) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" @@ -82,13 +78,7 @@ QString dateTimeStr(qint64 nTime) QFont fixedPitchFont() { -#if QT_VERSION >= 0x50200 return QFontDatabase::systemFont(QFontDatabase::FixedFont); -#else - QFont font("Monospace"); - font.setStyleHint(QFont::Monospace); - return font; -#endif } // Just some dummy data to generate a convincing random-looking (but consistent) address @@ -349,7 +339,7 @@ bool checkPoint(const QPoint &p, const QWidget *w) { QWidget *atW = QApplication::widgetAt(w->mapToGlobal(p)); if (!atW) return false; - return atW->topLevelWidget() == w; + return atW->window() == w; } bool isObscured(QWidget *w) |