diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2012-11-23 15:20:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-28 13:13:41 +0100 |
commit | f308c296c59a6ef6fffa1e2e61f907eb94197477 (patch) | |
tree | 18dd46dcc50acf52a7b64ae701d779759cdaa703 | |
parent | ea104efa34592a68086704fd8d45b677b2bc5eb6 (diff) |
tst_QWidget: use QStyleFactory instead of QWindowsStyle
QWindowsStyle is soon to become an internal class.
Change-Id: I75424d6fc2f36fb0faace86c960d78a4ba305658
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 432950b8ec..1d9cd64321 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -55,7 +55,7 @@ #include <qpushbutton.h> #include <qstyle.h> #include <qwidget.h> -#include <qwindowsstyle.h> +#include <qstylefactory.h> #include <qdesktopwidget.h> #include <private/qwidget_p.h> #include <private/qapplication_p.h> @@ -420,7 +420,7 @@ void tst_QWidget::getSetCheck() QWidget child1(&obj1); // QStyle * QWidget::style() // void QWidget::setStyle(QStyle *) - QScopedPointer<QWindowsStyle> var1(new QWindowsStyle); + QScopedPointer<QStyle> var1(QStyleFactory::create(QLatin1String("Windows"))); obj1.setStyle(var1.data()); QCOMPARE(static_cast<QStyle *>(var1.data()), obj1.style()); obj1.setStyle((QStyle *)0); @@ -4833,7 +4833,7 @@ void tst_QWidget::moveChild() ColorWidget parent; // prevent custom styles - parent.setStyle(new QWindowsStyle); + parent.setStyle(QStyleFactory::create(QLatin1String("Windows"))); ColorWidget child(&parent, Qt::blue); #ifndef Q_OS_WINCE @@ -4881,7 +4881,7 @@ void tst_QWidget::showAndMoveChild() { QWidget parent(0, Qt::FramelessWindowHint); // prevent custom styles - parent.setStyle(new QWindowsStyle); + parent.setStyle(QStyleFactory::create(QLatin1String("Windows"))); QDesktopWidget desktop; QRect desktopDimensions = desktop.availableGeometry(&parent); @@ -4951,7 +4951,7 @@ void tst_QWidget::subtractOpaqueSiblings() void tst_QWidget::deleteStyle() { QWidget widget; - widget.setStyle(new QWindowsStyle); + widget.setStyle(QStyleFactory::create(QLatin1String("Windows"))); widget.show(); delete widget.style(); qApp->processEvents(); @@ -6043,7 +6043,7 @@ void tst_QWidget::render() QWidget window; window.resize(100, 100); // prevent custom styles - window.setStyle(new QWindowsStyle); + window.setStyle(QStyleFactory::create(QLatin1String("Windows"))); window.show(); QVERIFY(QTest::qWaitForWindowExposed(&window)); QWidget child(&window); @@ -6062,7 +6062,7 @@ void tst_QWidget::render() widget.setAutoFillBackground(true); widget.setPalette(Qt::red); // prevent custom styles - widget.setStyle(new QWindowsStyle); + widget.setStyle(QStyleFactory::create(QLatin1String("Windows"))); widget.show(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); QImage image(widget.size(), QImage::Format_RGB32); @@ -6314,7 +6314,7 @@ void tst_QWidget::renderWithPainter() { QWidget widget(0, Qt::Tool); // prevent custom styles - widget.setStyle(new QWindowsStyle); + widget.setStyle(QStyleFactory::create(QLatin1String("Windows"))); widget.show(); widget.resize(70, 50); widget.setAutoFillBackground(true); |