summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-09-23 08:01:37 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-09-23 08:06:49 (GMT)
commite73d4d577410ce0724c818cd0d4a28b7ff7350bb (patch)
tree5bd3eb97c0bf5bcd6c30773d79b54fd579426003
parent24071323009135108023698ef2f8b266f5437f5c (diff)
downloadQt-e73d4d577410ce0724c818cd0d4a28b7ff7350bb.zip
Qt-e73d4d577410ce0724c818cd0d4a28b7ff7350bb.tar.gz
Qt-e73d4d577410ce0724c818cd0d4a28b7ff7350bb.tar.bz2
Fix compilation errors in qcombobox autotest
Dependency on windows style, without including the header file Needed static casts to compare QWidget* with QComboBox* at least for the Nokia x86 compiler. Reviewed-by: axis
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index b549af6..8dfe836 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -77,6 +77,9 @@
#include <qabstractitemview.h>
#include "../../shared/util.h"
#include <qstyleditemdelegate.h>
+#ifndef QT_NO_STYLE_WINDOWS
+#include <qwindowsstyle.h>
+#endif
//TESTED_CLASS=
//TESTED_FILES=
@@ -2140,7 +2143,7 @@ void tst_QComboBox::task247863_keyBoardSelection()
combo.addItem( QLatin1String("222"));
combo.show();
QApplication::setActiveWindow(&combo);
- QTRY_COMPARE(QApplication::activeWindow(), &combo);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo));
QSignalSpy spy(&combo, SIGNAL(activated(const QString &)));
qApp->setEffectEnabled(Qt::UI_AnimateCombo, false);
@@ -2161,7 +2164,7 @@ void tst_QComboBox::task220195_keyBoardSelection2()
combo.addItem( QLatin1String("foo3"));
combo.show();
QApplication::setActiveWindow(&combo);
- QTRY_COMPARE(QApplication::activeWindow(), &combo);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo));
combo.setCurrentIndex(-1);
QVERIFY(combo.currentText().isNull());
@@ -2353,6 +2356,9 @@ void tst_QComboBox::subControlRectsWithOffset()
void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup()
{
+#ifdef QT_NO_STYLE_WINDOWS
+ QSKIP("test depends on windows style", QTest::SkipAll);
+#else
class TestStyle: public QWindowsStyle
{
public:
@@ -2385,6 +2391,7 @@ void tst_QComboBox::task260974_menuItemRectangleForComboBoxPopup()
QTRY_VERIFY(style.discoveredRect.width() <= comboBox.width());
}
+#endif
}
QTEST_MAIN(tst_QComboBox)