summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-13 16:16:05 +0100
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-13 16:16:34 +0100
commit3a48a44f39a39126a9065f9b349b8906662f07b6 (patch)
tree89cac3d3f8e29e4ddc96803203f3f337dbad8c9c /tests
parent2432150f9eabbaa0317eeed038eaf661f8ce507e (diff)
Fixed dockwidget autotest on X11
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdockwidget/tst_qdockwidget.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp
index c9a7f1caa5..8f72e399c1 100644
--- a/tests/auto/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp
@@ -50,6 +50,7 @@
#include <qlineedit.h>
#include <QDesktopWidget>
#include <QtGui/QPainter>
+#include "private/qdockwidget_p.h"
bool hasFeature(QDockWidget *dockwidget, QDockWidget::DockWidgetFeature feature)
{ return (dockwidget->features() & feature) == feature; }
@@ -865,7 +866,9 @@ void tst_QDockWidget::taskQTBUG_1665_closableChanged()
dock.show();
QTest::qWaitForWindowShown(&dock);
- if (dock.windowFlags() & Qt::FramelessWindowHint)
+ QDockWidgetLayout *l = qobject_cast<QDockWidgetLayout*>(dock.layout());
+
+ if (l && !l->nativeWindowDeco())
QSKIP("this machine doesn't support native dock widget", SkipAll);
QVERIFY(dock.windowFlags() & Qt::WindowCloseButtonHint);