Commit 623d6473 authored by kbalazs@webkit.org's avatar kbalazs@webkit.org

2011-01-27 Balazs Kelemen <kbalazs@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt][WK2] WTR should be initialized in the same way as DRT
        https://bugs.webkit.org/show_bug.cgi?id=53240

        * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
        (WTR::activateFonts): Added missing initialization steps.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c25624a7
2011-01-27 Balazs Kelemen <kbalazs@webkit.org>
Reviewed by Csaba Osztrogonác.
[Qt][WK2] WTR should be initialized in the same way as DRT
https://bugs.webkit.org/show_bug.cgi?id=53240
* WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
(WTR::activateFonts): Added missing initialization steps.
2011-01-27 Joone Hur <joone.hur@collabora.co.uk>
Unreviewed.
......@@ -29,10 +29,13 @@
#include "ActivateFonts.h"
#include <QApplication>
#include <QByteArray>
#include <QDir>
#include <QWindowsStyle>
#ifdef Q_WS_X11
#include <QX11Info>
#include <fontconfig/fontconfig.h>
#endif
......@@ -43,6 +46,8 @@ namespace WTR {
void activateFonts()
{
#if defined(Q_WS_X11)
FcInit();
static int numFonts = -1;
// Some test cases may add or remove application fonts (via @font-face).
......@@ -78,6 +83,18 @@ void activateFonts()
appFontSet = FcConfigGetFonts(config, FcSetApplication);
numFonts = appFontSet->nfont;
#endif
QApplication::setGraphicsSystem("raster");
QApplication::setStyle(new QWindowsStyle);
QFont f("Sans Serif");
f.setPointSize(9);
f.setWeight(QFont::Normal);
f.setStyle(QFont::StyleNormal);
QApplication::setFont(f);
QX11Info::setAppDpiX(0, 96);
QX11Info::setAppDpiY(0, 96);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment