summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/styles/qstyle/tst_qstyle.cpp')
-rw-r--r--tests/auto/widgets/styles/qstyle/tst_qstyle.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
index cf867194cc..c733fadbf5 100644
--- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
+++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp
@@ -234,7 +234,10 @@ void tst_QStyle::testProxyStyle()
QVERIFY(proxyStyle->baseStyle());
qApp->setStyle(proxyStyle);
- QProxyStyle doubleProxy(new QProxyStyle(QStyleFactory::create("Windows")));
+ QProxyStyle* baseStyle = new QProxyStyle("Windows");
+ QCOMPARE(baseStyle->baseStyle()->objectName(), style->objectName());
+
+ QProxyStyle doubleProxy(baseStyle);
QVERIFY(testAllFunctions(&doubleProxy));
CustomProxy customStyle;
@@ -738,7 +741,7 @@ public:
void tst_QStyle::testDrawingShortcuts()
{
- {
+ {
QWidget w;
setFrameless(&w);
QToolButton *tb = new QToolButton(&w);
@@ -768,14 +771,14 @@ void tst_QStyle::testDrawingShortcuts()
bool showMnemonic = dts->styleHint(QStyle::SH_UnderlineShortcut, &sotb, tb);
QVERIFY(dts->alignment & (showMnemonic ? Qt::TextShowMnemonic : Qt::TextHideMnemonic));
delete dts;
- }
+ }
}
#define SCROLLBAR_SPACING 33
class FrameTestStyle : public QProxyStyle {
public:
- FrameTestStyle() : QProxyStyle(QStyleFactory::create("Windows")) { }
+ FrameTestStyle() : QProxyStyle("Windows") { }
int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *widget, QStyleHintReturn *returnData) const {
if (hint == QStyle::SH_ScrollView_FrameOnlyAroundContents)
return 1;