tst_QComboBox: use QProxyStyle instead of QWindowsStyle

QWindowsStyle is soon to become an internal class.

Change-Id: Ic76ecc20ff600a7d401b44c8dc4d93198c06becc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
This commit is contained in:
J-P Nurmi 2012-11-23 15:50:48 +01:00 committed by The Qt Project
parent eefec0e0be
commit 5ad4e14fb1

View File

@ -72,9 +72,7 @@
#include <qstylefactory.h> #include <qstylefactory.h>
#include <qabstractitemview.h> #include <qabstractitemview.h>
#include <qstyleditemdelegate.h> #include <qstyleditemdelegate.h>
#ifndef QT_NO_STYLE_WINDOWS #include <qproxystyle.h>
#include <qwindowsstyle.h>
#endif
class tst_QComboBox : public QObject class tst_QComboBox : public QObject
{ {
@ -2428,9 +2426,11 @@ void tst_QComboBox::subControlRectsWithOffset()
#ifndef QT_NO_STYLE_WINDOWS #ifndef QT_NO_STYLE_WINDOWS
void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup() void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup()
{ {
class TestStyle: public QWindowsStyle class TestStyle: public QProxyStyle
{ {
public: public:
TestStyle() : QProxyStyle(QStyleFactory::create("windows")) { }
int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *ret) const int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *ret) const
{ {
if (hint == SH_ComboBox_Popup) return 1; if (hint == SH_ComboBox_Popup) return 1;