summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/_Categories/QtCore.txt4
-rw-r--r--tests/auto/_Categories/QtGui.txt4
-rw-r--r--tests/auto/_networkselftest/tst_networkselftest.cpp16
-rw-r--r--tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp314
-rw-r--r--tests/auto/languagechange/tst_languagechange.cpp6
-rw-r--r--tests/auto/qabstractitemview/tst_qabstractitemview.cpp4
-rw-r--r--tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp4
-rw-r--r--tests/auto/qautoptr/qautoptr.pro2
-rw-r--r--tests/auto/qbitarray/tst_qbitarray.cpp2
-rw-r--r--tests/auto/qclipboard/tst_qclipboard.cpp6
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp4
-rw-r--r--tests/auto/qcssparser/qcssparser.pro1
-rw-r--r--tests/auto/qcssparser/tst_cssparser.cpp4
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp6
-rw-r--r--tests/auto/qdesktopservices/qdesktopservices.pro16
-rw-r--r--tests/auto/qdesktopservices/tst_qdesktopservices.cpp178
-rw-r--r--tests/auto/qdir/tst_qdir.cpp56
-rw-r--r--tests/auto/qfiledialog/qfiledialog.pro2
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp2
-rw-r--r--tests/auto/qfilesystemmodel/qfilesystemmodel.pro4
-rw-r--r--tests/auto/qfontdatabase/tst_qfontdatabase.cpp4
-rw-r--r--tests/auto/qfontdialog/tst_qfontdialog.cpp2
-rw-r--r--tests/auto/qftp/tst_qftp.cpp10
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp4
-rw-r--r--tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp60
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp2
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp6
-rw-r--r--tests/auto/qhttp/tst_qhttp.cpp12
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp12
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp24
-rw-r--r--tests/auto/qimage/tst_qimage.cpp6
-rw-r--r--tests/auto/qimagereader/qimagereader.pro1
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/qitemmodel/qitemmodel.pro11
-rw-r--r--tests/auto/qitemview/tst_qitemview.cpp4
-rw-r--r--tests/auto/qkeyevent/tst_qkeyevent.cpp6
-rw-r--r--tests/auto/qlibrary/tst/tst.pro2
-rw-r--r--tests/auto/qlocalsocket/lackey/lackey.pro4
-rw-r--r--tests/auto/qlocalsocket/test/test.pro2
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp18
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp14
-rw-r--r--tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp22
-rw-r--r--tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp8
-rw-r--r--tests/auto/qnetworkreply/test/test.pro4
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp42
-rw-r--r--tests/auto/qobject/qobject.pro2
-rw-r--r--tests/auto/qobject/tst_qobject.cpp2
-rw-r--r--tests/auto/qobject/tst_qobject.pro1
-rw-r--r--tests/auto/qobjectrace/tst_qobjectrace.cpp14
-rw-r--r--tests/auto/qpluginloader/tst/tst.pro3
-rw-r--r--tests/auto/qpluginloader/tst_qpluginloader.cpp19
-rw-r--r--tests/auto/qresourceengine/qresourceengine.pro14
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp4
-rw-r--r--tests/auto/qsettings/tst_qsettings.cpp4
-rw-r--r--tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp14
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp28
-rw-r--r--tests/auto/qsql/qsql.pro4
-rw-r--r--tests/auto/qsqldatabase/qsqldatabase.pro4
-rw-r--r--tests/auto/qsqlerror/qsqlerror.pro2
-rw-r--r--tests/auto/qsqlfield/qsqlfield.pro2
-rw-r--r--tests/auto/qsqlquery/qsqlquery.pro2
-rw-r--r--tests/auto/qsqlquerymodel/qsqlquerymodel.pro2
-rw-r--r--tests/auto/qsqlrecord/qsqlrecord.pro2
-rw-r--r--tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro4
-rw-r--r--tests/auto/qsqltablemodel/qsqltablemodel.pro2
-rw-r--r--tests/auto/qsqlthread/qsqlthread.pro2
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro4
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp40
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp182
-rw-r--r--tests/auto/qtcpserver/crashingServer/main.cpp2
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp8
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp34
-rw-r--r--tests/auto/qtemporaryfile/qtemporaryfile.pro2
-rw-r--r--tests/auto/qtextcodec/test/test.pro2
-rw-r--r--tests/auto/qtextedit/tst_qtextedit.cpp2
-rw-r--r--tests/auto/qtextodfwriter/qtextodfwriter.pro2
-rw-r--r--tests/auto/qtextstream/test/test.pro2
-rw-r--r--tests/auto/qtextstream/tst_qtextstream.cpp4
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp1
-rw-r--r--tests/auto/qudpsocket/tst_qudpsocket.cpp152
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp6
-rw-r--r--tests/auto/qwaitcondition/tst_qwaitcondition.cpp716
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp12
-rw-r--r--tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp4
-rw-r--r--tests/auto/symbian/orientationchange/orientationchange.pro4
-rw-r--r--tests/auto/symbian/orientationchange/tst_orientationchange.cpp36
-rw-r--r--tests/auto/symbian/qmainexceptions/qmainexceptions.pro4
-rw-r--r--tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp8
88 files changed, 1256 insertions, 1019 deletions
diff --git a/tests/auto/_Categories/QtCore.txt b/tests/auto/_Categories/QtCore.txt
index c3fb879..452b6ba 100644
--- a/tests/auto/_Categories/QtCore.txt
+++ b/tests/auto/_Categories/QtCore.txt
@@ -5,7 +5,7 @@ exceptionsafety
qabstractitemmodel
#Requires STL
qalgorithms
-qanimationgroup
+qanimationgroup
qatomicint
qatomicpointer
qbitarray
@@ -80,7 +80,7 @@ qsocketnotifier
qstate
qstatemachine
#Requires STL
-qstl
+qstl
qstring
qstringlist
qstringmatcher
diff --git a/tests/auto/_Categories/QtGui.txt b/tests/auto/_Categories/QtGui.txt
index 6ef7cfe..dcb3be5 100644
--- a/tests/auto/_Categories/QtGui.txt
+++ b/tests/auto/_Categories/QtGui.txt
@@ -43,7 +43,7 @@ qdirmodel
qdockwidget
qdoublespinbox
qdoublevalidator
-qdrag
+qdrag
qerrormessage
qfiledialog
qfileiconprovider
@@ -166,7 +166,7 @@ qtextlist
qtextobject
qtextodfwriter
#This test can only be compiled on HW currently, because it does not use reduced exports
-#Because we are planning to use class level exports also in HW later on, there is no
+#Because we are planning to use class level exports also in HW later on, there is no
#sense to enable this at all
#qtextpiecetable
qtextscriptengine
diff --git a/tests/auto/_networkselftest/tst_networkselftest.cpp b/tests/auto/_networkselftest/tst_networkselftest.cpp
index cfb5c3c..2c57e83 100644
--- a/tests/auto/_networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/_networkselftest/tst_networkselftest.cpp
@@ -52,8 +52,8 @@ class tst_NetworkSelfTest: public QObject
Q_OBJECT
public:
tst_NetworkSelfTest();
- virtual ~tst_NetworkSelfTest();
-
+ virtual ~tst_NetworkSelfTest();
+
private slots:
void hostTest();
void dnsResolution_data();
@@ -68,7 +68,7 @@ private slots:
void httpServer();
void httpsServer();
void httpProxy();
- void httpProxyBasicAuth();
+ void httpProxyBasicAuth();
void httpProxyNtlmAuth();
void socks5Proxy();
void socks5ProxyAuth();
@@ -371,7 +371,7 @@ void tst_NetworkSelfTest::remotePortsOpen_data()
QTest::newRow("https") << 443;
QTest::newRow("http-proxy") << 3128;
QTest::newRow("http-proxy-auth-basic") << 3129;
- QTest::newRow("http-proxy-auth-ntlm") << 3130;
+ QTest::newRow("http-proxy-auth-ntlm") << 3130;
QTest::newRow("socks5-proxy") << 1080;
QTest::newRow("socks5-proxy-auth") << 1081;
}
@@ -381,8 +381,8 @@ void tst_NetworkSelfTest::remotePortsOpen()
#ifdef Q_OS_SYMBIAN
if (qstrcmp(QTest::currentDataTag(), "http-proxy-auth-ntlm") == 0)
QSKIP("NTML authentication not yet supported in Symbian", SkipSingle);
-#endif
-
+#endif
+
QFETCH(int, portNumber);
QTcpSocket socket;
socket.connectToHost(QtNetworkSettings::serverName(), portNumber);
@@ -538,7 +538,7 @@ void tst_NetworkSelfTest::httpProxyNtlmAuth()
{
#ifdef Q_OS_SYMBIAN
QSKIP("NTML authentication not yet supported in Symbian", SkipAll);
-#else
+#else
netChat(3130, QList<Chat>()
// test auth required response
<< Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
@@ -551,7 +551,7 @@ void tst_NetworkSelfTest::httpProxyNtlmAuth()
<< Chat::discardUntil("\r\nProxy-Authenticate: NTLM\r\n")
<< Chat::DiscardUntilDisconnect
);
-#endif
+#endif
}
// SOCKSv5 is a binary protocol
diff --git a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index c867899..0a95e5a 100644
--- a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -71,49 +71,60 @@ private slots:
void widgets_data();
void widgets();
+
+ void vector_data();
+ void vector();
+
+ void list_data();
+ void list();
+
+ void linkedList_data();
+ void linkedList();
};
// helper structs to create an arbitrary widget
-struct AbstractObjectCreator
+struct AbstractTester
{
- virtual void test(QObject *parent) = 0;
+ virtual void operator()(QObject *parent) = 0;
};
+Q_DECLARE_METATYPE(AbstractTester *)
-Q_DECLARE_METATYPE(AbstractObjectCreator *)
+typedef void (*TestFunction)(QObject*);
+Q_DECLARE_METATYPE(TestFunction)
template <typename T>
-struct ObjectCreator : public AbstractObjectCreator
+struct ObjectCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{
QScopedPointer<T> ptr(new T);
}
};
-struct BitArrayCreator : public AbstractObjectCreator
+struct BitArrayCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{ QScopedPointer<QBitArray> bitArray(new QBitArray(100, true)); }
};
-struct ByteArrayMatcherCreator : public AbstractObjectCreator
+struct ByteArrayMatcherCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{ QScopedPointer<QByteArrayMatcher> ptr(new QByteArrayMatcher("ralf test",8)); }
};
-struct CryptographicHashCreator : public AbstractObjectCreator
+struct CryptographicHashCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{
QScopedPointer<QCryptographicHash> ptr(new QCryptographicHash(QCryptographicHash::Sha1));
ptr->addData("ralf test",8);
}
};
-struct DataStreamCreator : public AbstractObjectCreator
+struct DataStreamCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{
QScopedPointer<QByteArray> arr(new QByteArray("hallo, test"));
QScopedPointer<QDataStream> ptr(new QDataStream(arr.data(), QIODevice::ReadWrite));
@@ -121,9 +132,9 @@ struct DataStreamCreator : public AbstractObjectCreator
}
};
-struct DirCreator : public AbstractObjectCreator
+struct DirCreator : public AbstractTester
{
- void test(QObject *)
+ void operator()(QObject *)
{
QDir::cleanPath("../////././");
QScopedPointer<QDir> ptr(new QDir("."));
@@ -140,9 +151,9 @@ struct DirCreator : public AbstractObjectCreator
void tst_ExceptionSafetyObjects::objects_data()
{
- QTest::addColumn<AbstractObjectCreator *>("objectCreator");
+ QTest::addColumn<AbstractTester *>("objectCreator");
-#define NEWROW(T) QTest::newRow(#T) << static_cast<AbstractObjectCreator *>(new ObjectCreator<T >)
+#define NEWROW(T) QTest::newRow(#T) << static_cast<AbstractTester *>(new ObjectCreator<T >)
NEWROW(QObject);
NEWROW(QBuffer);
NEWROW(QFile);
@@ -154,7 +165,7 @@ void tst_ExceptionSafetyObjects::objects_data()
NEWROW(QTranslator);
NEWROW(QFSFileEngine);
-#define NEWROW2(T, CREATOR) QTest::newRow(#T) << static_cast<AbstractObjectCreator *>(new CREATOR)
+#define NEWROW2(T, CREATOR) QTest::newRow(#T) << static_cast<AbstractTester *>(new CREATOR)
NEWROW2(QBitArray, BitArrayCreator);
NEWROW2(QByteArrayMatcher, ByteArrayMatcherCreator);
NEWROW2(QCryptographicHash, CryptographicHashCreator);
@@ -165,9 +176,10 @@ void tst_ExceptionSafetyObjects::objects_data()
// create and destructs an object, and lets each and every allocation
// during construction and destruction fail.
-static void doOOMTest(AbstractObjectCreator *creator, QObject *parent)
+template <typename T>
+static void doOOMTest(T &testFunc, QObject *parent, int start=0)
{
- int currentOOMIndex = 0;
+ int currentOOMIndex = start;
bool caught = false;
bool done = false;
@@ -180,7 +192,7 @@ static void doOOMTest(AbstractObjectCreator *creator, QObject *parent)
caught = false;
try {
- creator->test(parent);
+ testFunc(parent);
} catch (const std::bad_alloc &) {
caught = true;
} catch (const std::exception &ex) {
@@ -198,6 +210,10 @@ static void doOOMTest(AbstractObjectCreator *creator, QObject *parent)
}
}
+ // if we get a FAIL, stop executing now
+ if (QTest::currentTestFailed())
+ done = true;
+
//#define REALLY_VERBOSE
#ifdef REALLY_VERBOSE
fprintf(stderr, " OOM Index: %d\n", currentOOMIndex);
@@ -212,6 +228,8 @@ static void doOOMTest(AbstractObjectCreator *creator, QObject *parent)
#ifdef VERBOSE
fprintf(stderr, "OOM Test done, checked allocs: %d (range %d - %d)\n", currentOOMIndex,
allocCountBefore, allocFailer.currentAllocIndex());
+#else
+ Q_UNUSED(allocCountBefore);
#endif
}
@@ -278,7 +296,9 @@ void tst_ExceptionSafetyObjects::initTestCase()
(void) std::set_new_handler(nh_func);
#endif
- doOOMTest(new ObjectCreator<SelfTestObject>, 0);
+ ObjectCreator<SelfTestObject> *selfTest = new ObjectCreator<SelfTestObject>;
+ doOOMTest(*selfTest, 0);
+ delete selfTest;
QCOMPARE(alloc1Failed, 1);
QCOMPARE(alloc2Failed, 1);
QCOMPARE(alloc3Failed, 2);
@@ -289,15 +309,17 @@ void tst_ExceptionSafetyObjects::initTestCase()
void tst_ExceptionSafetyObjects::objects()
{
- QFETCH(AbstractObjectCreator *, objectCreator);
+ QFETCH(AbstractTester *, objectCreator);
- doOOMTest(objectCreator, 0);
+ doOOMTest(*objectCreator, 0);
+
+ delete objectCreator;
}
template <typename T>
-struct WidgetCreator : public AbstractObjectCreator
+struct WidgetCreator : public AbstractTester
{
- void test(QObject *parent)
+ void operator()(QObject *parent)
{
Q_ASSERT(!parent || parent->isWidgetType());
QScopedPointer<T> ptr(parent ? new T(static_cast<QWidget *>(parent)) : new T);
@@ -305,9 +327,9 @@ struct WidgetCreator : public AbstractObjectCreator
};
// QSizeGrip doesn't have a default constructor - always pass parent (even though it might be 0)
-template <> struct WidgetCreator<QSizeGrip> : public AbstractObjectCreator
+template <> struct WidgetCreator<QSizeGrip> : public AbstractTester
{
- void test(QObject *parent)
+ void operator()(QObject *parent)
{
Q_ASSERT(!parent || parent->isWidgetType());
QScopedPointer<QSizeGrip> ptr(new QSizeGrip(static_cast<QWidget *>(parent)));
@@ -315,9 +337,9 @@ template <> struct WidgetCreator<QSizeGrip> : public AbstractObjectCreator
};
// QDesktopWidget doesn't need a parent.
-template <> struct WidgetCreator<QDesktopWidget> : public AbstractObjectCreator
+template <> struct WidgetCreator<QDesktopWidget> : public AbstractTester
{
- void test(QObject *parent)
+ void operator()(QObject *parent)
{
Q_ASSERT(!parent || parent->isWidgetType());
QScopedPointer<QDesktopWidget> ptr(new QDesktopWidget());
@@ -325,10 +347,10 @@ template <> struct WidgetCreator<QDesktopWidget> : public AbstractObjectCreator
};
void tst_ExceptionSafetyObjects::widgets_data()
{
- QTest::addColumn<AbstractObjectCreator *>("widgetCreator");
+ QTest::addColumn<AbstractTester *>("widgetCreator");
#undef NEWROW
-#define NEWROW(T) QTest::newRow(#T) << static_cast<AbstractObjectCreator *>(new WidgetCreator<T >)
+#define NEWROW(T) QTest::newRow(#T) << static_cast<AbstractTester *>(new WidgetCreator<T >)
NEWROW(QWidget);
@@ -389,17 +411,239 @@ void tst_ExceptionSafetyObjects::widgets_data()
void tst_ExceptionSafetyObjects::widgets()
{
- QFETCH(AbstractObjectCreator *, widgetCreator);
+ QFETCH(AbstractTester *, widgetCreator);
- doOOMTest(widgetCreator, 0);
+ doOOMTest(*widgetCreator, 0, 00000);
QWidget parent;
- doOOMTest(widgetCreator, &parent);
+ doOOMTest(*widgetCreator, &parent, 00000);
+
+ delete widgetCreator;
// if the test reaches here without crashing, we passed :)
QVERIFY(true);
}
+struct Integer
+{
+ Integer(int value = 42)
+ : ptr(new int(value))
+ {
+ ++instanceCount;
+ }
+
+ Integer(const Integer &other)
+ : ptr(new int(*other.ptr))
+ {
+ ++instanceCount;
+ }
+
+ Integer &operator=(const Integer &other)
+ {
+ int *newPtr = new int(*other.ptr);
+ delete ptr;
+ ptr = newPtr;
+ return *this;
+ }
+
+ ~Integer()
+ {
+ --instanceCount;
+ delete ptr;
+ }
+
+ int value() const
+ {
+ return *ptr;
+ }
+
+ int *ptr;
+ static int instanceCount;
+};
+
+int Integer::instanceCount = 0;
+
+template <template<typename T> class Container>
+void containerInsertTest(QObject*)
+{
+ Container<Integer> container;
+
+ // insert an item in an empty container
+ try {
+ container.insert(container.begin(), 41);
+ } catch (...) {
+ QVERIFY(container.isEmpty());
+ QCOMPARE(Integer::instanceCount, 0);
+ return;
+ }
+
+ QCOMPARE(container.size(), 1);
+ QCOMPARE(Integer::instanceCount, 1);
+
+ // insert an item before another item
+ try {
+ container.insert(container.begin(), 42);
+ } catch (...) {
+ QCOMPARE(container.size(), 1);
+ QCOMPARE(container.first().value(), 41);
+ QCOMPARE(Integer::instanceCount, 1);
+ return;
+ }
+
+ QCOMPARE(Integer::instanceCount, 2);
+
+ // insert an item in between
+ try {
+ container.insert(container.begin() + 1, 43);
+ } catch (...) {
+ QCOMPARE(container.size(), 2);
+ QCOMPARE(container.first().value(), 41);
+ QCOMPARE((container.begin() + 1)->value(), 42);
+ QCOMPARE(Integer::instanceCount, 2);
+ return;
+ }
+
+ QCOMPARE(Integer::instanceCount, 3);
+}
+
+template <template<typename T> class Container>
+void containerAppendTest(QObject*)
+{
+ Container<Integer> container;
+
+ // append to an empty container
+ try {
+ container.append(42);
+ } catch (...) {
+ QCOMPARE(container.size(), 0);
+ QCOMPARE(Integer::instanceCount, 0);
+ return;
+ }
+
+ // append to a container with one item
+ try {
+ container.append(43);
+ } catch (...) {
+ QCOMPARE(container.size(), 1);
+ QCOMPARE(container.first().value(), 42);
+ QCOMPARE(Integer::instanceCount, 1);
+ return;
+ }
+}
+
+template <template<typename T> class Container>
+void containerEraseTest(QObject*)
+{
+ Container<Integer> container;
+
+ try {
+ container.append(42);
+ container.append(43);
+ container.append(44);
+ container.append(45);
+ container.append(46);
+ } catch (...) {
+ // don't care
+ return;
+ }
+
+ // sanity checks
+ QCOMPARE(container.size(), 5);
+ QCOMPARE(Integer::instanceCount, 5);
+
+ // delete the first one
+ try {
+ container.erase(container.begin());
+ } catch (...) {
+ QCOMPARE(container.size(), 5);
+ QCOMPARE(container.first().value(), 42);
+ QCOMPARE(Integer::instanceCount, 5);
+ return;
+ }
+
+ QCOMPARE(container.size(), 4);
+ QCOMPARE(container.first().value(), 43);
+ QCOMPARE(Integer::instanceCount, 4);
+
+ // delete the last one
+ try {
+ container.erase(container.end() - 1);
+ } catch (...) {
+ QCOMPARE(container.size(), 4);
+ QCOMPARE(Integer::instanceCount, 4);
+ return;
+ }
+
+ QCOMPARE(container.size(), 3);
+ QCOMPARE(container.first().value(), 43);
+ QCOMPARE((container.begin() + 1)->value(), 44);
+ QCOMPARE((container.begin() + 2)->value(), 45);
+ QCOMPARE(Integer::instanceCount, 3);
+
+ // delete the middle one
+ try {
+ container.erase(container.begin() + 1);
+ } catch (...) {
+ QCOMPARE(container.size(), 3);
+ QCOMPARE(container.first().value(), 43);
+ QCOMPARE((container.begin() + 1)->value(), 44);
+ QCOMPARE((container.begin() + 2)->value(), 45);
+ QCOMPARE(Integer::instanceCount, 3);
+ return;
+ }
+
+ QCOMPARE(container.size(), 2);
+ QCOMPARE(container.first().value(), 43);
+ QCOMPARE((container.begin() + 1)->value(), 45);
+ QCOMPARE(Integer::instanceCount, 2);
+}
+
+template <template<typename T> class Container>
+static void containerData()
+{
+ QTest::addColumn<TestFunction>("testFunction");
+
+ QTest::newRow("insert") << static_cast<TestFunction>(containerInsertTest<Container>);
+ QTest::newRow("append") << static_cast<TestFunction>(containerAppendTest<Container>);
+ QTest::newRow("erase") << static_cast<TestFunction>(containerEraseTest<Container>);
+}
+
+void tst_ExceptionSafetyObjects::vector_data()
+{
+ containerData<QVector>();
+}
+
+void tst_ExceptionSafetyObjects::vector()
+{
+ QFETCH(TestFunction, testFunction);
+
+ doOOMTest(testFunction, 0);
+}
+
+void tst_ExceptionSafetyObjects::list_data()
+{
+ containerData<QList>();
+}
+
+void tst_ExceptionSafetyObjects::list()
+{
+ QFETCH(TestFunction, testFunction);
+
+ doOOMTest(testFunction, 0);
+}
+
+void tst_ExceptionSafetyObjects::linkedList_data()
+{
+ containerData<QLinkedList>();
+}
+
+void tst_ExceptionSafetyObjects::linkedList()
+{
+ QFETCH(TestFunction, testFunction);
+
+ doOOMTest(testFunction, 0);
+}
+
QTEST_MAIN(tst_ExceptionSafetyObjects)
#include "tst_exceptionsafety_objects.moc"
#endif // QT_NO_EXCEPTIONS
diff --git a/tests/auto/languagechange/tst_languagechange.cpp b/tests/auto/languagechange/tst_languagechange.cpp
index f856f67..9ffadb1 100644
--- a/tests/auto/languagechange/tst_languagechange.cpp
+++ b/tests/auto/languagechange/tst_languagechange.cpp
@@ -213,11 +213,11 @@ void tst_languageChange::retranslatability()
"get proper widget layout.");
TransformTranslator translator;
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
- // Allow a little extra time or emulator startup delays cause failure
+ // Allow a little extra time or emulator startup delays cause failure
QTimer::singleShot(5000, &translator, SLOT(install()));
-#else
+#else
QTimer::singleShot(500, &translator, SLOT(install()));
-#endif
+#endif
switch (dialogType) {
case InputDialog:
(void)QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label"));
diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
index 6a6b395..cceaed8 100644
--- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp
@@ -456,7 +456,7 @@ void tst_QAbstractItemView::basic_tests(TestView *view)
view->setDragEnabled(true);
QCOMPARE(view->dragEnabled(), true);
#endif
-
+
// setAlternatingRowColors
view->setAlternatingRowColors(false);
QCOMPARE(view->alternatingRowColors(), false);
@@ -569,7 +569,7 @@ void tst_QAbstractItemView::basic_tests(TestView *view)
view->tst_setState(TestView::CollapsingState);
QVERIFY(view->tst_state()==TestView::CollapsingState);
#endif
-
+
view->tst_startAutoScroll();
view->tst_stopAutoScroll();
view->tst_doAutoScroll();
diff --git a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 2a4a1a7..b3f918b 100644
--- a/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -84,7 +84,7 @@ public:
#ifdef Q_OS_SYMBIAN
QString location = QLatin1String("./cache/");
#else
- QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+ QString location = QDesktopServices::storageLocation(QDesktopServices::DataLocation)
+ QLatin1String("/cache/");
#endif
setCacheDirectory(location);
@@ -111,7 +111,7 @@ tst_QAbstractNetworkCache::tst_QAbstractNetworkCache()
}
tst_QAbstractNetworkCache::~tst_QAbstractNetworkCache()
-{
+{
}
static bool AlwaysTrue = true;
diff --git a/tests/auto/qautoptr/qautoptr.pro b/tests/auto/qautoptr/qautoptr.pro
index 9eab084..b0c574f 100644
--- a/tests/auto/qautoptr/qautoptr.pro
+++ b/tests/auto/qautoptr/qautoptr.pro
@@ -1,4 +1,4 @@
load(qttest_p4)
SOURCES += tst_qautoptr.cpp
-QT = core
+QT = core
include(../xmlpatterns.pri)
diff --git a/tests/auto/qbitarray/tst_qbitarray.cpp b/tests/auto/qbitarray/tst_qbitarray.cpp
index 3c9ef53..f8f288f 100644
--- a/tests/auto/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/qbitarray/tst_qbitarray.cpp
@@ -646,7 +646,7 @@ void tst_QBitArray::resize()
// grow the array back and check the new bit
a.resize(10);
QCOMPARE( a, QStringToQBitArray(QString("1100000000")) );
-
+
// other test with and
a.resize(9);
QBitArray b = QStringToQBitArray(QString("1111111111"));
diff --git a/tests/auto/qclipboard/tst_qclipboard.cpp b/tests/auto/qclipboard/tst_qclipboard.cpp
index c01f274..2dc20d5 100644
--- a/tests/auto/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/qclipboard/tst_qclipboard.cpp
@@ -198,7 +198,7 @@ void tst_QClipboard::copy_exit_paste()
// ### It's still possible to test copy/paste - just keep the apps running
#elif defined (Q_OS_SYMBIAN) && defined (Q_CC_NOKIAX86)
QSKIP("emulator cannot launch multiple processes",SkipAll);
-#endif
+#endif
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup", SkipAll);
const QStringList stringArgument = QStringList() << "Test string.";
@@ -242,7 +242,7 @@ void tst_QClipboard::setMimeData()
QApplication::clipboard()->setMimeData(data, QClipboard::Clipboard);
QApplication::clipboard()->setMimeData(data, QClipboard::Selection);
QApplication::clipboard()->setMimeData(data, QClipboard::FindBuffer);
-
+
QSignalSpy spySelection(QApplication::clipboard(), SIGNAL(selectionChanged()));
QSignalSpy spyData(QApplication::clipboard(), SIGNAL(dataChanged()));
QSignalSpy spyFindBuffer(QApplication::clipboard(), SIGNAL(findBufferChanged()));
@@ -279,7 +279,7 @@ void tst_QClipboard::setMimeData()
spySelection.clear();
spyData.clear();
spyFindBuffer.clear();
-
+
QApplication::clipboard()->setMimeData(newData, QClipboard::Clipboard);
QApplication::clipboard()->setMimeData(newData, QClipboard::Selection); // used to crash on X11
QApplication::clipboard()->setMimeData(newData, QClipboard::FindBuffer);
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index dbb90fd..0ed02f1 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -1246,7 +1246,7 @@ void tst_QComboBox::insertItem()
QCOMPARE(testWidget->count(), initialItems.count() + 1);
QCOMPARE(testWidget->itemText(expectedIndex), itemLabel);
-
+
if (editable)
QCOMPARE(testWidget->currentText(), QString("FOO"));
}
@@ -2202,7 +2202,7 @@ void tst_QComboBox::noScrollbar()
QVERIFY(!comboBox.view()->horizontalScrollBar()->isVisible());
QVERIFY(!comboBox.view()->verticalScrollBar()->isVisible());
}
-
+
{
QTableWidget *table = new QTableWidget(2,2);
QComboBox comboBox;
diff --git a/tests/auto/qcssparser/qcssparser.pro b/tests/auto/qcssparser/qcssparser.pro
index 2a61403..84ee425 100644
--- a/tests/auto/qcssparser/qcssparser.pro
+++ b/tests/auto/qcssparser/qcssparser.pro
@@ -13,4 +13,3 @@ wince*|symbian: {
addFiles.path = .
DEPLOYMENT += addFiles
}
-
diff --git a/tests/auto/qcssparser/tst_cssparser.cpp b/tests/auto/qcssparser/tst_cssparser.cpp
index ce923e1..9870ec2 100644
--- a/tests/auto/qcssparser/tst_cssparser.cpp
+++ b/tests/auto/qcssparser/tst_cssparser.cpp
@@ -1139,8 +1139,8 @@ void tst_CssParser::specificity()
QVERIFY(parser.parse(&sheet));
QCOMPARE(sheet.styleRules.count() + sheet.nameIndex.count() + sheet.idIndex.count() , 1);
- QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0)
- : (!sheet.nameIndex.isEmpty()) ? *sheet.nameIndex.begin()
+ QCss::StyleRule rule = (!sheet.styleRules.isEmpty()) ? sheet.styleRules.at(0)
+ : (!sheet.nameIndex.isEmpty()) ? *sheet.nameIndex.begin()
: *sheet.idIndex.begin();
QCOMPARE(rule.selectors.count(), 1);
QTEST(rule.selectors.at(0).specificity(), "specificity");
diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
index 93bf4ed..652093e 100644
--- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -2216,12 +2216,12 @@ void tst_QDateTimeEdit::mousePress()
// Ask the SC_SpinBoxUp button location from style
QStyleOptionSpinBox so;
- so.rect = testWidget->rect();
+ so.rect = testWidget->rect();
QRect rectUp = testWidget->style()->subControlRect(QStyle::CC_SpinBox, &so, QStyle::SC_SpinBoxUp, testWidget);
-
+
// Send mouseClick to center of SC_SpinBoxUp
QTest::mouseClick(testWidget, Qt::LeftButton, 0, rectUp.center());
- QCOMPARE(testWidget->date().year(), 2005);
+ QCOMPARE(testWidget->date().year(), 2005);
}
diff --git a/tests/auto/qdesktopservices/qdesktopservices.pro b/tests/auto/qdesktopservices/qdesktopservices.pro
index 3c96e85..7c1bdb9 100644
--- a/tests/auto/qdesktopservices/qdesktopservices.pro
+++ b/tests/auto/qdesktopservices/qdesktopservices.pro
@@ -10,22 +10,22 @@ symbian: {
dummy.path = .
text.sources = text\*
- text.path = \data\others\
+ text.path = \data\others\
image.sources = image\*
image.path = \data\images\
-
+
audio.sources = audio\*
audio.path = \data\sounds\
-
+
video.sources = video\*
- video.path = \data\videos\
-
+ video.path = \data\videos\
+
install.sources = install\*
- install.path = \data\installs\
-
+ install.path = \data\installs\
+
DEPLOYMENT += image audio video install
-
+
# These are only needed for manual tests
#DEPLOYMENT += dummy text
}
diff --git a/tests/auto/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/qdesktopservices/tst_qdesktopservices.cpp
index c69b112..dd85774 100644
--- a/tests/auto/qdesktopservices/tst_qdesktopservices.cpp
+++ b/tests/auto/qdesktopservices/tst_qdesktopservices.cpp
@@ -61,16 +61,16 @@ private slots:
void cleanup();
void openUrl();
#ifdef Q_OS_SYMBIAN
- // These test are manual ones, you need to check from device that
+ // These test are manual ones, you need to check from device that
// correct system application is started with correct content
- // When you want to run these test, uncomment //#define RUN_MANUAL_TESTS
+ // When you want to run these test, uncomment //#define RUN_MANUAL_TESTS
void openHttpUrl_data();
void openHttpUrl();
void openMailtoUrl_data();
- void openMailtoUrl();
+ void openMailtoUrl();
void openFileUrl_data();
void openFileUrl();
-#endif
+#endif
void handlers();
void storageLocation_data();
void storageLocation();
@@ -104,7 +104,7 @@ void tst_qdesktopservices::openUrl()
// At the bare minimum check that they return false for invalid url's
QCOMPARE(QDesktopServices::openUrl(QUrl()), false);
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- // this test is only valid on windows on other systems it might mean open a new document in the application handling .file
+ // this test is only valid on windows on other systems it might mean open a new document in the application handling .file
QCOMPARE(QDesktopServices::openUrl(QUrl("file://invalid.file")), false);
#endif
}
@@ -112,32 +112,32 @@ void tst_qdesktopservices::openUrl()
#ifdef Q_OS_SYMBIAN
void tst_qdesktopservices::openHttpUrl_data()
{
- QTest::addColumn<QUrl>("url");
- QTest::addColumn<bool>("result");
- QTest::newRow("BasicWithHttp") << QUrl("http://www.google.fi") << true;
- QTest::newRow("BasicWithoutHttp") << QUrl("www.nokia.fi") << true;
+ QTest::addColumn<QUrl>("url");
+ QTest::addColumn<bool>("result");
+ QTest::newRow("BasicWithHttp") << QUrl("http://www.google.fi") << true;
+ QTest::newRow("BasicWithoutHttp") << QUrl("www.nokia.fi") << true;
QTest::newRow("BasicWithUserAndPw") << QUrl("http://s60prereleases:oslofjord@pepper.troll.no/s60prereleases/patches/") << true;
QTest::newRow("URL with space") << QUrl("http://www.manataka.org/Contents Page.html") << true;
-
+
}
void tst_qdesktopservices::openHttpUrl()
{
-#ifndef RUN_MANUAL_TESTS
- QSKIP("Test disabled -- only for manual purposes", SkipAll);
-#endif
-
- QFETCH(QUrl, url);
- QFETCH(bool, result);
- QCOMPARE(QDesktopServices::openUrl(url), result);
+#ifndef RUN_MANUAL_TESTS
+ QSKIP("Test disabled -- only for manual purposes", SkipAll);
+#endif
+
+ QFETCH(QUrl, url);
+ QFETCH(bool, result);
+ QCOMPARE(QDesktopServices::openUrl(url), result);
QTest::qWait(30000);
}
void tst_qdesktopservices::openMailtoUrl_data()
{
QTest::addColumn<QUrl>("url");
- QTest::addColumn<bool>("result");
-
+ QTest::addColumn<bool>("result");
+
// http://en.wikipedia.org/wiki/E-mail_address
// RFC Valid e-mail addresses
QTest::newRow("Wiki valid email 1") << QUrl("mailto:abc@example.com") << true;
@@ -149,97 +149,97 @@ void tst_qdesktopservices::openMailtoUrl_data()
QTest::newRow("Wiki valid email 7") << QUrl("mailto:abc+mailbox/department=shipping@example.com") << true;
// S60 email client considers the next URL invalid, even ity should be valid
QTest::newRow("Wiki valid email 8") << QUrl("mailto:!#$%&'*+-/=?^_`.{|}~@example.com") << true; // all of these characters are allowed
- QTest::newRow("Wiki valid email 9") << QUrl("mailto:\"abc@def\"@example.com") << true; // anything goes inside quotation marks
+ QTest::newRow("Wiki valid email 9") << QUrl("mailto:\"abc@def\"@example.com") << true; // anything goes inside quotation marks
QTest::newRow("Wiki valid email 10") << QUrl("mailto:\"Fred \\\"quota\\\" Bloggs\"@example.com") << true; // however, quotes need escaping
-
- // RFC invalid e-mail addresses
- // These return true even though they are invalid, but check that user is notified about invalid URL in mail application
- QTest::newRow("Wiki invalid email 1") << QUrl("mailto:Abc.example.com") << true; // character @ is missing
- QTest::newRow("Wiki invalid email 2") << QUrl("mailto:Abc.@example.com") << true; // character dot(.) is last in local part
- QTest::newRow("Wiki invalid email 3") << QUrl("mailto:Abc..123@example.com") << true; // character dot(.) is double
- QTest::newRow("Wiki invalid email 4") << QUrl("mailto:A@b@c@example.com") << true; // only one @ is allowed outside quotations marks
- QTest::newRow("Wiki invalid email 5") << QUrl("mailto:()[]\\;:,<>@example.com") << true; // none of the characters before the @ is allowed outside quotation marks
-
- QTest::newRow("Basic") << QUrl("mailto:test@nokia.com") << true;
+
+ // RFC invalid e-mail addresses
+ // These return true even though they are invalid, but check that user is notified about invalid URL in mail application
+ QTest::newRow("Wiki invalid email 1") << QUrl("mailto:Abc.example.com") << true; // character @ is missing
+ QTest::newRow("Wiki invalid email 2") << QUrl("mailto:Abc.@example.com") << true; // character dot(.) is last in local part
+ QTest::newRow("Wiki invalid email 3") << QUrl("mailto:Abc..123@example.com") << true; // character dot(.) is double
+ QTest::newRow("Wiki invalid email 4") << QUrl("mailto:A@b@c@example.com") << true; // only one @ is allowed outside quotations marks
+ QTest::newRow("Wiki invalid email 5") << QUrl("mailto:()[]\\;:,<>@example.com") << true; // none of the characters before the @ is allowed outside quotation marks
+
+ QTest::newRow("Basic") << QUrl("mailto:test@nokia.com") << true;
QTest::newRow("BasicSeveralAddr") << QUrl("mailto:test@nokia.com,test2@nokia.com,test3@nokia.com") << true;
- QTest::newRow("BasicAndSubject") << QUrl("mailto:test@nokia.com?subject=hello nokia") << true;
- QTest::newRow("BasicAndTo") << QUrl("mailto:test@nokia.com?to=test2@nokia.com") << true;
-
+ QTest::newRow("BasicAndSubject") << QUrl("mailto:test@nokia.com?subject=hello nokia") << true;
+ QTest::newRow("BasicAndTo") << QUrl("mailto:test@nokia.com?to=test2@nokia.com") << true;
+
QTest::newRow("BasicAndCc") << QUrl("mailto:test@nokia.com?cc=mycc@address.com") << true;
- QTest::newRow("BasicAndBcc") << QUrl("mailto:test@nokia.com?bcc=mybcc@address.com") << true;
- QTest::newRow("BasicAndBody") << QUrl("mailto:test@nokia.com?body=Test email message body") << true;
-
+ QTest::newRow("BasicAndBcc") << QUrl("mailto:test@nokia.com?bcc=mybcc@address.com") << true;
+ QTest::newRow("BasicAndBody") << QUrl("mailto:test@nokia.com?body=Test email message body") << true;
+
// RFC examples, these are actually invalid because there is not host defined
// Check that user is notified about invalid URL in mail application
QTest::newRow("RFC2368 Example 1") << QUrl::fromEncoded("mailto:addr1%2C%20addr2") << true;
QTest::newRow("RFC2368 Example 2") << QUrl::fromEncoded("mailto:?to=addr1%2C%20addr2") << true;
QTest::newRow("RFC2368 Example 3") << QUrl("mailto:addr1?to=addr2") << true;
-
- QTest::newRow("RFC2368 Example 4") << QUrl("mailto:joe@example.com?cc=bob@example.com&body=hello") << true;
+
+ QTest::newRow("RFC2368 Example 4") << QUrl("mailto:joe@example.com?cc=bob@example.com&body=hello") << true;
QTest::newRow("RFC2368 Example 5") << QUrl("mailto:?to=joe@example.com&cc=bob@example.com&body=hello") << true;
QTest::newRow("RFC2368 Example 6") << QUrl("mailto:foobar@example.com?In-Reply-To=%3c3469A91.D10AF4C@example.com") << true; // OpaqueData
QTest::newRow("RFC2368 Example 7") << QUrl::fromEncoded("mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index") << true;
QTest::newRow("RFC2368 Example 8") << QUrl::fromEncoded("mailto:infobot@example.com?body=send%20current-issue") << true;
QTest::newRow("RFC2368 Example 9") << QUrl("mailto:infobot@example.com?subject=current-issue") << true;
QTest::newRow("RFC2368 Example 10") << QUrl("mailto:chris@example.com") << true;
-
+
//QTest::newRow("RFC2368 Example 11 - illegal chars") << QUrl("mailto:joe@example.com?cc=bob@example.com?body=hello") << false;
QTest::newRow("RFC2368 Example 12") << QUrl::fromEncoded("mailto:gorby%25kremvax@example.com") << true; // encoded reserved chars '%'
- QTest::newRow("RFC2368 Example 13") << QUrl::fromEncoded("mailto:unlikely%3Faddress@example.com?blat=foop") << true; // encoded reserved chars `?'
+ QTest::newRow("RFC2368 Example 13") << QUrl::fromEncoded("mailto:unlikely%3Faddress@example.com?blat=foop") << true; // encoded reserved chars `?'
}
void tst_qdesktopservices::openMailtoUrl()
{
-#ifndef RUN_MANUAL_TESTS
- QSKIP("Test disabled -- only for manual purposes", SkipAll);
-#endif
-
- QFETCH(QUrl, url);
- QFETCH(bool, result);
- QCOMPARE(QDesktopServices::openUrl(url), result);
+#ifndef RUN_MANUAL_TESTS
+ QSKIP("Test disabled -- only for manual purposes", SkipAll);
+#endif
+
+ QFETCH(QUrl, url);
+ QFETCH(bool, result);
+ QCOMPARE(QDesktopServices::openUrl(url), result);
}
void tst_qdesktopservices::openFileUrl_data()
{
QTest::addColumn<QUrl>("url");
- QTest::addColumn<bool>("result");
-
+ QTest::addColumn<bool>("result");
+
// Text files
- QTest::newRow("DOS text file") << QUrl("file:///c:/data/others/dosfile.txt") << true;
- QTest::newRow("No EOF text file") << QUrl("file:///c:/data/others/noendofline.txt") << true;
+ QTest::newRow("DOS text file") << QUrl("file:///c:/data/others/dosfile.txt") << true;
+ QTest::newRow("No EOF text file") << QUrl("file:///c:/data/others/noendofline.txt") << true;
QTest::newRow("text file") << QUrl("file:///c:/data/others/testfile.txt") << true;
- QTest::newRow("text file with space") << QUrl("file:///c:/data/others/test file.txt") << true;
-
+ QTest::newRow("text file with space") << QUrl("file:///c:/data/others/test file.txt") << true;
+
// Images
- QTest::newRow("BMP image") << QUrl("file:///c:/data/images/image.bmp") << true;
- QTest::newRow("GIF image") << QUrl("file:///c:/data/images/image.gif") << true;
- QTest::newRow("JPG image") << QUrl("file:///c:/data/images/image.jpg") << true;
- QTest::newRow("PNG image") << QUrl("file:///c:/data/images/image.png") << true;
-
- // Audio
- QTest::newRow("MP4 audio") << QUrl("file:///c:/data/sounds/aac-only.mp4") << true;
- QTest::newRow("3GP audio") << QUrl("file:///c:/data/sounds/audio_3gpp.3gp") << true;
-
- // Video
- QTest::newRow("MP4 video") << QUrl("file:///c:/data/videos/vid-mpeg4-22k.mp4") << true;
-
- // Installs
- QTest::newRow("SISX") << QUrl("file:///c:/data/installs/ErrRd.sisx") << true;
-
- // Errors
- QTest::newRow("File does not exist") << QUrl("file:///c:/thisfileneverexists.txt") << false;
+ QTest::newRow("BMP image") << QUrl("file:///c:/data/images/image.bmp") << true;
+ QTest::newRow("GIF image") << QUrl("file:///c:/data/images/image.gif") << true;
+ QTest::newRow("JPG image") << QUrl("file:///c:/data/images/image.jpg") << true;
+ QTest::newRow("PNG image") << QUrl("file:///c:/data/images/image.png") << true;
+
+ // Audio
+ QTest::newRow("MP4 audio") << QUrl("file:///c:/data/sounds/aac-only.mp4") << true;
+ QTest::newRow("3GP audio") << QUrl("file:///c:/data/sounds/audio_3gpp.3gp") << true;
+
+ // Video
+ QTest::newRow("MP4 video") << QUrl("file:///c:/data/videos/vid-mpeg4-22k.mp4") << true;
+
+ // Installs
+ QTest::newRow("SISX") << QUrl("file:///c:/data/installs/ErrRd.sisx") << true;
+
+ // Errors
+ QTest::newRow("File does not exist") << QUrl("file:///c:/thisfileneverexists.txt") << false;
}
void tst_qdesktopservices::openFileUrl()
{
-#ifndef RUN_MANUAL_TESTS
- QSKIP("Test disabled -- only for manual purposes", SkipAll);
-#endif
-
- QFETCH(QUrl, url);
- QFETCH(bool, result);
+#ifndef RUN_MANUAL_TESTS
+ QSKIP("Test disabled -- only for manual purposes", SkipAll);
+#endif
+
+ QFETCH(QUrl, url);
+ QFETCH(bool, result);
QCOMPARE(QDesktopServices::openUrl(url), result);
- QTest::qWait(15000);
+ QTest::qWait(15000);
}
#endif
@@ -297,17 +297,17 @@ void tst_qdesktopservices::storageLocation()
QString storageLocation = QDesktopServices::storageLocation(location);
QString displayName = QDesktopServices::displayName(location);
//qDebug( "displayName: %s", displayName );
-
+
storageLocation = storageLocation.toLower();
displayName = displayName.toLower();
-
- QString drive = QDir::currentPath().left(2).toLower();
+
+ QString drive = QDir::currentPath().left(2).toLower();
if( drive == "z:" )
drive = "c:";
switch(location) {
case QDesktopServices::DesktopLocation:
- QCOMPARE( storageLocation, QString() );
+ QCOMPARE( storageLocation, drive + QString("/data") );
break;
case QDesktopServices::DocumentsLocation:
QCOMPARE( storageLocation, drive + QString("/data") );
@@ -319,9 +319,9 @@ void tst_qdesktopservices::storageLocation()
case QDesktopServices::ApplicationsLocation:
#ifdef Q_CC_NOKIAX86
QCOMPARE( storageLocation, QString("z:/sys/bin") );
-#else
- QCOMPARE( storageLocation, drive + QString("/sys/bin") );
-#endif
+#else
+ QCOMPARE( storageLocation, drive + QString("/sys/bin") );
+#endif
break;
case QDesktopServices::MusicLocation:
QCOMPARE( storageLocation, drive + QString("/data/sounds") );
@@ -331,7 +331,7 @@ void tst_qdesktopservices::storageLocation()
break;
case QDesktopServices::PicturesLocation:
QCOMPARE( storageLocation, drive + QString("/data/images") );
- break;
+ break;
case QDesktopServices::TempLocation:
QCOMPARE( storageLocation, QDir::tempPath().toLower());
break;
@@ -339,18 +339,18 @@ void tst_qdesktopservices::storageLocation()
QCOMPARE( storageLocation, QDir::homePath().toLower());
break;
case QDesktopServices::DataLocation:
- // Just check the folder not the drive
+ // Just check the folder not the drive
QCOMPARE( storageLocation.mid(2), QDir::currentPath().mid(2).toLower());
- break;
+ break;
default:
QCOMPARE( storageLocation, QString() );
- break;
+ break;
}
#else
QDesktopServices::storageLocation(location);
QDesktopServices::displayName(location);
-#endif
+#endif
}
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp
index 60bb177..549e9d1 100644
--- a/tests/auto/qdir/tst_qdir.cpp
+++ b/tests/auto/qdir/tst_qdir.cpp
@@ -400,20 +400,20 @@ void tst_QDir::entryList_data()
QTest::addColumn<int>("sortspec");
QTest::addColumn<QStringList>("expected");
QTest::newRow("spaces1") << SRCDIR "testdir/spaces" << QStringList("*. bar")
- << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
- << QStringList("foo. bar"); // notice how spaces5 works
+ << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
+ << QStringList("foo. bar"); // notice how spaces5 works
QTest::newRow("spaces2") << SRCDIR "testdir/spaces" << QStringList("*.bar")
- << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
- << QStringList("foo.bar");
+ << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
+ << QStringList("foo.bar");
QTest::newRow("spaces3") << SRCDIR "testdir/spaces" << QStringList("foo.*")
- << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
- << QString("foo. bar,foo.bar").split(',');
+ << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
+ << QString("foo. bar,foo.bar").split(',');
QTest::newRow("files1") << SRCDIR "testdir/dir" << QString("*r.cpp *.pro").split(" ")
- << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
- << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(',');
+ << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
+ << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(',');
QTest::newRow("testdir1") << SRCDIR "testdir" << QStringList()
- << (int)(QDir::AllDirs) << (int)(QDir::NoSort)
- << QString(".,..,dir,spaces").split(',');
+ << (int)(QDir::AllDirs) << (int)(QDir::NoSort)
+ << QString(".,..,dir,spaces").split(',');
// #### this test uses filenames that cannot be represented on all filesystems we test, in
// particular HFS+ on the Mac. When checking out the files with perforce it silently ignores the
// error that it cannot represent the file names stored in the repository and the test fails. That
@@ -422,8 +422,8 @@ void tst_QDir::entryList_data()
// ignored but git reports an error. The test only tried to prevent QDir from _hanging_ when listing
// the directory.
// QTest::newRow("unprintablenames") << SRCDIR "unprintablenames" << QStringList("*")
-// << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
-// << QString(".,..").split(",");
+// << (int)(QDir::NoFilter) << (int)(QDir::NoSort)
+// << QString(".,..").split(",");
QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data")
<< (int)(QDir::NoFilter) << (int)(QDir::NoSort)
<< QString("file1.data,file2.data,file3.data").split(',');
@@ -559,10 +559,10 @@ void tst_QDir::entryList()
QFile::remove(SRCDIR "entrylist/brokenlink.lnk");
QFile::remove(SRCDIR "entrylist/brokenlink");
- // WinCE/Symbian does not have . and .. in the directory listing
+ // WinCE/Symbian does not have . and .. in the directory listing
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
- expected.removeAll(".");
- expected.removeAll("..");
+ expected.removeAll(".");
+ expected.removeAll("..");
#endif
#if defined(Q_OS_WIN)
@@ -572,7 +572,7 @@ void tst_QDir::entryList()
QFile::link(SRCDIR "entryList/nothing", SRCDIR "entrylist/brokenlink.lnk");
#elif defined(Q_OS_SYMBIAN)
// Symbian doesn't support links to directories
- expected.removeAll("linktodirectory.lnk");
+ expected.removeAll("linktodirectory.lnk");
// Expecting failures from a couple of OpenC bugs. Do checks only once.
static int xFailChecked = false;
@@ -769,7 +769,7 @@ void tst_QDir::canonicalPath_data()
}
#endif
- QTest::newRow("relative") << "." << appPath;
+ QTest::newRow("relative") << "." << appPath;
QTest::newRow("relativeSubDir") << "./testData/../testData" << appPath + "/testData";
#ifndef Q_WS_WIN
@@ -816,10 +816,10 @@ void tst_QDir::current_data()
else
appPath.chop(1); // remove the ending slash
#if defined Q_WS_WIN
- if (appPath.endsWith("release", Qt::CaseInsensitive))
- appPath = appPath.left(appPath.length()-8);
+ if (appPath.endsWith("release", Qt::CaseInsensitive))
+ appPath = appPath.left(appPath.length()-8);
else if (appPath.endsWith("debug", Qt::CaseInsensitive))
- appPath = appPath.left(appPath.length()-6);
+ appPath = appPath.left(appPath.length()-6);
#endif
QTest::newRow("startup") << QString() << appPath;
@@ -853,9 +853,9 @@ void tst_QDir::current()
QDir newCurrent = QDir::current();
QDir::setCurrent(oldDir);
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
- QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower());
+ QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower());
#else
- QCOMPARE(newCurrent.absolutePath(), currentDir);
+ QCOMPARE(newCurrent.absolutePath(), currentDir);
#endif
}
@@ -870,8 +870,8 @@ void tst_QDir::cd_data()
QTest::addColumn<QString>("newDir");
QString appPath = QDir::currentPath();
- int index = appPath.lastIndexOf("/");
- QTest::newRow("cdUp") << QDir::currentPath() << ".." << true << appPath.left(index==0?1:index);
+ int index = appPath.lastIndexOf("/");
+ QTest::newRow("cdUp") << QDir::currentPath() << ".." << true << appPath.left(index==0?1:index);
QTest::newRow("noChange") << QDir::currentPath() << "." << true << appPath;
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) // on windows QDir::root() is usually c:/ but cd "/" will not force it to be root
QTest::newRow("absolute") << QDir::currentPath() << "/" << true << "/";
@@ -913,11 +913,11 @@ void tst_QDir::setNameFilters_data()
QTest::newRow("spaces1") << appPath + "testdir/spaces" << QStringList("*. bar")
<< QStringList("foo. bar");
QTest::newRow("spaces2") << appPath + "testdir/spaces" << QStringList("*.bar")
- << QStringList("foo.bar");
+ << QStringList("foo.bar");
QTest::newRow("spaces3") << appPath + "testdir/spaces" << QStringList("foo.*")
- << QString("foo. bar,foo.bar").split(",");
+ << QString("foo. bar,foo.bar").split(",");
QTest::newRow("files1") << appPath + "testdir/dir" << QString("*r.cpp *.pro").split(" ")
- << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(",");
+ << QString("qdir.pro,qrc_qdir.cpp,tst_qdir.cpp").split(",");
QTest::newRow("resources1") << QString(":/tst_qdir/resources/entryList") << QStringList("*.data")
<< QString("file1.data,file2.data,file3.data").split(',');
}
@@ -1204,7 +1204,7 @@ void tst_QDir::operator_eq()
void tst_QDir::dotAndDotDot()
{
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
- QSKIP("WinCE and Symbian do not have . nor ..", SkipAll);
+ QSKIP("WinCE and Symbian do not have . nor ..", SkipAll);
#endif
QDir dir(QString(SRCDIR "testdir/"));
QStringList entryList = dir.entryList(QDir::Dirs);
diff --git a/tests/auto/qfiledialog/qfiledialog.pro b/tests/auto/qfiledialog/qfiledialog.pro
index 3c238ec..bea7716 100644
--- a/tests/auto/qfiledialog/qfiledialog.pro
+++ b/tests/auto/qfiledialog/qfiledialog.pro
@@ -15,6 +15,4 @@ wince*|symbian: {
}
symbian:TARGET.EPOCHEAPSIZE="0x100 0x1000000"
-
symbian:HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h
-
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index 2a19a04..75b6100 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -1112,7 +1112,7 @@ void tst_QFileInfo::isExecutable()
#ifdef Q_OS_SYMBIAN
# if defined(Q_CC_NOKIAX86)
QSKIP("Impossible to implement reading/touching of application binaries in Symbian emulator", SkipAll);
-# endif
+# endif
QString appPath = "c:/sys/bin/tst_qfileinfo.exe";
#else
QString appPath = QCoreApplication::applicationDirPath();
diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
index 8701318..d421e44 100644
--- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
+++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
@@ -5,12 +5,12 @@ include(../../../../modeltest/modeltest.pri)
QT = core gui
-SOURCES += tst_qfilesystemmodel.cpp
+SOURCES += tst_qfilesystemmodel.cpp
TARGET = tst_qfilesystemmodel
symbian: {
HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h
-
+
# need to deploy something to create the private directory
dummyDeploy.sources = tst_qfilesystemmodel.cpp
dummyDeploy.path = .
diff --git a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
index 7dd2fd0..eec9872 100644
--- a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
+++ b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp
@@ -193,7 +193,7 @@ void tst_QFontDatabase::addAppFont()
{
#ifdef Q_OS_SYMBIAN
QSKIP( "Symbian: Application fonts are not yet supported", SkipAll );
-#else
+#else
QFETCH(bool, useMemoryFont);
QSignalSpy fontDbChangedSpy(QApplication::instance(), SIGNAL(fontDatabaseChanged()));
@@ -243,7 +243,7 @@ void tst_QFontDatabase::addAppFont()
QCOMPARE(fontDbChangedSpy.count(), 2);
QVERIFY(db.families() == oldFamilies);
-#endif
+#endif
}
QTEST_MAIN(tst_QFontDatabase)
diff --git a/tests/auto/qfontdialog/tst_qfontdialog.cpp b/tests/auto/qfontdialog/tst_qfontdialog.cpp
index cbdd440..ae92880 100644
--- a/tests/auto/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/qfontdialog/tst_qfontdialog.cpp
@@ -171,7 +171,7 @@ void tst_QFontDialog::task256466_wrongStyle()
QModelIndex currentFamily = familyList->model()->index(i, 0);
familyList->setCurrentIndex(currentFamily);
const QFont current = dialog.currentFont(),
- expected = fdb.font(currentFamily.data().toString(),
+ expected = fdb.font(currentFamily.data().toString(),
styleList->currentIndex().data().toString(), sizeList->currentIndex().data().toInt());
QCOMPARE(current.family(), expected.family());
QCOMPARE(current.style(), expected.style());
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 7942d4b..f32803e 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -193,7 +193,7 @@ tst_QFtp::tst_QFtp()
}
tst_QFtp::~tst_QFtp()
-{
+{
}
void tst_QFtp::initTestCase_data()
@@ -201,12 +201,12 @@ void tst_QFtp::initTestCase_data()
QTest::addColumn<bool>("setProxy");
QTest::addColumn<int>("proxyType");
- QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
+ QTest::newRow("WithoutProxy") << false << 0;
+#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
//### doesn't work well yet.
//QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy);
-#endif
+#endif
}
void tst_QFtp::initTestCase()
@@ -1293,7 +1293,7 @@ void tst_QFtp::abort_data()
QTest::newRow( "get_fluke02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/rfc3252") << QByteArray();
// Qt/CE and Symbian test environment has to less memory for this test
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
QByteArray bigData( 10*1024*1024, 0 );
bigData.fill( 'B' );
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 7f6f322..8239b03 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -6638,7 +6638,7 @@ public:
QGraphicsRectItem::paint(painter, option, widget);
painter->drawText(boundingRect(), Qt::AlignCenter, QString("%1x%2\n%3x%4").arg(p.x()).arg(p.y()).arg(sp.x()).arg(sp.y()));
}
-
+
protected:
void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{
@@ -6989,7 +6989,7 @@ void tst_QGraphicsItem::setTransformProperties()
QCOMPARE_TRANSFORM(item1->sceneTransform(), item2->sceneTransform());
- QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform());
+ QCOMPARE_TRANSFORM(item1->itemTransform(item2), QTransform());
QCOMPARE_TRANSFORM(item2->itemTransform(item1), QTransform());
}
}
diff --git a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
index bca673f..29c1491 100644
--- a/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
+++ b/tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp
@@ -178,7 +178,7 @@ void tst_QGraphicsLayout::automaticReparenting()
QCOMPARE(w1->parentItem(), static_cast<QGraphicsItem*>(window));
QCOMPARE(w2->parentItem(), static_cast<QGraphicsItem*>(window));
- // Sublayouts
+ // Sublayouts
QGraphicsLinearLayout *l2 = new QGraphicsLinearLayout();
QGraphicsWidget *w3 = new QGraphicsWidget();
l2->addItem(w3);
@@ -212,7 +212,7 @@ void tst_QGraphicsLayout::automaticReparenting()
class TestLayout : public QGraphicsLinearLayout
{
public:
- TestLayout(QGraphicsLayoutItem *parent = 0)
+ TestLayout(QGraphicsLayoutItem *parent = 0)
: QGraphicsLinearLayout(parent)
{
m_count = 0;
@@ -224,7 +224,7 @@ class TestLayout : public QGraphicsLinearLayout
QGraphicsLinearLayout::setGeometry(rect);
}
-
+
int m_count;
};
@@ -320,9 +320,9 @@ public:
}
void setGeometry(const QRectF &geom);
-
+
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
-
+
inline QGraphicsRectItem *rectItem() {
return static_cast<QGraphicsRectItem *>(graphicsItem());
}
@@ -354,20 +354,20 @@ QSizeF AnimatedLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint
class AnimatedLayout : public QObject, public QGraphicsLinearLayout {
Q_OBJECT
public:
- AnimatedLayout(QGraphicsWidget *widget) : QGraphicsLinearLayout(widget), m_timeline(500, this)
+ AnimatedLayout(QGraphicsWidget *widget) : QGraphicsLinearLayout(widget), m_timeline(500, this)
{
connect(&m_timeline, SIGNAL(valueChanged(qreal)), this, SLOT(valueChanged(qreal)));
}
-
+
void setGeometry(const QRectF &geom) {
fromGeoms.clear();
toGeoms.clear();
for (int i = 0; i < count(); ++i) {
fromGeoms << itemAt(i)->geometry();
}
-
+
QGraphicsLinearLayout::setGeometry(geom);
-
+
for (int i = 0; i < count(); ++i) {
toGeoms << itemAt(i)->geometry();
}
@@ -380,13 +380,13 @@ private slots:
QGraphicsLayoutItem *li = itemAt(i);
QRectF from = fromGeoms.at(i);
QRectF to = toGeoms.at(i);
-
- QRectF geom(from.topLeft() + (to.topLeft() - from.topLeft()) * value,
+
+ QRectF geom(from.topLeft() + (to.topLeft() - from.topLeft()) * value,
from.size() + (to.size() - from.size()) * value);
static_cast<QGraphicsRectItem*>(li->graphicsItem())->setRect(geom);
}
}
-private:
+private:
QTimeLine m_timeline;
QVector<QRectF> fromGeoms;
QVector<QRectF> toGeoms;
@@ -407,7 +407,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems()
QGraphicsRectItem *item1 = new QGraphicsRectItem;
AnimatedLayoutItem *li1 = new AnimatedLayoutItem(item1);
lout->addItem(li1);
-
+
QGraphicsRectItem *item2 = new QGraphicsRectItem;
AnimatedLayoutItem *li2 = new AnimatedLayoutItem(item2);
lout->addItem(li2);
@@ -417,7 +417,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems()
lout->addItem(li3);
window->setLayout(lout);
-
+
window->setGeometry(0, 0, 99, 99);
view.setSceneRect(QRectF(-10, -10, 110, 110));
view.resize(150, 150);
@@ -426,11 +426,11 @@ void tst_QGraphicsLayout::alternativeLayoutItems()
QApplication::processEvents();
QTest::qWait(750);
QApplication::processEvents();
-
+
QCOMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF( 0, 0, 33, 99));
QCOMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(33, 0, 33, 99));
QCOMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(66, 0, 33, 99));
-
+
lout->setOrientation(Qt::Vertical);
QApplication::processEvents();
@@ -439,7 +439,7 @@ void tst_QGraphicsLayout::alternativeLayoutItems()
QCOMPARE(static_cast<QGraphicsRectItem*>(li1->graphicsItem())->rect(), QRectF(0, 0, 99, 33));
QCOMPARE(static_cast<QGraphicsRectItem*>(li2->graphicsItem())->rect(), QRectF(0, 33, 99, 33));
QCOMPARE(static_cast<QGraphicsRectItem*>(li3->graphicsItem())->rect(), QRectF(0, 66, 99, 33));
-
+
}
class CustomLayoutItem : public QGraphicsLayoutItem {
@@ -451,8 +451,8 @@ public:
setOwnedByLayout(true);
}
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
-
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
+
~CustomLayoutItem() {
m_destructedSet->insert(this);
}
@@ -482,8 +482,8 @@ public:
m_destructedSet = destructedSet;
}
- QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
-
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF() ) const;
+
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * = 0)
{
const QRect r = option->rect.adjusted(0, 0, -1, -1);
@@ -565,7 +565,7 @@ void insertItem(int index, QGraphicsLayoutItem *item)
QGraphicsWidget *widget = static_cast<QGraphicsWidget *>(item);
updateParentWidget(widget);
-
+
if (index == items.count()) {
items.append(item);
@@ -613,7 +613,7 @@ void tst_QGraphicsLayout::ownership()
CustomLayoutItem *li3 = new CustomLayoutItem(&destructedSet);
lay->addItem(li3);
destructedSet.clear();
-
+
delete lay;
QSet<QGraphicsLayoutItem*> expected;
expected << li1 << li2 << li3;
@@ -642,10 +642,10 @@ void tst_QGraphicsLayout::ownership()
{
QGraphicsWidget *window = new QGraphicsWidget(0, Qt::Window);
QGraphicsLinearLayout *lay = new QGraphicsLinearLayout;
-
+
CustomGraphicsWidget *li1 = new CustomGraphicsWidget;
lay->addItem(li1);
-
+
QGraphicsLinearLayout *li2 = new QGraphicsLinearLayout;
CustomGraphicsWidget *li2_1 = new CustomGraphicsWidget;
li2->addItem(li2_1);
@@ -654,25 +654,25 @@ void tst_QGraphicsLayout::ownership()
CustomGraphicsWidget *li2_3 = new CustomGraphicsWidget;
li2->addItem(li2_3);
lay->addItem(li2);
-
+
CustomGraphicsWidget *li3 = new CustomGraphicsWidget;
lay->addItem(li3);
-
+
window->setLayout(lay);
scene.addItem(window);
view.resize(500, 200);
view.show();
-
+
for (int i = li2->count(); i > 0; --i) {
QCOMPARE(li2->count(), i);
delete li2->itemAt(0);
}
-
+
for (int i = lay->count(); i > 0; --i) {
QCOMPARE(lay->count(), i);
delete lay->itemAt(0);
}
-
+
delete window;
}
diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 1d0663a..f436551 100644
--- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -3189,7 +3189,7 @@ void tst_QGraphicsProxyWidget::windowFlags()
QVERIFY((widget->windowFlags() & widgetWFlags) == widgetWFlags);
proxy.setWidget(widget);
-
+
if (resultingProxyFlags == 0)
QVERIFY(!proxy.windowFlags());
else
diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp
index 50d2325..f4ad307 100644
--- a/tests/auto/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp
@@ -165,7 +165,7 @@ tst_QHostInfo::tst_QHostInfo()
}
tst_QHostInfo::~tst_QHostInfo()
-{
+{
}
void tst_QHostInfo::initTestCase()
@@ -223,7 +223,7 @@ void tst_QHostInfo::lookupIPv4_data()
QTest::newRow("empty") << "" << "" << int(QHostInfo::HostNotFound);
QTest::newRow("lupinella_00") << "l" << lupinellaIp << int(QHostInfo::NoError);
- QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError);
+ QTest::newRow("lupinella_01") << "lupinella" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("lupinella_02") << "lupinella.troll.no" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("lupinella_03") << "lupinella.trolltech.com" << lupinellaIp << int(QHostInfo::NoError);
QTest::newRow("multiple_ip4") << "multi.dev.troll.no" << "1.2.3.4 1.2.3.5 10.3.3.31" << int(QHostInfo::NoError);
@@ -392,7 +392,7 @@ protected:
void tst_QHostInfo::threadSafety()
{
const int nattempts = 5;
-#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
const int runs = 10;
#else
const int runs = 100;
diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp
index a6bec39..37ce256 100644
--- a/tests/auto/qhttp/tst_qhttp.cpp
+++ b/tests/auto/qhttp/tst_qhttp.cpp
@@ -198,9 +198,9 @@ void tst_QHttp::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
-#ifdef TEST_QNETWORK_PROXY
+#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
-#endif
+#endif
}
void tst_QHttp::initTestCase()
@@ -426,7 +426,7 @@ void tst_QHttp::head_data()
QTest::newRow( "failprot_01" ) << QtNetworkSettings::serverName() << 80u
<< QString("/t") << 1 << 404 << 0u;
-
+
QTest::newRow( "failprot_02" ) << QtNetworkSettings::serverName() << 80u
<< QString("qtest/rfc3252.txt") << 1 << 400 << 0u;
@@ -1242,11 +1242,11 @@ void tst_QHttp::unexpectedRemoteClose()
QCoreApplication::instance()->processEvents();
QEventLoop loop;
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
QTimer::singleShot(3000, &loop, SLOT(quit()));
-#else
+#else
QTimer::singleShot(30000, &loop, SLOT(quit()));
-#endif
+#endif
QHttp http;
QObject::connect(&http, SIGNAL(done(bool)), &loop, SLOT(quit()));
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index cea6229..a29a292 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -420,17 +420,17 @@ void tst_QHttpNetworkConnection::post()
QCOMPARE(reply->statusCode(), statusCode);
QCOMPARE(reply->reasonPhrase(), statusString);
-
+
qint64 cLen = reply->contentLength();
if (cLen==-1) {
- // HTTP 1.1 server may respond with chunked encoding and in that
+ // HTTP 1.1 server may respond with chunked encoding and in that
// case contentLength is not present in reply -> verify that it is the case
QByteArray transferEnc = reply->headerField("Transfer-Encoding");
QCOMPARE(transferEnc, QByteArray("chunked"));
- } else {
+ } else {
QCOMPARE(cLen, qint64(contentLength));
- }
-
+ }
+
stopWatch.start();
QByteArray ba;
do {
@@ -443,7 +443,7 @@ void tst_QHttpNetworkConnection::post()
QVERIFY(reply->isFinished());
QCOMPARE(ba.size(), downloadSize);
-
+
delete reply;
}
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
index ce96a2c..4287a16 100644
--- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -324,9 +324,9 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
array.resize(available);
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
- // Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
-
+ // Check that the greeting is what we expect it to be
+ QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -455,7 +455,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
// Read greeting
QVERIFY(socket.waitForReadyRead(5000));
QString s = socket.readLine();
- QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
// Write NOOP
QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
@@ -528,11 +528,11 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest()
}
// Read greeting
- QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
- QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
- QtNetworkSettings::expectedReplyIMAP().constData());
-
-
+ QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
+ QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
+ QtNetworkSettings::expectedReplyIMAP().constData());
+
+
tcpSocketNonBlocking_data.clear();
tcpSocketNonBlocking_totalWritten = 0;
@@ -710,10 +710,10 @@ void tst_QHttpSocketEngine::passwordAuth()
QByteArray array;
array.resize(available);
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
-
+
// Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
-
+ QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index af02bbf..703be80 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -270,7 +270,7 @@ void tst_QImage::formatHandlersInput_data()
const QString prefix = QLatin1String(SRCDIR) + "images/";
#else
const QString prefix = QLatin1String(SRCDIR) + "/images/";
- #endif
+ #endif
// add a new line here when a file is added
QTest::newRow("ICO") << "ICO" << prefix + "image.ico";
@@ -1476,9 +1476,9 @@ void tst_QImage::smoothScale3()
void tst_QImage::smoothScaleBig()
{
#if defined(Q_OS_WINCE)
- int bigValue = 2000;
+ int bigValue = 2000;
#elif defined(Q_OS_SYMBIAN)
- int bigValue = 2000;
+ int bigValue = 2000;
#else
int bigValue = 200000;
#endif
diff --git a/tests/auto/qimagereader/qimagereader.pro b/tests/auto/qimagereader/qimagereader.pro
index 44a0ddc..b4e1de1 100644
--- a/tests/auto/qimagereader/qimagereader.pro
+++ b/tests/auto/qimagereader/qimagereader.pro
@@ -35,4 +35,3 @@ symbian*: {
DEPLOYMENT += images imagePlugins
}
-
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index f1adc51..df0853b 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -1120,7 +1120,7 @@ void tst_QItemDelegate::enterKey()
QTest::keyClick(editor, Qt::Key(key));
QApplication::processEvents();
-
+
if (widget == 2 || widget == 3) {
QVERIFY(!editor.isNull());
QCOMPARE(editor && editor->hasFocus(), expectedFocus);
diff --git a/tests/auto/qitemmodel/qitemmodel.pro b/tests/auto/qitemmodel/qitemmodel.pro
index 381a008..eb62b24 100644
--- a/tests/auto/qitemmodel/qitemmodel.pro
+++ b/tests/auto/qitemmodel/qitemmodel.pro
@@ -3,8 +3,6 @@ SOURCES += tst_qitemmodel.cpp
QT += sql
-symbian:TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb"
-
# NOTE: The deployment of the sqldrivers is disabled on purpose.
# If we deploy the plugins, they are loaded twice when running
# the tests on the autotest system. In that case we run out of
@@ -15,3 +13,12 @@ symbian:TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb"
# plugFiles.path = sqldrivers
# DEPLOYMENT += plugFiles
#}
+
+symbian {
+ TARGET.EPOCHEAPSIZE="0x100000 0x1000000 // Min 1Mb, max 16Mb"
+ contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
+ sqlite.path = /sys/bin
+ sqlite.sources = sqlite3.dll
+ DEPLOYMENT += sqlite
+ }
+}
diff --git a/tests/auto/qitemview/tst_qitemview.cpp b/tests/auto/qitemview/tst_qitemview.cpp
index c9e6f48..0ea7e0e 100644
--- a/tests/auto/qitemview/tst_qitemview.cpp
+++ b/tests/auto/qitemview/tst_qitemview.cpp
@@ -256,7 +256,7 @@ void tst_QItemView::populate()
{
treeModel = new CheckerModel;
QModelIndex parent;
-#if defined(QT_ARCH_ARM) || defined(Q_OS_SYMBIAN)
+#if defined(QT_ARCH_ARM) || defined(Q_OS_SYMBIAN)
const int baseInsert = 4;
#else
const int baseInsert = 26;
@@ -360,7 +360,7 @@ void tst_QItemView::nonDestructiveBasicTest()
QCOMPARE(view->showDropIndicator(), false);
view->setDropIndicatorShown(true);
QCOMPARE(view->showDropIndicator(), true);
-
+
// setDragEnabled
view->setDragEnabled(false);
QCOMPARE(view->dragEnabled(), false);
diff --git a/tests/auto/qkeyevent/tst_qkeyevent.cpp b/tests/auto/qkeyevent/tst_qkeyevent.cpp
index 1e19a49..9adf97c 100644
--- a/tests/auto/qkeyevent/tst_qkeyevent.cpp
+++ b/tests/auto/qkeyevent/tst_qkeyevent.cpp
@@ -179,7 +179,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents()
QFETCH( QString, text );
testWidget->recievedKeyPress = false;
-#ifdef Q_WS_WIN
+#ifdef Q_WS_WIN
// Will be eaten by Windows system
if ( key == Qt::Key_Print )
return;
@@ -208,7 +208,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents()
if ( key >= Qt::Key_BracketRight && key <= Qt::Key_ydiaeresis )
return;
#endif // Q_WS_WIN
-
+
#ifdef Q_OS_SYMBIAN
// Not supported on symbian
if ( key == Qt::Key_Print )
@@ -238,7 +238,7 @@ void tst_QKeyEvent::sendRecieveKeyEvents()
if ( key >= Qt::Key_BracketRight && key <= Qt::Key_ydiaeresis )
return;
#endif // Q_WS_WIN
-
+
if ( key == Qt::Key_F1 )
return; // Ignore for the moment
diff --git a/tests/auto/qlibrary/tst/tst.pro b/tests/auto/qlibrary/tst/tst.pro
index 06c2cd8..e15d7ed 100644
--- a/tests/auto/qlibrary/tst/tst.pro
+++ b/tests/auto/qlibrary/tst/tst.pro
@@ -22,7 +22,7 @@ wince*: {
system.trolltech.test.mylib.dll
binDep.path = /sys/bin
#mylib.dl2 nonstandard binary deployment will cause warning in emulator,
-#but it can be safely ignored.
+#but it can be safely ignored.
custBinDep.sources = mylib.dl2
custBinDep.path = /sys/bin
diff --git a/tests/auto/qlocalsocket/lackey/lackey.pro b/tests/auto/qlocalsocket/lackey/lackey.pro
index f073e7a..7bb6bc3 100644
--- a/tests/auto/qlocalsocket/lackey/lackey.pro
+++ b/tests/auto/qlocalsocket/lackey/lackey.pro
@@ -12,7 +12,7 @@ mac:CONFIG -= app_bundle
DEFINES += QLOCALSERVER_DEBUG
DEFINES += QLOCALSOCKET_DEBUG
-SOURCES += main.cpp
+SOURCES += main.cpp
TARGET = lackey
-symbian:TARGET.CAPABILITY = ALL -TCB \ No newline at end of file
+symbian:TARGET.CAPABILITY = ALL -TCB \ No newline at end of file
diff --git a/tests/auto/qlocalsocket/test/test.pro b/tests/auto/qlocalsocket/test/test.pro
index e399a29..da741b9 100644
--- a/tests/auto/qlocalsocket/test/test.pro
+++ b/tests/auto/qlocalsocket/test/test.pro
@@ -43,5 +43,5 @@ wince*|symbian {
scriptFiles.path = lackey/scripts
DEPLOYMENT = additionalFiles scriptFiles
QT += script # for easy deployment of QtScript
-}
+}
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 0fe05a8..d1daf00 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -55,7 +55,7 @@
#ifdef Q_OS_SYMBIAN
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
- #define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
+ #define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
#endif
Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError)
Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState)
@@ -380,7 +380,7 @@ void tst_QLocalSocket::listenAndConnect()
QSignalSpy spyReadyRead(socket, SIGNAL(readyRead()));
socket->connectToServer(name);
-#if defined(QT_LOCALSOCKET_TCP) || defined (Q_OS_SYMBIAN)
+#if defined(QT_LOCALSOCKET_TCP) || defined (Q_OS_SYMBIAN)
QTest::qWait(250);
#endif
@@ -613,10 +613,10 @@ void tst_QLocalSocket::fullPath()
LocalSocket socket;
socket.connectToServer(serverName);
-#if defined (Q_OS_SYMBIAN)
+#if defined (Q_OS_SYMBIAN)
QTest::qWait(250);
-#endif
-
+#endif
+
QCOMPARE(socket.serverName(), serverName);
QCOMPARE(socket.fullServerName(), serverName);
socket.disconnectFromServer();
@@ -764,16 +764,16 @@ void tst_QLocalSocket::threadedConnection()
Server server;
#if defined(Q_OS_SYMBIAN)
server.setStackSize(0x14000);
-#endif
+#endif
server.clients = threads;
server.start();
QList<Client*> clients;
for (int i = 0; i < threads; ++i) {
clients.append(new Client());
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN)
clients.last()->setStackSize(0x14000);
-#endif
+#endif
clients.last()->start();
}
@@ -1001,7 +1001,7 @@ void tst_QLocalSocket::unlink(QString name)
int result = ::unlink(fullName.toUtf8().data());
if(result != 0) {
- qWarning() << "Unlinking " << fullName << " failed with " << strerror(errno);
+ qWarning() << "Unlinking " << fullName << " failed with " << strerror(errno);
}
}
#endif
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 3ce7f7f..70174e3 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -444,7 +444,7 @@ void tst_QMenu::overrideMenuAction()
delete aFileMenu;
- //after the deletion of the override menu action,
+ //after the deletion of the override menu action,
//the menu should have its default menu action back
QCOMPARE(m->menuAction(), menuaction);
@@ -473,7 +473,7 @@ void tst_QMenu::statusTip()
QVERIFY(btn != NULL);
- //because showMenu calls QMenu::exec, we need to use a singleshot
+ //because showMenu calls QMenu::exec, we need to use a singleshot
//to continue the test
QTimer::singleShot(200,this, SLOT(onStatusTipTimer()));
btn->showMenu();
@@ -487,10 +487,10 @@ void tst_QMenu::onStatusTipTimer()
QVERIFY(menu != 0);
QVERIFY(menu->isVisible());
QTest::keyClick(menu, Qt::Key_Down);
-
+
//we store the statustip to press escape in any case
//otherwise, if the test fails it blocks (never gets out of QMenu::exec
- const QString st=statustip;
+ const QString st=statustip;
menu->close(); //goes out of the menu
@@ -555,10 +555,10 @@ void tst_QMenu::tearOff()
menu->popup(QPoint(0,0));
QTest::qWait(50);
QVERIFY(!menu->isTearOffMenuVisible());
-
+
QTest::mouseClick(menu, Qt::LeftButton, 0, QPoint(3, 3), 10);
QTest::qWait(100);
-
+
QVERIFY(menu->isTearOffMenuVisible());
QPointer<QMenu> torn = 0;
foreach (QWidget *w, QApplication::allWidgets()) {
@@ -641,7 +641,7 @@ void tst_QMenu::activeSubMenuPosition()
main->setActiveAction(menuAction);
sub->setActiveAction(subAction);
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
main->popup(QPoint(50,200));
#else
main->popup(QPoint(200,200));
diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
index dd584a0..be0bfe3 100644
--- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
+++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
@@ -204,9 +204,9 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP()
//---------------------------------------------------------------------------
void tst_QNativeSocketEngine::udpLoopbackTest()
{
-#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
+#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
QSKIP("Not working on Emulator without WinPCAP", SkipAll);
-#endif
+#endif
QNativeSocketEngine udpSocket;
// Initialize device #1
@@ -257,7 +257,7 @@ void tst_QNativeSocketEngine::udpIPv6LoopbackTest()
{
#if defined(Q_OS_SYMBIAN)
QSKIP("Symbian: IPv6 is not yet supported", SkipAll);
-#endif
+#endif
QNativeSocketEngine udpSocket;
// Initialize device #1
@@ -309,7 +309,7 @@ void tst_QNativeSocketEngine::broadcastTest()
{
#ifdef Q_OS_AIX
QSKIP("Broadcast does not work on darko", SkipAll);
-#endif
+#endif
QNativeSocketEngine broadcastSocket;
// Initialize a regular Udp socket
@@ -401,10 +401,10 @@ void tst_QNativeSocketEngine::serverTest()
//---------------------------------------------------------------------------
void tst_QNativeSocketEngine::udpLoopbackPerformance()
-{
-#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
+{
+#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
QSKIP("Not working on Emulator without WinPCAP", SkipAll);
-#endif
+#endif
QNativeSocketEngine udpSocket;
// Initialize device #1
@@ -576,13 +576,13 @@ void tst_QNativeSocketEngine::bind()
QNativeSocketEngine binder3;
QVERIFY(binder3.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol));
QVERIFY(!binder3.bind(QHostAddress::Any, 31180));
-
-#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
+
+#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
qDebug("On Symbian Emulator (WinSock) we get EADDRNOTAVAIL instead of EADDRINUSE");
- QVERIFY(binder3.error() == QAbstractSocket::SocketAddressNotAvailableError);
+ QVERIFY(binder3.error() == QAbstractSocket::SocketAddressNotAvailableError);
#else
QVERIFY(binder3.error() == QAbstractSocket::AddressInUseError);
-#endif
+#endif
}
//---------------------------------------------------------------------------
diff --git a/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp
index cf3d856..f3f343b 100644
--- a/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -129,8 +129,8 @@ void tst_QNetworkInterface::loopbackIPv6()
{
#ifdef Q_OS_SYMBIAN
QSKIP( "Symbian: IPv6 is not yet supported", SkipAll );
-#else
-
+#else
+
QList<QHostAddress> all = QNetworkInterface::allAddresses();
bool loopbackfound = false;
@@ -142,9 +142,9 @@ void tst_QNetworkInterface::loopbackIPv6()
break;
} else if (addr.protocol() == QAbstractSocket::IPv6Protocol)
anyIPv6 = true;
-
+
QVERIFY(!anyIPv6 || loopbackfound);
-#endif
+#endif
}
void tst_QNetworkInterface::localAddress()
diff --git a/tests/auto/qnetworkreply/test/test.pro b/tests/auto/qnetworkreply/test/test.pro
index 593de8b..e0df503 100644
--- a/tests/auto/qnetworkreply/test/test.pro
+++ b/tests/auto/qnetworkreply/test/test.pro
@@ -25,12 +25,10 @@ symbian:{
addFiles.sources = ../empty ../rfc3252.txt ../resource ../bigfile
addFiles.path = .
DEPLOYMENT += addFiles
-
+
# Symbian toolchain does not support correct include semantics
INCPATH+=..\..\..\..\include\QtNetwork\private
# bigfile test case requires more heap
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY="ALL -TCB"
}
-
-
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index a4c3b80..ea493c7 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -974,7 +974,7 @@ tst_QNetworkReply::tst_QNetworkReply()
}
tst_QNetworkReply::~tst_QNetworkReply()
-{
+{
}
@@ -1823,11 +1823,11 @@ void tst_QNetworkReply::ioGetFromFtp()
DataReader reader(reply);
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(20);
#else
- QTestEventLoop::instance().enterLoop(10);
-#endif
+ QTestEventLoop::instance().enterLoop(10);
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(reply->url(), request.url());
@@ -1857,19 +1857,19 @@ void tst_QNetworkReply::ioGetFromFtpWithReuse()
QSignalSpy spy(reply1, SIGNAL(finished()));
connect(reply2, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(20);
#else
- QTestEventLoop::instance().enterLoop(10);
-#endif
+ QTestEventLoop::instance().enterLoop(10);
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
if (spy.count() == 0) {
connect(reply1, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(20);
#else
- QTestEventLoop::instance().enterLoop(10);
-#endif
+ QTestEventLoop::instance().enterLoop(10);
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
}
@@ -2558,11 +2558,11 @@ void tst_QNetworkReply::ioGetWithManyProxies()
SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(10);
-#else
+#else
QTestEventLoop::instance().enterLoop(60);
-#endif
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
manager.disconnect(SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
@@ -3447,11 +3447,11 @@ void tst_QNetworkReply::downloadProgress()
QVERIFY2(sender->waitForBytesWritten(2000), "Network timeout");
spy.clear();
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(5);
#else
QTestEventLoop::instance().enterLoop(2);
-#endif
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(spy.count() > 0);
QVERIFY(!reply->isFinished());
@@ -3466,11 +3466,11 @@ void tst_QNetworkReply::downloadProgress()
delete sender;
spy.clear();
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(5);
#else
QTestEventLoop::instance().enterLoop(2);
-#endif
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QVERIFY(spy.count() > 0);
QVERIFY(!reply->isRunning());
@@ -3487,7 +3487,7 @@ void tst_QNetworkReply::uploadProgress_data()
}
void tst_QNetworkReply::uploadProgress()
-{
+{
QFETCH(QByteArray, data);
QTcpServer server;
QVERIFY(server.listen());
@@ -3759,11 +3759,11 @@ void tst_QNetworkReply::httpProxyCommands()
// wait for the finished signal
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(5);
#else
- QTestEventLoop::instance().enterLoop(1);
-#endif
+ QTestEventLoop::instance().enterLoop(1);
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
diff --git a/tests/auto/qobject/qobject.pro b/tests/auto/qobject/qobject.pro
index 0cafdc3..b6b3f20 100644
--- a/tests/auto/qobject/qobject.pro
+++ b/tests/auto/qobject/qobject.pro
@@ -1,4 +1,2 @@
TEMPLATE = subdirs
SUBDIRS = tst_qobject.pro signalbug.pro
-
-
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index 2627b8d..b602de1 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -1423,7 +1423,7 @@ void tst_QObject::moveToThread()
#if defined(Q_OS_SYMBIAN)
// Child timer will be registered after parent timer in the new
// thread, and 10ms is less than symbian timer resolution, so
- // child->timerEventThread compare after thread.wait() will
+ // child->timerEventThread compare after thread.wait() will
// usually fail unless timers are farther apart.
child->startTimer(100);
object->startTimer(150);
diff --git a/tests/auto/qobject/tst_qobject.pro b/tests/auto/qobject/tst_qobject.pro
index b3bda37..aed181f 100644
--- a/tests/auto/qobject/tst_qobject.pro
+++ b/tests/auto/qobject/tst_qobject.pro
@@ -15,4 +15,3 @@ symbian: {
addFiles.path = \sys\bin
DEPLOYMENT += addFiles
}
-
diff --git a/tests/auto/qobjectrace/tst_qobjectrace.cpp b/tests/auto/qobjectrace/tst_qobjectrace.cpp
index 1bd09cd..1736d0b 100644
--- a/tests/auto/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/qobjectrace/tst_qobjectrace.cpp
@@ -44,8 +44,8 @@
#include <QtTest/QtTest>
-enum { OneMinute = 60 * 1000,
- TwoMinutes = OneMinute * 2,
+enum { OneMinute = 60 * 1000,
+ TwoMinutes = OneMinute * 2,
TenMinutes = OneMinute * 10,
TwentyFiveMinutes = OneMinute * 25 };
@@ -143,7 +143,7 @@ void tst_QObjectRace::moveToThreadRace()
// ### FIXME: task 257411 - remove xfail once this is fixed
QEXPECT_FAIL("", "Symbian event dispatcher can't handle this kind of race, see task: 257411", Abort);
QVERIFY(false);
-#endif
+#endif
RaceObject *object = new RaceObject;
enum { ThreadCount = 6 };
@@ -222,7 +222,7 @@ public:
// Symbian needs "a bit" more time
# define EXTRA_THREAD_WAIT TenMinutes
# define MAIN_THREAD_WAIT TwentyFiveMinutes
-#else
+#else
# define EXTRA_THREAD_WAIT 3000
# define MAIN_THREAD_WAIT TwoMinutes
#endif
@@ -230,13 +230,13 @@ public:
void tst_QObjectRace::destroyRace()
{
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
- // ### FIXME: task 257411 - remove xfail once this is fixed.
+ // ### FIXME: task 257411 - remove xfail once this is fixed.
// Oddly enough, this seems to work properly in HW, if given enough time and memory.
QEXPECT_FAIL("", "Symbian event dispatcher can't handle this kind of race on emulator, see task: 257411", Abort);
QVERIFY(false);
-#endif
+#endif
- enum { ThreadCount = 10, ObjectCountPerThread = 733,
+ enum { ThreadCount = 10, ObjectCountPerThread = 733,
ObjectCount = ThreadCount * ObjectCountPerThread };
const char *_slots[] = { SLOT(slot1()) , SLOT(slot2()) , SLOT(slot3()),
diff --git a/tests/auto/qpluginloader/tst/tst.pro b/tests/auto/qpluginloader/tst/tst.pro
index f848bb1..ecc4ecb 100644
--- a/tests/auto/qpluginloader/tst/tst.pro
+++ b/tests/auto/qpluginloader/tst/tst.pro
@@ -24,7 +24,6 @@ symbian: {
libDep.path = /sys/bin
pluginDep.sources = theplugin.dll
pluginDep.path = bin
-
+
DEPLOYMENT += libDep pluginDep
}
-
diff --git a/tests/auto/qpluginloader/tst_qpluginloader.cpp b/tests/auto/qpluginloader/tst_qpluginloader.cpp
index 5f07c78..d45acaf 100644
--- a/tests/auto/qpluginloader/tst_qpluginloader.cpp
+++ b/tests/auto/qpluginloader/tst_qpluginloader.cpp
@@ -303,13 +303,13 @@ void tst_QPluginLoader::checkingStubsFromDifferentDrives()
// This test needs C-drive + some additional drive (driveForStubs)
- const QString driveForStubs("E:/");// != "C:/"
+ const QString driveForStubs("E:/");// != "C:/"
const QString stubDir("system/temp/stubtest/");
const QString stubName("dummyStub.qtplugin");
const QString fullStubFileName(stubDir + stubName);
QDir dir(driveForStubs);
bool test1(false); bool test2(false);
-
+
// initial clean up
QFile::remove(driveForStubs + fullStubFileName);
dir.rmdir(driveForStubs + stubDir);
@@ -317,22 +317,22 @@ void tst_QPluginLoader::checkingStubsFromDifferentDrives()
// create a stub dir and do stub drive check
if (!dir.mkpath(stubDir))
QSKIP("Required drive not available for this test", SkipSingle);
-
+
{// test without stub, should not be found
QPluginLoader loader("C:/" + fullStubFileName);
test1 = !loader.fileName().length();
- }
-
+ }
+
// create a stub to defined drive
QFile tempFile(driveForStubs + fullStubFileName);
tempFile.open(QIODevice::ReadWrite);
QFileInfo fileInfo(tempFile);
-
- {// now should be found even tried to find from C:
+
+ {// now should be found even tried to find from C:
QPluginLoader loader("C:/" + fullStubFileName);
test2 = (loader.fileName() == fileInfo.absoluteFilePath());
}
-
+
// clean up
tempFile.close();
if (!QFile::remove(driveForStubs + fullStubFileName))
@@ -343,10 +343,9 @@ void tst_QPluginLoader::checkingStubsFromDifferentDrives()
// test after cleanup
QVERIFY(test1);
QVERIFY(test2);
-
+
#endif//Q_OS_SYMBIAN
}
QTEST_APPLESS_MAIN(tst_QPluginLoader)
#include "tst_qpluginloader.moc"
-
diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro
index c06a5eb..1e8c5c7 100644
--- a/tests/auto/qresourceengine/qresourceengine.pro
+++ b/tests/auto/qresourceengine/qresourceengine.pro
@@ -7,12 +7,12 @@ load(resources)
# Input
SOURCES += tst_resourceengine.cpp
-RESOURCES += testqrc/test.qrc
+RESOURCES += testqrc/test.qrc
symbian-sbsv2 {
- runtime_resource.target = $$PWD/runtime_resource.rcc
+ runtime_resource.target = $$PWD/runtime_resource.rcc
} else {
- runtime_resource.target = runtime_resource.rcc
+ runtime_resource.target = runtime_resource.rcc
}
runtime_resource.depends = $$PWD/testqrc/test.qrc
runtime_resource.commands = $$QMAKE_RCC -root /runtime_resource/ -binary $${runtime_resource.depends} -o $${runtime_resource.target}
@@ -22,15 +22,15 @@ PRE_TARGETDEPS += $${runtime_resource.target}
QT = core
wince*|symbian*:{
deploy.sources += runtime_resource.rcc parentdir.txt
- test.sources = testqrc/*
+ test.sources = testqrc/*
test.path = testqrc
alias.sources = testqrc/aliasdir/*
alias.path = testqrc/aliasdir
- other.sources = testqrc/otherdir/*
+ other.sources = testqrc/otherdir/*
other.path = testqrc/otherdir
- search1.sources = testqrc/searchpath1/*
+ search1.sources = testqrc/searchpath1/*
search1.path = testqrc/searchpath1
- search2.sources = testqrc/searchpath2/*
+ search2.sources = testqrc/searchpath2/*
search2.path = testqrc/searchpath2
sub.sources = testqrc/subdir/*
sub.path = testqrc/subdir
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 7215852..130133c 100644
--- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
+++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
@@ -256,8 +256,8 @@ tst_Suite::tst_Suite()
#ifdef Q_OS_SYMBIAN
addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on Symbian");
- addTestExclusion("unicode-test", "Demands too much memory on Symbian");
-#endif
+ addTestExclusion("unicode-test", "Demands too much memory on Symbian");
+#endif
QVector<uint> *data = qt_meta_data_tst_Suite();
// content:
diff --git a/tests/auto/qsettings/tst_qsettings.cpp b/tests/auto/qsettings/tst_qsettings.cpp
index ddf9724..70dbbb6 100644
--- a/tests/auto/qsettings/tst_qsettings.cpp
+++ b/tests/auto/qsettings/tst_qsettings.cpp
@@ -124,7 +124,7 @@ private slots:
void setPath();
void setDefaultFormat();
void dontCreateNeedlessPaths();
-#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
void dontReorderIniKeysNeedlessly();
#endif
@@ -3685,7 +3685,7 @@ void tst_QSettings::dontCreateNeedlessPaths()
QVERIFY(!fileInfo.dir().exists());
}
-#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
void tst_QSettings::dontReorderIniKeysNeedlessly()
{
#ifdef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
diff --git a/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
index d4ae159..a6064bc 100644
--- a/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
+++ b/tests/auto/qsocketnotifier/tst_qsocketnotifier.cpp
@@ -134,24 +134,24 @@ void tst_QSocketNotifier::unexpectedDisconnection()
QNativeSocketEngine readEnd1;
readEnd1.initialize(QAbstractSocket::TcpSocket);
- bool b = readEnd1.connectToHost(server.serverAddress(), server.serverPort());
+ bool b = readEnd1.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd1.waitForWrite());
// while (!b && readEnd1.state() != QAbstractSocket::ConnectedState)
// b = readEnd1.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd1.state() == QAbstractSocket::ConnectedState);
- QVERIFY(server.waitForNewConnection());
+ QVERIFY(server.waitForNewConnection());
QTcpSocket *writeEnd1 = server.nextPendingConnection();
QVERIFY(writeEnd1 != 0);
-
+
QNativeSocketEngine readEnd2;
readEnd2.initialize(QAbstractSocket::TcpSocket);
- b = readEnd2.connectToHost(server.serverAddress(), server.serverPort());
+ b = readEnd2.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd2.waitForWrite());
// while (!b)
// b = readEnd2.connectToHost(server.serverAddress(), server.serverPort());
QVERIFY(readEnd2.state() == QAbstractSocket::ConnectedState);
- QVERIFY(server.waitForNewConnection());
- QTcpSocket *writeEnd2 = server.nextPendingConnection();
+ QVERIFY(server.waitForNewConnection());
+ QTcpSocket *writeEnd2 = server.nextPendingConnection();
QVERIFY(writeEnd2 != 0);
writeEnd1->write("1", 1);
@@ -167,7 +167,7 @@ void tst_QSocketNotifier::unexpectedDisconnection()
do {
// we have to wait until sequence value changes
- // as any event can make us jump out processing
+ // as any event can make us jump out processing
QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents);
} while(tester.getSequence() <= 0);
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 2fc80da..d6628bd 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -336,7 +336,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
// Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+ QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -528,10 +528,10 @@ void tst_QSocks5SocketEngine::serverTest()
//---------------------------------------------------------------------------
void tst_QSocks5SocketEngine::udpTest()
{
-#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
+#ifdef SYMBIAN_WINSOCK_CONNECTIVITY
QSKIP("UDP works bads on non WinPCAP emulator setting", SkipAll);
-#endif
-
+#endif
+
QSocks5SocketEngine udpSocket;
// Initialize device #1
@@ -669,10 +669,10 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest()
}
// Read greeting
- QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
- QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
- QtNetworkSettings::expectedReplyIMAP().constData());
-
+ QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
+ QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
+ QtNetworkSettings::expectedReplyIMAP().constData());
+
tcpSocketNonBlocking_data.clear();
tcpSocketNonBlocking_totalWritten = 0;
@@ -857,9 +857,9 @@ void tst_QSocks5SocketEngine::passwordAuth()
array.resize(available);
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
- // Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
-
+ // Check that the greeting is what we expect it to be
+ QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
QVERIFY(socketDevice.write(array2.data(),
@@ -925,9 +925,9 @@ void tst_QSocks5SocketEngine::passwordAuth2()
array.resize(available);
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
- // Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
-
+ // Check that the greeting is what we expect it to be
+ QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
QVERIFY(socketDevice.write(array2.data(),
diff --git a/tests/auto/qsql/qsql.pro b/tests/auto/qsql/qsql.pro
index 6660f42..167a38d 100644
--- a/tests/auto/qsql/qsql.pro
+++ b/tests/auto/qsql/qsql.pro
@@ -1,7 +1,7 @@
load(qttest_p4)
SOURCES += tst_qsql.cpp
-QT += sql
+QT += sql
contains(QT_CONFIG, qt3support): QT += qt3support
@@ -12,7 +12,7 @@ wince*: {
symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}
diff --git a/tests/auto/qsqldatabase/qsqldatabase.pro b/tests/auto/qsqldatabase/qsqldatabase.pro
index 623523d..964c8c9 100644
--- a/tests/auto/qsqldatabase/qsqldatabase.pro
+++ b/tests/auto/qsqldatabase/qsqldatabase.pro
@@ -22,10 +22,10 @@ wince*: {
symbian {
TARGET.EPOCHEAPSIZE=5000 5000000
TARGET.EPOCSTACKSIZE=50000
-
+
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}
diff --git a/tests/auto/qsqlerror/qsqlerror.pro b/tests/auto/qsqlerror/qsqlerror.pro
index 855e720..2eb7934 100644
--- a/tests/auto/qsqlerror/qsqlerror.pro
+++ b/tests/auto/qsqlerror/qsqlerror.pro
@@ -10,7 +10,7 @@ SOURCES += tst_qsqlerror.cpp
symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}
diff --git a/tests/auto/qsqlfield/qsqlfield.pro b/tests/auto/qsqlfield/qsqlfield.pro
index 022d73f..6e5b461 100644
--- a/tests/auto/qsqlfield/qsqlfield.pro
+++ b/tests/auto/qsqlfield/qsqlfield.pro
@@ -6,7 +6,7 @@ QT += sql
symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}
diff --git a/tests/auto/qsqlquery/qsqlquery.pro b/tests/auto/qsqlquery/qsqlquery.pro
index d512f50..494ca4c 100644
--- a/tests/auto/qsqlquery/qsqlquery.pro
+++ b/tests/auto/qsqlquery/qsqlquery.pro
@@ -17,7 +17,7 @@ wince*: {
symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}
diff --git a/tests/auto/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/qsqlquerymodel/qsqlquerymodel.pro
index ede90b0..cd8586c 100644
--- a/tests/auto/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/qsqlquerymodel/qsqlquerymodel.pro
@@ -9,7 +9,7 @@ wince*: {
}else:symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
} else {
diff --git a/tests/auto/qsqlrecord/qsqlrecord.pro b/tests/auto/qsqlrecord/qsqlrecord.pro
index db92c09..67e8ab9 100644
--- a/tests/auto/qsqlrecord/qsqlrecord.pro
+++ b/tests/auto/qsqlrecord/qsqlrecord.pro
@@ -4,7 +4,7 @@ SOURCES += tst_qsqlrecord.cpp
symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
diff --git a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index fe7185a..2fddd03 100644
--- a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -6,12 +6,12 @@ QT += sql
wince*: {
plugFiles.sources = ../../../plugins/sqldrivers
plugFiles.path = .
- DEPLOYMENT += plugFiles
+ DEPLOYMENT += plugFiles
LIBS += -lws2
}else:symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
} else {
diff --git a/tests/auto/qsqltablemodel/qsqltablemodel.pro b/tests/auto/qsqltablemodel/qsqltablemodel.pro
index a1a0d35..a046fb1 100644
--- a/tests/auto/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/qsqltablemodel/qsqltablemodel.pro
@@ -11,7 +11,7 @@ wince*: {
}else:symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}else {
diff --git a/tests/auto/qsqlthread/qsqlthread.pro b/tests/auto/qsqlthread/qsqlthread.pro
index 8650e6c..2708f1a 100644
--- a/tests/auto/qsqlthread/qsqlthread.pro
+++ b/tests/auto/qsqlthread/qsqlthread.pro
@@ -12,7 +12,7 @@ wince*: {
}else:symbian {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
sqlite.path = /sys/bin
- sqlite.sources = sqlite3.dll
+ sqlite.sources = sqlite3.dll
DEPLOYMENT += sqlite
}
}else {
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index 8f61318..147175e 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -17,7 +17,7 @@ win32 {
wince* {
DEFINES += SRCDIR=\\\"./\\\"
-
+
certFiles.sources = certs ssl.tar.gz
certFiles.path = .
DEPLOYMENT += certFiles
@@ -25,7 +25,7 @@ wince* {
DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY="ALL -TCB"
-
+
certFiles.sources = certs ssl.tar.gz
certFiles.path = .
DEPLOYMENT += certFiles
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 225f4d1..12e8f1b 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -199,9 +199,9 @@ protected slots:
}
void untrustedWorkaroundSlot(const QList<QSslError> &errors)
{
- if (errors.size() == 1 &&
- (errors.first().error() == QSslError::CertificateUntrusted ||
- errors.first().error() == QSslError::SelfSignedCertificate))
+ if (errors.size() == 1 &&
+ (errors.first().error() == QSslError::CertificateUntrusted ||
+ errors.first().error() == QSslError::SelfSignedCertificate))
socket->ignoreSslErrors();
}
void ignoreErrorListSlot(const QList<QSslError> &errors);
@@ -229,7 +229,7 @@ tst_QSslSocket::tst_QSslSocket()
}
tst_QSslSocket::~tst_QSslSocket()
-{
+{
}
enum ProxyTests {
@@ -504,7 +504,7 @@ void tst_QSslSocket::simpleConnectWithIgnore()
if (!socket.canReadLine())
enterLoop(10);
- QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL());
+ QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL());
socket.disconnectFromHost();
}
@@ -952,7 +952,7 @@ void tst_QSslSocket::waitForConnectedEncryptedReadyRead()
QVERIFY(socket->waitForConnected(10000));
QVERIFY(socket->waitForEncrypted(10000));
- // dont forget to login
+ // dont forget to login
QCOMPARE((int) socket->write("USER ftptest\r\n"), 14);
QCOMPARE((int) socket->write("PASS ftP2Ptf\r\n"), 14);
@@ -1056,7 +1056,7 @@ void tst_QSslSocket::systemCaCertificates()
void tst_QSslSocket::wildcard()
{
- QSKIP("TODO: solve wildcard problem", SkipAll);
+ QSKIP("TODO: solve wildcard problem", SkipAll);
if (!QSslSocket::supportsSsl())
return;
@@ -1311,11 +1311,11 @@ protected:
// delayed acceptance:
QTest::qSleep(100);
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
bool ret = server.waitForNewConnection(2000);
#else
- bool ret = server.waitForNewConnection(20000);
-#endif
+ bool ret = server.waitForNewConnection(20000);
+#endif
// delayed start of encryption
QTest::qSleep(100);
@@ -1503,13 +1503,13 @@ void tst_QSslSocket::disconnectFromHostWhenConnecting()
// without proxy, the state will be HostLookupState;
// with proxy, the state will be ConnectingState.
QVERIFY(socket->state() == QAbstractSocket::HostLookupState ||
- socket->state() == QAbstractSocket::ConnectingState);
+ socket->state() == QAbstractSocket::ConnectingState);
socket->disconnectFromHost();
// the state of the socket must be the same before and after calling
// disconnectFromHost()
QCOMPARE(state, socket->state());
QVERIFY(socket->state() == QAbstractSocket::HostLookupState ||
- socket->state() == QAbstractSocket::ConnectingState);
+ socket->state() == QAbstractSocket::ConnectingState);
QVERIFY(socket->waitForDisconnected(5000));
QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState);
// we did not call close, so the socket must be still open
@@ -1526,16 +1526,16 @@ void tst_QSslSocket::disconnectFromHostWhenConnected()
QSslSocketPtr socket = newSocket();
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 993);
socket->ignoreSslErrors();
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
QVERIFY(socket->waitForEncrypted(5000));
-#else
- QVERIFY(socket->waitForEncrypted(10000));
-#endif
+#else
+ QVERIFY(socket->waitForEncrypted(10000));
+#endif
socket->write("XXXX LOGOUT\r\n");
QCOMPARE(socket->state(), QAbstractSocket::ConnectedState);
socket->disconnectFromHost();
QCOMPARE(socket->state(), QAbstractSocket::ClosingState);
-#ifdef Q_OS_SYMBIAN
+#ifdef Q_OS_SYMBIAN
// I don't understand how socket->waitForDisconnected can work on other platforms
// since socket->write will end to:
// QMetaObject::invokeMethod(this, "_q_flushWriteBuffer", Qt::QueuedConnection);
@@ -1544,9 +1544,9 @@ void tst_QSslSocket::disconnectFromHostWhenConnected()
connect(socket, SIGNAL(disconnected()), this, SLOT(exitLoop()));
enterLoop(5);
QVERIFY(!timeout());
-#else
- QVERIFY(socket->waitForDisconnected(5000));
-#endif
+#else
+ QVERIFY(socket->waitForDisconnected(5000));
+#endif
QCOMPARE(socket->bytesToWrite(), qint64(0));
}
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index 97115bb..41347eb 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -129,7 +129,7 @@ private slots:
void transitionToRootState();
void transitionFromRootState();
void transitionEntersParent();
-
+
void defaultErrorState();
void customGlobalErrorState();
void customLocalErrorStateInBrokenState();
@@ -148,16 +148,16 @@ private slots:
void customErrorStateNotInGraph();
void transitionToStateNotInGraph();
void restoreProperties();
-
+
void defaultGlobalRestorePolicy();
void globalRestorePolicySetToRestore();
void globalRestorePolicySetToDoNotRestore();
void noInitialStateForInitialState();
-
+
//void restorePolicyNotInherited();
//void mixedRestoreProperties();
- //void setRestorePolicyToDoNotRestore();
+ //void setRestorePolicyToDoNotRestore();
//void setGlobalRestorePolicyToGlobalRestore();
//void restorePolicyOnChildState();
@@ -186,7 +186,7 @@ private slots:
// void removeDefaultAnimationForSource();
// void removeDefaultAnimationForTarget();
// void overrideDefaultAnimationWithSource();
-// void overrideDefaultAnimationWithTarget();
+// void overrideDefaultAnimationWithTarget();
// void overrideDefaultSourceAnimationWithSpecific();
// void overrideDefaultTargetAnimationWithSpecific();
// void overrideDefaultTargetAnimationWithSource();
@@ -393,14 +393,14 @@ void tst_QStateMachine::defaultErrorState()
class CustomErrorState: public QState
{
public:
- CustomErrorState(QStateMachine *machine, QState *parent = 0)
+ CustomErrorState(QStateMachine *machine, QState *parent = 0)
: QState(parent), error(QStateMachine::NoError), m_machine(machine)
{
}
void onEntry(QEvent *)
{
- error = m_machine->error();
+ error = m_machine->error();
errorString = m_machine->errorString();
}
@@ -444,7 +444,7 @@ void tst_QStateMachine::customGlobalErrorState()
QVERIFY(machine.configuration().contains(initialState));
QCoreApplication::processEvents();
-
+
QCOMPARE(machine.isRunning(), true);
QCOMPARE(machine.configuration().count(), 1);
QVERIFY(machine.configuration().contains(customErrorState));
@@ -455,7 +455,7 @@ void tst_QStateMachine::customGlobalErrorState()
}
void tst_QStateMachine::customLocalErrorStateInBrokenState()
-{
+{
QStateMachine machine;
CustomErrorState *customErrorState = new CustomErrorState(&machine);
machine.addState(customErrorState);
@@ -467,15 +467,15 @@ void tst_QStateMachine::customLocalErrorStateInBrokenState()
QState *brokenState = new QState();
brokenState->setObjectName("brokenState");
- machine.addState(brokenState);
- brokenState->setErrorState(customErrorState);
+ machine.addState(brokenState);
+ brokenState->setErrorState(customErrorState);
QState *childState = new QState(brokenState);
childState->setObjectName("childState");
initialState->addTransition(new EventTransition(QEvent::Type(QEvent::User + 1), brokenState));
- machine.start();
+ machine.start();
QCoreApplication::processEvents();
machine.postEvent(new QEvent(QEvent::Type(QEvent::User + 1)));
@@ -495,15 +495,15 @@ void tst_QStateMachine::customLocalErrorStateInOtherState()
QState *initialState = new QState();
initialState->setObjectName("initialState");
- QTest::ignoreMessage(QtWarningMsg, "QState::setErrorState: error state cannot belong to a different state machine");
+ QTest::ignoreMessage(QtWarningMsg, "QState::setErrorState: error state cannot belong to a different state machine");
initialState->setErrorState(customErrorState);
machine.addState(initialState);
machine.setInitialState(initialState);
QState *brokenState = new QState();
brokenState->setObjectName("brokenState");
-
- machine.addState(brokenState);
+
+ machine.addState(brokenState);
QState *childState = new QState(brokenState);
childState->setObjectName("childState");
@@ -534,7 +534,7 @@ void tst_QStateMachine::customLocalErrorStateInParentOfBrokenState()
QState *parentOfBrokenState = new QState();
machine.addState(parentOfBrokenState);
parentOfBrokenState->setObjectName("parentOfBrokenState");
- parentOfBrokenState->setErrorState(customErrorState);
+ parentOfBrokenState->setErrorState(customErrorState);
QState *brokenState = new QState(parentOfBrokenState);
brokenState->setObjectName("brokenState");
@@ -574,7 +574,7 @@ void tst_QStateMachine::customLocalErrorStateOverridesParent()
machine.addState(parentOfBrokenState);
parentOfBrokenState->setObjectName("parentOfBrokenState");
parentOfBrokenState->setErrorState(customErrorStateForParent);
-
+
QState *brokenState = new QState(parentOfBrokenState);
brokenState->setObjectName("brokenState");
brokenState->setErrorState(customErrorStateForBrokenState);
@@ -613,10 +613,10 @@ void tst_QStateMachine::errorStateHasChildren()
QState *initialState = new QState();
initialState->setObjectName("initialState");
machine.addState(initialState);
- machine.setInitialState(initialState);
+ machine.setInitialState(initialState);
QState *brokenState = new QState();
- brokenState->setObjectName("brokenState");
+ brokenState->setObjectName("brokenState");
machine.addState(brokenState);
QState *childState = new QState(brokenState);
@@ -633,7 +633,7 @@ void tst_QStateMachine::errorStateHasChildren()
QCOMPARE(machine.isRunning(), true);
QCOMPARE(machine.configuration().count(), 2);
QVERIFY(machine.configuration().contains(customErrorState));
- QVERIFY(machine.configuration().contains(childOfErrorState));
+ QVERIFY(machine.configuration().contains(childOfErrorState));
}
@@ -652,10 +652,10 @@ void tst_QStateMachine::errorStateHasErrors()
QState *initialState = new QState();
initialState->setObjectName("initialState");
machine.addState(initialState);
- machine.setInitialState(initialState);
+ machine.setInitialState(initialState);
QState *brokenState = new QState();
- brokenState->setObjectName("brokenState");
+ brokenState->setObjectName("brokenState");
machine.addState(brokenState);
QState *childState = new QState(brokenState);
@@ -684,10 +684,10 @@ void tst_QStateMachine::errorStateIsRootState()
QState *initialState = new QState();
initialState->setObjectName("initialState");
machine.addState(initialState);
- machine.setInitialState(initialState);
-
+ machine.setInitialState(initialState);
+
QState *brokenState = new QState();
- brokenState->setObjectName("brokenState");
+ brokenState->setObjectName("brokenState");
machine.addState(brokenState);
QState *childState = new QState(brokenState);
@@ -724,7 +724,7 @@ void tst_QStateMachine::errorStateEntersParentFirst()
QState *grandParent = new QState(greatGrandParent);
grandParent->setObjectName("grandParent");
- grandParent->assignProperty(entryController, "grandParentEntered", true);
+ grandParent->assignProperty(entryController, "grandParentEntered", true);
QState *parent = new QState(grandParent);
parent->setObjectName("parent");
@@ -739,7 +739,7 @@ void tst_QStateMachine::errorStateEntersParentFirst()
initialStateOfGreatGrandParent->setObjectName("initialStateOfGreatGrandParent");
greatGrandParent->setInitialState(initialStateOfGreatGrandParent);
- QState *brokenState = new QState(greatGrandParent);
+ QState *brokenState = new QState(greatGrandParent);
brokenState->setObjectName("brokenState");
QState *childState = new QState(brokenState);
@@ -805,9 +805,9 @@ void tst_QStateMachine::customErrorStateIsNull()
void tst_QStateMachine::clearError()
{
- QStateMachine machine;
+ QStateMachine machine;
machine.setErrorState(new QState(&machine)); // avoid warnings
-
+
QState *brokenState = new QState(&machine);
brokenState->setObjectName("brokenState");
machine.setInitialState(brokenState);
@@ -840,10 +840,10 @@ void tst_QStateMachine::historyStateAsInitialState()
QHistoryState *s2h = new QHistoryState(s2);
s2->setInitialState(s2h);
-
+
QState *s21 = new QState(s2);
s2h->setDefaultState(s21);
-
+
s1->addTransition(new EventTransition(QEvent::User, s2));
machine.start();
@@ -898,17 +898,17 @@ void tst_QStateMachine::brokenStateIsNeverEntered()
entryController->setProperty("childStateEntered", false);
entryController->setProperty("errorStateEntered", false);
- QState *initialState = new QState(&machine);
+ QState *initialState = new QState(&machine);
machine.setInitialState(initialState);
QState *errorState = new QState(&machine);
errorState->assignProperty(entryController, "errorStateEntered", true);
- machine.setErrorState(errorState);
+ machine.setErrorState(errorState);
QState *brokenState = new QState(&machine);
brokenState->assignProperty(entryController, "brokenStateEntered", true);
brokenState->setObjectName("brokenState");
-
+
QState *childState = new QState(brokenState);
childState->assignProperty(entryController, "childStateEntered", true);
@@ -927,7 +927,7 @@ void tst_QStateMachine::brokenStateIsNeverEntered()
void tst_QStateMachine::transitionToStateNotInGraph()
{
- QStateMachine machine;
+ QStateMachine machine;
QState *initialState = new QState(&machine);
initialState->setObjectName("initialState");
@@ -1036,7 +1036,7 @@ void tst_QStateMachine::addAndRemoveState()
#ifdef QT_BUILD_INTERNAL
QStateMachine machine;
QStatePrivate *root_d = QStatePrivate::get(&machine);
- QCOMPARE(root_d->childStates().size(), 0);
+ QCOMPARE(root_d->childStates().size(), 0);
QTest::ignoreMessage(QtWarningMsg, "QStateMachine::addState: cannot add null state");
machine.addState(0);
@@ -1520,7 +1520,7 @@ public:
{ setTargetState(target); }
protected:
- virtual bool eventTest(QEvent *e)
+ virtual bool eventTest(QEvent *e)
{
if (e->type() != QEvent::Type(QEvent::User+2))
return false;
@@ -2401,7 +2401,7 @@ void tst_QStateMachine::targetStateWithNoParent()
machine.start();
QTest::ignoreMessage(QtWarningMsg, "Unrecoverable error detected in running state machine: No common ancestor for targets and source of transition from state 's1'");
QTRY_COMPARE(startedSpy.count(), 1);
- QCOMPARE(machine.isRunning(), false);
+ QCOMPARE(machine.isRunning(), false);
QCOMPARE(stoppedSpy.count(), 1);
QCOMPARE(finishedSpy.count(), 0);
QCOMPARE(machine.error(), QStateMachine::NoCommonAncestorForTransitionError);
@@ -2421,7 +2421,7 @@ void tst_QStateMachine::targetStateDeleted()
void tst_QStateMachine::defaultGlobalRestorePolicy()
{
- QStateMachine machine;
+ QStateMachine machine;
QObject *propertyHolder = new QObject(&machine);
propertyHolder->setProperty("a", 1);
@@ -2441,7 +2441,7 @@ void tst_QStateMachine::defaultGlobalRestorePolicy()
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
-
+
QCOMPARE(propertyHolder->property("a").toInt(), 3);
QCOMPARE(propertyHolder->property("b").toInt(), 2);
@@ -2455,7 +2455,7 @@ void tst_QStateMachine::defaultGlobalRestorePolicy()
QCoreApplication::processEvents();
QCOMPARE(propertyHolder->property("a").toInt(), 3);
- QCOMPARE(propertyHolder->property("b").toInt(), 4);
+ QCOMPARE(propertyHolder->property("b").toInt(), 4);
}
void tst_QStateMachine::noInitialStateForInitialState()
@@ -2481,7 +2481,7 @@ void tst_QStateMachine::noInitialStateForInitialState()
/*
void tst_QStateMachine::restorePolicyNotInherited()
{
- QStateMachine machine;
+ QStateMachine machine;
QObject *propertyHolder = new QObject();
propertyHolder->setProperty("a", 1);
@@ -2509,7 +2509,7 @@ void tst_QStateMachine::restorePolicyNotInherited()
machine.setInitialState(parentState);
machine.start();
QCoreApplication::processEvents();
-
+
QCOMPARE(propertyHolder->property("a").toInt(), 3);
QCOMPARE(propertyHolder->property("b").toInt(), 2);
@@ -2523,7 +2523,7 @@ void tst_QStateMachine::restorePolicyNotInherited()
QCoreApplication::processEvents();
QCOMPARE(propertyHolder->property("a").toInt(), 3);
- QCOMPARE(propertyHolder->property("b").toInt(), 4);
+ QCOMPARE(propertyHolder->property("b").toInt(), 4);
}*/
@@ -2550,7 +2550,7 @@ void tst_QStateMachine::globalRestorePolicySetToDoNotRestore()
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
-
+
QCOMPARE(propertyHolder->property("a").toInt(), 3);
QCOMPARE(propertyHolder->property("b").toInt(), 2);
@@ -2564,7 +2564,7 @@ void tst_QStateMachine::globalRestorePolicySetToDoNotRestore()
QCoreApplication::processEvents();
QCOMPARE(propertyHolder->property("a").toInt(), 3);
- QCOMPARE(propertyHolder->property("b").toInt(), 4);
+ QCOMPARE(propertyHolder->property("b").toInt(), 4);
}
/*
@@ -2670,7 +2670,7 @@ void tst_QStateMachine::restorePolicyOnChildState()
machine.setInitialState(parentState);
machine.start();
QCoreApplication::processEvents();
-
+
QCOMPARE(propertyHolder->property("a").toInt(), 3);
QCOMPARE(propertyHolder->property("b").toInt(), 2);
@@ -2684,13 +2684,13 @@ void tst_QStateMachine::restorePolicyOnChildState()
QCoreApplication::processEvents();
QCOMPARE(propertyHolder->property("a").toInt(), 1);
- QCOMPARE(propertyHolder->property("b").toInt(), 2);
+ QCOMPARE(propertyHolder->property("b").toInt(), 2);
}
*/
void tst_QStateMachine::globalRestorePolicySetToRestore()
{
- QStateMachine machine;
+ QStateMachine machine;
machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
QObject *propertyHolder = new QObject(&machine);
@@ -2711,7 +2711,7 @@ void tst_QStateMachine::globalRestorePolicySetToRestore()
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
-
+
QCOMPARE(propertyHolder->property("a").toInt(), 3);
QCOMPARE(propertyHolder->property("b").toInt(), 2);
@@ -2725,16 +2725,16 @@ void tst_QStateMachine::globalRestorePolicySetToRestore()
QCoreApplication::processEvents();
QCOMPARE(propertyHolder->property("a").toInt(), 1);
- QCOMPARE(propertyHolder->property("b").toInt(), 2);
+ QCOMPARE(propertyHolder->property("b").toInt(), 2);
}
/*
void tst_QStateMachine::mixedRestoreProperties()
{
- QStateMachine machine;
+ QStateMachine machine;
QObject *propertyHolder = new QObject();
- propertyHolder->setProperty("a", 1);
+ propertyHolder->setProperty("a", 1);
QState *s1 = new QState(&machine);
s1->setRestorePolicy(QState::RestoreProperties);
@@ -2761,7 +2761,7 @@ void tst_QStateMachine::mixedRestoreProperties()
machine.setInitialState(s1);
machine.start();
QCoreApplication::processEvents();
-
+
// Enter s1, save current
QCOMPARE(propertyHolder->property("a").toInt(), 3);
@@ -2837,7 +2837,7 @@ void tst_QStateMachine::simpleAnimation()
QCOREAPPLICATION_EXEC(5000);
QVERIFY(machine.configuration().contains(s3));
- QCOMPARE(object->property("fooBar").toDouble(), 2.0);
+ QCOMPARE(object->property("fooBar").toDouble(), 2.0);
}
class SlotCalledCounter: public QObject
@@ -2870,7 +2870,7 @@ void tst_QStateMachine::twoAnimations()
animationBar->setDuration(900);
SlotCalledCounter counter;
- connect(animationFoo, SIGNAL(finished()), &counter, SLOT(slot()));
+ connect(animationFoo, SIGNAL(finished()), &counter, SLOT(slot()));
connect(animationBar, SIGNAL(finished()), &counter, SLOT(slot()));
EventTransition *et = new EventTransition(QEvent::User, s2);
@@ -2892,7 +2892,7 @@ void tst_QStateMachine::twoAnimations()
QVERIFY(machine.configuration().contains(s3));
QCOMPARE(object->property("foo").toDouble(), 2.0);
QCOMPARE(object->property("bar").toDouble(), 10.0);
-
+
QCOMPARE(counter.counter, 2);
}
@@ -3005,12 +3005,12 @@ void tst_QStateMachine::nestedTargetStateForAnimation()
QState *s2Child2 = new QState(s2);
s2Child2->assignProperty(object, "bar", 11.0);
QAbstractTransition *at = s2Child->addTransition(new EventTransition(QEvent::User, s2Child2));
-
+
QPropertyAnimation *animation = new QPropertyAnimation(object, "bar", s2);
animation->setDuration(2000);
connect(animation, SIGNAL(finished()), &counter, SLOT(slot()));
at->addAnimation(animation);
-
+
at = s1->addTransition(new EventTransition(QEvent::User, s2));
animation = new QPropertyAnimation(object, "foo", s2);
@@ -3020,7 +3020,7 @@ void tst_QStateMachine::nestedTargetStateForAnimation()
animation = new QPropertyAnimation(object, "bar", s2);
connect(animation, SIGNAL(finished()), &counter, SLOT(slot()));
at->addAnimation(animation);
-
+
QState *s3 = new QState(&machine);
s2->addTransition(s2Child, SIGNAL(polished()), s3);
@@ -3062,7 +3062,7 @@ void tst_QStateMachine::animatedGlobalRestoreProperty()
QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", s2);
connect(pa, SIGNAL(finished()), &counter, SLOT(slot()));
at->addAnimation(pa);
-
+
at = s2->addTransition(pa, SIGNAL(finished()), s3);
pa = new QPropertyAnimation(object, "foo", s3);
connect(pa, SIGNAL(finished()), &counter, SLOT(slot()));
@@ -3104,7 +3104,7 @@ void tst_QStateMachine::specificTargetValueOfAnimation()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
- s2->addTransition(anim, SIGNAL(finished()), s3);
+ s2->addTransition(anim, SIGNAL(finished()), s3);
machine.setInitialState(s1);
machine.start();
@@ -3134,7 +3134,7 @@ void tst_QStateMachine::addDefaultAnimation()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
-
+
s1->addTransition(new EventTransition(QEvent::User, s2));
QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine);
@@ -3171,7 +3171,7 @@ void tst_QStateMachine::addDefaultAnimationWithUnusedAnimation()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
-
+
s1->addTransition(new EventTransition(QEvent::User, s2));
QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine);
@@ -3216,7 +3216,7 @@ void tst_QStateMachine::removeDefaultAnimation()
QCOMPARE(machine.defaultAnimations().size(), 0);
machine.addDefaultAnimation(anim);
-
+
QPropertyAnimation *anim2 = new QPropertyAnimation(&propertyHolder, "foo");
machine.addDefaultAnimation(anim2);
@@ -3255,8 +3255,8 @@ void tst_QStateMachine::overrideDefaultAnimationWithSpecific()
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3294,7 +3294,7 @@ void tst_QStateMachine::addDefaultAnimationForSource()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
-
+
s1->addTransition(new EventTransition(QEvent::User, s2));
QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine);
@@ -3326,7 +3326,7 @@ void tst_QStateMachine::addDefaultAnimationForTarget()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
-
+
s1->addTransition(new EventTransition(QEvent::User, s2));
QPropertyAnimation *pa = new QPropertyAnimation(object, "foo", &machine);
@@ -3371,7 +3371,7 @@ void tst_QStateMachine::removeDefaultAnimationForSource()
QCOMPARE(machine.defaultAnimationsForSourceState(&machine).size(), 0);
machine.addDefaultAnimationForSourceState(&machine, anim);
-
+
QPropertyAnimation *anim2 = new QPropertyAnimation(this, "foo");
machine.addDefaultAnimationForSourceState(&machine, anim2);
@@ -3415,7 +3415,7 @@ void tst_QStateMachine::removeDefaultAnimationForTarget()
QCOMPARE(machine.defaultAnimationsForTargetState(&machine).size(), 0);
machine.addDefaultAnimationForTargetState(&machine, anim);
-
+
QPropertyAnimation *anim2 = new QPropertyAnimation(this, "foo");
machine.addDefaultAnimationForTargetState(&machine, anim2);
@@ -3450,9 +3450,9 @@ void tst_QStateMachine::overrideDefaultAnimationWithSource()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
- s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+ s1->addTransition(new EventTransition(QEvent::User, s2));
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3490,9 +3490,9 @@ void tst_QStateMachine::overrideDefaultAnimationWithTarget()
QState *s3 = new QState(&machine);
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
- s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+ s1->addTransition(new EventTransition(QEvent::User, s2));
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3532,8 +3532,8 @@ void tst_QStateMachine::overrideDefaultSourceAnimationWithSpecific()
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3572,8 +3572,8 @@ void tst_QStateMachine::overrideDefaultTargetAnimationWithSpecific()
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
QAbstractTransition *at = s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3612,8 +3612,8 @@ void tst_QStateMachine::overrideDefaultTargetAnimationWithSource()
QObject::connect(s3, SIGNAL(entered()), QCoreApplication::instance(), SLOT(quit()));
s1->addTransition(new EventTransition(QEvent::User, s2));
-
- QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
+
+ QPropertyAnimation *defaultAnimation = new QPropertyAnimation(object, "foo");
connect(defaultAnimation, SIGNAL(stateChanged(QAbstractAnimation::State, QAbstractAnimation::State)), &counter, SLOT(slot()));
QPropertyAnimation *moreSpecificAnimation = new QPropertyAnimation(object, "foo");
@@ -3663,7 +3663,7 @@ void tst_QStateMachine::parallelStateAssignmentsDone()
QCOMPARE(propertyHolder->property("foo").toInt(), 123);
QCOMPARE(propertyHolder->property("bar").toInt(), 456);
QCOMPARE(propertyHolder->property("zoot").toInt(), 789);
-
+
machine.postEvent(new QEvent(QEvent::User));
QCoreApplication::processEvents();
@@ -3675,13 +3675,13 @@ void tst_QStateMachine::parallelStateAssignmentsDone()
void tst_QStateMachine::transitionsFromParallelStateWithNoChildren()
{
QStateMachine machine;
-
+
QState *parallelState = new QState(QState::ParallelStates, &machine);
machine.setInitialState(parallelState);
- QState *s1 = new QState(&machine);
+ QState *s1 = new QState(&machine);
parallelState->addTransition(new EventTransition(QEvent::User, s1));
-
+
machine.start();
QCoreApplication::processEvents();
@@ -3712,7 +3712,7 @@ void tst_QStateMachine::parallelStateTransition()
QState *s2InitialChild = new QState(s2);
s2->setInitialState(s2InitialChild);
- QState *s1OtherChild = new QState(s1);
+ QState *s1OtherChild = new QState(s1);
s1->addTransition(new EventTransition(QEvent::User, s1OtherChild));
@@ -3732,12 +3732,12 @@ void tst_QStateMachine::parallelStateTransition()
QVERIFY(machine.configuration().contains(parallelState));
QVERIFY(machine.configuration().contains(s1));
-
+
QVERIFY(machine.configuration().contains(s2));
QVERIFY(machine.configuration().contains(s1OtherChild));
QVERIFY(machine.configuration().contains(s2InitialChild));
QCOMPARE(machine.configuration().size(), 5);
-
+
}
void tst_QStateMachine::nestedRestoreProperties()
@@ -3808,7 +3808,7 @@ void tst_QStateMachine::nestedRestoreProperties2()
s2->assignProperty(propertyHolder, "foo", 3);
QState *s21 = new QState(s2);
- s21->assignProperty(propertyHolder, "bar", 4);
+ s21->assignProperty(propertyHolder, "bar", 4);
s2->setInitialState(s21);
QState *s22 = new QState(s2);
diff --git a/tests/auto/qtcpserver/crashingServer/main.cpp b/tests/auto/qtcpserver/crashingServer/main.cpp
index f135d26..c360fe4 100644
--- a/tests/auto/qtcpserver/crashingServer/main.cpp
+++ b/tests/auto/qtcpserver/crashingServer/main.cpp
@@ -61,7 +61,7 @@ int main(int argc, char *argv[])
file.close();
#else
printf("Listening\n");
- fflush(stdout);
+ fflush(stdout);
#endif
server.waitForNewConnection(5000);
diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp
index e630f73..64bf880 100644
--- a/tests/auto/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp
@@ -134,7 +134,7 @@ tst_QTcpServer::tst_QTcpServer()
}
tst_QTcpServer::~tst_QTcpServer()
-{
+{
}
void tst_QTcpServer::initTestCase_data()
@@ -510,7 +510,7 @@ private:
//----------------------------------------------------------------------------------
void tst_QTcpServer::waitForConnectionTest()
{
-
+
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
#ifdef TEST_QNETWORK_PROXY
@@ -614,10 +614,10 @@ protected:
void tst_QTcpServer::addressReusable()
{
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
QSKIP("Symbian: Emulator does not support process launching", SkipAll );
#endif
-
+
#if defined(QT_NO_PROCESS)
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
#else
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 44e6550..780b151 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -902,12 +902,12 @@ void tst_QTcpSocket::disconnectWhileConnecting()
socket->disconnectFromHost();
}
- connect(socket, SIGNAL(disconnected()), SLOT(exitLoopSlot()));
-#ifndef Q_OS_SYMBIAN
+ connect(socket, SIGNAL(disconnected()), SLOT(exitLoopSlot()));
+#ifndef Q_OS_SYMBIAN
enterLoop(10);
-#else
+#else
enterLoop(30);
-#endif
+#endif
QVERIFY2(!timeout(), "Network timeout");
QVERIFY(socket->state() == QAbstractSocket::UnconnectedState);
if (!closeDirectly) {
@@ -971,11 +971,11 @@ protected:
QTcpSocket *socket = server->nextPendingConnection();
while (!quit) {
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
if (socket->waitForDisconnected(500))
-#else
+#else
if (socket->waitForDisconnected(5000))
-#endif
+#endif
break;
if (socket->error() != QAbstractSocket::SocketTimeoutError)
return;
@@ -1023,11 +1023,11 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
socket->disconnectFromHost();
}
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
QVERIFY2(socket->waitForDisconnected(10000), "Network timeout");
-#else
+#else
QVERIFY2(socket->waitForDisconnected(30000), "Network timeout");
-#endif
+#endif
QVERIFY(socket->state() == QAbstractSocket::UnconnectedState);
if (!closeDirectly) {
QCOMPARE(int(socket->openMode()), int(QIODevice::ReadWrite));
@@ -1073,11 +1073,11 @@ void tst_QTcpSocket::disconnectWhileLookingUp()
// let anything queued happen
QEventLoop loop;
-#ifndef Q_OS_SYMBIAN
+#ifndef Q_OS_SYMBIAN
QTimer::singleShot(50, &loop, SLOT(quit()));
-#else
+#else
QTimer::singleShot(5000, &loop, SLOT(quit()));
-#endif
+#endif
loop.exec();
// recheck
@@ -1783,7 +1783,7 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
QCOMPARE(readyReadSpy.count(), 1);
QString s = socket->readLine();
-#ifdef TEST_QNETWORK_PROXY
+#ifdef TEST_QNETWORK_PROXY
QNetworkProxy::ProxyType proxyType = QNetworkProxy::applicationProxy().type();
if(proxyType == QNetworkProxy::NoProxy) {
QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4REV1] aspiriniks Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
@@ -1791,8 +1791,8 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] aspiriniks Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
}
#else
- QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
-#endif
+ QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
+#endif
QCOMPARE(socket->bytesAvailable(), qint64(0));
QCoreApplication::instance()->processEvents();
@@ -2011,7 +2011,7 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
QSKIP("stressTest subprocess needs Qt3Support", SkipAll);
#elif defined( Q_OS_SYMBIAN )
- QSKIP("Symbian: QProcess IO is not yet supported, fix when supported", SkipAll);
+ QSKIP("Symbian: QProcess IO is not yet supported, fix when supported", SkipAll);
#else
QFETCH(QString, client);
QFETCH(QString, server);
diff --git a/tests/auto/qtemporaryfile/qtemporaryfile.pro b/tests/auto/qtemporaryfile/qtemporaryfile.pro
index 0f2a6ea..c93a2e5 100644
--- a/tests/auto/qtemporaryfile/qtemporaryfile.pro
+++ b/tests/auto/qtemporaryfile/qtemporaryfile.pro
@@ -6,7 +6,7 @@ QT = core
symbian {
testData.sources = tst_qtemporaryfile.cpp
testData.path = .
- DEPLOYMENT += testData
+ DEPLOYMENT += testData
}else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
diff --git a/tests/auto/qtextcodec/test/test.pro b/tests/auto/qtextcodec/test/test.pro
index 7748ce4..36cac7c 100644
--- a/tests/auto/qtextcodec/test/test.pro
+++ b/tests/auto/qtextcodec/test/test.pro
@@ -11,7 +11,7 @@ wince*|symbian {
wince*: {
DEFINES += SRCDIR=\\\"\\\"
}else:symbian {
- # Symbian can't define SRCDIR meaningfully here
+ # Symbian can't define SRCDIR meaningfully here
} else {
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
}
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp
index 776c348..392af5e 100644
--- a/tests/auto/qtextedit/tst_qtextedit.cpp
+++ b/tests/auto/qtextedit/tst_qtextedit.cpp
@@ -150,7 +150,7 @@ private slots:
void preserveCharFormatInAppend();
#ifndef QT_NO_CLIPBOARD
void copyAndSelectAllInReadonly();
-#endif
+#endif
void ctrlAltInput();
void noPropertiesOnDefaultTextEditCharFormat();
void setPlainTextShouldUseCurrentCharFormat();
diff --git a/tests/auto/qtextodfwriter/qtextodfwriter.pro b/tests/auto/qtextodfwriter/qtextodfwriter.pro
index 2689894..f5e2c09 100644
--- a/tests/auto/qtextodfwriter/qtextodfwriter.pro
+++ b/tests/auto/qtextodfwriter/qtextodfwriter.pro
@@ -2,4 +2,4 @@ load(qttest_p4)
SOURCES += tst_qtextodfwriter.cpp
!symbian:DEFINES += SRCDIR=\\\"$$PWD\\\"
-symbian:INCLUDEPATH+=$$[QT_INSTALL_PREFIX]/include/QtGui/private
+symbian:INCLUDEPATH+=$$[QT_INSTALL_PREFIX]/include/QtGui/private
diff --git a/tests/auto/qtextstream/test/test.pro b/tests/auto/qtextstream/test/test.pro
index b24708c..973c011 100644
--- a/tests/auto/qtextstream/test/test.pro
+++ b/tests/auto/qtextstream/test/test.pro
@@ -28,7 +28,7 @@ wince*|symbian: {
wince*: {
DEFINES += SRCDIR=\\\"\\\"
}else:symbian {
- # Symbian can't define SRCDIR meaningfully here
+ # Symbian can't define SRCDIR meaningfully here
}else {
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
}
diff --git a/tests/auto/qtextstream/tst_qtextstream.cpp b/tests/auto/qtextstream/tst_qtextstream.cpp
index 484d7c9..d8dd618 100644
--- a/tests/auto/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/qtextstream/tst_qtextstream.cpp
@@ -476,7 +476,7 @@ tst_QTextStream::tst_QTextStream()
}
tst_QTextStream::~tst_QTextStream()
-{
+{
}
void tst_QTextStream::init()
@@ -1251,7 +1251,7 @@ void tst_QTextStream::stillOpenWhenAtEnd()
#endif
QTcpSocket socket;
socket.connectToHost(QtNetworkSettings::serverName(), 143);
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN)
QVERIFY(socket.waitForReadyRead(30000));
#else
QVERIFY(socket.waitForReadyRead(5000));
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 5d18cf0..e3bd9e4 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -549,4 +549,3 @@ void tst_QTimer::timerFiresOnlyOncePerProcessEvents()
QTEST_MAIN(tst_QTimer)
#include "tst_qtimer.moc"
-
diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp
index db18eb5..e064967 100644
--- a/tests/auto/qudpsocket/tst_qudpsocket.cpp
+++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp
@@ -228,7 +228,7 @@ void tst_QUdpSocket::broadcasting()
for (int j = 0; j < 100; ++j) {
broadcastSocket.writeDatagram(message[i], strlen(message[i]),
- QHostAddress::Broadcast, 5000);
+ QHostAddress::Broadcast, 5000);
QTestEventLoop::instance().enterLoop(15);
if (QTestEventLoop::instance().timeout()) {
#if defined(Q_OS_FREEBSD)
@@ -334,17 +334,17 @@ void tst_QUdpSocket::ipv6Loop()
quint16 paulPort = 28123;
if (!peter.bind(QHostAddress::LocalHostIPv6, peterPort)) {
- QCOMPARE(peter.error(), QUdpSocket::UnsupportedSocketOperationError);
+ QCOMPARE(peter.error(), QUdpSocket::UnsupportedSocketOperationError);
} else {
- QVERIFY(paul.bind(QHostAddress::LocalHostIPv6, paulPort));
+ QVERIFY(paul.bind(QHostAddress::LocalHostIPv6, paulPort));
- QCOMPARE(peter.writeDatagram(peterMessage.data(), peterMessage.length(), QHostAddress("::1"),
+ QCOMPARE(peter.writeDatagram(peterMessage.data(), peterMessage.length(), QHostAddress("::1"),
paulPort), qint64(peterMessage.length()));
- QCOMPARE(paul.writeDatagram(paulMessage.data(), paulMessage.length(),
+ QCOMPARE(paul.writeDatagram(paulMessage.data(), paulMessage.length(),
QHostAddress("::1"), peterPort), qint64(paulMessage.length()));
- char peterBuffer[16*1024];
- char paulBuffer[16*1024];
+ char peterBuffer[16*1024];
+ char paulBuffer[16*1024];
#if !defined(Q_OS_WINCE)
QVERIFY(peter.waitForReadyRead(5000));
QVERIFY(paul.waitForReadyRead(5000));
@@ -352,16 +352,16 @@ void tst_QUdpSocket::ipv6Loop()
QVERIFY(peter.waitForReadyRead(15000));
QVERIFY(paul.waitForReadyRead(15000));
#endif
- if (success) {
- QCOMPARE(peter.readDatagram(peterBuffer, sizeof(peterBuffer)), qint64(paulMessage.length()));
- QCOMPARE(paul.readDatagram(paulBuffer, sizeof(peterBuffer)), qint64(peterMessage.length()));
- } else {
- QVERIFY(peter.readDatagram(peterBuffer, sizeof(peterBuffer)) != paulMessage.length());
- QVERIFY(paul.readDatagram(paulBuffer, sizeof(peterBuffer)) != peterMessage.length());
- }
-
- QCOMPARE(QByteArray(peterBuffer, paulMessage.length()), paulMessage);
- QCOMPARE(QByteArray(paulBuffer, peterMessage.length()), peterMessage);
+ if (success) {
+ QCOMPARE(peter.readDatagram(peterBuffer, sizeof(peterBuffer)), qint64(paulMessage.length()));
+ QCOMPARE(paul.readDatagram(paulBuffer, sizeof(peterBuffer)), qint64(peterMessage.length()));
+ } else {
+ QVERIFY(peter.readDatagram(peterBuffer, sizeof(peterBuffer)) != paulMessage.length());
+ QVERIFY(paul.readDatagram(paulBuffer, sizeof(peterBuffer)) != peterMessage.length());
+ }
+
+ QCOMPARE(QByteArray(peterBuffer, paulMessage.length()), paulMessage);
+ QCOMPARE(QByteArray(paulBuffer, peterMessage.length()), peterMessage);
}
}
@@ -483,21 +483,21 @@ void tst_QUdpSocket::writeDatagram()
void tst_QUdpSocket::performance()
{
#if defined(Q_OS_SYMBIAN)
- // Large packets seems not to go through on Symbian
- // Reason might be also fragmentation due to VPN connection etc
-
+ // Large packets seems not to go through on Symbian
+ // Reason might be also fragmentation due to VPN connection etc
+
QFETCH_GLOBAL(bool, setProxy);
- QFETCH_GLOBAL(int, proxyType);
-
+ QFETCH_GLOBAL(int, proxyType);
+
int arrSize = 8192;
- if (setProxy && proxyType == QNetworkProxy::Socks5Proxy)
- arrSize = 1024;
-
- QByteArray arr(arrSize, '@');
+ if (setProxy && proxyType == QNetworkProxy::Socks5Proxy)
+ arrSize = 1024;
+
+ QByteArray arr(arrSize, '@');
#else
- QByteArray arr(8192, '@');
+ QByteArray arr(8192, '@');
#endif // Q_OS_SYMBIAN
-
+
QUdpSocket server;
QVERIFY2(server.bind(), server.errorString().toLatin1().constData());
@@ -507,13 +507,13 @@ void tst_QUdpSocket::performance()
QUdpSocket client;
client.connectToHost(serverAddress, server.localPort());
-
+
QTime stopWatch;
stopWatch.start();
qint64 nbytes = 0;
while (stopWatch.elapsed() < 5000) {
- for (int i = 0; i < 100; ++i) {
+ for (int i = 0; i < 100; ++i) {
if (client.write(arr.data(), arr.size()) > 0) {
do {
nbytes += server.readDatagram(arr.data(), arr.size());
@@ -525,14 +525,14 @@ void tst_QUdpSocket::performance()
float secs = stopWatch.elapsed() / 1000.0;
qDebug("\t%.2fMB/%.2fs: %.2fMB/s", float(nbytes / (1024.0*1024.0)),
secs, float(nbytes / (1024.0*1024.0)) / secs);
-
-#if defined(Q_OS_SYMBIAN)
+
+#if defined(Q_OS_SYMBIAN)
if(nbytes == 0) {
- qDebug("No bytes passed through local UDP socket, since UDP socket write returns EWOULDBLOCK");
- qDebug("Should try with blocking sockets, but it is not currently possible due to Open C defect");
+ qDebug("No bytes passed through local UDP socket, since UDP socket write returns EWOULDBLOCK");
+ qDebug("Should try with blocking sockets, but it is not currently possible due to Open C defect");
}
-#endif
-
+#endif
+
}
void tst_QUdpSocket::bindMode()
@@ -552,48 +552,48 @@ void tst_QUdpSocket::bindMode()
QUdpSocket socket2;
QVERIFY(!socket2.bind(socket.localPort()));
#if defined(Q_OS_SYMBIAN)
-
+
//RPRocess me;
if(RProcess().HasCapability(ECapabilityNetworkControl)) {
- qDebug("Test executed *with* NetworkControl capability");
- // In Symbian OS ReuseAddressHint together with NetworkControl capability
- // gives application *always* right to bind to port. I.e. it does not matter
- // if first socket was bound with any bind flag. Since autotests in Symbian
- // are currently executed with ALL -TCB rights, this path is the one executed.
- QVERIFY(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
- socket.close();
- socket2.close();
-
- QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
- QVERIFY(!socket2.bind(socket.localPort()));
- QVERIFY2(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData());
- socket.close();
- socket2.close();
-
- QVERIFY2(socket.bind(0, QUdpSocket::DontShareAddress), socket.errorString().toLatin1().constData());
- QVERIFY(!socket2.bind(socket.localPort()));
- QVERIFY(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
- socket.close();
- socket2.close();
- } else {
- qDebug("Test executed *without* NetworkControl capability");
- // If we don't have NetworkControl capability, attempt to bind already bound
- // address will *always* fail. I.e. it does not matter if first socket was
- // bound with any bind flag.
- QVERIFY(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
- socket.close();
-
- QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
- QVERIFY(!socket2.bind(socket.localPort()));
- QVERIFY2(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData());
- socket.close();
-
- QVERIFY2(socket.bind(0, QUdpSocket::DontShareAddress), socket.errorString().toLatin1().constData());
- QVERIFY(!socket2.bind(socket.localPort()));
- QVERIFY(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
- socket.close();
- }
-#elif defined(Q_OS_UNIX)
+ qDebug("Test executed *with* NetworkControl capability");
+ // In Symbian OS ReuseAddressHint together with NetworkControl capability
+ // gives application *always* right to bind to port. I.e. it does not matter
+ // if first socket was bound with any bind flag. Since autotests in Symbian
+ // are currently executed with ALL -TCB rights, this path is the one executed.
+ QVERIFY(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
+ socket.close();
+ socket2.close();
+
+ QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
+ QVERIFY(!socket2.bind(socket.localPort()));
+ QVERIFY2(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData());
+ socket.close();
+ socket2.close();
+
+ QVERIFY2(socket.bind(0, QUdpSocket::DontShareAddress), socket.errorString().toLatin1().constData());
+ QVERIFY(!socket2.bind(socket.localPort()));
+ QVERIFY(socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
+ socket.close();
+ socket2.close();
+ } else {
+ qDebug("Test executed *without* NetworkControl capability");
+ // If we don't have NetworkControl capability, attempt to bind already bound
+ // address will *always* fail. I.e. it does not matter if first socket was
+ // bound with any bind flag.
+ QVERIFY(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
+ socket.close();
+
+ QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
+ QVERIFY(!socket2.bind(socket.localPort()));
+ QVERIFY2(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData());
+ socket.close();
+
+ QVERIFY2(socket.bind(0, QUdpSocket::DontShareAddress), socket.errorString().toLatin1().constData());
+ QVERIFY(!socket2.bind(socket.localPort()));
+ QVERIFY(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
+ socket.close();
+ }
+#elif defined(Q_OS_UNIX)
QVERIFY(!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint));
socket.close();
QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index a846d8f..a9070fc 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -3063,9 +3063,9 @@ void tst_QVariant::toIntFromQString() const
*/
void tst_QVariant::toIntFromDouble() const
{
- double d = 2147483630; // max int 2147483647
+ double d = 2147483630; // max int 2147483647
QVERIFY((int)d == 2147483630);
-
+
QVariant var(d);
QVERIFY( var.canConvert( QVariant::Int ) );
@@ -3086,7 +3086,7 @@ void tst_QVariant::task256984_setValue()
QVERIFY( !v2.isDetached() );
qVariantSetValue(v2, 3); //set an integer value
-
+
QVERIFY( v1.isDetached() );
QVERIFY( v2.isDetached() );
}
diff --git a/tests/auto/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/qwaitcondition/tst_qwaitcondition.cpp
index a6d272c..6ac02e7 100644
--- a/tests/auto/qwaitcondition/tst_qwaitcondition.cpp
+++ b/tests/auto/qwaitcondition/tst_qwaitcondition.cpp
@@ -98,10 +98,10 @@ public:
void run()
{
- mutex.lock();
- cond.wakeOne();
- cond.wait(&mutex);
- mutex.unlock();
+ mutex.lock();
+ cond.wakeOne();
+ cond.wait(&mutex);
+ mutex.unlock();
}
};
@@ -114,15 +114,15 @@ public:
QWaitCondition *cond;
inline wait_QMutex_Thread_2()
- : mutex(0), cond(0)
+ : mutex(0), cond(0)
{ }
void run()
{
- mutex->lock();
- started.wakeOne();
- cond->wait(mutex);
- mutex->unlock();
+ mutex->lock();
+ started.wakeOne();
+ cond->wait(mutex);
+ mutex->unlock();
}
};
@@ -137,10 +137,10 @@ public:
void run()
{
- readWriteLock.lockForWrite();
- cond.wakeOne();
- cond.wait(&readWriteLock);
- readWriteLock.unlock();
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ cond.wait(&readWriteLock);
+ readWriteLock.unlock();
}
};
@@ -153,15 +153,15 @@ public:
QWaitCondition *cond;
inline wait_QReadWriteLock_Thread_2()
- : readWriteLock(0), cond(0)
+ : readWriteLock(0), cond(0)
{ }
void run()
{
- readWriteLock->lockForRead();
- started.wakeOne();
- cond->wait(readWriteLock);
- readWriteLock->unlock();
+ readWriteLock->lockForRead();
+ started.wakeOne();
+ cond->wait(readWriteLock);
+ readWriteLock->unlock();
}
};
@@ -169,79 +169,79 @@ void tst_QWaitCondition::wait_QMutex()
{
int x;
for (int i = 0; i < iterations; ++i) {
- {
- QMutex mutex;
- QWaitCondition cond;
-
- mutex.lock();
-
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, 1));
-
- cond.wakeAll();
- QVERIFY(!cond.wait(&mutex, 1));
-
- mutex.unlock();
- }
-
- {
- // test multiple threads waiting on separate wait conditions
- wait_QMutex_Thread_1 thread[ThreadCount];
-
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex.lock();
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].cond.wait(&thread[x].mutex, 1000));
- thread[x].mutex.unlock();
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex.lock();
- thread[x].cond.wakeOne();
- thread[x].mutex.unlock();
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
-
- {
- // test multiple threads waiting on a wait condition
- QMutex mutex;
- QWaitCondition cond1, cond2;
- wait_QMutex_Thread_2 thread[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
- }
- mutex.unlock();
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
-
- mutex.lock();
- cond1.wakeAll();
- cond2.wakeAll();
- mutex.unlock();
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
+ {
+ QMutex mutex;
+ QWaitCondition cond;
+
+ mutex.lock();
+
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, 1));
+
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&mutex, 1));
+
+ mutex.unlock();
+ }
+
+ {
+ // test multiple threads waiting on separate wait conditions
+ wait_QMutex_Thread_1 thread[ThreadCount];
+
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex.lock();
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].cond.wait(&thread[x].mutex, 1000));
+ thread[x].mutex.unlock();
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex.lock();
+ thread[x].cond.wakeOne();
+ thread[x].mutex.unlock();
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
+ }
+
+ {
+ // test multiple threads waiting on a wait condition
+ QMutex mutex;
+ QWaitCondition cond1, cond2;
+ wait_QMutex_Thread_2 thread[ThreadCount];
+
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ }
+ mutex.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
+
+ mutex.lock();
+ cond1.wakeAll();
+ cond2.wakeAll();
+ mutex.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
+ }
}
}
@@ -288,99 +288,99 @@ void tst_QWaitCondition::wait_QReadWriteLock()
int x;
for (int i = 0; i < iterations; ++i) {
- {
+ {
QReadWriteLock readWriteLock;
QWaitCondition waitCondition;
- readWriteLock.lockForRead();
+ readWriteLock.lockForRead();
- waitCondition.wakeOne();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ waitCondition.wakeOne();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- waitCondition.wakeAll();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ waitCondition.wakeAll();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- readWriteLock.unlock();
- }
+ readWriteLock.unlock();
+ }
{
QReadWriteLock readWriteLock;
- QWaitCondition waitCondition;
+ QWaitCondition waitCondition;
- readWriteLock.lockForWrite();
+ readWriteLock.lockForWrite();
- waitCondition.wakeOne();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ waitCondition.wakeOne();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- waitCondition.wakeAll();
- QVERIFY(!waitCondition.wait(&readWriteLock, 1));
+ waitCondition.wakeAll();
+ QVERIFY(!waitCondition.wait(&readWriteLock, 1));
- readWriteLock.unlock();
- }
+ readWriteLock.unlock();
+ }
- {
- // test multiple threads waiting on separate wait conditions
- wait_QReadWriteLock_Thread_1 thread[ThreadCount];
+ {
+ // test multiple threads waiting on separate wait conditions
+ wait_QReadWriteLock_Thread_1 thread[ThreadCount];
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock.lockForRead();
- thread[x].start();
- // wait for thread to start
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock.lockForRead();
+ thread[x].start();
+ // wait for thread to start
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_WINSCW)
// Symbian emulator startup simultaneously with this thread causes additional delay
- QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 10000));
+ QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 10000));
#else
- QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 1000));
+ QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 1000));
#endif
- thread[x].readWriteLock.unlock();
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock.lockForRead();
- thread[x].cond.wakeOne();
- thread[x].readWriteLock.unlock();
- }
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
-
- {
- // test multiple threads waiting on a wait condition
- QReadWriteLock readWriteLock;
- QWaitCondition cond1, cond2;
- wait_QReadWriteLock_Thread_2 thread[ThreadCount];
-
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].readWriteLock = &readWriteLock;
- thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&readWriteLock, 1000));
- }
- readWriteLock.unlock();
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].isRunning());
- QVERIFY(!thread[x].isFinished());
- }
-
- readWriteLock.lockForWrite();
- cond1.wakeAll();
- cond2.wakeAll();
- readWriteLock.unlock();
-
- for (x = 0; x < ThreadCount; ++x) {
- QVERIFY(thread[x].wait(1000));
- }
- }
+ thread[x].readWriteLock.unlock();
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock.lockForRead();
+ thread[x].cond.wakeOne();
+ thread[x].readWriteLock.unlock();
+ }
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
+ }
+
+ {
+ // test multiple threads waiting on a wait condition
+ QReadWriteLock readWriteLock;
+ QWaitCondition cond1, cond2;
+ wait_QReadWriteLock_Thread_2 thread[ThreadCount];
+
+ readWriteLock.lockForWrite();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].readWriteLock = &readWriteLock;
+ thread[x].cond = (x < ThreadCount / 2) ? &cond1 : &cond2;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&readWriteLock, 1000));
+ }
+ readWriteLock.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].isRunning());
+ QVERIFY(!thread[x].isFinished());
+ }
+
+ readWriteLock.lockForWrite();
+ cond1.wakeAll();
+ cond2.wakeAll();
+ readWriteLock.unlock();
+
+ for (x = 0; x < ThreadCount; ++x) {
+ QVERIFY(thread[x].wait(1000));
+ }
+ }
}
}
@@ -397,7 +397,7 @@ public:
QWaitCondition *cond;
inline wake_Thread()
- : mutex(0), cond(0)
+ : mutex(0), cond(0)
{ }
static inline void sleep(ulong s)
@@ -405,14 +405,14 @@ public:
void run()
{
- mutex->lock();
- ++count;
+ mutex->lock();
+ ++count;
dummy.wakeOne(); // this wakeup should be lost
- started.wakeOne();
+ started.wakeOne();
dummy.wakeAll(); // this one too
- cond->wait(mutex);
+ cond->wait(mutex);
--count;
- mutex->unlock();
+ mutex->unlock();
}
};
@@ -430,7 +430,7 @@ public:
QWaitCondition *cond;
inline wake_Thread_2()
- : readWriteLock(0), cond(0)
+ : readWriteLock(0), cond(0)
{ }
static inline void sleep(ulong s)
@@ -438,14 +438,14 @@ public:
void run()
{
- readWriteLock->lockForWrite();
- ++count;
+ readWriteLock->lockForWrite();
+ ++count;
dummy.wakeOne(); // this wakeup should be lost
started.wakeOne();
dummy.wakeAll(); // this one too
- cond->wait(readWriteLock);
+ cond->wait(readWriteLock);
--count;
- readWriteLock->unlock();
+ readWriteLock->unlock();
}
};
@@ -456,194 +456,194 @@ void tst_QWaitCondition::wakeOne()
int x;
// wake up threads, one at a time
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
+ QMutex mutex;
+ QWaitCondition cond;
// QMutex
- wake_Thread thread[ThreadCount];
- bool thread_exited[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread_exited[x] = FALSE;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
+ wake_Thread thread[ThreadCount];
+ bool thread_exited[ThreadCount];
+
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread_exited[x] = FALSE;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
// make sure wakeups are not queued... if nothing is
// waiting at the time of the wakeup, nothing happens
QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- }
- mutex.unlock();
+ }
+ mutex.unlock();
- QCOMPARE(wake_Thread::count, ThreadCount);
+ QCOMPARE(wake_Thread::count, ThreadCount);
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; ++x) {
- mutex.lock();
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; ++x) {
+ mutex.lock();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- mutex.unlock();
+ mutex.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
continue;
- if (thread[y].wait(exited > 0 ? 1 : 1000)) {
- thread_exited[y] = TRUE;
- ++exited;
- }
- }
+ if (thread[y].wait(exited > 0 ? 1 : 1000)) {
+ thread_exited[y] = TRUE;
+ ++exited;
+ }
+ }
- QCOMPARE(exited, 1);
- QCOMPARE(wake_Thread::count, ThreadCount - (x + 1));
- }
+ QCOMPARE(exited, 1);
+ QCOMPARE(wake_Thread::count, ThreadCount - (x + 1));
+ }
- QCOMPARE(wake_Thread::count, 0);
+ QCOMPARE(wake_Thread::count, 0);
// QReadWriteLock
QReadWriteLock readWriteLock;
wake_Thread_2 rwthread[ThreadCount];
readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- thread_exited[x] = FALSE;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ thread_exited[x] = FALSE;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
// make sure wakeups are not queued... if nothing is
// waiting at the time of the wakeup, nothing happens
QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- }
- readWriteLock.unlock();
+ }
+ readWriteLock.unlock();
- QCOMPARE(wake_Thread_2::count, ThreadCount);
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; ++x) {
- readWriteLock.lockForWrite();
- cond.wakeOne();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; ++x) {
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- readWriteLock.unlock();
+ readWriteLock.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
continue;
- if (rwthread[y].wait(exited > 0 ? 1 : 1000)) {
- thread_exited[y] = TRUE;
- ++exited;
- }
- }
+ if (rwthread[y].wait(exited > 0 ? 1 : 1000)) {
+ thread_exited[y] = TRUE;
+ ++exited;
+ }
+ }
- QCOMPARE(exited, 1);
- QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 1));
- }
+ QCOMPARE(exited, 1);
+ QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 1));
+ }
- QCOMPARE(wake_Thread_2::count, 0);
+ QCOMPARE(wake_Thread_2::count, 0);
}
// wake up threads, two at a time
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
+ QMutex mutex;
+ QWaitCondition cond;
// QMutex
- wake_Thread thread[ThreadCount];
- bool thread_exited[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread_exited[x] = FALSE;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
+ wake_Thread thread[ThreadCount];
+ bool thread_exited[ThreadCount];
+
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread_exited[x] = FALSE;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
// make sure wakeups are not queued... if nothing is
// waiting at the time of the wakeup, nothing happens
QVERIFY(!thread[x].dummy.wait(&mutex, 1));
- }
- mutex.unlock();
+ }
+ mutex.unlock();
- QCOMPARE(wake_Thread::count, ThreadCount);
+ QCOMPARE(wake_Thread::count, ThreadCount);
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; x += 2) {
- mutex.lock();
- cond.wakeOne();
- cond.wakeOne();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; x += 2) {
+ mutex.lock();
+ cond.wakeOne();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
QVERIFY(!thread[x].dummy.wait(&mutex, 1));
QVERIFY(!thread[x + 1].dummy.wait(&mutex, 1));
- mutex.unlock();
+ mutex.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
continue;
- if (thread[y].wait(exited > 0 ? 1 : 1000)) {
- thread_exited[y] = TRUE;
- ++exited;
- }
- }
+ if (thread[y].wait(exited > 0 ? 1 : 1000)) {
+ thread_exited[y] = TRUE;
+ ++exited;
+ }
+ }
- QCOMPARE(exited, 2);
- QCOMPARE(wake_Thread::count, ThreadCount - (x + 2));
- }
+ QCOMPARE(exited, 2);
+ QCOMPARE(wake_Thread::count, ThreadCount - (x + 2));
+ }
- QCOMPARE(wake_Thread::count, 0);
+ QCOMPARE(wake_Thread::count, 0);
// QReadWriteLock
QReadWriteLock readWriteLock;
wake_Thread_2 rwthread[ThreadCount];
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- thread_exited[x] = FALSE;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ readWriteLock.lockForWrite();
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ thread_exited[x] = FALSE;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
// make sure wakeups are not queued... if nothing is
// waiting at the time of the wakeup, nothing happens
QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
- }
- readWriteLock.unlock();
+ }
+ readWriteLock.unlock();
- QCOMPARE(wake_Thread_2::count, ThreadCount);
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
- // wake up threads one at a time
- for (x = 0; x < ThreadCount; x += 2) {
- readWriteLock.lockForWrite();
- cond.wakeOne();
- cond.wakeOne();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ // wake up threads one at a time
+ for (x = 0; x < ThreadCount; x += 2) {
+ readWriteLock.lockForWrite();
+ cond.wakeOne();
+ cond.wakeOne();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
QVERIFY(!rwthread[x].dummy.wait(&readWriteLock, 1));
QVERIFY(!rwthread[x + 1].dummy.wait(&readWriteLock, 1));
- readWriteLock.unlock();
+ readWriteLock.unlock();
- int exited = 0;
- for (int y = 0; y < ThreadCount; ++y) {
- if (thread_exited[y])
+ int exited = 0;
+ for (int y = 0; y < ThreadCount; ++y) {
+ if (thread_exited[y])
continue;
- if (rwthread[y].wait(exited > 0 ? 1 : 1000)) {
- thread_exited[y] = TRUE;
- ++exited;
- }
- }
+ if (rwthread[y].wait(exited > 0 ? 1 : 1000)) {
+ thread_exited[y] = TRUE;
+ ++exited;
+ }
+ }
- QCOMPARE(exited, 2);
- QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 2));
- }
+ QCOMPARE(exited, 2);
+ QCOMPARE(wake_Thread_2::count, ThreadCount - (x + 2));
+ }
- QCOMPARE(wake_Thread_2::count, 0);
+ QCOMPARE(wake_Thread_2::count, 0);
}
}
@@ -651,69 +651,69 @@ void tst_QWaitCondition::wakeAll()
{
int x;
for (int i = 0; i < iterations; ++i) {
- QMutex mutex;
- QWaitCondition cond;
+ QMutex mutex;
+ QWaitCondition cond;
// QMutex
- wake_Thread thread[ThreadCount];
-
- mutex.lock();
- for (x = 0; x < ThreadCount; ++x) {
- thread[x].mutex = &mutex;
- thread[x].cond = &cond;
- thread[x].start();
- // wait for thread to start
- QVERIFY(thread[x].started.wait(&mutex, 1000));
- }
- mutex.unlock();
-
- QCOMPARE(wake_Thread::count, ThreadCount);
-
- // wake up all threads at once
- mutex.lock();
- cond.wakeAll();
- QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
- mutex.unlock();
-
- int exited = 0;
- for (x = 0; x < ThreadCount; ++x) {
- if (thread[x].wait(1000))
- ++exited;
- }
-
- QCOMPARE(exited, ThreadCount);
- QCOMPARE(wake_Thread::count, 0);
+ wake_Thread thread[ThreadCount];
+
+ mutex.lock();
+ for (x = 0; x < ThreadCount; ++x) {
+ thread[x].mutex = &mutex;
+ thread[x].cond = &cond;
+ thread[x].start();
+ // wait for thread to start
+ QVERIFY(thread[x].started.wait(&mutex, 1000));
+ }
+ mutex.unlock();
+
+ QCOMPARE(wake_Thread::count, ThreadCount);
+
+ // wake up all threads at once
+ mutex.lock();
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&mutex, COND_WAIT_TIME));
+ mutex.unlock();
+
+ int exited = 0;
+ for (x = 0; x < ThreadCount; ++x) {
+ if (thread[x].wait(1000))
+ ++exited;
+ }
+
+ QCOMPARE(exited, ThreadCount);
+ QCOMPARE(wake_Thread::count, 0);
// QReadWriteLock
QReadWriteLock readWriteLock;
- wake_Thread_2 rwthread[ThreadCount];
-
- readWriteLock.lockForWrite();
- for (x = 0; x < ThreadCount; ++x) {
- rwthread[x].readWriteLock = &readWriteLock;
- rwthread[x].cond = &cond;
- rwthread[x].start();
- // wait for thread to start
- QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
- }
- readWriteLock.unlock();
-
- QCOMPARE(wake_Thread_2::count, ThreadCount);
-
- // wake up all threads at once
- readWriteLock.lockForWrite();
- cond.wakeAll();
- QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
- readWriteLock.unlock();
+ wake_Thread_2 rwthread[ThreadCount];
+
+ readWriteLock.lockForWrite();
+ for (x = 0; x < ThreadCount; ++x) {
+ rwthread[x].readWriteLock = &readWriteLock;
+ rwthread[x].cond = &cond;
+ rwthread[x].start();
+ // wait for thread to start
+ QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000));
+ }
+ readWriteLock.unlock();
+
+ QCOMPARE(wake_Thread_2::count, ThreadCount);
+
+ // wake up all threads at once
+ readWriteLock.lockForWrite();
+ cond.wakeAll();
+ QVERIFY(!cond.wait(&readWriteLock, COND_WAIT_TIME));
+ readWriteLock.unlock();
exited = 0;
- for (x = 0; x < ThreadCount; ++x) {
- if (rwthread[x].wait(1000))
- ++exited;
- }
+ for (x = 0; x < ThreadCount; ++x) {
+ if (rwthread[x].wait(1000))
+ ++exited;
+ }
- QCOMPARE(exited, ThreadCount);
- QCOMPARE(wake_Thread_2::count, 0);
+ QCOMPARE(exited, ThreadCount);
+ QCOMPARE(wake_Thread_2::count, 0);
}
}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 0b2da10..98a5e73 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -3466,7 +3466,7 @@ QString textPropertyToString(Display *display, XTextProperty& text_prop)
static CCoeControl* GetStatusPaneControl( TInt aPaneId )
{
const TUid paneUid = { aPaneId };
-
+
CEikStatusPane* statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane();
if (statusPane && statusPane->PaneCapabilities(paneUid).IsPresent()){
CCoeControl* control = NULL;
@@ -3476,17 +3476,17 @@ static CCoeControl* GetStatusPaneControl( TInt aPaneId )
}
return NULL;
}
-// Returns the application's title pane, if not present returns NULL.
+// Returns the application's title pane, if not present returns NULL.
static CAknTitlePane* TitlePane()
{
return static_cast<CAknTitlePane*>(GetStatusPaneControl(EEikStatusPaneUidTitle));
}
-
-// Returns the application's title pane, if not present returns NULL.
+
+// Returns the application's title pane, if not present returns NULL.
static CAknContextPane* ContextPane()
{
return static_cast<CAknContextPane*>(GetStatusPaneControl(EEikStatusPaneUidContext));
-}
+}
#endif
static QString visibleWindowTitle(QWidget *window, Qt::WindowState state = Qt::WindowNoState)
@@ -3551,7 +3551,7 @@ static QString visibleWindowTitle(QWidget *window, Qt::WindowState state = Qt::W
if (win)
vTitle = win->caption();
}
-#elif defined (Q_WS_S60)
+#elif defined (Q_WS_S60)
CAknTitlePane* titlePane = TitlePane();
if(titlePane)
{
diff --git a/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp b/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
index e0c183c..54ba29e 100644
--- a/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
+++ b/tests/auto/qxmlsimplereader/tst_qxmlsimplereader.cpp
@@ -575,10 +575,10 @@ void tst_QXmlSimpleReader::inputFromSocket_data()
void tst_QXmlSimpleReader::inputFromSocket()
{
QFETCH(QString, file_name);
-
+
#if defined(Q_OS_SYMBIAN)
QSKIP("Symbian: Skipped due to problems in Open C and QtNetwork", SkipAll);
-#endif
+#endif
#if defined(Q_OS_WIN32) && (defined(Q_CC_INTEL) || defined(Q_CC_MINGW) || defined(Q_CC_MSVC_NET))
QSKIP("Regression caused by QHOstInfo change 294548, see task 202231.", SkipAll);
diff --git a/tests/auto/symbian/orientationchange/orientationchange.pro b/tests/auto/symbian/orientationchange/orientationchange.pro
index d240fa1..08b34f9 100644
--- a/tests/auto/symbian/orientationchange/orientationchange.pro
+++ b/tests/auto/symbian/orientationchange/orientationchange.pro
@@ -1,7 +1,7 @@
load(qttest_p4)
-HEADERS +=
+HEADERS +=
SOURCES += tst_orientationchange.cpp
-symbian {
+symbian {
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
}
diff --git a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
index 9d57ae1..ff371fa 100644
--- a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
+++ b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp
@@ -61,11 +61,11 @@ class TestWidget : public QWidget
{
public:
TestWidget(QWidget *parent = 0);
-
+
void reset();
public:
void resizeEvent(QResizeEvent *event);
-
+
public:
QSize resizeEventSize;
int resizeEventCount;
@@ -86,58 +86,58 @@ void TestWidget::reset()
void TestWidget::resizeEvent(QResizeEvent *event)
{
QWidget::resizeEvent(event);
-
+
// Size delivered in first resize event is stored.
- if (!resizeEventCount)
+ if (!resizeEventCount)
resizeEventSize = event->size();
- resizeEventCount++;
+ resizeEventCount++;
}
void tst_orientationchange::resizeEventOnOrientationChange()
{
// This will test that when orientation 'changes', then
// at most one resize event is generated.
-
+
TestWidget *normalWidget = new TestWidget();
TestWidget *fullScreenWidget = new TestWidget();
TestWidget *maximizedWidget = new TestWidget();
-
+
fullScreenWidget->showFullScreen();
maximizedWidget->showMaximized();
normalWidget->show();
-
+
QCoreApplication::sendPostedEvents();
QCoreApplication::sendPostedEvents();
-
+
QCOMPARE(fullScreenWidget->resizeEventCount, 1);
QCOMPARE(fullScreenWidget->size(), fullScreenWidget->resizeEventSize);
QCOMPARE(maximizedWidget->resizeEventCount, 1);
QCOMPARE(maximizedWidget->size(), maximizedWidget->resizeEventSize);
QCOMPARE(normalWidget->resizeEventCount, 1);
QCOMPARE(normalWidget->size(), normalWidget->resizeEventSize);
-
+
fullScreenWidget->reset();
maximizedWidget->reset();
normalWidget->reset();
-
+
// Assumes that Qt application is AVKON application.
CAknAppUi *appUi = static_cast<CAknAppUi*>(CEikonEnv::Static()->EikAppUi());
-
+
// Determine 'opposite' orientation to the current orientation.
-
+
CAknAppUi::TAppUiOrientation orientation = CAknAppUi::EAppUiOrientationLandscape;
if (fullScreenWidget->size().width() > fullScreenWidget->size().height()) {
orientation = CAknAppUi::EAppUiOrientationPortrait;
}
-
+
TRAPD(err, appUi->SetOrientationL(orientation));
QCoreApplication::sendPostedEvents();
QCoreApplication::sendPostedEvents();
- // setOrientationL is not guaranteed to change orientation
- // (if emulator configured to support just portrait or landscape, then
+ // setOrientationL is not guaranteed to change orientation
+ // (if emulator configured to support just portrait or landscape, then
// setOrientationL call shouldn't do anything).
// So let's ensure that we do not get resize event twice.
@@ -150,9 +150,9 @@ void tst_orientationchange::resizeEventOnOrientationChange()
QCOMPARE(maximizedWidget->size(), maximizedWidget->resizeEventSize);
}
QCOMPARE(normalWidget->resizeEventCount, 0);
-
+
TRAP(err, appUi->SetOrientationL(CAknAppUi::EAppUiOrientationUnspecified));
-
+
delete normalWidget;
delete fullScreenWidget;
delete maximizedWidget;
diff --git a/tests/auto/symbian/qmainexceptions/qmainexceptions.pro b/tests/auto/symbian/qmainexceptions/qmainexceptions.pro
index 7533dd4..16111c1 100644
--- a/tests/auto/symbian/qmainexceptions/qmainexceptions.pro
+++ b/tests/auto/symbian/qmainexceptions/qmainexceptions.pro
@@ -1,5 +1,3 @@
load(qttest_p4)
-HEADERS +=
+HEADERS +=
SOURCES += tst_qmainexceptions.cpp
-
-
diff --git a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp
index 1601b7e..bfe092b 100644
--- a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp
+++ b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp
@@ -423,7 +423,7 @@ void HybridFuncLX(THybridAction aAction)
void tst_qmainexceptions::testHybrid()
{
- TRAPD(error,
+ TRAPD(error,
QT_TRYCATCH_LEAVING(
HybridFuncLX(EHybridLeave);
) );
@@ -432,8 +432,8 @@ void tst_qmainexceptions::testHybrid()
QCOMPARE(int(sizeof(expected1)/sizeof(int)), int(recDtor - dtorFired));
for (int i=0; i<sizeof(expected1)/sizeof(int); i++)
QCOMPARE(expected1[i], dtorFired[i]);
-
- TRAP(error,
+
+ TRAP(error,
QT_TRYCATCH_LEAVING(
HybridFuncLX(EHybridThrow);
) );
@@ -443,7 +443,7 @@ void tst_qmainexceptions::testHybrid()
for (int i=0; i<sizeof(expected2)/sizeof(int); i++)
QCOMPARE(expected2[i], dtorFired[i]);
- TRAP(error,
+ TRAP(error,
QT_TRYCATCH_LEAVING(
HybridFuncLX(EHybridPass);
) );