From 7351a43560675def9aeab111aa5cd22891b74f72 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 5 May 2011 10:38:15 +0200 Subject: [PATCH] remove some QApplication dependencies --- src/gui/text/qfont.cpp | 23 ----------------------- src/gui/text/qrawfont_qpa.cpp | 4 ++-- src/gui/text/qtexthtmlparser.cpp | 3 +-- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index dd5dfda..5032633 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -65,13 +65,6 @@ #include "qx11info_x11.h" #include #endif -#ifdef Q_WS_QWS -#include "qscreen_qws.h" -#if !defined(QT_NO_QWS_QPF2) -#include -#include "qfontengine_qpf_p.h" -#endif -#endif #ifdef Q_OS_SYMBIAN #include #endif @@ -171,14 +164,6 @@ Q_GUI_EXPORT int qt_defaultDpiX() #elif defined(Q_WS_MAC) extern float qt_mac_defaultDpi_x(); //qpaintdevice_mac.cpp dpi = qt_mac_defaultDpi_x(); -#elif defined(Q_WS_QWS) - if (!qt_screen) - return 72; - QScreen *screen = qt_screen; - const QList subScreens = qt_screen->subScreens(); - if (!subScreens.isEmpty()) - screen = subScreens.at(0); - dpi = qRound(screen->width() / (screen->physicalWidth() / qreal(25.4))); #elif defined(Q_WS_QPA) QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); if (pi) { @@ -210,14 +195,6 @@ Q_GUI_EXPORT int qt_defaultDpiY() #elif defined(Q_WS_MAC) extern float qt_mac_defaultDpi_y(); //qpaintdevice_mac.cpp dpi = qt_mac_defaultDpi_y(); -#elif defined(Q_WS_QWS) - if (!qt_screen) - return 72; - QScreen *screen = qt_screen; - const QList subScreens = qt_screen->subScreens(); - if (!subScreens.isEmpty()) - screen = subScreens.at(0); - dpi = qRound(screen->height() / (screen->physicalHeight() / qreal(25.4))); #elif defined(Q_WS_QPA) QPlatformIntegration *pi = QGuiApplicationPrivate::platformIntegration(); if (pi) { diff --git a/src/gui/text/qrawfont_qpa.cpp b/src/gui/text/qrawfont_qpa.cpp index 103619c..6c8befe 100644 --- a/src/gui/text/qrawfont_qpa.cpp +++ b/src/gui/text/qrawfont_qpa.cpp @@ -45,7 +45,7 @@ #include "qrawfont_p.h" #include -#include +#include QT_BEGIN_NAMESPACE @@ -58,7 +58,7 @@ void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, int pixel { Q_ASSERT(fontEngine == 0); - QPlatformFontDatabase *pfdb = QApplicationPrivate::platformIntegration()->fontDatabase(); + QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase(); fontEngine = pfdb->fontEngine(fontData, pixelSize, hintingPreference); if (fontEngine != 0) fontEngine->ref.ref(); diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 9252e89..0eb0673 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -43,7 +43,6 @@ #include #include -#include #include #include #include @@ -1055,7 +1054,7 @@ void QTextHtmlParserNode::initializeProperties(const QTextHtmlParserNode *parent && !attributes.at(i + 1).isEmpty()) { hasHref = true; charFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline); - charFormat.setForeground(QApplication::palette().link()); + charFormat.setForeground(Qt::blue); // ### Qt5: QApplication::palette().link()); } } -- 2.7.4