remove some QApplication dependencies

This commit is contained in:
Lars Knoll 2011-05-05 10:38:15 +02:00
parent 22a6540326
commit 7351a43560
3 changed files with 3 additions and 27 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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());
}
}