summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/atwrapper/atWrapper.pro4
-rw-r--r--tests/auto/other/collections/tst_collections.cpp7
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp4
-rw-r--r--tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp1
-rw-r--r--tests/auto/other/languagechange/languagechange.pro2
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp14
-rw-r--r--tests/auto/other/macgui/macgui.pro4
-rw-r--r--tests/auto/other/macnativeevents/macnativeevents.pro4
-rw-r--r--tests/auto/other/macplist/app/app.pro11
-rw-r--r--tests/auto/other/networkselftest/tst_networkselftest.cpp14
-rw-r--r--tests/auto/other/other.pro2
11 files changed, 27 insertions, 40 deletions
diff --git a/tests/auto/other/atwrapper/atWrapper.pro b/tests/auto/other/atwrapper/atWrapper.pro
index 5dcbdb98ce..9de320b364 100644
--- a/tests/auto/other/atwrapper/atWrapper.pro
+++ b/tests/auto/other/atwrapper/atWrapper.pro
@@ -1,9 +1,6 @@
-# -*- Mode: makefile -*-
-
ARTHUR=$$QT_SOURCE_TREE/tests/arthur
COMMON_FOLDER = $$ARTHUR/common
include($$ARTHUR/arthurtester.pri)
-TEMPLATE = app
INCLUDEPATH += $$ARTHUR
DEFINES += SRCDIR=\\\"$$PWD\\\"
@@ -15,7 +12,6 @@ include($$ARTHUR/datagenerator/datagenerator.pri)
CONFIG += testcase
-# Input
HEADERS += atWrapper.h
SOURCES += atWrapperAutotest.cpp atWrapper.cpp
diff --git a/tests/auto/other/collections/tst_collections.cpp b/tests/auto/other/collections/tst_collections.cpp
index 9bfed15fc4..dc6d7f4b55 100644
--- a/tests/auto/other/collections/tst_collections.cpp
+++ b/tests/auto/other/collections/tst_collections.cpp
@@ -2124,11 +2124,10 @@ void tst_Collections::qstring()
QVERIFY(s.toAscii().isNull());
s = "ascii";
- s += (uchar) 0xb0;
+ s += QChar((uchar) 0xb0);
QVERIFY(s.toUtf8() != s.toLatin1());
- QString sa = s.toLatin1().constData();
- QVERIFY(sa[sa.length()-1] == (ushort) 0xb0);
- QVERIFY(sa.left(sa.length()-1) == "ascii");
+ QCOMPARE(s[s.length()-1].unicode(), (ushort)0xb0);
+ QVERIFY(s.left(s.length()-1) == "ascii");
QVERIFY(s == QString::fromUtf8(s.toUtf8().constData()));
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index 43e3788098..d72a04c8aa 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -268,9 +268,7 @@ namespace QtTestInternal
struct Getter {
static QMetaType::SaveOperator saveOp()
{
- typedef void(*SavePtr)(QDataStream &, const T *);
- SavePtr op = ::qMetaTypeSaveHelper<T>;
- return reinterpret_cast<QMetaType::SaveOperator>(op);
+ return ::qMetaTypeSaveHelper<T>;
}
};
diff --git a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
index 71a70384fc..a426a90976 100644
--- a/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
+++ b/tests/auto/other/exceptionsafety_objects/tst_exceptionsafety_objects.cpp
@@ -166,7 +166,6 @@ void tst_ExceptionSafety_Objects::objects_data()
NEWROW(QObject);
NEWROW(QBuffer);
NEWROW(QFile);
- NEWROW(QFSFileEngine);
NEWROW(QProcess);
NEWROW(QSettings);
NEWROW(QThread);
diff --git a/tests/auto/other/languagechange/languagechange.pro b/tests/auto/other/languagechange/languagechange.pro
index efbc524556..b115c01641 100644
--- a/tests/auto/other/languagechange/languagechange.pro
+++ b/tests/auto/other/languagechange/languagechange.pro
@@ -1,4 +1,4 @@
CONFIG += testcase
TARGET = tst_languagechange
-QT += widgets core-private testlib
+QT += widgets core-private gui-private testlib
SOURCES += tst_languagechange.cpp
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index b4bd766df7..663f2ef798 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -43,13 +43,16 @@
#include <QtTest/QtTest>
#include <qapplication.h>
+#include <private/qguiapplication_p.h>
#include <QtCore/QSet>
#include <QtCore/QFile>
#include <QtCore/QTranslator>
#include <QtCore/QTemporaryDir>
#include <private/qthread_p.h>
+#include <QtGui/QPlatformTheme>
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QColorDialog>
+#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QFileDialog>
#include <QtWidgets/QDesktopWidget>
@@ -66,12 +69,16 @@ private slots:
void retranslatability_data();
void retranslatability();
+private:
+ QDialogButtonBox::ButtonLayout m_layout;
};
-tst_languageChange::tst_languageChange()
-
+tst_languageChange::tst_languageChange() :
+ m_layout(QDialogButtonBox::WinLayout)
{
+ if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
+ m_layout = static_cast<QDialogButtonBox::ButtonLayout>(theme->themeHint(QPlatformTheme::DialogButtonBoxLayout).toInt());
}
void tst_languageChange::initTestCase()
@@ -240,6 +247,9 @@ void tst_languageChange::retranslatability()
QFETCH( int, dialogType);
QFETCH( TranslationSet, expected);
+ if (m_layout == QDialogButtonBox::GnomeLayout)
+ QSKIP("The input data are not suitable for this layout (QDialogButtonBox::GnomeLayout)");
+
// This will always be queried for when a language changes
expected.insert("QCoreApplication::QT_LAYOUT_DIRECTION::Translate this string to the string 'LTR' in left-to-right "
"languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to "
diff --git a/tests/auto/other/macgui/macgui.pro b/tests/auto/other/macgui/macgui.pro
index 5632450a3a..b7adbb470e 100644
--- a/tests/auto/other/macgui/macgui.pro
+++ b/tests/auto/other/macgui/macgui.pro
@@ -1,10 +1,6 @@
CONFIG += testcase
TARGET = tst_macgui
-TEMPLATE = app
-DEPENDPATH += .
-INCLUDEPATH += .
-# Input
SOURCES += tst_macgui.cpp guitest.cpp
HEADERS += guitest.h
diff --git a/tests/auto/other/macnativeevents/macnativeevents.pro b/tests/auto/other/macnativeevents/macnativeevents.pro
index efe091f9f0..6ec0942222 100644
--- a/tests/auto/other/macnativeevents/macnativeevents.pro
+++ b/tests/auto/other/macnativeevents/macnativeevents.pro
@@ -1,7 +1,3 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Wed Nov 29 22:24:47 2006
-######################################################################
-
CONFIG += testcase
TARGET = tst_macnativeevents
TEMPLATE = app
diff --git a/tests/auto/other/macplist/app/app.pro b/tests/auto/other/macplist/app/app.pro
index b4b895197c..9ccac831d0 100644
--- a/tests/auto/other/macplist/app/app.pro
+++ b/tests/auto/other/macplist/app/app.pro
@@ -1,12 +1,3 @@
-######################################################################
-# Automatically generated by qmake (2.01a) Wed Jan 7 13:01:11 2009
-######################################################################
-
-TEMPLATE = app
-TARGET =
-DEPENDPATH += .
-INCLUDEPATH += .
+QT += widgets
-# Input
SOURCES += main.cpp
-QT += widgets
diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp
index 99d4ac9522..841df6e1f0 100644
--- a/tests/auto/other/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp
@@ -80,7 +80,7 @@ private slots:
void httpServerFiles();
void httpServerCGI_data();
void httpServerCGI();
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void httpsServer();
#endif
void httpProxy();
@@ -188,14 +188,14 @@ static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout
static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000)
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
#endif
QTime timer;
timer.start();
forever {
if (socket->bytesToWrite() == 0
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
&& sslSocket->encryptedBytesToWrite() == 0
#endif
)
@@ -210,7 +210,7 @@ static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000)
static void netChat(int port, const QList<Chat> &chat)
{
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
QSslSocket socket;
#else
QTcpSocket socket;
@@ -322,7 +322,7 @@ static void netChat(int port, const QList<Chat> &chat)
break;
case Chat::StartEncryption:
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
QFAIL("Internal error: SSL required for this test");
#else
qDebug() << i << "Starting client encryption";
@@ -745,7 +745,7 @@ void tst_NetworkSelfTest::httpServerCGI()
netChat(80, chat);
}
-#ifndef QT_NO_OPENSSL
+#ifndef QT_NO_SSL
void tst_NetworkSelfTest::httpsServer()
{
netChat(443, QList<Chat>()
@@ -937,7 +937,7 @@ void tst_NetworkSelfTest::socks5ProxyAuth()
void tst_NetworkSelfTest::supportsSsl()
{
-#ifdef QT_NO_OPENSSL
+#ifdef QT_NO_SSL
QFAIL("SSL not compiled in");
#else
QVERIFY2(QSslSocket::supportsSsl(), "Could not load SSL libraries");
diff --git a/tests/auto/other/other.pro b/tests/auto/other/other.pro
index 69fe00dc19..9ec5ea8e34 100644
--- a/tests/auto/other/other.pro
+++ b/tests/auto/other/other.pro
@@ -26,6 +26,8 @@ SUBDIRS=\
qtokenautomaton \
windowsmobile \
+testcocoon: SUBDIRS -= headersclean
+
cross_compile: SUBDIRS -= \
atwrapper \
compiler \