summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-24 22:19:06 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-24 22:19:06 +0200
commit5a7c14af3c27089b0b8698da3c689637ffaa9cfa (patch)
tree6f2d1ad02bd9721af0fe7bd92ff7c9e2e4e078e9 /tests
parent2487b9d0e183047a26dcbeb87f58b771a8e12348 (diff)
parentc9d2f14b2a814fd29c858d9519e82fc5cbc2afdf (diff)
Merge branch '4.5' into 4.6
Conflicts: bin/syncqt configure demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h dist/README dist/changes-3.0.0 dist/changes-3.0.0-beta1 dist/changes-4.3.0 doc/src/desktop-integration.qdoc doc/src/development/designer-manual.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/index.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/porting/porting4.qdoc doc/src/porting4-obsoletedmechanism.qdocinc doc/src/qt-webpages.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/snippets/code/src_corelib_tools_qregexp.cpp doc/src/snippets/code/src_qt3support_network_q3ftp.cpp doc/src/snippets/qstring/main.cpp doc/src/snippets/textdocument-blocks/xmlwriter.cpp doc/src/snippets/textdocument-frames/xmlwriter.cpp doc/src/snippets/textdocument-tables/xmlwriter.cpp doc/src/tech-preview/known-issues.html doc/src/topics.qdoc doc/src/xml-processing/xml-processing.qdoc examples/xml/saxbookmarks/jennifer.xbel src/3rdparty/phonon/ds9/mediaobject.cpp src/3rdparty/phonon/ds9/mediaobject.h src/corelib/io/qurl.cpp src/corelib/tools/qdumper.cpp src/corelib/xml/qxmlstream.h src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qmotifdnd_x11.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/painting/qwindowsurface_d3d.cpp src/gui/styles/qmacstyle_mac.mm src/gui/text/qtextformat.cpp src/gui/text/qtextobject_p.h src/network/access/qhttp.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/plugins/codecs/kr/qeuckrcodec.cpp src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/qt3support/network/q3http.cpp src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h src/sql/drivers/sqlite/qsql_sqlite.cpp src/svg/qsvghandler.cpp src/svg/qsvgstyle.cpp src/xmlpatterns/expr/qcastingplatform_p.h src/xmlpatterns/iterators/qcachingiterator_p.h src/xmlpatterns/parser/qquerytransformparser_p.h tests/auto/q3uridrag/tst_q3uridrag.cpp tests/auto/qcombobox/tst_qcombobox.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tests/auto/qmainwindow/tst_qmainwindow.cpp tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qurl/tst_qurl.cpp tests/auto/qvariant/tst_qvariant.cpp tests/auto/qwidget/tst_qwidget.cpp tests/auto/uic/baseline/batchtranslation.ui tests/auto/uic/baseline/batchtranslation.ui.h tests/auto/uic/baseline/config.ui tests/auto/uic/baseline/config.ui.h tests/auto/uic/baseline/finddialog.ui tests/auto/uic/baseline/finddialog.ui.h tests/auto/uic/baseline/formwindowsettings.ui tests/auto/uic/baseline/formwindowsettings.ui.h tests/auto/uic/baseline/helpdialog.ui tests/auto/uic/baseline/helpdialog.ui.h tests/auto/uic/baseline/listwidgeteditor.ui tests/auto/uic/baseline/listwidgeteditor.ui.h tests/auto/uic/baseline/mainwindowbase.ui tests/auto/uic/baseline/mainwindowbase.ui.h tests/auto/uic/baseline/newactiondialog.ui tests/auto/uic/baseline/newactiondialog.ui.h tests/auto/uic/baseline/newform.ui tests/auto/uic/baseline/newform.ui.h tests/auto/uic/baseline/orderdialog.ui tests/auto/uic/baseline/orderdialog.ui.h tests/auto/uic/baseline/paletteeditor.ui tests/auto/uic/baseline/paletteeditor.ui.h tests/auto/uic/baseline/paletteeditoradvancedbase.ui tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h tests/auto/uic/baseline/phrasebookbox.ui tests/auto/uic/baseline/phrasebookbox.ui.h tests/auto/uic/baseline/plugindialog.ui tests/auto/uic/baseline/plugindialog.ui.h tests/auto/uic/baseline/previewwidget.ui tests/auto/uic/baseline/previewwidget.ui.h tests/auto/uic/baseline/previewwidgetbase.ui tests/auto/uic/baseline/previewwidgetbase.ui.h tests/auto/uic/baseline/qfiledialog.ui tests/auto/uic/baseline/qfiledialog.ui.h tests/auto/uic/baseline/qtgradientdialog.ui tests/auto/uic/baseline/qtgradientdialog.ui.h tests/auto/uic/baseline/qtgradientviewdialog.ui tests/auto/uic/baseline/qtgradientviewdialog.ui.h tests/auto/uic/baseline/saveformastemplate.ui tests/auto/uic/baseline/saveformastemplate.ui.h tests/auto/uic/baseline/statistics.ui tests/auto/uic/baseline/statistics.ui.h tests/auto/uic/baseline/stringlisteditor.ui tests/auto/uic/baseline/stringlisteditor.ui.h tests/auto/uic/baseline/tabbedbrowser.ui tests/auto/uic/baseline/tabbedbrowser.ui.h tests/auto/uic/baseline/tablewidgeteditor.ui tests/auto/uic/baseline/tablewidgeteditor.ui.h tests/auto/uic/baseline/translatedialog.ui tests/auto/uic/baseline/translatedialog.ui.h tests/auto/uic/baseline/treewidgeteditor.ui tests/auto/uic/baseline/treewidgeteditor.ui.h tests/auto/uic/baseline/trpreviewtool.ui tests/auto/uic/baseline/trpreviewtool.ui.h tests/auto/uic3/baseline/previewwidget.ui tests/auto/uic3/baseline/previewwidget.ui.4 tests/auto/uic3/baseline/previewwidgetbase.ui tests/auto/uic3/baseline/previewwidgetbase.ui.4 tests/auto/uic3/baseline/qactivexselect.ui tests/auto/uic3/baseline/qactivexselect.ui.4 tests/auto/uiloader/baseline/batchtranslation.ui tests/auto/uiloader/baseline/config.ui tests/auto/uiloader/baseline/finddialog.ui tests/auto/uiloader/baseline/formwindowsettings.ui tests/auto/uiloader/baseline/helpdialog.ui tests/auto/uiloader/baseline/listwidgeteditor.ui tests/auto/uiloader/baseline/mainwindowbase.ui tests/auto/uiloader/baseline/newactiondialog.ui tests/auto/uiloader/baseline/newform.ui tests/auto/uiloader/baseline/orderdialog.ui tests/auto/uiloader/baseline/paletteeditor.ui tests/auto/uiloader/baseline/paletteeditoradvancedbase.ui tests/auto/uiloader/baseline/phrasebookbox.ui tests/auto/uiloader/baseline/plugindialog.ui tests/auto/uiloader/baseline/previewwidget.ui tests/auto/uiloader/baseline/previewwidgetbase.ui tests/auto/uiloader/baseline/qfiledialog.ui tests/auto/uiloader/baseline/qtgradientdialog.ui tests/auto/uiloader/baseline/qtgradienteditor.ui tests/auto/uiloader/baseline/qtgradientviewdialog.ui tests/auto/uiloader/baseline/saveformastemplate.ui tests/auto/uiloader/baseline/statistics.ui tests/auto/uiloader/baseline/stringlisteditor.ui tests/auto/uiloader/baseline/tabbedbrowser.ui tests/auto/uiloader/baseline/tablewidgeteditor.ui tests/auto/uiloader/baseline/translatedialog.ui tests/auto/uiloader/baseline/treewidgeteditor.ui tests/auto/uiloader/baseline/trpreviewtool.ui tests/auto/windowsmobile/test/test.pro tests/auto/xmlpatternsdiagnosticsts/test/tst_xmlpatternsdiagnosticsts.cpp tools/doxygen/config/header.html tools/doxygen/config/phonon.doxyfile tools/installer/nsis/opensource.ini tools/linguist/phrasebooks/polish.qph tools/linguist/shared/cpp.cpp tools/linguist/shared/ts.dtd tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-inc.qdocconf tools/qdoc3/test/qt.qdocconf tools/qvfb/qtopiakeysym.h tools/qvfb/qvfbx11view.cpp tools/qvfb/qvfbx11view.h tools/qvfb/x11keyfaker.cpp tools/xmlpatterns/main.cpp tools/xmlpatterns/main.h tools/xmlpatterns/qcoloringmessagehandler_p.h tools/xmlpatterns/qcoloroutput.cpp tools/xmlpatterns/qcoloroutput_p.h translations/assistant_de.ts translations/qt_ar.ts translations/qt_da.ts translations/qt_de.ts translations/qt_fr.ts translations/qt_ja_JP.ts translations/qt_ru.ts translations/qt_uk.ts translations/qt_zh_CN.ts util/qlalr/compress.cpp util/qlalr/cppgenerator.cpp util/qlalr/dotgraph.cpp util/qlalr/grammar.cpp util/qlalr/lalr.cpp util/qlalr/main.cpp util/qlalr/parsetable.cpp util/qlalr/recognizer.cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro2
-rw-r--r--tests/auto/compiler/.gitignore (renamed from tests/auto/compile/.gitignore)0
-rw-r--r--tests/auto/compiler/baseclass.cpp (renamed from tests/auto/compile/baseclass.cpp)0
-rw-r--r--tests/auto/compiler/baseclass.h (renamed from tests/auto/compile/baseclass.h)0
-rw-r--r--tests/auto/compiler/compiler.pro (renamed from tests/auto/compile/compile.pro)2
-rw-r--r--tests/auto/compiler/derivedclass.cpp (renamed from tests/auto/compile/derivedclass.cpp)0
-rw-r--r--tests/auto/compiler/derivedclass.h (renamed from tests/auto/compile/derivedclass.h)0
-rw-r--r--tests/auto/compiler/tst_compiler.cpp (renamed from tests/auto/compile/tst_compile.cpp)2
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp82
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp3
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp3
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp29
-rw-r--r--tests/auto/qtwidgets/tst_qtwidgets.cpp6
-rw-r--r--tests/auto/windowsmobile/test/testSimpleWidget_current.pngbin21940 -> 22034 bytes
-rw-r--r--tests/auto/windowsmobile/test/tst_windowsmobile.cpp12
-rw-r--r--tests/auto/windowsmobile/testQMenuBar/main.cpp2
16 files changed, 131 insertions, 12 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index e16eb75db6..80d540f23c 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -8,7 +8,7 @@ TEMPLATE = subdirs
SUBDIRS += \
bic \
collections \
- compile \
+ compiler \
compilerwarnings \
exceptionsafety \
linguist \
diff --git a/tests/auto/compile/.gitignore b/tests/auto/compiler/.gitignore
index bdcee467b6..bdcee467b6 100644
--- a/tests/auto/compile/.gitignore
+++ b/tests/auto/compiler/.gitignore
diff --git a/tests/auto/compile/baseclass.cpp b/tests/auto/compiler/baseclass.cpp
index 54795323f2..54795323f2 100644
--- a/tests/auto/compile/baseclass.cpp
+++ b/tests/auto/compiler/baseclass.cpp
diff --git a/tests/auto/compile/baseclass.h b/tests/auto/compiler/baseclass.h
index 25abbfea8d..25abbfea8d 100644
--- a/tests/auto/compile/baseclass.h
+++ b/tests/auto/compiler/baseclass.h
diff --git a/tests/auto/compile/compile.pro b/tests/auto/compiler/compiler.pro
index 6c38078874..c444c63af6 100644
--- a/tests/auto/compile/compile.pro
+++ b/tests/auto/compiler/compiler.pro
@@ -1,5 +1,5 @@
load(qttest_p4)
-SOURCES += tst_compile.cpp baseclass.cpp derivedclass.cpp
+SOURCES += tst_compiler.cpp baseclass.cpp derivedclass.cpp
HEADERS += baseclass.h derivedclass.h
QT = core
diff --git a/tests/auto/compile/derivedclass.cpp b/tests/auto/compiler/derivedclass.cpp
index 3b71861bb1..3b71861bb1 100644
--- a/tests/auto/compile/derivedclass.cpp
+++ b/tests/auto/compiler/derivedclass.cpp
diff --git a/tests/auto/compile/derivedclass.h b/tests/auto/compiler/derivedclass.h
index 9396ff9740..9396ff9740 100644
--- a/tests/auto/compile/derivedclass.h
+++ b/tests/auto/compiler/derivedclass.h
diff --git a/tests/auto/compile/tst_compile.cpp b/tests/auto/compiler/tst_compiler.cpp
index cef798af74..78c1a56fb1 100644
--- a/tests/auto/compile/tst_compile.cpp
+++ b/tests/auto/compiler/tst_compiler.cpp
@@ -653,4 +653,4 @@ void tst_Compiler::staticConstUnionWithInitializerList() const
}
QTEST_MAIN(tst_Compiler)
-#include "tst_compile.moc"
+#include "tst_compiler.moc"
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 6adcdfee4e..effa8763cf 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -156,6 +156,7 @@ private slots:
void windowFlags();
void shortcutsDeletion();
void painterStateProtectionOnWindowFrame();
+ void ensureClipping();
// Task fixes
void task236127_bspTreeIndexFails();
@@ -2459,6 +2460,87 @@ void tst_QGraphicsWidget::task250119_shortcutContext()
scene.removeItem(&w_signal);
}
+class ClippingAndTransformsScene : public QGraphicsScene
+{
+public:
+ QList<QGraphicsItem *> drawnItems;
+protected:
+ void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[],
+ const QStyleOptionGraphicsItem options[], QWidget *widget = 0)
+ {
+ drawnItems.clear();
+ for (int i = 0; i < numItems; ++i)
+ drawnItems << items[i];
+ QGraphicsScene::drawItems(painter, numItems, items, options, widget);
+ }
+};
+
+class RectWidget : public QGraphicsWidget
+{
+public:
+
+ RectWidget(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsWidget(parent), mColor(color) {}
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->setBrush(QBrush(mColor));
+ painter->drawRect(boundingRect());
+ }
+
+ Qt::GlobalColor mColor;
+};
+
+class RectItem : public QGraphicsItem
+{
+public:
+
+ RectItem(Qt::GlobalColor color, QGraphicsItem *parent=0) : QGraphicsItem(parent), mColor(color) {}
+
+ QRectF boundingRect() const
+ {return QRectF(10,10,50,50);}
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->setBrush(QBrush(mColor));
+ painter->drawRect(boundingRect());
+ }
+
+ Qt::GlobalColor mColor;
+};
+
+void tst_QGraphicsWidget::ensureClipping()
+{
+ ClippingAndTransformsScene scene;
+ scene.setSceneRect(-50, -50, 200, 200);
+
+ //A root that clip children
+ RectWidget *clipWidget = new RectWidget(Qt::black);
+ scene.addItem(clipWidget);
+
+ clipWidget->setFlag(QGraphicsItem::ItemClipsChildrenToShape);
+
+ //a child
+ RectWidget *childWidget = new RectWidget(Qt::red, clipWidget);
+ clipWidget->setGeometry(QRectF(10, 10, 100, 100));
+ childWidget->setGeometry(QRectF(25, 25, 50, 50));
+
+ //We put a QGraphicsItem to be sure this one is also paint
+ RectItem *childitem = new RectItem(Qt::blue, clipWidget);
+
+ QGraphicsView view(&scene);
+ view.show();
+#ifdef Q_WS_X11
+ qt_x11_wait_for_window_manager(&view);
+#endif
+ QTest::qWait(250);
+
+ QList<QGraphicsItem *> expected;
+ expected << clipWidget << childWidget << childitem;
+ QVERIFY(scene.drawnItems.contains(clipWidget));
+ QVERIFY(scene.drawnItems.contains(childWidget));
+ QVERIFY(scene.drawnItems.contains(childitem));
+}
+
QTEST_MAIN(tst_QGraphicsWidget)
#include "tst_qgraphicswidget.moc"
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 13aa2b8ab1..8590eac693 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -266,6 +266,9 @@ tst_QMenu::addActionsAndClear()
void tst_QMenu::mouseActivation()
{
+#ifdef Q_OS_WINCE_WM
+ QSKIP("We have a separate mouseActivation test for Windows mobile.", SkipAll);
+#endif
QMenu menu;
menu.addAction("Menu Action");
menu.show();
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
index 70a198d6e5..5cf27d314d 100644
--- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
+++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
@@ -745,6 +745,9 @@ private:
void tst_QScriptEngineDebugger::multithreadedDebugging()
{
+#ifdef Q_OS_WINCE
+ QSKIP("This tests uses too much memory for Windows CE", SkipAll);
+#endif
ScriptEvaluator eval;
QThread thread;
eval.moveToThread(&thread);
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index ba5ef70509..85ecf6b855 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -181,6 +181,7 @@ private slots:
void ignoreSslErrorsList();
void ignoreSslErrorsListWithSlot_data();
void ignoreSslErrorsListWithSlot();
+ void readFromClosedSocket();
static void exitLoop()
{
@@ -1668,6 +1669,34 @@ void tst_QSslSocket::ignoreSslErrorsListWithSlot()
QCOMPARE(socket.waitForEncrypted(10000), expectEncryptionSuccess);
}
+// make sure a closed socket has no bytesAvailable()
+// related to https://bugs.webkit.org/show_bug.cgi?id=28016
+void tst_QSslSocket::readFromClosedSocket()
+{
+ QSslSocketPtr socket = newSocket();
+ socket->ignoreSslErrors();
+ socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
+ socket->ignoreSslErrors();
+ socket->waitForConnected();
+ socket->waitForEncrypted();
+ // provoke a response by sending a request
+ socket->write("GET /gif/fluke.gif HTTP/1.1\n");
+ socket->write("Host: ");
+ socket->write(QtNetworkSettings::serverName().toLocal8Bit().constData());
+ socket->write("\n");
+ socket->write("\n");
+ socket->waitForBytesWritten();
+ socket->waitForReadyRead();
+ QVERIFY(socket->state() == QAbstractSocket::ConnectedState);
+ QVERIFY(socket->bytesAvailable());
+ socket->close();
+ QVERIFY(!socket->bytesAvailable());
+ QVERIFY(!socket->bytesToWrite());
+ socket->waitForDisconnected();
+ QVERIFY(!socket->bytesAvailable());
+ QVERIFY(!socket->bytesToWrite());
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslSocket)
diff --git a/tests/auto/qtwidgets/tst_qtwidgets.cpp b/tests/auto/qtwidgets/tst_qtwidgets.cpp
index 0ccc0aa51b..9473648024 100644
--- a/tests/auto/qtwidgets/tst_qtwidgets.cpp
+++ b/tests/auto/qtwidgets/tst_qtwidgets.cpp
@@ -86,9 +86,9 @@ void tst_QtWidgets::snapshot()
QString filename = "qtwidgets_" + QHostInfo::localHostName() + "_" + QDateTime::currentDateTime().toString("yyyy.MM.dd_hh.mm.ss") + ".png";
QFtp ftp;
- ftp.connectToHost("kramer.troll.no");
- ftp.login("anonymous");
- ftp.cd("pics");
+ ftp.connectToHost("qt-test-server.qt-test-net");
+ ftp.login("ftptest", "password");
+ ftp.cd("qtest/pics");
ftp.put(buf.data(), filename, QFtp::Binary);
ftp.close();
diff --git a/tests/auto/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
index 5cbc2bb313..09a10a3797 100644
--- a/tests/auto/windowsmobile/test/testSimpleWidget_current.png
+++ b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
Binary files differ
diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
index 73ea0a6af8..091504c896 100644
--- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
@@ -62,14 +62,14 @@ public:
#endif
}
-#ifdef Q_OS_WINCE_WM
+#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
private slots:
void testMainWindowAndMenuBar();
void testSimpleWidget();
#endif
};
-#ifdef Q_OS_WINCE_WM
+#if defined(Q_OS_WINCE_WM) && defined(_WIN32_WCE) && _WIN32_WCE <= 0x501
bool qt_wince_is_platform(const QString &platformString) {
wchar_t tszPlatform[64];
@@ -120,8 +120,6 @@ void openMenu()
void compareScreenshots(const QString &image1, const QString &image2)
{
- if (qt_wince_is_smartphone())
- QSKIP("This test is only for Windows Mobile", SkipAll);
QImage screenShot(image1);
QImage original(image2);
@@ -145,6 +143,9 @@ void takeScreenShot(const QString filename)
void tst_WindowsMobile::testMainWindowAndMenuBar()
{
+ if (qt_wince_is_smartphone())
+ QSKIP("This test is only for Windows Mobile", SkipAll);
+
QProcess process;
process.start("testQMenuBar.exe");
QCOMPARE(process.state(), QProcess::Running);
@@ -158,6 +159,9 @@ void tst_WindowsMobile::testMainWindowAndMenuBar()
void tst_WindowsMobile::testSimpleWidget()
{
+ if (qt_wince_is_smartphone())
+ QSKIP("This test is only for Windows Mobile", SkipAll);
+
QMenuBar menubar;
menubar.show();
QWidget maximized;
diff --git a/tests/auto/windowsmobile/testQMenuBar/main.cpp b/tests/auto/windowsmobile/testQMenuBar/main.cpp
index 4949dbbf67..f615c4836a 100644
--- a/tests/auto/windowsmobile/testQMenuBar/main.cpp
+++ b/tests/auto/windowsmobile/testQMenuBar/main.cpp
@@ -48,8 +48,6 @@
int main(int argc, char * argv[])
{
- int widgetNum = 20;
-
QList<QWidget*> widgets;
QApplication app(argc, argv);