summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2011-05-05 10:38:15 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-05-05 10:38:15 +0200
commit7351a43560675def9aeab111aa5cd22891b74f72 (patch)
tree9bbc502b3045573d4becf56ef8f39c2a6037f760
parent22a6540326ad5c97babde53ea70f291e38e65f2d (diff)
remove some QApplication dependencies
-rw-r--r--src/gui/text/qfont.cpp23
-rw-r--r--src/gui/text/qrawfont_qpa.cpp4
-rw-r--r--src/gui/text/qtexthtmlparser.cpp3
3 files changed, 3 insertions, 27 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index dd5dfdaf81..503263345c 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -65,13 +65,6 @@
#include "qx11info_x11.h"
#include <private/qt_x11_p.h>
#endif
-#ifdef Q_WS_QWS
-#include "qscreen_qws.h"
-#if !defined(QT_NO_QWS_QPF2)
-#include <qfile.h>
-#include "qfontengine_qpf_p.h"
-#endif
-#endif
#ifdef Q_OS_SYMBIAN
#include <private/qt_s60_p.h>
#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<QScreen*> 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<QScreen*> 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 103619c37d..6c8befec60 100644
--- a/src/gui/text/qrawfont_qpa.cpp
+++ b/src/gui/text/qrawfont_qpa.cpp
@@ -45,7 +45,7 @@
#include "qrawfont_p.h"
#include <QtGui/qplatformfontdatabase_qpa.h>
-#include <private/qapplication_p.h>
+#include <private/qguiapplication_p.h>
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 9252e89922..0eb0673c69 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -43,7 +43,6 @@
#include <qbytearray.h>
#include <qtextcodec.h>
-#include <qapplication.h>
#include <qstack.h>
#include <qdebug.h>
#include <qthread.h>
@@ -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());
}
}