summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-24 14:03:55 (GMT)
committeraxis <qt-info@nokia.com>2009-04-27 07:09:01 (GMT)
commite74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch)
tree3a131f9235fb6a455793178d8313655e4fd0036e /tests/auto/qwidget/tst_qwidget.cpp
parent8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff)
parent211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff)
downloadQt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.zip
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.gz
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
Diffstat (limited to 'tests/auto/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp37
1 files changed, 17 insertions, 20 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 9fb5fa3..d493219 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -350,6 +350,7 @@ private slots:
void paintOutsidePaintEvent();
#endif
void updateOnDestroyedSignal();
+ void toplevelLineEditFocus();
private:
bool ensureScreenSize(int width, int height);
@@ -2584,9 +2585,6 @@ void tst_QWidget::setGeometry()
void tst_QWidget::windowOpacity()
{
-#if defined(Q_WS_X11) && QT_VERSION < 0x040200
- QSKIP("QWidget::windowOpacity is broken in Qt < 4.2 on X11", SkipAll);
-#else
#ifdef Q_OS_WINCE
QSKIP( "Windows CE does not support windowOpacity", SkipAll);
#endif
@@ -2596,43 +2594,27 @@ void tst_QWidget::windowOpacity()
// Initial value should be 1.0
QCOMPARE(widget.windowOpacity(), 1.0);
// children should always return 1.0
-#if QT_VERSION < 0x040200
- QEXPECT_FAIL("", "Prior to 4.2, all children widgets returned 0.0", Continue);
-#endif
QCOMPARE(child.windowOpacity(), 1.0);
widget.setWindowOpacity(0.0);
QCOMPARE(widget.windowOpacity(), 0.0);
child.setWindowOpacity(0.0);
-#if QT_VERSION < 0x040200
- QEXPECT_FAIL("", "Prior to 4.2, all children widgets returned 0.0", Continue);
-#endif
QCOMPARE(child.windowOpacity(), 1.0);
widget.setWindowOpacity(1.0);
QCOMPARE(widget.windowOpacity(), 1.0);
child.setWindowOpacity(1.0);
-#if QT_VERSION < 0x040200
- QEXPECT_FAIL("", "Prior to 4.2, all children widgets returned 0.0", Continue);
-#endif
QCOMPARE(child.windowOpacity(), 1.0);
widget.setWindowOpacity(2.0);
QCOMPARE(widget.windowOpacity(), 1.0);
child.setWindowOpacity(2.0);
-#if QT_VERSION < 0x040200
- QEXPECT_FAIL("", "Prior to 4.2, all children widgets returned 0.0", Continue);
-#endif
QCOMPARE(child.windowOpacity(), 1.0);
widget.setWindowOpacity(-1.0);
QCOMPARE(widget.windowOpacity(), 0.0);
child.setWindowOpacity(-1.0);
-#if QT_VERSION < 0x040200
- QEXPECT_FAIL("", "Prior to 4.2, all children widgets returned 0.0", Continue);
-#endif
QCOMPARE(child.windowOpacity(), 1.0);
-#endif
}
class UpdateWidget : public QWidget
@@ -5385,7 +5367,7 @@ void tst_QWidget::subtractOpaqueSiblings()
{
#ifdef QT_MAC_USE_COCOA
QSKIP("Cocoa only has rect granularity.", SkipAll);
-#elif defined(Q_WIDGET_USE_DIRTYLIST) || (QT_VERSION >= 0x040400)
+#else
QWidget w;
w.setGeometry(50, 50, 300, 300);
@@ -8797,5 +8779,20 @@ void tst_QWidget::updateOnDestroyedSignal()
QTest::qWait(200);
}
+void tst_QWidget::toplevelLineEditFocus()
+{
+ testWidget->hide();
+
+ QLineEdit w;
+ w.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&w);
+#endif
+ QTest::qWait(200);
+
+ QCOMPARE(QApplication::activeWindow(), &w);
+ QCOMPARE(QApplication::focusWidget(), &w);
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"