Remove Symbian-specific code from tests.
Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
ab061e3e43
commit
95cebd34eb
@ -90,8 +90,8 @@ tst_QParallelAnimationGroup::~tst_QParallelAnimationGroup()
|
||||
void tst_QParallelAnimationGroup::initTestCase()
|
||||
{
|
||||
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
|
||||
#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAC) || defined(Q_WS_WINCE)
|
||||
// give the Symbian and mac app start event queue time to clear
|
||||
#if defined(Q_WS_MAC) || defined(Q_WS_WINCE)
|
||||
// give the mac/wince app start event queue time to clear
|
||||
QTest::qWait(1000);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = test
|
||||
|
||||
!wince*:!symbian:SUBDIRS += echo
|
||||
!wince*:SUBDIRS += echo
|
||||
|
@ -16,7 +16,7 @@ win32: {
|
||||
TARGET = tst_qtextcodec
|
||||
}
|
||||
|
||||
wince*|symbian {
|
||||
wince* {
|
||||
addFiles.files = ../*.txt
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
@ -27,9 +27,6 @@ wince*|symbian {
|
||||
|
||||
wince*: {
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
}else:symbian {
|
||||
# Symbian can't define SRCDIR meaningfully here
|
||||
LIBS += -lcharconv -lconvnames -lgb2312_shared -ljisx0201 -ljisx0208 -lefsrv
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
}
|
||||
|
@ -50,11 +50,6 @@
|
||||
#include <QtConcurrentMap>
|
||||
#include <QThreadPool>
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
|
||||
class tst_QTextCodec : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -196,9 +191,7 @@ void tst_QTextCodec::fromUnicode_data()
|
||||
QTest::newRow("data16") << "ISO-8859-16" << true;
|
||||
|
||||
QTest::newRow("data18") << "IBM850" << true;
|
||||
#ifndef Q_OS_SYMBIAN //symbian implementation will return empty string if all char are invalid
|
||||
QTest::newRow("data19") << "IBM874" << true;
|
||||
#endif
|
||||
QTest::newRow("data20") << "IBM866" << true;
|
||||
|
||||
QTest::newRow("data21") << "windows-1250" << true;
|
||||
@ -206,9 +199,7 @@ void tst_QTextCodec::fromUnicode_data()
|
||||
QTest::newRow("data23") << "windows-1252" << true;
|
||||
QTest::newRow("data24") << "windows-1253" << true;
|
||||
QTest::newRow("data25") << "windows-1254" << true;
|
||||
#ifndef Q_OS_SYMBIAN //symbian implementation will return empty string if all char are invalid
|
||||
QTest::newRow("data26") << "windows-1255" << true;
|
||||
#endif
|
||||
QTest::newRow("data27") << "windows-1256" << true;
|
||||
QTest::newRow("data28") << "windows-1257" << true;
|
||||
QTest::newRow("data28") << "windows-1258" << true;
|
||||
@ -1948,8 +1939,6 @@ void tst_QTextCodec::toLocal8Bit()
|
||||
{
|
||||
#ifdef QT_NO_PROCESS
|
||||
QSKIP("This test requires QProcess", SkipAll);
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QSKIP("This test requires streams support in QProcess", SkipAll);
|
||||
#else
|
||||
QProcess process;
|
||||
process.start("echo/echo");
|
||||
@ -2065,11 +2054,6 @@ void tst_QTextCodec::moreToFromUnicode_data() {
|
||||
QTest::newRow("turkish") << QByteArray("ISO-8859-9")
|
||||
<< QByteArray("\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::newRow("thai") << QByteArray("TIS-620")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB");
|
||||
#endif
|
||||
|
||||
QTest::newRow("latin1") << QByteArray("ISO-8859-1")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
||||
|
||||
@ -2079,9 +2063,6 @@ void tst_QTextCodec::moreToFromUnicode_data() {
|
||||
sms7bit_ba.append(i);
|
||||
}
|
||||
}
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::newRow("sms7bit") << QByteArray("SMS 7-bit") << sms7bit_ba;
|
||||
#endif
|
||||
|
||||
QTest::newRow("latin2") << QByteArray("ISO-8859-2")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
||||
@ -2101,11 +2082,6 @@ void tst_QTextCodec::moreToFromUnicode_data() {
|
||||
QTest::newRow("greek 2") << QByteArray("ISO-8859-7")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA6\xA7\xA8\xA9\xAB\xAC\xAD\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE");
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::newRow("hebriew") << QByteArray("ISO-8859-8")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFD\xFE");
|
||||
#endif
|
||||
|
||||
QTest::newRow("latin5") << QByteArray("ISO-8859-9")
|
||||
<< QByteArray("\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2A\x2B\x2C\x2D\x2E\x2F\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3A\x3B\x3C\x3D\x3E\x3F\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x5B\x5C\x5D\x5E\x5F\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7A\x7B\x7C\x7D\x7E\x7F\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
|
||||
|
||||
|
@ -11,9 +11,3 @@ SUBDIRS=\
|
||||
qtconcurrentthreadengine \
|
||||
qthreadpool
|
||||
|
||||
symbian:SUBDIRS -= \
|
||||
qtconcurrentfilter \
|
||||
qtconcurrentiteratekernel \
|
||||
qtconcurrentmap \
|
||||
qtconcurrentrun \
|
||||
qtconcurrentthreadengine \
|
||||
|
@ -6,15 +6,7 @@ wince*: {
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:symbian {
|
||||
# SRCDIR defined in code in symbian
|
||||
addFiles.files = datastream.q42
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
TARGET.EPOCHEAPSIZE = 1000000 10000000
|
||||
TARGET.UID3 = 0xE0340001
|
||||
DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x",""))
|
||||
}else {
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# define STRINGIFY(x) #x
|
||||
# define TOSTRING(x) STRINGIFY(x)
|
||||
# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(QBitArray)
|
||||
Q_DECLARE_METATYPE(qint64)
|
||||
|
||||
@ -1906,7 +1900,7 @@ static QRegion qRegionData(int index)
|
||||
case 4: return QRegion(100, -100, 2048, 4096, QRegion::Rectangle);
|
||||
case 5: return QRegion(-100, 100, 4096, 2048, QRegion::Rectangle);
|
||||
case 6: return QRegion(0, 0, 0, 0, QRegion::Ellipse);
|
||||
#if defined(Q_OS_SYMBIAN) || (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions.
|
||||
#if (!defined(Q_OS_UNIX) && !defined(Q_OS_WINCE)) // all our Unix platforms use X regions.
|
||||
case 7: return QRegion(1, 2, 300, 400, QRegion::Ellipse);
|
||||
case 8: return QRegion(100, 100, 1024, 768, QRegion::Ellipse);
|
||||
case 9: return QRegion(-100, -100, 1024, 1024, QRegion::Ellipse);
|
||||
@ -2558,7 +2552,7 @@ void tst_QDataStream::status_charptr_QByteArray_data()
|
||||
QTest::addColumn<int>("expectedStatus");
|
||||
QTest::addColumn<QByteArray>("expectedString");
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QByteArray oneMbMinus1(1024 * 1024 - 1, '\0');
|
||||
for (int i = 0; i < oneMbMinus1.size(); ++i)
|
||||
oneMbMinus1[i] = 0x1 | (8 * ((uchar)i / 9));
|
||||
@ -2572,7 +2566,7 @@ void tst_QDataStream::status_charptr_QByteArray_data()
|
||||
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x03jkl", 7) << (int) QDataStream::Ok << QByteArray("jkl");
|
||||
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x04jklm", 8) << (int) QDataStream::Ok << QByteArray("jklm");
|
||||
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x04jklmj", 8) << (int) QDataStream::Ok << QByteArray("jklm");
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QTest::newRow("size 1MB-1") << QByteArray("\x00\x0f\xff\xff", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::Ok << oneMbMinus1;
|
||||
QTest::newRow("size 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "j";
|
||||
QTest::newRow("size 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("jkl") << (int) QDataStream::Ok << oneMbMinus1 + "jk";
|
||||
@ -2592,7 +2586,7 @@ void tst_QDataStream::status_charptr_QByteArray_data()
|
||||
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x02j", 5) << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x03jk", 6) << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x04jkl", 7) << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QTest::newRow("badsize 1MB") << QByteArray("\x00\x10\x00\x00", 4) + oneMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x10\x00\x01", 4) + oneMbMinus1 + QByteArray("j") << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
QTest::newRow("badsize 3MB") << QByteArray("\x00\x30\x00\x00", 4) + threeMbMinus1 << (int) QDataStream::ReadPastEnd << QByteArray();
|
||||
@ -2662,7 +2656,7 @@ void tst_QDataStream::status_QString_data()
|
||||
QTest::addColumn<int>("expectedStatus");
|
||||
QTest::addColumn<QString>("expectedString");
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QString oneMbMinus1;
|
||||
oneMbMinus1.resize(1024 * 1024 - 1);
|
||||
for (int i = 0; i < oneMbMinus1.size(); ++i)
|
||||
@ -2680,7 +2674,7 @@ void tst_QDataStream::status_QString_data()
|
||||
QTest::newRow("size 3") << QByteArray("\x00\x00\x00\x06\x00j\x00k\x00l", 10) << (int) QDataStream::Ok << QString("jkl");
|
||||
QTest::newRow("size 4") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00m", 12) << (int) QDataStream::Ok << QString("jklm");
|
||||
QTest::newRow("size 4j") << QByteArray("\x00\x00\x00\x08\x00j\x00k\x00l\x00mjj", 14) << (int) QDataStream::Ok << QString("jklm");
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QTest::newRow("size 1MB-1") << QByteArray("\x00\x1f\xff\xfe", 4) + oneMbMinus1Data + QByteArray("jj") << (int) QDataStream::Ok << oneMbMinus1;
|
||||
QTest::newRow("size 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "j";
|
||||
QTest::newRow("size 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("\x00j\x00k\x00l", 6) << (int) QDataStream::Ok << oneMbMinus1 + "jk";
|
||||
@ -2700,7 +2694,7 @@ void tst_QDataStream::status_QString_data()
|
||||
QTest::newRow("badsize 2") << QByteArray("\x00\x00\x00\x04jj", 6) << (int) QDataStream::ReadPastEnd << QString();
|
||||
QTest::newRow("badsize 3") << QByteArray("\x00\x00\x00\x06jjkk", 8) << (int) QDataStream::ReadPastEnd << QString();
|
||||
QTest::newRow("badsize 4") << QByteArray("\x00\x00\x00\x08jjkkll", 10) << (int) QDataStream::ReadPastEnd << QString();
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QTest::newRow("badsize 1MB") << QByteArray("\x00\x20\x00\x00", 4) + oneMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
|
||||
QTest::newRow("badsize 1MB+1") << QByteArray("\x00\x20\x00\x02", 4) + oneMbMinus1Data + QByteArray("j") << (int) QDataStream::ReadPastEnd << QString();
|
||||
QTest::newRow("badsize 3MB") << QByteArray("\x00\x60\x00\x00", 4) + threeMbMinus1Data << (int) QDataStream::ReadPastEnd << QString();
|
||||
|
@ -3,7 +3,7 @@ SOURCES += tst_qdir.cpp
|
||||
RESOURCES += qdir.qrc
|
||||
QT = core
|
||||
|
||||
wince*|symbian {
|
||||
wince* {
|
||||
DirFiles.files = testdir testData searchdir resources entrylist types tst_qdir.cpp
|
||||
DirFiles.path = .
|
||||
DEPLOYMENT += DirFiles
|
||||
@ -11,12 +11,6 @@ wince*|symbian {
|
||||
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:symbian {
|
||||
TARGET.CAPABILITY += AllFiles
|
||||
TARGET.UID3 = 0xE0340002
|
||||
DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x",""))
|
||||
LIBS += -lefsrv
|
||||
INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -56,12 +56,7 @@
|
||||
|
||||
#include "../../../../shared/filesystem.h"
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# include <f32file.h>
|
||||
# define STRINGIFY(x) #x
|
||||
# define TOSTRING(x) STRINGIFY(x)
|
||||
# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#if defined(Q_OS_UNIX)
|
||||
# include <unistd.h>
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
@ -70,12 +65,6 @@
|
||||
#define Q_NO_SYMLINKS
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
#define Q_NO_SYMLINKS
|
||||
#define Q_NO_SYMLINKS_TO_DIRS
|
||||
#endif
|
||||
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
@ -224,20 +213,10 @@ void tst_QDir::getSetCheck()
|
||||
|
||||
tst_QDir::tst_QDir()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// Can't deploy empty test dir, so create it here
|
||||
QDir dir(SRCDIR);
|
||||
dir.mkdir("testData");
|
||||
#endif
|
||||
}
|
||||
|
||||
tst_QDir::~tst_QDir()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// Remove created test dir
|
||||
QDir dir(SRCDIR);
|
||||
dir.rmdir("testData");
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QDir::construction()
|
||||
@ -253,7 +232,7 @@ void tst_QDir::setPath_data()
|
||||
QTest::addColumn<QString>("dir2");
|
||||
|
||||
QTest::newRow("data0") << QString(".") << QString("..");
|
||||
#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("data1") << QString("c:/") << QDir::currentPath();
|
||||
#endif
|
||||
}
|
||||
@ -372,7 +351,7 @@ void tst_QDir::exists_data()
|
||||
QTest::newRow("unc 8") << "//" + QtNetworkSettings::winServerName() + "/asharethatshouldnotexist" << false;
|
||||
QTest::newRow("unc 9") << "//ahostthatshouldnotexist" << false;
|
||||
#endif
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("This drive should exist") << "C:/" << true;
|
||||
// find a non-existing drive and check if it does not exist
|
||||
QFileInfoList drives = QFSFileEngine::drives();
|
||||
@ -408,7 +387,7 @@ void tst_QDir::isRelativePath_data()
|
||||
QTest::addColumn<bool>("relative");
|
||||
|
||||
QTest::newRow("data0") << "../somedir" << true;
|
||||
#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_WS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("data1") << "C:/sOmedir" << false;
|
||||
#endif
|
||||
QTest::newRow("data2") << "somedir" << true;
|
||||
@ -617,8 +596,8 @@ 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
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
// WinCE does not have . and .. in the directory listing
|
||||
#if defined(Q_OS_WINCE)
|
||||
expected.removeAll(".");
|
||||
expected.removeAll("..");
|
||||
#endif
|
||||
@ -629,50 +608,6 @@ void tst_QDir::entryList()
|
||||
QFile::link(SRCDIR "entryList/file", SRCDIR "entrylist/linktofile.lnk");
|
||||
QFile::link(SRCDIR "entryList/directory", SRCDIR "entrylist/linktodirectory.lnk");
|
||||
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");
|
||||
|
||||
// Expecting failures from a couple of OpenC bugs. Do checks only once.
|
||||
static int xFailChecked = false;
|
||||
static int expectedFail1 = false;
|
||||
static int expectedFail2 = false;
|
||||
|
||||
if (!expectedFail1) {
|
||||
// Can't create link if file doesn't exist in symbian, so create file temporarily,
|
||||
// But only if testing for
|
||||
QFile tempFile(SRCDIR "entryList/nothing");
|
||||
tempFile.open(QIODevice::WriteOnly);
|
||||
tempFile.link(SRCDIR "entryList/brokenlink.lnk");
|
||||
tempFile.remove();
|
||||
}
|
||||
|
||||
if (!expectedFail2) {
|
||||
QFile::link(SRCDIR "entryList/file", SRCDIR "entrylist/linktofile.lnk");
|
||||
}
|
||||
|
||||
if (!xFailChecked) {
|
||||
// ### Until OpenC supports stat correctly for symbolic links, expect them to fail.
|
||||
expectedFail1 = QFileInfo(SRCDIR "entryList/brokenlink.lnk").exists();
|
||||
expectedFail2 = !(QFileInfo(SRCDIR "entryList/linktofile.lnk").isFile());
|
||||
|
||||
QEXPECT_FAIL("", "OpenC bug, stat for broken links returns normally, when it should return error.", Continue);
|
||||
QVERIFY(!expectedFail1);
|
||||
|
||||
QEXPECT_FAIL("", "OpenC bug, stat for file links doesn't indicate them as such.", Continue);
|
||||
QVERIFY(!expectedFail2);
|
||||
xFailChecked = true;
|
||||
}
|
||||
|
||||
if (expectedFail1) {
|
||||
expected.removeAll("brokenlink.lnk");
|
||||
QFile::remove(SRCDIR "entrylist/brokenlink.lnk");
|
||||
}
|
||||
|
||||
if (expectedFail2) {
|
||||
expected.removeAll("linktofile.lnk");
|
||||
QFile::remove(SRCDIR "entrylist/linktofile.lnk");
|
||||
}
|
||||
#else
|
||||
QFile::link("file", SRCDIR "entrylist/linktofile.lnk");
|
||||
QFile::link("directory", SRCDIR "entrylist/linktodirectory.lnk");
|
||||
@ -698,7 +633,7 @@ void tst_QDir::entryList()
|
||||
return;
|
||||
}
|
||||
bool doContentCheck = true;
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
if (qstrcmp(QTest::currentDataTag(), "QDir::AllEntries | QDir::Writable") == 0) {
|
||||
// for root, everything is writeable
|
||||
if (::getuid() == 0)
|
||||
@ -713,11 +648,6 @@ void tst_QDir::entryList()
|
||||
QCOMPARE(actual.count(), expected.count());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Test cleanup on device requires setting the permissions back to normal
|
||||
QFile(SRCDIR "entrylist/file").setPermissions(QFile::WriteUser | QFile::ReadUser);
|
||||
#endif
|
||||
|
||||
QFile::remove(SRCDIR "entrylist/writable");
|
||||
QFile::remove(SRCDIR "entrylist/linktofile");
|
||||
QFile::remove(SRCDIR "entrylist/linktodirectory");
|
||||
@ -733,7 +663,7 @@ void tst_QDir::entryListSimple_data()
|
||||
QTest::addColumn<int>("countMin");
|
||||
|
||||
QTest::newRow("data2") << "do_not_expect_this_path_to_exist/" << 0;
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
QTest::newRow("simple dir") << SRCDIR "resources" << 0;
|
||||
QTest::newRow("simple dir with slash") << SRCDIR "resources/" << 0;
|
||||
#else
|
||||
@ -793,9 +723,6 @@ void tst_QDir::entryListWithSymLinks()
|
||||
QVERIFY(entryList.contains("myDir"));
|
||||
# ifndef Q_NO_SYMLINKS_TO_DIRS
|
||||
QVERIFY(entryList.contains("myLinkToDir.lnk"));
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QEXPECT_FAIL("", "OpenC stat for symlinks is buggy.", Continue);
|
||||
#endif
|
||||
QVERIFY(!entryList.contains("myLinkToFile.lnk"));
|
||||
}
|
||||
@ -852,7 +779,7 @@ void tst_QDir::canonicalPath_data()
|
||||
QTest::newRow("rootPath + ./") << QDir::rootPath().append("./") << QDir::rootPath();
|
||||
|
||||
QTest::newRow("rootPath + ../.. ") << QDir::rootPath().append("../..") << QDir::rootPath();
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QTest::newRow("drive:\\") << QDir::toNativeSeparators(QDir::rootPath()) << QDir::rootPath();
|
||||
QTest::newRow("drive:\\.\\") << QDir::toNativeSeparators(QDir::rootPath().append("./")) << QDir::rootPath();
|
||||
QTest::newRow("drive:\\..\\..") << QDir::toNativeSeparators(QDir::rootPath().append("../..")) << QDir::rootPath();
|
||||
@ -879,7 +806,7 @@ void tst_QDir::canonicalPath()
|
||||
QFETCH(QString, canonicalPath);
|
||||
|
||||
QDir dir(path);
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QCOMPARE(dir.canonicalPath().toLower(), canonicalPath.toLower());
|
||||
#else
|
||||
QCOMPARE(dir.canonicalPath(), canonicalPath);
|
||||
@ -934,7 +861,7 @@ void tst_QDir::current()
|
||||
if (!currentDir.isEmpty()) {
|
||||
QDir newCurrent = QDir::current();
|
||||
QDir::setCurrent(oldDir);
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QCOMPARE(newCurrent.absolutePath().toLower(), currentDir.toLower());
|
||||
#else
|
||||
QCOMPARE(newCurrent.absolutePath(), currentDir);
|
||||
@ -955,7 +882,7 @@ void tst_QDir::cd_data()
|
||||
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
|
||||
#if defined(Q_OS_WIN) // on windows QDir::root() is usually c:/ but cd "/" will not force it to be root
|
||||
QTest::newRow("absolute") << QDir::currentPath() << "/" << true << "/";
|
||||
#else
|
||||
QTest::newRow("absolute") << QDir::currentPath() << "/" << true << QDir::root().absolutePath();
|
||||
@ -1036,7 +963,7 @@ tst_QDir::cleanPath_data()
|
||||
QTest::newRow("data3") << QDir::cleanPath("../.") << "..";
|
||||
QTest::newRow("data4") << QDir::cleanPath("../..") << "../..";
|
||||
#if !defined(Q_OS_WINCE)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QTest::newRow("data5") << "d:\\a\\bc\\def\\.." << "d:/a/bc";
|
||||
QTest::newRow("data6") << "d:\\a\\bc\\def\\../../.." << "d:/";
|
||||
#else
|
||||
@ -1100,12 +1027,10 @@ void tst_QDir::absolutePath_data()
|
||||
QTest::addColumn<QString>("expectedPath");
|
||||
|
||||
QTest::newRow("0") << "/machine/share/dir1" << "/machine/share/dir1";
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("1") << "\\machine\\share\\dir1" << "/machine/share/dir1";
|
||||
# if !defined(Q_OS_SYMBIAN)
|
||||
QTest::newRow("2") << "//machine/share/dir1" << "//machine/share/dir1";
|
||||
QTest::newRow("3") << "\\\\machine\\share\\dir1" << "//machine/share/dir1";
|
||||
# endif
|
||||
QTest::newRow("4") << "c:/machine/share/dir1" << "c:/machine/share/dir1";
|
||||
QTest::newRow("5") << "c:\\machine\\share\\dir1" << "c:/machine/share/dir1";
|
||||
#endif
|
||||
@ -1148,7 +1073,7 @@ void tst_QDir::relativeFilePath_data()
|
||||
|
||||
QTest::newRow("11") << "" << "" << "";
|
||||
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("12") << "C:/foo/bar" << "ding" << "ding";
|
||||
QTest::newRow("13") << "C:/foo/bar" << "C:/ding/dong" << "../../ding/dong";
|
||||
QTest::newRow("14") << "C:/foo/bar" << "/ding/dong" << "../../ding/dong";
|
||||
@ -1167,12 +1092,10 @@ void tst_QDir::relativeFilePath_data()
|
||||
QTest::newRow("27") << "C:" << "D:/" << "D:/";
|
||||
QTest::newRow("28") << "C:/" << "D:" << "D:";
|
||||
QTest::newRow("29") << "C:/" << "D:/" << "D:/";
|
||||
# if !defined(Q_OS_SYMBIAN)
|
||||
QTest::newRow("30") << "C:/foo/bar" << "//anotherHost/foo/bar" << "//anotherHost/foo/bar";
|
||||
QTest::newRow("31") << "//anotherHost/foo" << "//anotherHost/foo/bar" << "bar";
|
||||
QTest::newRow("32") << "//anotherHost/foo" << "bar" << "bar";
|
||||
QTest::newRow("33") << "//anotherHost/foo" << "C:/foo/bar" << "C:/foo/bar";
|
||||
# endif
|
||||
#endif
|
||||
|
||||
QTest::newRow("resource0") << ":/prefix" << "foo.bar" << "foo.bar";
|
||||
@ -1235,8 +1158,6 @@ void tst_QDir::rename()
|
||||
QVERIFY(dir.rename("rename-test-renamed", "rename-test"));
|
||||
#if defined(Q_OS_MAC)
|
||||
QVERIFY(!dir.rename("rename-test", "/etc/rename-test-renamed"));
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QVERIFY(!dir.rename("rename-test", "/resource/rename-test-renamed"));
|
||||
#elif !defined(Q_OS_WIN)
|
||||
// on windows this is possible - maybe make the test a bit better
|
||||
QVERIFY(!dir.rename("rename-test", "/rename-test-renamed"));
|
||||
@ -1295,7 +1216,7 @@ void tst_QDir::dirName_data()
|
||||
QTest::newRow("slash0") << "c:/winnt/system32" << "system32";
|
||||
QTest::newRow("slash1") << "/winnt/system32" << "system32";
|
||||
QTest::newRow("slash2") << "c:/winnt/system32/kernel32.dll" << "kernel32.dll";
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QTest::newRow("bslash0") << "c:\\winnt\\system32" << "system32";
|
||||
QTest::newRow("bslash1") << "\\winnt\\system32" << "system32";
|
||||
QTest::newRow("bslash2") << "c:\\winnt\\system32\\kernel32.dll" << "kernel32.dll";
|
||||
@ -1322,8 +1243,8 @@ 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);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("WinCE does not have . nor ..", SkipAll);
|
||||
#else
|
||||
QDir dir(QString(SRCDIR "testdir/"));
|
||||
QStringList entryList = dir.entryList(QDir::Dirs);
|
||||
@ -1384,14 +1305,14 @@ void tst_QDir::rootPath()
|
||||
QCOMPARE(path, dir.absolutePath());
|
||||
QVERIFY(QDir::isAbsolutePath(path));
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
QCOMPARE(path, QString("/"));
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QDir::nativeSeparators()
|
||||
{
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QCOMPARE(QDir::toNativeSeparators(QLatin1String("/")), QString("\\"));
|
||||
QCOMPARE(QDir::toNativeSeparators(QLatin1String("\\")), QString("\\"));
|
||||
QCOMPARE(QDir::fromNativeSeparators(QLatin1String("/")), QString("/"));
|
||||
@ -1564,7 +1485,7 @@ void tst_QDir::updateFileLists()
|
||||
|
||||
QDir dir("update-file-lists");
|
||||
|
||||
#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
|
||||
#if defined(Q_OS_WINCE)
|
||||
//no . and .. on these OS.
|
||||
QCOMPARE(dir.count(), uint(4));
|
||||
QCOMPARE(dir.entryList().size(), 4);
|
||||
@ -1762,7 +1683,7 @@ void tst_QDir::isRoot_data()
|
||||
#endif
|
||||
QTest::newRow(QString("canonicalPath " + test).toLatin1()) << test << true;
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
test = QDir::rootPath().left(2);
|
||||
QTest::newRow(QString("drive relative " + test).toLatin1()) << test << false;
|
||||
#endif
|
||||
@ -1811,32 +1732,18 @@ void tst_QDir::drives()
|
||||
#if defined(Q_OS_WIN)
|
||||
QVERIFY(list.count() >= 1); //system
|
||||
QLatin1Char systemdrive('c');
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QVERIFY(list.count() >= 2); //system, rom
|
||||
QLatin1Char romdrive('z');
|
||||
QLatin1Char systemdrive('a' + int(RFs::GetSystemDrive()));
|
||||
#endif
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QVERIFY(list.count() <= 26);
|
||||
bool foundsystem = false;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
bool foundrom = false;
|
||||
#endif
|
||||
foreach (QFileInfo fi, list) {
|
||||
QCOMPARE(fi.absolutePath().size(), 3); //"x:/"
|
||||
QCOMPARE(fi.absolutePath().at(1), QChar(QLatin1Char(':')));
|
||||
QCOMPARE(fi.absolutePath().at(2), QChar(QLatin1Char('/')));
|
||||
if (fi.absolutePath().at(0).toLower() == systemdrive)
|
||||
foundsystem = true;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
if (fi.absolutePath().at(0).toLower() == romdrive)
|
||||
foundrom = true;
|
||||
#endif
|
||||
}
|
||||
QCOMPARE(foundsystem, true);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QCOMPARE(foundrom, true);
|
||||
#endif
|
||||
#else
|
||||
QCOMPARE(list.count(), 1); //root
|
||||
QCOMPARE(list.at(0).absolutePath(), QLatin1String("/"));
|
||||
@ -1951,7 +1858,7 @@ void tst_QDir::isReadable()
|
||||
QDir dir;
|
||||
|
||||
QVERIFY(dir.isReadable());
|
||||
#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_UNIX)
|
||||
QVERIFY(dir.mkdir("nonreadabledir"));
|
||||
QVERIFY(0 == ::chmod("nonreadabledir", 0));
|
||||
QVERIFY(!QDir("nonreadabledir").isReadable());
|
||||
|
@ -52,11 +52,6 @@
|
||||
#define Q_NO_SYMLINKS
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
#define Q_NO_SYMLINKS
|
||||
#define Q_NO_SYMLINKS_TO_DIRS
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
# include "../../../network-settings.h"
|
||||
#endif
|
||||
@ -159,7 +154,7 @@ tst_QDirIterator::tst_QDirIterator()
|
||||
createDirectory("empty");
|
||||
|
||||
#ifndef Q_NO_SYMLINKS
|
||||
# if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
# if defined(Q_OS_WIN)
|
||||
// ### Sadly, this is a platform difference right now.
|
||||
createLink("entrylist/file", "entrylist/linktofile.lnk");
|
||||
# ifndef Q_NO_SYMLINKS_TO_DIRS
|
||||
@ -211,7 +206,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
|
||||
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
|
||||
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
|
||||
<< QString(
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
"entrylist/.,"
|
||||
"entrylist/..,"
|
||||
#endif
|
||||
@ -229,7 +224,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
|
||||
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
|
||||
<< QDir::Filters(QDir::AllEntries | QDir::NoDot) << QStringList("*")
|
||||
<< QString(
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
"entrylist/..,"
|
||||
#endif
|
||||
"entrylist/file,"
|
||||
@ -246,7 +241,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
|
||||
<< QString("entrylist") << QDirIterator::IteratorFlags(0)
|
||||
<< QDir::Filters(QDir::AllEntries | QDir::NoDotDot) << QStringList("*")
|
||||
<< QString(
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
"entrylist/.,"
|
||||
#endif
|
||||
"entrylist/file,"
|
||||
@ -277,7 +272,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
|
||||
<< QString("entrylist") << QDirIterator::IteratorFlags(QDirIterator::Subdirectories | QDirIterator::FollowSymlinks)
|
||||
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
|
||||
<< QString(
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
"entrylist/.,"
|
||||
"entrylist/..,"
|
||||
"entrylist/directory/.,"
|
||||
@ -317,7 +312,7 @@ void tst_QDirIterator::iterateRelativeDirectory_data()
|
||||
QTest::newRow("empty, default")
|
||||
<< QString("empty") << QDirIterator::IteratorFlags(0)
|
||||
<< QDir::Filters(QDir::NoFilter) << QStringList("*")
|
||||
#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
|
||||
#if defined(Q_OS_WINCE)
|
||||
<< QStringList();
|
||||
#else
|
||||
<< QString("empty/.,empty/..").split(',');
|
||||
|
@ -1,10 +1,10 @@
|
||||
TEMPLATE = subdirs
|
||||
wince*|symbian:{
|
||||
wince* {
|
||||
SUBDIRS = test
|
||||
} else {
|
||||
SUBDIRS = test stdinprocess
|
||||
}
|
||||
|
||||
!symbian:SUBDIRS += largefile
|
||||
SUBDIRS += largefile
|
||||
|
||||
CONFIG += parallel_test
|
||||
|
@ -1,7 +1,7 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += ../tst_qfile.cpp
|
||||
|
||||
wince*|symbian {
|
||||
wince* {
|
||||
QT = core gui
|
||||
files.files += ..\\dosfile.txt ..\\noendofline.txt ..\\testfile.txt \
|
||||
..\\testlog.txt ..\\two.dots.file ..\\tst_qfile.cpp \
|
||||
@ -16,9 +16,6 @@ wince*|symbian {
|
||||
wince* {
|
||||
SOURCES += $$QT_SOURCE_TREE/src/corelib/kernel/qfunctions_wince.cpp # needed for QT_OPEN
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:symbian {
|
||||
# do not define SRCDIR at all
|
||||
TARGET.EPOCHEAPSIZE = 0x100000 0x3000000
|
||||
} else {
|
||||
QT = core network
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
@ -37,8 +34,4 @@ win32 {
|
||||
LIBS+=-lole32 -luuid
|
||||
}
|
||||
|
||||
symbian {
|
||||
LIBS+=-lefsrv
|
||||
}
|
||||
|
||||
mac*:CONFIG+=insignificant_test
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
#include <QHostInfo>
|
||||
#endif
|
||||
#include <QProcess>
|
||||
@ -70,18 +70,12 @@
|
||||
#elif defined(Q_OS_WINCE)
|
||||
# include <qplatformdefs.h>
|
||||
# include <private/qfsfileengine_p.h>
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
# include <f32file.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include "../../../network-settings.h"
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# define SRCDIR ""
|
||||
#endif
|
||||
|
||||
#ifndef STDIN_FILENO
|
||||
#define STDIN_FILENO 0
|
||||
#endif
|
||||
@ -218,10 +212,7 @@ private slots:
|
||||
void resize();
|
||||
|
||||
void objectConstructors();
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
void platformSecurity_data();
|
||||
void platformSecurity();
|
||||
#endif
|
||||
|
||||
void caseSensitivity();
|
||||
|
||||
void autocloseHandle();
|
||||
@ -242,9 +233,6 @@ private:
|
||||
OpenQFile,
|
||||
OpenFd,
|
||||
OpenStream,
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
OpenRFile,
|
||||
#endif
|
||||
NumberOfFileTypes
|
||||
};
|
||||
|
||||
@ -281,33 +269,6 @@ private:
|
||||
return stream_ && file.open(stream_, mode, handleFlags);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
bool openRFile(QFile &file, QIODevice::OpenMode mode, QFile::FileHandleFlags handleFlags)
|
||||
{
|
||||
//connect file server first time
|
||||
if (!rfs_.Handle() && rfs_.Connect() != KErrNone)
|
||||
return false;
|
||||
//symbian does not like ./ in filenames, so open by absolute path
|
||||
QString fileName(QDir::toNativeSeparators(QFileInfo(file).absoluteFilePath()));
|
||||
TPtrC fn(fileName.utf16(), fileName.length());
|
||||
TInt smode = 0;
|
||||
if (mode & QIODevice::WriteOnly)
|
||||
smode |= EFileWrite;
|
||||
if (mode & QIODevice::ReadOnly)
|
||||
smode |= EFileRead;
|
||||
TInt r;
|
||||
if ((mode & QIODevice::Truncate) || (!(mode & QIODevice::ReadOnly) && !(mode & QIODevice::Append))) {
|
||||
r = rfile_.Replace(rfs_, fn, smode);
|
||||
} else {
|
||||
r = rfile_.Open(rfs_, fn, smode);
|
||||
if (r == KErrNotFound && (mode & QIODevice::WriteOnly)) {
|
||||
r = rfile_.Create(rfs_, fn, smode);
|
||||
}
|
||||
}
|
||||
return (r == KErrNone) && file.open(rfile_, mode, handleFlags);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool openFile(QFile &file, QIODevice::OpenMode mode, FileType type = OpenQFile, QFile::FileHandleFlags handleFlags = QFile::DontCloseHandle)
|
||||
{
|
||||
if (mode & QIODevice::WriteOnly && !file.exists())
|
||||
@ -329,10 +290,7 @@ private:
|
||||
|
||||
case OpenStream:
|
||||
return openStream(file, mode, handleFlags);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
case OpenRFile:
|
||||
return openRFile(file, mode, handleFlags);
|
||||
#endif
|
||||
|
||||
case NumberOfFileTypes:
|
||||
break;
|
||||
}
|
||||
@ -348,10 +306,6 @@ private:
|
||||
QT_CLOSE(fd_);
|
||||
if (stream_)
|
||||
::fclose(stream_);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
if (rfile_.SubSessionHandle())
|
||||
rfile_.Close();
|
||||
#endif
|
||||
|
||||
fd_ = -1;
|
||||
stream_ = 0;
|
||||
@ -359,10 +313,6 @@ private:
|
||||
|
||||
int fd_;
|
||||
FILE *stream_;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
RFs rfs_;
|
||||
RFile rfile_;
|
||||
#endif
|
||||
};
|
||||
|
||||
tst_QFile::tst_QFile()
|
||||
@ -562,10 +512,7 @@ void tst_QFile::open()
|
||||
|
||||
QFETCH( bool, ok );
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
if (qstrcmp(QTest::currentDataTag(), "noreadfile") == 0)
|
||||
QSKIP("Symbian does not support non-readable files", SkipSingle);
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#if defined(Q_OS_UNIX)
|
||||
if (::getuid() == 0)
|
||||
// root and Chuck Norris don't care for file permissions. Skip.
|
||||
QSKIP("Running this test as root doesn't make sense", SkipAll);
|
||||
@ -897,8 +844,8 @@ void tst_QFile::readAllBuffer()
|
||||
|
||||
void tst_QFile::readAllStdin()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Currently no stdin/out supported for Windows CE or Symbian", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Currently no stdin/out supported for Windows CE", SkipAll);
|
||||
#endif
|
||||
#if defined(QT_NO_PROCESS)
|
||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
||||
@ -924,8 +871,8 @@ void tst_QFile::readAllStdin()
|
||||
|
||||
void tst_QFile::readLineStdin()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Currently no stdin/out supported for Windows CE or Symbian", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Currently no stdin/out supported for Windows CE", SkipAll);
|
||||
#endif
|
||||
#if defined(QT_NO_PROCESS)
|
||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
||||
@ -967,7 +914,7 @@ void tst_QFile::readLineStdin()
|
||||
|
||||
void tst_QFile::readLineStdin_lineByLine()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Currently no stdin/out supported for Windows CE", SkipAll);
|
||||
#endif
|
||||
#if defined(QT_NO_PROCESS)
|
||||
@ -1095,7 +1042,7 @@ void tst_QFile::ungetChar()
|
||||
void tst_QFile::invalidFile_data()
|
||||
{
|
||||
QTest::addColumn<QString>("fileName");
|
||||
#if !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_WS_WIN)
|
||||
QTest::newRow( "x11" ) << QString( "qwe//" );
|
||||
#else
|
||||
QTest::newRow( "colon1" ) << QString( "fail:invalid" );
|
||||
@ -1165,10 +1112,6 @@ void tst_QFile::permissions_data()
|
||||
|
||||
void tst_QFile::permissions()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
if (qstrcmp(QTest::currentDataTag(), "data0") == 0)
|
||||
QSKIP("Symbian does not have execution permissions", SkipSingle);
|
||||
#endif
|
||||
QFETCH(QString, file);
|
||||
QFETCH(uint, perms);
|
||||
QFETCH(bool, expected);
|
||||
@ -1261,11 +1204,8 @@ void tst_QFile::copyShouldntOverwrite()
|
||||
QFile::remove("tst_qfile.cpy");
|
||||
QFile file(SRCDIR "tst_qfile.cpp");
|
||||
QVERIFY(file.copy("tst_qfile.cpy"));
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteUser);
|
||||
#else
|
||||
bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteOther);
|
||||
#endif
|
||||
|
||||
bool ok = QFile::setPermissions("tst_qfile.cpy", QFile::WriteOther);
|
||||
QVERIFY(ok);
|
||||
QVERIFY(!file.copy("tst_qfile.cpy"));
|
||||
QFile::remove("tst_qfile.cpy");
|
||||
@ -1352,9 +1292,6 @@ static QString getWorkingDirectoryForLink(const QString &linkFileName)
|
||||
|
||||
void tst_QFile::link()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian does not support links", SkipAll);
|
||||
#endif
|
||||
QFile::remove("myLink.lnk");
|
||||
|
||||
QFileInfo info1(SRCDIR "tst_qfile.cpp");
|
||||
@ -1383,9 +1320,6 @@ void tst_QFile::link()
|
||||
|
||||
void tst_QFile::linkToDir()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian does not support linking to directories", SkipAll);
|
||||
#endif
|
||||
QFile::remove("myLinkToDir.lnk");
|
||||
QDir dir;
|
||||
dir.mkdir("myDir");
|
||||
@ -1406,9 +1340,6 @@ void tst_QFile::linkToDir()
|
||||
|
||||
void tst_QFile::absolutePathLinkToRelativePath()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian does not support links", SkipAll);
|
||||
#endif
|
||||
QFile::remove("myDir/test.txt");
|
||||
QFile::remove("myDir/myLink.lnk");
|
||||
QDir dir;
|
||||
@ -1420,7 +1351,7 @@ void tst_QFile::absolutePathLinkToRelativePath()
|
||||
#else
|
||||
QVERIFY(QFile::link("myDir/test.txt", "myDir/myLink.lnk"));
|
||||
#endif
|
||||
QEXPECT_FAIL("", "Symlinking using relative paths is currently different on Windows and Unix/Symbian", Continue);
|
||||
QEXPECT_FAIL("", "Symlinking using relative paths is currently different on Windows and Unix", Continue);
|
||||
QCOMPARE(QFileInfo(QFile(QFileInfo("myDir/myLink.lnk").absoluteFilePath()).symLinkTarget()).absoluteFilePath(),
|
||||
QFileInfo("myDir/test.txt").absoluteFilePath());
|
||||
|
||||
@ -1431,29 +1362,15 @@ void tst_QFile::absolutePathLinkToRelativePath()
|
||||
|
||||
void tst_QFile::readBrokenLink()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian does not support links", SkipAll);
|
||||
#endif
|
||||
QFile::remove("myLink2.lnk");
|
||||
QFileInfo info1("file12");
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// In Symbian can't link to nonexisting file directly, so create the file temporarily
|
||||
QFile tempFile("file12");
|
||||
tempFile.open(QIODevice::WriteOnly);
|
||||
tempFile.link("myLink2.lnk");
|
||||
tempFile.remove();
|
||||
#else
|
||||
QVERIFY(QFile::link("file12", "myLink2.lnk"));
|
||||
#endif
|
||||
QFileInfo info2("myLink2.lnk");
|
||||
QVERIFY(info2.isSymLink());
|
||||
QCOMPARE(info2.symLinkTarget(), info1.absoluteFilePath());
|
||||
QVERIFY(QFile::remove(info2.absoluteFilePath()));
|
||||
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
QVERIFY(QFile::link("ole/..", "myLink2.lnk"));
|
||||
QCOMPARE(QFileInfo("myLink2.lnk").symLinkTarget(), QDir::currentPath());
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QFile::readTextFile_data()
|
||||
@ -1666,7 +1583,7 @@ void tst_QFile::bufferedRead()
|
||||
|
||||
void tst_QFile::isSequential()
|
||||
{
|
||||
#if defined (Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_WIN)
|
||||
QSKIP("Unix only test.", SkipAll);
|
||||
#endif
|
||||
|
||||
@ -2005,7 +1922,7 @@ void tst_QFile::longFileName()
|
||||
}
|
||||
{
|
||||
QFile file(fileName);
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
QEXPECT_FAIL("244 chars", "Full pathname must be less than 260 chars", Abort);
|
||||
QEXPECT_FAIL("244 chars to absolutepath", "Full pathname must be less than 260 chars", Abort);
|
||||
#endif
|
||||
@ -2268,9 +2185,6 @@ void tst_QFile::writeLargeDataBlock_data()
|
||||
QTest::newRow("localfile-QFile") << "./largeblockfile.txt" << (int)OpenQFile;
|
||||
QTest::newRow("localfile-Fd") << "./largeblockfile.txt" << (int)OpenFd;
|
||||
QTest::newRow("localfile-Stream") << "./largeblockfile.txt" << (int)OpenStream;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::newRow("localfile-RFile") << "./largeblockfile.txt" << (int)OpenRFile;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
// Some semi-randomness to avoid collisions.
|
||||
@ -2287,8 +2201,8 @@ static QByteArray getLargeDataBlock()
|
||||
|
||||
if (array.isNull())
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
int resizeSize = 1024 * 1024; // WinCE and Symbian do not have much space
|
||||
#if defined(Q_OS_WINCE)
|
||||
int resizeSize = 1024 * 1024; // WinCE does not have much space
|
||||
#else
|
||||
int resizeSize = 64 * 1024 * 1024;
|
||||
#endif
|
||||
@ -2439,7 +2353,7 @@ void tst_QFile::rename_data()
|
||||
QTest::newRow("a -> .") << QString("a") << QString(".") << false;
|
||||
QTest::newRow("renamefile -> renamefile") << QString("renamefile") << QString("renamefile") << false;
|
||||
QTest::newRow("renamefile -> noreadfile") << QString("renamefile") << QString("noreadfile") << false;
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
QTest::newRow("renamefile -> /etc/renamefile") << QString("renamefile") << QString("/etc/renamefile") << false;
|
||||
#endif
|
||||
QTest::newRow("renamefile -> renamedfile") << QString("renamefile") << QString("renamedfile") << true;
|
||||
@ -2616,7 +2530,7 @@ void tst_QFile::standarderror()
|
||||
void tst_QFile::handle()
|
||||
{
|
||||
int fd;
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QFile file(SRCDIR "tst_qfile.cpp");
|
||||
QVERIFY(file.open(QIODevice::ReadOnly));
|
||||
fd = int(file.handle());
|
||||
@ -2666,9 +2580,6 @@ void tst_QFile::handle()
|
||||
|
||||
void tst_QFile::nativeHandleLeaks()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QSKIP("test assumptions invalid for symbian", SkipAll);
|
||||
#else
|
||||
int fd1, fd2;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@ -2710,7 +2621,6 @@ void tst_QFile::nativeHandleLeaks()
|
||||
#ifdef Q_OS_WIN
|
||||
QCOMPARE( handle2, handle1 );
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QFile::readEof_data()
|
||||
@ -2721,7 +2631,7 @@ void tst_QFile::readEof_data()
|
||||
QTest::newRow("buffered") << SRCDIR "testfile.txt" << 0;
|
||||
QTest::newRow("unbuffered") << SRCDIR "testfile.txt" << int(QIODevice::Unbuffered);
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
QTest::newRow("sequential,buffered") << "/dev/null" << 0;
|
||||
QTest::newRow("sequential,unbuffered") << "/dev/null" << int(QIODevice::Unbuffered);
|
||||
#endif
|
||||
@ -2955,9 +2865,7 @@ void tst_QFile::map()
|
||||
|
||||
file.close();
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
if (false) // No permissions for user makes no sense in Symbian
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#if defined(Q_OS_UNIX)
|
||||
if (::getuid() != 0)
|
||||
// root always has permissions
|
||||
#endif
|
||||
@ -3120,7 +3028,7 @@ void tst_QFile::openStandardStreamsFileDescriptors()
|
||||
|
||||
void tst_QFile::openStandardStreamsBufferedStreams()
|
||||
{
|
||||
#if defined (Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_WIN)
|
||||
QSKIP("Unix only test.", SkipAll);
|
||||
#endif
|
||||
// Using streams
|
||||
@ -3173,9 +3081,6 @@ void tst_QFile::resize_data()
|
||||
QTest::newRow("native") << int(OpenQFile);
|
||||
QTest::newRow("fileno") << int(OpenFd);
|
||||
QTest::newRow("stream") << int(OpenStream);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QTest::newRow("rfile") << int(OpenRFile);
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QFile::resize()
|
||||
@ -3201,65 +3106,9 @@ void tst_QFile::objectConstructors()
|
||||
QVERIFY(!file2->exists());
|
||||
}
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
void tst_QFile::platformSecurity_data()
|
||||
{
|
||||
QTest::addColumn<QString>("file");
|
||||
QTest::addColumn<bool>("readable");
|
||||
QTest::addColumn<bool>("writable");
|
||||
|
||||
QString selfname = QCoreApplication::applicationFilePath();
|
||||
QString ownprivate = QCoreApplication::applicationDirPath();
|
||||
QString owndrive = selfname.left(2);
|
||||
bool amiprivileged = RProcess().HasCapability(ECapabilityAllFiles);
|
||||
QTest::newRow("resource") << owndrive + "/resource/apps/tst_qfile.rsc" << true << amiprivileged;
|
||||
QTest::newRow("sys") << selfname << amiprivileged << false;
|
||||
QTest::newRow("own private") << ownprivate + "/testfile.txt" << true << true;
|
||||
QTest::newRow("other private") << owndrive + "/private/10003a3f/import/apps/tst_qfile_reg.rsc" << amiprivileged << amiprivileged;
|
||||
}
|
||||
|
||||
void tst_QFile::platformSecurity()
|
||||
{
|
||||
QFETCH(QString,file);
|
||||
QFETCH(bool,readable);
|
||||
QFETCH(bool,writable);
|
||||
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::ReadOnly), readable);
|
||||
}
|
||||
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::ReadOnly | QIODevice::Unbuffered), readable);
|
||||
}
|
||||
|
||||
//append mode used to avoid truncating the files.
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::WriteOnly | QIODevice::Append), writable);
|
||||
}
|
||||
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Unbuffered), writable);
|
||||
}
|
||||
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::ReadWrite), writable);
|
||||
}
|
||||
|
||||
{
|
||||
QFile f(file);
|
||||
QCOMPARE(f.open(QIODevice::ReadWrite | QIODevice::Unbuffered), writable);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QFile::caseSensitivity()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
const bool caseSensitive = false;
|
||||
#else
|
||||
const bool caseSensitive = true;
|
||||
@ -3313,37 +3162,6 @@ public:
|
||||
|
||||
void tst_QFile::autocloseHandle()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// these tests are a bit different, because using a closed file handle results in a panic rather than error
|
||||
{
|
||||
QFile file("readonlyfile");
|
||||
QFile file2("readonlyfile");
|
||||
QVERIFY(openFile(file, QIODevice::ReadOnly, OpenRFile, QFile::AutoCloseHandle));
|
||||
// file is opened with mandatory lock, so opening again should fail
|
||||
QVERIFY(!file2.open(QIODevice::ReadOnly));
|
||||
|
||||
file.close();
|
||||
// opening again should now succeed (because handle is closed)
|
||||
QVERIFY(file2.open(QIODevice::ReadOnly));
|
||||
}
|
||||
|
||||
{
|
||||
QFile file("readonlyfile");
|
||||
QFile file2("readonlyfile");
|
||||
QVERIFY(openFile(file, QIODevice::ReadOnly, OpenRFile, QFile::DontCloseHandle));
|
||||
// file is opened with mandatory lock, so opening again should fail
|
||||
QVERIFY(!file2.open(QIODevice::ReadOnly));
|
||||
|
||||
file.close();
|
||||
// opening again should still fail (because handle is not auto closed)
|
||||
QVERIFY(!file2.open(QIODevice::ReadOnly));
|
||||
|
||||
rfile_.Close();
|
||||
// now it should succeed
|
||||
QVERIFY(file2.open(QIODevice::ReadOnly));
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
QFile file("readonlyfile");
|
||||
QVERIFY(openFile(file, QIODevice::ReadOnly, OpenFd, QFile::AutoCloseHandle));
|
||||
|
@ -6,7 +6,7 @@ QT = core-private
|
||||
|
||||
RESOURCES += qfileinfo.qrc
|
||||
|
||||
wince*:|symbian: {
|
||||
wince* {
|
||||
deploy.files += qfileinfo.qrc tst_qfileinfo.cpp
|
||||
res.files = resources\\file1 resources\\file1.ext1 resources\\file1.ext1.ext2
|
||||
res.path = resources
|
||||
@ -15,17 +15,9 @@ wince*:|symbian: {
|
||||
|
||||
win32*:LIBS += -ladvapi32 -lnetapi32
|
||||
|
||||
symbian {
|
||||
TARGET.CAPABILITY=AllFiles
|
||||
LIBS *= -lefsrv
|
||||
INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE # Needed for e32svr.h in S^3 envs
|
||||
}
|
||||
|
||||
# support for running test from shadow build directory
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:symbian {
|
||||
# do not define SRCDIR at all
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -64,19 +64,10 @@
|
||||
#endif
|
||||
#include <qplatformdefs.h>
|
||||
#include <qdebug.h>
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#include <f32file.h>
|
||||
#include <private/qcore_symbian_p.h>
|
||||
#endif
|
||||
#include "../../../network-settings.h"
|
||||
#include <private/qfileinfo_p.h>
|
||||
#include "../../../../shared/filesystem.h"
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# define SRCDIR ""
|
||||
# define NO_SYMLINKS
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern Q_AUTOTEST_EXPORT bool qIsLikelyToBeNfs(int /* handle */);
|
||||
QT_END_NAMESPACE
|
||||
@ -191,7 +182,7 @@ private slots:
|
||||
|
||||
void detachingOperations();
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
void owner();
|
||||
#endif
|
||||
void group();
|
||||
@ -211,14 +202,9 @@ tst_QFileInfo::~tst_QFileInfo()
|
||||
QFile::remove("dummyfile");
|
||||
QFile::remove("simplefile.txt");
|
||||
QFile::remove("longFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileNamelongFileName.txt");
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QFile::remove("hidden.txt");
|
||||
QFile::remove("nothidden.txt");
|
||||
#else
|
||||
QFile::remove("tempfile.txt");
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
QDir().rmdir("./.hidden-directory");
|
||||
QFile::remove("link_to_tst_qfileinfo");
|
||||
#endif
|
||||
@ -346,7 +332,7 @@ void tst_QFileInfo::isDir_data()
|
||||
|
||||
QTest::newRow("broken link") << "brokenlink.lnk" << false;
|
||||
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("drive 1") << "c:" << true;
|
||||
QTest::newRow("drive 2") << "c:/" << true;
|
||||
//QTest::newRow("drive 2") << "t:s" << false;
|
||||
@ -384,7 +370,7 @@ void tst_QFileInfo::isRoot_data()
|
||||
|
||||
QTest::newRow("simple dir") << SRCDIR "resources" << false;
|
||||
QTest::newRow("simple dir with slash") << SRCDIR "resources/" << false;
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("drive 1") << "c:" << false;
|
||||
QTest::newRow("drive 2") << "c:/" << true;
|
||||
QTest::newRow("drive 3") << "p:/" << false;
|
||||
@ -459,7 +445,7 @@ void tst_QFileInfo::absolutePath_data()
|
||||
QTest::addColumn<QString>("filename");
|
||||
|
||||
QString drivePrefix;
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
drivePrefix = QDir::currentPath().left(2);
|
||||
QString nonCurrentDrivePrefix =
|
||||
drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:");
|
||||
@ -508,7 +494,7 @@ void tst_QFileInfo::absFilePath_data()
|
||||
QTest::newRow("relativeFile") << "tmp.txt" << QDir::currentPath() + "/tmp.txt";
|
||||
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << QDir::currentPath() + "/" + "temp/tmp.txt";
|
||||
QString drivePrefix;
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QString curr = QDir::currentPath();
|
||||
|
||||
curr.remove(0, 2); // Make it a absolute path with no drive specifier: \depot\qt-4.2\tests\auto\qfileinfo
|
||||
@ -536,7 +522,7 @@ void tst_QFileInfo::absFilePath()
|
||||
QFETCH(QString, expected);
|
||||
|
||||
QFileInfo fi(file);
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QVERIFY(QString::compare(fi.absoluteFilePath(), expected, Qt::CaseInsensitive) == 0);
|
||||
#else
|
||||
QCOMPARE(fi.absoluteFilePath(), expected);
|
||||
@ -565,7 +551,7 @@ void tst_QFileInfo::canonicalFilePath()
|
||||
QFileInfo info("/tmp/../../../../../../../../../../../../../../../../../");
|
||||
info.canonicalFilePath();
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
// This used to crash on Mac
|
||||
QFileInfo dontCrash(QLatin1String("/"));
|
||||
QCOMPARE(dontCrash.canonicalFilePath(), QLatin1String("/"));
|
||||
@ -582,8 +568,6 @@ void tst_QFileInfo::canonicalFilePath()
|
||||
QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath());
|
||||
}
|
||||
}
|
||||
# if !defined(Q_OS_SYMBIAN)
|
||||
// Symbian doesn't support links to directories
|
||||
{
|
||||
const QString link(QDir::tempPath() + QDir::separator() + "tst_qfileinfo");
|
||||
QFile::remove(link);
|
||||
@ -624,7 +608,6 @@ void tst_QFileInfo::canonicalFilePath()
|
||||
QCOMPARE(info1.canonicalFilePath(), info2.canonicalFilePath());
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@ -663,7 +646,7 @@ void tst_QFileInfo::fileName_data()
|
||||
|
||||
QTest::newRow("relativeFile") << "tmp.txt" << "tmp.txt";
|
||||
QTest::newRow("relativeFileInSubDir") << "temp/tmp.txt" << "tmp.txt";
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE)) || defined(Q_OS_SYMBIAN)
|
||||
#if (defined(Q_OS_WIN) && !defined(Q_OS_WINCE))
|
||||
QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "tmp.txt";
|
||||
#else
|
||||
QTest::newRow("absFilePath") << "/home/andy/tmp.txt" << "tmp.txt";
|
||||
@ -863,9 +846,6 @@ void tst_QFileInfo::permission()
|
||||
QFETCH(QString, file);
|
||||
QFETCH(int, perms);
|
||||
QFETCH(bool, expected);
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QSKIP("No user based rights in Symbian OS - SOS needs platform security tests instead", SkipAll);
|
||||
#endif
|
||||
QFileInfo fi(file);
|
||||
QCOMPARE(fi.permission(QFile::Permissions(perms)), expected);
|
||||
}
|
||||
@ -937,7 +917,7 @@ void tst_QFileInfo::compare_data()
|
||||
QTest::newRow("casesense1")
|
||||
<< QString::fromLatin1(SRCDIR "tst_qfileInfo.cpp")
|
||||
<< QString::fromLatin1(SRCDIR "tst_qfileinfo.cpp")
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
<< true;
|
||||
#elif defined(Q_OS_MAC)
|
||||
<< !caseSensitiveOnMac;
|
||||
@ -960,7 +940,7 @@ void tst_QFileInfo::consistent_data()
|
||||
QTest::addColumn<QString>("file");
|
||||
QTest::addColumn<QString>("expected");
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QTest::newRow("slashes") << QString::fromLatin1("\\a\\a\\a\\a") << QString::fromLatin1("/a/a/a/a");
|
||||
#endif
|
||||
QTest::newRow("ending slash") << QString::fromLatin1("/a/somedir/") << QString::fromLatin1("/a/somedir/");
|
||||
@ -1011,9 +991,6 @@ void tst_QFileInfo::fileTimes()
|
||||
#if defined(Q_OS_WINCE)
|
||||
QEXPECT_FAIL("longfile", "No long filenames on WinCE", Abort);
|
||||
QEXPECT_FAIL("longfile absolutepath", "No long filenames on WinCE", Abort);
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QEXPECT_FAIL("longfile", "Maximum total filepath cannot exceed 256 characters in Symbian", Abort);
|
||||
QEXPECT_FAIL("longfile absolutepath", "Maximum total filepath cannot exceed 256 characters in Symbian", Abort);
|
||||
#endif
|
||||
QVERIFY(file.open(QFile::WriteOnly | QFile::Text));
|
||||
#ifdef Q_OS_UNIX
|
||||
@ -1060,9 +1037,6 @@ void tst_QFileInfo::fileTimes()
|
||||
//is set to 0, in the test machine.
|
||||
#ifdef Q_OS_WINCE
|
||||
QEXPECT_FAIL("simple", "WinCE only stores date of access data, not the time", Continue);
|
||||
#endif
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QEXPECT_FAIL("simple", "Symbian implementation of stat doesn't return read time right", Abort);
|
||||
#endif
|
||||
QVERIFY(fileInfo.lastRead() > beforeRead);
|
||||
QVERIFY(fileInfo.lastModified() > beforeWrite);
|
||||
@ -1176,7 +1150,7 @@ void tst_QFileInfo::isHidden_data()
|
||||
QTest::newRow("C:/path/to/hidden-directory") << QDir::currentPath() + QString::fromLatin1("/hidden-directory") << true;
|
||||
QTest::newRow("C:/path/to/hidden-directory/.") << QDir::currentPath() + QString::fromLatin1("/hidden-directory/.") << true;
|
||||
#endif
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
QVERIFY(QDir("./.hidden-directory").exists() || QDir().mkdir("./.hidden-directory"));
|
||||
QTest::newRow("/path/to/.hidden-directory") << QDir::currentPath() + QString("/.hidden-directory") << true;
|
||||
QTest::newRow("/path/to/.hidden-directory/.") << QDir::currentPath() + QString("/.hidden-directory/.") << true;
|
||||
@ -1186,7 +1160,7 @@ void tst_QFileInfo::isHidden_data()
|
||||
#if defined(Q_OS_MAC)
|
||||
// /bin has the hidden attribute on Mac OS X
|
||||
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << true;
|
||||
#elif !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#elif !defined(Q_OS_WIN)
|
||||
QTest::newRow("/bin/") << QString::fromLatin1("/bin/") << false;
|
||||
#endif
|
||||
|
||||
@ -1195,35 +1169,6 @@ void tst_QFileInfo::isHidden_data()
|
||||
QTest::newRow("mac_private_etc") << QString::fromLatin1("/private/etc") << false;
|
||||
QTest::newRow("mac_Applications") << QString::fromLatin1("/Applications") << false;
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// No guaranteed hidden file knows to exist in Symbian filesystem, so make one.
|
||||
QString hiddenFileName("hidden.txt");
|
||||
QString notHiddenFileName("nothidden.txt");
|
||||
QTest::newRow("hidden file") << hiddenFileName << true;
|
||||
QTest::newRow("non-hidden file") << notHiddenFileName << false;
|
||||
|
||||
{
|
||||
QFile file(hiddenFileName);
|
||||
QVERIFY(file.open(QIODevice::WriteOnly));
|
||||
QTextStream t(&file);
|
||||
t << "foobar";
|
||||
|
||||
QFile file2(notHiddenFileName);
|
||||
QVERIFY(file2.open(QIODevice::WriteOnly));
|
||||
QTextStream t2(&file2);
|
||||
t2 << "foobar";
|
||||
}
|
||||
|
||||
RFs rfs;
|
||||
TInt err = rfs.Connect();
|
||||
QCOMPARE(err, KErrNone);
|
||||
HBufC* symFile = qt_QString2HBufC(hiddenFileName);
|
||||
err = rfs.SetAtt(*symFile, KEntryAttHidden, 0);
|
||||
rfs.Close();
|
||||
delete symFile;
|
||||
QCOMPARE(err, KErrNone);
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QFileInfo::isHidden()
|
||||
@ -1508,7 +1453,7 @@ void tst_QFileInfo::isWritable()
|
||||
QVERIFY(fi.exists());
|
||||
QVERIFY(!fi.isWritable());
|
||||
#endif
|
||||
#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_UNIX)
|
||||
if (::getuid() == 0)
|
||||
QVERIFY(QFileInfo("/etc/passwd").isWritable());
|
||||
else
|
||||
@ -1518,14 +1463,10 @@ void tst_QFileInfo::isWritable()
|
||||
|
||||
void tst_QFileInfo::isExecutable()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QString appPath = "c:/sys/bin/tst_qfileinfo.exe";
|
||||
#else
|
||||
QString appPath = QCoreApplication::applicationDirPath();
|
||||
appPath += "/tst_qfileinfo";
|
||||
# if defined(Q_OS_WIN)
|
||||
#if defined(Q_OS_WIN)
|
||||
appPath += ".exe";
|
||||
# endif
|
||||
#endif
|
||||
QFileInfo fi(appPath);
|
||||
QCOMPARE(fi.isExecutable(), true);
|
||||
@ -1652,7 +1593,7 @@ void tst_QFileInfo::detachingOperations()
|
||||
QVERIFY(!info1.caching());
|
||||
}
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
#if defined (Q_OS_WIN)
|
||||
BOOL IsUserAdmin()
|
||||
{
|
||||
@ -1743,7 +1684,7 @@ void tst_QFileInfo::owner()
|
||||
void tst_QFileInfo::group()
|
||||
{
|
||||
QString expected;
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX)
|
||||
struct group *gr;
|
||||
gid_t gid = getegid();
|
||||
gr = getgrgid(gid);
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include <QtCore/private/qfilesystementry_p.h>
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
# define WIN_STUFF
|
||||
#endif
|
||||
|
||||
|
@ -104,7 +104,7 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
|
||||
if (inotify_init() != -1)
|
||||
do_force_engines << "inotify";
|
||||
#endif
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD) || defined(Q_OS_SYMBIAN)
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_FREEBSD)
|
||||
// we have native engines for win32, macosx and freebsd
|
||||
do_force_engines << "native";
|
||||
#endif
|
||||
@ -464,8 +464,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
|
||||
//Note that if there are several changes during a short period of time, some
|
||||
//of the changes might not emit this signal. However, the last change in the
|
||||
//sequence of changes will always generate this signal.
|
||||
//Symbian behaves as documented (and can't be filtered), but the other platforms don't
|
||||
//so test should not assert this
|
||||
QVERIFY(dirChangedSpy.count() < 2);
|
||||
|
||||
if (backend == "dnotify")
|
||||
@ -504,9 +502,7 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
|
||||
timer.start(3000);
|
||||
eventLoop.exec();
|
||||
QCOMPARE(fileChangedSpy.count(), 0);
|
||||
// polling watcher has generated separate events for content and time change
|
||||
// on Symbian emulator, so allow possibility of 2 events
|
||||
QVERIFY(dirChangedSpy.count() == 1 || dirChangedSpy.count() == 2);
|
||||
QCOMPARE(dirChangedSpy.count(), 1);
|
||||
|
||||
QVERIFY(QDir().rmdir("testDir"));
|
||||
}
|
||||
|
@ -9,12 +9,6 @@ wince*: {
|
||||
DEPLOYMENT += addFiles
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
!wince50standard-x86-msvc2005: DEFINES += WINCE_EMULATOR_TEST=1
|
||||
} else:symbian {
|
||||
# SRCDIR defined in code in symbian
|
||||
addFiles.files = tst_qiodevice.cpp
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
TARGET.CAPABILITY = NetworkServices
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -49,10 +49,6 @@
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
class tst_QIODevice : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -102,7 +98,6 @@ void tst_QIODevice::getSetCheck()
|
||||
|
||||
tst_QIODevice::tst_QIODevice()
|
||||
{
|
||||
Q_SET_DEFAULT_IAP
|
||||
}
|
||||
|
||||
tst_QIODevice::~tst_QIODevice()
|
||||
|
@ -17,16 +17,11 @@ SUBDIRS = \
|
||||
testGuiProcess \
|
||||
testDetached \
|
||||
fileWriterProcess \
|
||||
testSetWorkingDirectory
|
||||
|
||||
!symbian: {
|
||||
SUBDIRS +=testProcessSpacesArgs/onespace.pro \
|
||||
testSetWorkingDirectory \
|
||||
testProcessSpacesArgs/onespace.pro \
|
||||
testProcessSpacesArgs/twospaces.pro \
|
||||
testSoftExit
|
||||
}
|
||||
|
||||
win32:!wince*:SUBDIRS+=testProcessEchoGui
|
||||
|
||||
SUBDIRS += test
|
||||
|
||||
|
||||
|
@ -18,10 +18,7 @@ win32: {
|
||||
|
||||
|
||||
QT = core
|
||||
|
||||
!symbian: {
|
||||
QT += network
|
||||
}
|
||||
QT += network
|
||||
|
||||
embedded: QT += gui
|
||||
|
||||
@ -106,19 +103,3 @@ wince*: {
|
||||
addFile_testSoftExit \
|
||||
addFile_testSpaceInName
|
||||
}
|
||||
|
||||
symbian: {
|
||||
binDep.files = \
|
||||
fileWriterProcess.exe \
|
||||
testDetached.exe \
|
||||
testExitCodes.exe \
|
||||
testProcessCrash.exe \
|
||||
testProcessEcho.exe \
|
||||
testProcessNormal.exe \
|
||||
testProcessOutput.exe \
|
||||
nospace.exe \
|
||||
testSpaceInName.exe
|
||||
binDep.path = \\sys\\bin
|
||||
|
||||
DEPLOYMENT += binDep
|
||||
}
|
||||
|
@ -4,7 +4,3 @@ CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
INSTALLS =
|
||||
DESTDIR = ./
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCSTACKSIZE =0x14000
|
||||
}
|
||||
|
@ -44,23 +44,13 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#if defined(__SYMBIAN32__)
|
||||
// Printing to stdout messes up the out.txt, so open a file and print there.
|
||||
FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","w+");
|
||||
for (int i=0; i<200; i++) {
|
||||
fprintf(file, "%d -this is a number\n", i);
|
||||
fflush(file);
|
||||
}
|
||||
fclose(file);
|
||||
#else
|
||||
# if defined(_WIN32_WCE)
|
||||
#if defined(_WIN32_WCE)
|
||||
for (int i=0; i<240; i++) {
|
||||
# else //fprintf Output is very slow on Windows CE/Symbian
|
||||
#else //fprintf Output is very slow on Windows CE
|
||||
for (int i=0; i<10240; i++) {
|
||||
# endif
|
||||
#endif
|
||||
fprintf(stdout, "%d -this is a number\n", i);
|
||||
fflush(stderr);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -44,14 +44,9 @@
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
#if defined(__SYMBIAN32__) || defined(WINCE) || defined(_WIN32_WCE)
|
||||
# if defined(__SYMBIAN32__)
|
||||
// Printing to stdout messes up the out.txt, so open a file and print there.
|
||||
FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","w+");
|
||||
# else
|
||||
#if defined(WINCE) || defined(_WIN32_WCE)
|
||||
// No pipes on this "OS"
|
||||
FILE* file = fopen("\\temp\\qprocess_args_test.txt","w+");
|
||||
# endif
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (i)
|
||||
fprintf(file, "|");
|
||||
|
@ -48,10 +48,8 @@
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QMetaType>
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
// Network test unnecessary?
|
||||
#include <QtNetwork/QHostInfo>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef QT_NO_PROCESS
|
||||
@ -132,7 +130,7 @@ private slots:
|
||||
void waitForBytesWrittenInABytesWrittenSlot();
|
||||
void spaceArgsTest_data();
|
||||
void spaceArgsTest();
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
void nativeArguments();
|
||||
#endif
|
||||
void exitCodeTest();
|
||||
@ -208,12 +206,6 @@ tst_QProcess::~tst_QProcess()
|
||||
|
||||
void tst_QProcess::init()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QString dirStr = QString::fromLatin1("c:\\logs");
|
||||
QDir dir;
|
||||
if (!dir.exists(dirStr))
|
||||
dir.mkpath(dirStr);
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QProcess::cleanup()
|
||||
@ -274,8 +266,6 @@ void tst_QProcess::simpleStart()
|
||||
// Note: This actually seems incorrect, it will only exit the while loop when finishing fails
|
||||
while (process->waitForFinished(5000))
|
||||
{ }
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QVERIFY(process->waitForFinished(5000));
|
||||
#else
|
||||
while (process->waitForReadyRead(5000))
|
||||
{ }
|
||||
@ -409,9 +399,6 @@ void tst_QProcess::echoTest()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QFETCH(QByteArray, input);
|
||||
|
||||
@ -470,9 +457,6 @@ void tst_QProcess::echoTest2()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process = new QProcess;
|
||||
connect(process, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
|
||||
@ -524,9 +508,6 @@ void tst_QProcess::echoTest_performance()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
#ifdef Q_OS_MAC
|
||||
@ -581,9 +562,6 @@ void tst_QProcess::echoTestGui()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
|
||||
@ -613,9 +591,6 @@ void tst_QProcess::batFiles()
|
||||
{
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Batch files are not supported on Windows CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Batch files are not supported on Symbian", SkipAll);
|
||||
#endif
|
||||
QFETCH(QString, batFile);
|
||||
QFETCH(QByteArray, output);
|
||||
@ -687,9 +662,6 @@ void tst_QProcess::loopBackTest()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process = new QProcess;
|
||||
#ifdef Q_OS_MAC
|
||||
@ -720,9 +692,6 @@ void tst_QProcess::readTimeoutAndThenCrash()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process = new QProcess;
|
||||
#ifdef Q_OS_MAC
|
||||
@ -764,30 +733,18 @@ void tst_QProcess::waitForFinished()
|
||||
process.start("testProcessOutput/testProcessOutput");
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QVERIFY(process.waitForFinished(5000));
|
||||
#else
|
||||
QVERIFY(process.waitForFinished(30000));
|
||||
#endif
|
||||
QCOMPARE(process.exitStatus(), QProcess::NormalExit);
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian test outputs to a file, so check that
|
||||
FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","r");
|
||||
int retval = 0;
|
||||
int count = 0;
|
||||
while((int)(retval = fgetc(file) )!= EOF)
|
||||
if (retval == '\n')
|
||||
count++;
|
||||
fclose(file);
|
||||
QCOMPARE(count, 200);
|
||||
#else
|
||||
# if defined (Q_OS_WINCE)
|
||||
#if defined (Q_OS_WINCE)
|
||||
QEXPECT_FAIL("", "Reading and writing to a process is not supported on Qt/CE", Continue);
|
||||
# endif
|
||||
#endif
|
||||
QString output = process.readAll();
|
||||
QCOMPARE(output.count("\n"), 10*1024);
|
||||
#endif
|
||||
|
||||
process.start("blurdybloop");
|
||||
QVERIFY(!process.waitForFinished());
|
||||
@ -800,9 +757,6 @@ void tst_QProcess::deadWhileReading()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
|
||||
@ -828,9 +782,6 @@ void tst_QProcess::restartProcessDeadlock()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
// The purpose of this test is to detect whether restarting a
|
||||
// process in the finished() connected slot causes a deadlock
|
||||
@ -869,9 +820,6 @@ void tst_QProcess::closeWriteChannel()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess more;
|
||||
more.start("testProcessEOF/testProcessEOF");
|
||||
@ -901,9 +849,6 @@ void tst_QProcess::closeReadChannel()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
QProcess::ProcessChannel channel1 = QProcess::StandardOutput;
|
||||
@ -941,9 +886,6 @@ void tst_QProcess::openModes()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess proc;
|
||||
QVERIFY(!proc.isOpen());
|
||||
@ -994,9 +936,6 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess proc;
|
||||
connect(&proc, SIGNAL(readyRead()), this, SLOT(exitLoopSlot()));
|
||||
@ -1033,9 +972,6 @@ void tst_QProcess::emitReadyReadOnlyWhenNewDataArrives()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::hardExit()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Killing started processes is not supported on Qt/Symbian due platform security", SkipAll);
|
||||
#endif
|
||||
QProcess proc;
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
@ -1062,9 +998,6 @@ void tst_QProcess::hardExit()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::softExit()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Terminating started processes is not supported on Qt/Symbian due platform security", SkipAll);
|
||||
#endif
|
||||
QProcess proc;
|
||||
|
||||
proc.start("testSoftExit/testSoftExit");
|
||||
@ -1169,9 +1102,6 @@ void tst_QProcess::softExitInSlots()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QFETCH(QString, appName);
|
||||
|
||||
@ -1191,9 +1121,6 @@ void tst_QProcess::mergedChannels()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
process.setReadChannelMode(QProcess::MergedChannels);
|
||||
@ -1224,9 +1151,6 @@ void tst_QProcess::forwardedChannels()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
process.setReadChannelMode(QProcess::ForwardedChannels);
|
||||
@ -1254,9 +1178,6 @@ void tst_QProcess::atEnd()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
|
||||
@ -1289,10 +1210,6 @@ public:
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
int serial;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
inline void run()
|
||||
{
|
||||
@ -1304,21 +1221,11 @@ protected:
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
process.start("testProcessEcho/testProcessEcho.app");
|
||||
#elif defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
// WINSCW builds in Symbian do not allow multiple processes to load Qt libraries,
|
||||
// so use just a simple process instead of testDetached.
|
||||
process.start("testProcessNormal");
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
// testDetached used because it does something, but doesn't take too long.
|
||||
QFile infoFile(QString("c:\\logs\\detinfo%1").arg(serial));
|
||||
QStringList args;
|
||||
args << infoFile.fileName();
|
||||
process.start("testDetached", args);
|
||||
#else
|
||||
process.start("testProcessEcho/testProcessEcho");
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QCOMPARE(process.write("abc\0", 4), qint64(4));
|
||||
#endif
|
||||
exitCode = exec();
|
||||
@ -1349,20 +1256,11 @@ void tst_QProcess::processInAThread()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::processesInMultipleThreads()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
int serialCounter = 0;
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
TestThread thread1;
|
||||
TestThread thread2;
|
||||
TestThread thread3;
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
thread1.serial = serialCounter++;
|
||||
thread2.serial = serialCounter++;
|
||||
thread3.serial = serialCounter++;
|
||||
#endif
|
||||
thread1.start();
|
||||
thread2.start();
|
||||
thread3.start();
|
||||
@ -1388,21 +1286,14 @@ void tst_QProcess::waitForFinishedWithTimeout()
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
process->start("testProcessEcho/testProcessEcho.app");
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
process->start("testProcessOutput");
|
||||
#else
|
||||
process->start("testProcessEcho/testProcessEcho");
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QVERIFY(process->waitForStarted(50));
|
||||
QVERIFY(!process->waitForFinished(1));
|
||||
#else
|
||||
QVERIFY(process->waitForStarted(5000));
|
||||
QVERIFY(!process->waitForFinished(1));
|
||||
|
||||
process->write("", 1);
|
||||
#endif
|
||||
|
||||
QVERIFY(process->waitForFinished());
|
||||
|
||||
@ -1416,9 +1307,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlot()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process = new QProcess(this);
|
||||
connect(process, SIGNAL(readyRead()), this, SLOT(waitForReadyReadInAReadyReadSlotSlot()));
|
||||
@ -1452,9 +1340,6 @@ void tst_QProcess::waitForReadyReadInAReadyReadSlotSlot()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
bytesAvailable = process->bytesAvailable();
|
||||
process->write("bar", 4);
|
||||
@ -1468,9 +1353,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlot()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process = new QProcess(this);
|
||||
connect(process, SIGNAL(bytesWritten(qint64)), this, SLOT(waitForBytesWrittenInABytesWrittenSlotSlot()));
|
||||
@ -1503,9 +1385,6 @@ void tst_QProcess::waitForBytesWrittenInABytesWrittenSlotSlot()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
process->write("b");
|
||||
QVERIFY(process->waitForBytesWritten(5000));
|
||||
@ -1564,12 +1443,8 @@ void tst_QProcess::spaceArgsTest()
|
||||
|
||||
QStringList programs;
|
||||
programs << QString::fromLatin1("testProcessSpacesArgs/nospace")
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
; // Symbian toolchain doesn't like exes with spaces in the name
|
||||
#else
|
||||
<< QString::fromLatin1("testProcessSpacesArgs/one space")
|
||||
<< QString::fromLatin1("testProcessSpacesArgs/two space s");
|
||||
#endif
|
||||
|
||||
process = new QProcess(this);
|
||||
|
||||
@ -1577,7 +1452,7 @@ void tst_QProcess::spaceArgsTest()
|
||||
QString program = programs.at(i);
|
||||
process->start(program, args);
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QVERIFY(process->waitForStarted(5000));
|
||||
QVERIFY(process->waitForFinished(5000));
|
||||
#else
|
||||
@ -1585,15 +1460,7 @@ void tst_QProcess::spaceArgsTest()
|
||||
QVERIFY(process->waitForFinished(10000));
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian test outputs to a file, so check that
|
||||
FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","r");
|
||||
QVERIFY(file);
|
||||
char buf[256];
|
||||
fgets(buf, 256, file);
|
||||
fclose(file);
|
||||
QStringList actual = QString::fromLatin1(buf).split("|");
|
||||
#elif !defined(Q_OS_WINCE)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QStringList actual = QString::fromLatin1(process->readAll()).split("|");
|
||||
#endif
|
||||
#if !defined(Q_OS_WINCE)
|
||||
@ -1615,14 +1482,7 @@ void tst_QProcess::spaceArgsTest()
|
||||
QVERIFY(process->waitForStarted(5000));
|
||||
QVERIFY(process->waitForFinished(5000));
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian test outputs to a file, so check that
|
||||
file = fopen("c:\\logs\\qprocess_args_test.txt","r");
|
||||
QVERIFY(file);
|
||||
fgets(buf, 256, file);
|
||||
fclose(file);
|
||||
actual = QString::fromLatin1(buf).split("|");
|
||||
#elif !defined(Q_OS_WINCE)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
actual = QString::fromLatin1(process->readAll()).split("|");
|
||||
#endif
|
||||
#if !defined(Q_OS_WINCE)
|
||||
@ -1638,7 +1498,7 @@ void tst_QProcess::spaceArgsTest()
|
||||
process = 0;
|
||||
}
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::nativeArguments()
|
||||
@ -1651,7 +1511,7 @@ void tst_QProcess::nativeArguments()
|
||||
|
||||
proc.start(QString::fromLatin1("testProcessSpacesArgs/nospace"), QStringList());
|
||||
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QVERIFY(proc.waitForStarted(5000));
|
||||
QVERIFY(proc.waitForFinished(5000));
|
||||
#else
|
||||
@ -1659,13 +1519,9 @@ void tst_QProcess::nativeArguments()
|
||||
QVERIFY(proc.waitForFinished(10000));
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE)
|
||||
// Symbian test outputs to a file, so check that
|
||||
# ifdef Q_OS_SYMBIAN
|
||||
FILE* file = fopen("c:\\logs\\qprocess_args_test.txt","r");
|
||||
# else
|
||||
#if defined(Q_OS_WINCE)
|
||||
// WinCE test outputs to a file, so check that
|
||||
FILE* file = fopen("\\temp\\qprocess_args_test.txt","r");
|
||||
# endif
|
||||
QVERIFY(file);
|
||||
char buf[256];
|
||||
fgets(buf, 256, file);
|
||||
@ -1691,13 +1547,7 @@ void tst_QProcess::nativeArguments()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::exitCodeTest()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Kernel will run out of process handles on some hw, as there is some
|
||||
// delay before they are recycled, so limit the amount of processes.
|
||||
for (int i = 0; i < 50; ++i) {
|
||||
#else
|
||||
for (int i = 0; i < 255; ++i) {
|
||||
#endif
|
||||
QProcess process;
|
||||
process.start("testExitCodes/testExitCodes " + QString::number(i));
|
||||
QVERIFY(process.waitForFinished(5000));
|
||||
@ -1825,9 +1675,6 @@ void tst_QProcess::removeFileWhileProcessIsRunning()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QFile file("removeFile.txt");
|
||||
QVERIFY(file.open(QFile::WriteOnly));
|
||||
@ -1867,7 +1714,7 @@ void tst_QProcess::setEnvironment_data()
|
||||
|
||||
void tst_QProcess::setEnvironment()
|
||||
{
|
||||
#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_WINCE)
|
||||
QSKIP("OS doesn't support environment variables", SkipAll);
|
||||
#endif
|
||||
|
||||
@ -1935,7 +1782,7 @@ void tst_QProcess::setProcessEnvironment_data()
|
||||
|
||||
void tst_QProcess::setProcessEnvironment()
|
||||
{
|
||||
#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_WINCE)
|
||||
QSKIP("OS doesn't support environment variables", SkipAll);
|
||||
#endif
|
||||
|
||||
@ -1972,7 +1819,7 @@ void tst_QProcess::setProcessEnvironment()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::systemEnvironment()
|
||||
{
|
||||
#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_WINCE)
|
||||
// there is no concept of system variables on Windows CE as there is no console
|
||||
QVERIFY(QProcess::systemEnvironment().isEmpty());
|
||||
QVERIFY(QProcessEnvironment::systemEnvironment().isEmpty());
|
||||
@ -1990,9 +1837,6 @@ void tst_QProcess::spaceInName()
|
||||
{
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
QProcess process;
|
||||
process.start("test Space In Name/testSpaceInName", QStringList());
|
||||
@ -2004,7 +1848,6 @@ void tst_QProcess::spaceInName()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::lockupsInStartDetached()
|
||||
{
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
// Check that QProcess doesn't cause a lock up at this program's
|
||||
// exit if a thread was started and we tried to run a program that
|
||||
// doesn't exist. Before Qt 4.2, this used to lock up on Unix due
|
||||
@ -2013,7 +1856,6 @@ void tst_QProcess::lockupsInStartDetached()
|
||||
QHostInfo::lookupHost(QString("something.invalid"), 0, 0);
|
||||
QProcess::execute("yjhbrty");
|
||||
QProcess::startDetached("yjhbrty");
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -2022,9 +1864,6 @@ void tst_QProcess::atEnd2()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess process;
|
||||
|
||||
@ -2070,9 +1909,6 @@ void tst_QProcess::setStandardInputFile()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
static const char data[] = "A bunch\1of\2data\3\4\5\6\7...";
|
||||
QProcess process;
|
||||
@ -2129,9 +1965,6 @@ void tst_QProcess::setStandardOutputFile()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
static const char data[] = "Original data. ";
|
||||
static const char testdata[] = "Test data.";
|
||||
@ -2197,9 +2030,6 @@ void tst_QProcess::setStandardOutputProcess()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QProcess source;
|
||||
QProcess sink;
|
||||
@ -2235,9 +2065,6 @@ void tst_QProcess::fileWriterProcess()
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
|
||||
QString stdinStr;
|
||||
for (int i = 0; i < 5000; ++i)
|
||||
@ -2264,30 +2091,18 @@ void tst_QProcess::fileWriterProcess()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::detachedWorkingDirectoryAndPid()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
// WINSCW builds in Symbian do not allow multiple processes to load Qt libraries,
|
||||
// so this test must be skipped.
|
||||
QSKIP("Multiple processes loading Qt are not allowed in Qt/Symbian emulator.", SkipAll);
|
||||
#endif
|
||||
qint64 pid;
|
||||
|
||||
#ifdef Q_OS_WINCE
|
||||
QTest::qSleep(1000);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian has no working directory support, so use logs dir as a shared directory
|
||||
QFile infoFile(QLatin1String("c:\\logs\\detachedinfo.txt"));
|
||||
#else
|
||||
QFile infoFile(QDir::currentPath() + QLatin1String("/detachedinfo.txt"));
|
||||
#endif
|
||||
infoFile.remove();
|
||||
|
||||
QString workingDir = QDir::currentPath() + "/testDetached";
|
||||
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
QVERIFY(QFile::exists(workingDir));
|
||||
#endif
|
||||
|
||||
QStringList args;
|
||||
args << infoFile.fileName();
|
||||
@ -2313,9 +2128,6 @@ void tst_QProcess::detachedWorkingDirectoryAndPid()
|
||||
qint64 actualPid = processIdString.toLongLong(&ok);
|
||||
QVERIFY(ok);
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QEXPECT_FAIL("", "Working directory is not supported on Qt/symbian", Continue);
|
||||
#endif
|
||||
QCOMPARE(actualWorkingDir, workingDir);
|
||||
QCOMPARE(actualPid, pid);
|
||||
}
|
||||
@ -2325,9 +2137,6 @@ void tst_QProcess::switchReadChannels()
|
||||
{
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/CE", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Reading and writing to a process is not supported on Qt/Symbian", SkipAll);
|
||||
#endif
|
||||
const char data[] = "ABCD";
|
||||
|
||||
@ -2363,9 +2172,6 @@ void tst_QProcess::setWorkingDirectory()
|
||||
{
|
||||
#ifdef Q_OS_WINCE
|
||||
QSKIP("Windows CE does not support working directory logic", SkipAll);
|
||||
#endif
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian does not support working directory logic", SkipAll);
|
||||
#endif
|
||||
process = new QProcess;
|
||||
process->setWorkingDirectory("test");
|
||||
@ -2399,23 +2205,13 @@ void tst_QProcess::startFinishStartFinish()
|
||||
#else
|
||||
process.start("testProcessOutput/testProcessOutput");
|
||||
#endif
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QVERIFY(process.waitForReadyRead(10000));
|
||||
QCOMPARE(QString::fromLatin1(process.readLine().trimmed()),
|
||||
QString("0 -this is a number"));
|
||||
#endif
|
||||
if (process.state() != QProcess::NotRunning)
|
||||
QVERIFY(process.waitForFinished(10000));
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian test outputs to a file, so check that
|
||||
FILE* file = fopen("c:\\logs\\qprocess_output_test.txt","r");
|
||||
QVERIFY(file);
|
||||
char buf[30];
|
||||
fgets(buf, 30, file);
|
||||
QCOMPARE(QString::fromLatin1(buf),
|
||||
QString("0 -this is a number\n"));
|
||||
fclose(file);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,18 +9,14 @@ load(resources)
|
||||
SOURCES += tst_qresourceengine.cpp
|
||||
RESOURCES += testqrc/test.qrc
|
||||
|
||||
symbian-sbsv2 {
|
||||
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}
|
||||
QMAKE_EXTRA_TARGETS = runtime_resource
|
||||
PRE_TARGETDEPS += $${runtime_resource.target}
|
||||
|
||||
QT = core
|
||||
wince*|symbian:{
|
||||
wince* {
|
||||
deploy.files += runtime_resource.rcc parentdir.txt
|
||||
test.files = testqrc/*
|
||||
test.path = testqrc
|
||||
@ -39,7 +35,7 @@ wince*|symbian:{
|
||||
testsub2.files = testqrc/test/test/*
|
||||
testsub2.path = testqrc/test/test
|
||||
DEPLOYMENT += deploy test alias other search1 search2 sub testsub testsub2
|
||||
!symbian:DEFINES += SRCDIR=\\\"\\\"
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -43,10 +43,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore>
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR "."
|
||||
#endif
|
||||
|
||||
class tst_QResourceEngine: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -53,9 +53,7 @@
|
||||
#include <QtGui/QKeySequence>
|
||||
#include "../../../../shared/util.h"
|
||||
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
# include <cctype>
|
||||
#endif
|
||||
#include <cctype>
|
||||
#if defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
||||
// need for unlink on mingw
|
||||
#include <io.h>
|
||||
@ -128,7 +126,7 @@ private slots:
|
||||
void setPath();
|
||||
void setDefaultFormat();
|
||||
void dontCreateNeedlessPaths();
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WIN)
|
||||
void dontReorderIniKeysNeedlessly();
|
||||
#endif
|
||||
#if defined(Q_OS_WIN)
|
||||
@ -177,7 +175,7 @@ void tst_QSettings::getSetCheck()
|
||||
|
||||
Q_DECLARE_METATYPE(QSettings::Format)
|
||||
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
static void removePath(const QString& _path)
|
||||
{
|
||||
QString path = _path;
|
||||
@ -324,11 +322,9 @@ void tst_QSettings::init()
|
||||
QSettings(QSettings::SystemScope, "software.org").clear();
|
||||
QSettings(QSettings::UserScope, "other.software.org").clear();
|
||||
QSettings(QSettings::SystemScope, "other.software.org").clear();
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
removePath(settingsPath());
|
||||
#endif
|
||||
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WIN)
|
||||
system(QString("chmod -R u+rw %1 2> /dev/null").arg(settingsPath()).toLatin1());
|
||||
system(QString("rm -fr %1 2> /dev/null").arg(settingsPath()).toLatin1());
|
||||
#endif
|
||||
@ -510,13 +506,13 @@ void tst_QSettings::ctor()
|
||||
*/
|
||||
QSettings settings5(format, QSettings::UserScope, "SoftWare.ORG", "killerApp");
|
||||
if (format == QSettings::NativeFormat) {
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN)
|
||||
QCOMPARE(settings5.value("key 1").toString(), QString("gurgle"));
|
||||
#else
|
||||
QVERIFY(!settings5.contains("key 1"));
|
||||
#endif
|
||||
} else {
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_DARWIN)
|
||||
QCOMPARE(settings5.value("key 1").toString(), QString("gurgle"));
|
||||
#else
|
||||
QVERIFY(!settings5.contains("key 1"));
|
||||
@ -686,8 +682,6 @@ void tst_QSettings::testErrorHandling()
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#ifdef Q_OS_WIN
|
||||
QSKIP("Windows doesn't support most file modes, including read-only directories, so this test is moot.", SkipAll);
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Symbian/Open C doesn't support execute or write only file modes, or directory permissions, so this test is mostly moot.", SkipAll);
|
||||
#elif defined(Q_OS_UNIX)
|
||||
if (::getuid() == 0)
|
||||
QSKIP("Running this test as root doesn't work, since file perms do not bother him", SkipAll);
|
||||
@ -1471,7 +1465,7 @@ void tst_QSettings::sync()
|
||||
|
||||
// Now "some other app" will change other.software.org.ini
|
||||
QString userConfDir = settingsPath("__user__") + QDir::separator();
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
unlink((userConfDir + "other.software.org.ini").toLatin1());
|
||||
rename((userConfDir + "software.org.ini").toLatin1(),
|
||||
(userConfDir + "other.software.org.ini").toLatin1());
|
||||
@ -3005,7 +2999,7 @@ void tst_QSettings::dontCreateNeedlessPaths()
|
||||
QVERIFY(!fileInfo.dir().exists());
|
||||
}
|
||||
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WIN)
|
||||
void tst_QSettings::dontReorderIniKeysNeedlessly()
|
||||
{
|
||||
#ifdef QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
|
||||
|
@ -2,13 +2,6 @@ load(qttest_p4)
|
||||
SOURCES += tst_qtemporaryfile.cpp
|
||||
QT = core
|
||||
|
||||
|
||||
symbian {
|
||||
testData.files = tst_qtemporaryfile.cpp
|
||||
testData.path = .
|
||||
DEPLOYMENT += testData
|
||||
}else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
CONFIG += parallel_test
|
||||
|
@ -59,10 +59,6 @@
|
||||
# include <unistd.h> // close(2)
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
@ -227,7 +223,7 @@ void tst_QTemporaryFile::fileName()
|
||||
QVERIFY(QFile::exists(fileName));
|
||||
// Get path to the temp file, without the file name.
|
||||
QString absoluteFilePath = QFileInfo(fileName).absolutePath();
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
absoluteFilePath = absoluteFilePath.toLower();
|
||||
absoluteTempPath = absoluteTempPath.toLower();
|
||||
#endif
|
||||
@ -398,7 +394,7 @@ void tst_QTemporaryFile::openOnRootDrives()
|
||||
|
||||
void tst_QTemporaryFile::stressTest()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
// 200 is still ok, first colision happens after ~30
|
||||
const int iterations = 200;
|
||||
#else
|
||||
|
@ -1,6 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS = test
|
||||
!symbian: SUBDIRS += stdinProcess readAllStdinProcess readLineStdinProcess
|
||||
|
||||
|
||||
|
||||
SUBDIRS = test stdinProcess readAllStdinProcess readLineStdinProcess
|
||||
|
@ -15,26 +15,13 @@ RESOURCES += ../qtextstream.qrc
|
||||
|
||||
QT = core network
|
||||
|
||||
|
||||
wince*|symbian: {
|
||||
addFiles.files = ../rfc3261.txt ../shift-jis.txt ../task113817.txt ../qtextstream.qrc ../tst_qtextstream.cpp
|
||||
addFiles.path = .
|
||||
res.files = ../resources
|
||||
res.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
|
||||
wince*: {
|
||||
wince* {
|
||||
addFiles.files = ../rfc3261.txt ../shift-jis.txt ../task113817.txt ../qtextstream.qrc ../tst_qtextstream.cpp
|
||||
addFiles.path = .
|
||||
res.files = ../resources
|
||||
res.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
}else:symbian {
|
||||
# Symbian can't define SRCDIR meaningfully here
|
||||
qt_not_deployed {
|
||||
codecs_plugins.files = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll
|
||||
codecs_plugins.path = $$QT_PLUGINS_BASE_DIR/codecs
|
||||
DEPLOYMENT += codecs_plugins
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,10 +76,6 @@ QT_END_NAMESPACE
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
class tst_QTextStream : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -378,7 +374,6 @@ void tst_QTextStream::getSetCheck()
|
||||
|
||||
tst_QTextStream::tst_QTextStream()
|
||||
{
|
||||
Q_SET_DEFAULT_IAP
|
||||
}
|
||||
|
||||
tst_QTextStream::~tst_QTextStream()
|
||||
@ -1126,13 +1121,7 @@ void tst_QTextStream::stillOpenWhenAtEnd()
|
||||
#endif
|
||||
QTcpSocket socket;
|
||||
socket.connectToHost(QtNetworkSettings::serverName(), 143);
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// This number is determined in an arbitrary way; whatever it takes
|
||||
// to make the test pass.
|
||||
QVERIFY(socket.waitForReadyRead(30000));
|
||||
#else
|
||||
QVERIFY(socket.waitForReadyRead(5000));
|
||||
#endif
|
||||
|
||||
QTextStream stream2(&socket);
|
||||
while (!stream2.readLine().isNull()) {}
|
||||
@ -1410,8 +1399,8 @@ void tst_QTextStream::pos3LargeFile()
|
||||
// ------------------------------------------------------------------------------
|
||||
void tst_QTextStream::readStdin()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Qt/CE has no stdin/out support for processes", SkipAll);
|
||||
#endif
|
||||
QProcess stdinProcess;
|
||||
stdinProcess.start("stdinProcess/stdinProcess");
|
||||
@ -1436,8 +1425,8 @@ void tst_QTextStream::readStdin()
|
||||
// ------------------------------------------------------------------------------
|
||||
void tst_QTextStream::readAllFromStdin()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Qt/CE has no stdin/out support for processes", SkipAll);
|
||||
#endif
|
||||
QProcess stdinProcess;
|
||||
stdinProcess.start("readAllStdinProcess/readAllStdinProcess", QIODevice::ReadWrite | QIODevice::Text);
|
||||
@ -1457,8 +1446,8 @@ void tst_QTextStream::readAllFromStdin()
|
||||
// ------------------------------------------------------------------------------
|
||||
void tst_QTextStream::readLineFromStdin()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Qt/CE and Symbian have no stdin/out support for processes", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Qt/CE has no stdin/out support for processes", SkipAll);
|
||||
#endif
|
||||
QProcess stdinProcess;
|
||||
stdinProcess.start("readLineStdinProcess/readLineStdinProcess", QIODevice::ReadWrite | QIODevice::Text);
|
||||
@ -2899,7 +2888,7 @@ void tst_QTextStream::int_write_with_locale()
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
// like QTEST_APPLESS_MAIN, but initialising the locale on Unix
|
||||
#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_UNIX)
|
||||
QT_BEGIN_NAMESPACE
|
||||
extern bool qt_locale_initialized;
|
||||
QT_END_NAMESPACE
|
||||
@ -2907,7 +2896,7 @@ QT_END_NAMESPACE
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if defined (Q_OS_UNIX) && !defined (Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_UNIX)
|
||||
::setlocale(LC_ALL, "");
|
||||
qt_locale_initialized = true;
|
||||
#endif
|
||||
|
@ -1,5 +1,4 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qurl.cpp
|
||||
QT = core core-private
|
||||
symbian: TARGET.CAPABILITY = NetworkServices
|
||||
CONFIG += parallel_test
|
||||
|
@ -4,5 +4,3 @@ QT -= gui
|
||||
QT += network
|
||||
|
||||
win32:!wince*:LIBS += -luser32
|
||||
|
||||
symbian:TARGET.CAPABILITY += NetworkServices
|
||||
|
@ -54,11 +54,6 @@
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#include <e32base.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "../../../../shared/util.h"
|
||||
|
||||
//TESTED_CLASS=
|
||||
@ -198,9 +193,6 @@ public slots:
|
||||
void cleanup();
|
||||
private slots:
|
||||
// This test *must* run first. See the definition for why.
|
||||
void onlySymbianActiveScheduler();
|
||||
void symbianNestedActiveSchedulerLoop_data();
|
||||
void symbianNestedActiveSchedulerLoop();
|
||||
void processEvents();
|
||||
void exec();
|
||||
void throwInExec();
|
||||
@ -232,101 +224,6 @@ void tst_QEventLoop::init()
|
||||
void tst_QEventLoop::cleanup()
|
||||
{ }
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
class OnlySymbianActiveScheduler_helper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OnlySymbianActiveScheduler_helper(int fd, QTimer *zeroTimer)
|
||||
: fd(fd),
|
||||
timerCount(0),
|
||||
zeroTimer(zeroTimer),
|
||||
zeroTimerCount(0),
|
||||
notifierCount(0)
|
||||
{
|
||||
}
|
||||
~OnlySymbianActiveScheduler_helper() {}
|
||||
|
||||
public slots:
|
||||
void timerSlot()
|
||||
{
|
||||
// Let all the events occur twice so we know they reactivated after
|
||||
// each occurrence.
|
||||
if (++timerCount >= 2) {
|
||||
// This will hopefully run last, so stop the active scheduler.
|
||||
CActiveScheduler::Stop();
|
||||
}
|
||||
}
|
||||
void zeroTimerSlot()
|
||||
{
|
||||
if (++zeroTimerCount >= 2) {
|
||||
zeroTimer->stop();
|
||||
}
|
||||
}
|
||||
void notifierSlot()
|
||||
{
|
||||
if (++notifierCount >= 2) {
|
||||
char dummy;
|
||||
::read(fd, &dummy, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
int fd;
|
||||
int timerCount;
|
||||
QTimer *zeroTimer;
|
||||
int zeroTimerCount;
|
||||
int notifierCount;
|
||||
};
|
||||
#endif
|
||||
|
||||
void tst_QEventLoop::onlySymbianActiveScheduler() {
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
QSKIP("This is a Symbian-only test.", SkipAll);
|
||||
#else
|
||||
// In here we try to use timers and sockets exclusively using the Symbian
|
||||
// active scheduler and no processEvents().
|
||||
// This test should therefore be run first, so that we can verify that
|
||||
// the first occurrence of processEvents does not do any initialization that
|
||||
// we depend on.
|
||||
|
||||
// Open up a pipe so we can test socket notifiers.
|
||||
int pipeEnds[2];
|
||||
if (::pipe(pipeEnds) != 0) {
|
||||
QFAIL("Could not open pipe");
|
||||
}
|
||||
QSocketNotifier notifier(pipeEnds[0], QSocketNotifier::Read);
|
||||
QSignalSpy notifierSpy(¬ifier, SIGNAL(activated(int)));
|
||||
char dummy = 1;
|
||||
::write(pipeEnds[1], &dummy, 1);
|
||||
|
||||
QTimer zeroTimer;
|
||||
QSignalSpy zeroTimerSpy(&zeroTimer, SIGNAL(timeout()));
|
||||
zeroTimer.setInterval(0);
|
||||
zeroTimer.start();
|
||||
|
||||
QTimer timer;
|
||||
QSignalSpy timerSpy(&timer, SIGNAL(timeout()));
|
||||
timer.setInterval(2000); // Generous timeout or this test will fail if there is high load
|
||||
timer.start();
|
||||
|
||||
OnlySymbianActiveScheduler_helper helper(pipeEnds[0], &zeroTimer);
|
||||
connect(¬ifier, SIGNAL(activated(int)), &helper, SLOT(notifierSlot()));
|
||||
connect(&zeroTimer, SIGNAL(timeout()), &helper, SLOT(zeroTimerSlot()));
|
||||
connect(&timer, SIGNAL(timeout()), &helper, SLOT(timerSlot()));
|
||||
|
||||
CActiveScheduler::Start();
|
||||
|
||||
::close(pipeEnds[1]);
|
||||
::close(pipeEnds[0]);
|
||||
|
||||
QCOMPARE(notifierSpy.count(), 2);
|
||||
QCOMPARE(zeroTimerSpy.count(), 2);
|
||||
QCOMPARE(timerSpy.count(), 2);
|
||||
#endif
|
||||
}
|
||||
|
||||
void tst_QEventLoop::processEvents()
|
||||
{
|
||||
QSignalSpy spy1(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()));
|
||||
@ -379,13 +276,7 @@ void tst_QEventLoop::processEvents()
|
||||
killTimer(timerId);
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
// Symbian needs bit longer timeout for emulator, as emulator startup causes additional delay
|
||||
# define EXEC_TIMEOUT 1000
|
||||
#else
|
||||
# define EXEC_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#define EXEC_TIMEOUT 100
|
||||
|
||||
void tst_QEventLoop::exec()
|
||||
{
|
||||
@ -452,13 +343,10 @@ void tst_QEventLoop::throwInExec()
|
||||
{
|
||||
#if defined(QT_NO_EXCEPTIONS) || defined(NO_EVENTLOOP_EXCEPTIONS)
|
||||
QSKIP("Exceptions are disabled", SkipAll);
|
||||
#elif defined(Q_OS_WINCE_WM) || defined(Q_OS_SYMBIAN)
|
||||
#elif defined(Q_OS_WINCE_WM)
|
||||
// Windows Mobile cannot handle cross library exceptions
|
||||
// qobject.cpp will try to rethrow the exception after handling
|
||||
// which causes gwes.exe to crash
|
||||
|
||||
// Symbian doesn't propagate exceptions from eventloop, but converts them to
|
||||
// CActiveScheduler errors instead -> this test will hang.
|
||||
QSKIP("This platform doesn't support propagating exceptions through the event loop", SkipAll);
|
||||
#elif defined(Q_OS_LINUX)
|
||||
// C++ exceptions can't be passed through glib callbacks. Skip the test if
|
||||
@ -691,7 +579,7 @@ void tst_QEventLoop::processEventsExcludeTimers()
|
||||
|
||||
// normal process events will send timers
|
||||
eventLoop.processEvents(QEventLoop::X11ExcludeTimers);
|
||||
#if !defined(Q_OS_UNIX) || defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_UNIX)
|
||||
QEXPECT_FAIL("", "X11ExcludeTimers only works on UN*X", Continue);
|
||||
#endif
|
||||
QCOMPARE(timerReceiver.gotTimerEvent, -1);
|
||||
@ -703,164 +591,6 @@ void tst_QEventLoop::processEventsExcludeTimers()
|
||||
timerReceiver.gotTimerEvent = -1;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
class DummyActiveObject : public CActive
|
||||
{
|
||||
public:
|
||||
DummyActiveObject(int levels);
|
||||
~DummyActiveObject();
|
||||
|
||||
void Start();
|
||||
|
||||
protected:
|
||||
void DoCancel();
|
||||
void RunL();
|
||||
|
||||
public:
|
||||
bool succeeded;
|
||||
|
||||
private:
|
||||
RTimer m_rTimer;
|
||||
int remainingLevels;
|
||||
};
|
||||
|
||||
class ActiveSchedulerLoop : public QObject
|
||||
{
|
||||
public:
|
||||
ActiveSchedulerLoop(int levels) : succeeded(false), timerId(-1), remainingLevels(levels) {}
|
||||
~ActiveSchedulerLoop() {}
|
||||
|
||||
void timerEvent(QTimerEvent *e);
|
||||
|
||||
public:
|
||||
bool succeeded;
|
||||
int timerId;
|
||||
int remainingLevels;
|
||||
};
|
||||
|
||||
DummyActiveObject::DummyActiveObject(int levels)
|
||||
: CActive(CActive::EPriorityStandard),
|
||||
succeeded(false),
|
||||
remainingLevels(levels)
|
||||
{
|
||||
m_rTimer.CreateLocal();
|
||||
}
|
||||
|
||||
DummyActiveObject::~DummyActiveObject()
|
||||
{
|
||||
Cancel();
|
||||
m_rTimer.Close();
|
||||
}
|
||||
|
||||
void DummyActiveObject::DoCancel()
|
||||
{
|
||||
m_rTimer.Cancel();
|
||||
}
|
||||
|
||||
void DummyActiveObject::RunL()
|
||||
{
|
||||
if (remainingLevels - 1 <= 0) {
|
||||
ActiveSchedulerLoop loop(remainingLevels - 1);
|
||||
loop.timerId = loop.startTimer(0);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
succeeded = loop.succeeded;
|
||||
} else {
|
||||
succeeded = true;
|
||||
}
|
||||
CActiveScheduler::Stop();
|
||||
}
|
||||
|
||||
void DummyActiveObject::Start()
|
||||
{
|
||||
m_rTimer.After(iStatus, 100000); // 100 ms
|
||||
SetActive();
|
||||
}
|
||||
|
||||
void ActiveSchedulerLoop::timerEvent(QTimerEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
DummyActiveObject *dummy = new(ELeave) DummyActiveObject(remainingLevels);
|
||||
CActiveScheduler::Add(dummy);
|
||||
|
||||
dummy->Start();
|
||||
|
||||
CActiveScheduler::Start();
|
||||
|
||||
succeeded = dummy->succeeded;
|
||||
|
||||
delete dummy;
|
||||
|
||||
killTimer(timerId);
|
||||
}
|
||||
|
||||
// We cannot trap panics when the test case fails, so run it in a different thread instead.
|
||||
class ActiveSchedulerThread : public QThread
|
||||
{
|
||||
public:
|
||||
ActiveSchedulerThread(QEventLoop::ProcessEventsFlag flags);
|
||||
~ActiveSchedulerThread();
|
||||
|
||||
protected:
|
||||
void run();
|
||||
|
||||
public:
|
||||
volatile bool succeeded;
|
||||
|
||||
private:
|
||||
QEventLoop::ProcessEventsFlag m_flags;
|
||||
};
|
||||
|
||||
ActiveSchedulerThread::ActiveSchedulerThread(QEventLoop::ProcessEventsFlag flags)
|
||||
: succeeded(false),
|
||||
m_flags(flags)
|
||||
{
|
||||
}
|
||||
|
||||
ActiveSchedulerThread::~ActiveSchedulerThread()
|
||||
{
|
||||
}
|
||||
|
||||
void ActiveSchedulerThread::run()
|
||||
{
|
||||
ActiveSchedulerLoop loop(2);
|
||||
loop.timerId = loop.startTimer(0);
|
||||
// It may panic in here if the active scheduler and the Qt loop don't go together.
|
||||
QCoreApplication::processEvents(m_flags);
|
||||
|
||||
succeeded = loop.succeeded;
|
||||
}
|
||||
#endif // ifdef Q_OS_SYMBIAN
|
||||
|
||||
void tst_QEventLoop::symbianNestedActiveSchedulerLoop_data()
|
||||
{
|
||||
QTest::addColumn<int>("processEventFlags");
|
||||
|
||||
QTest::newRow("AllEvents") << (int)QEventLoop::AllEvents;
|
||||
QTest::newRow("WaitForMoreEvents") << (int)QEventLoop::WaitForMoreEvents;
|
||||
}
|
||||
|
||||
/*
|
||||
Before you start fiddling with this test, you should have a good understanding of how
|
||||
Symbian active objects work. What the test does is to try to screw up the semaphore count
|
||||
in the active scheduler to cause stray signals, by running the Qt event loop and the
|
||||
active scheduler inside each other. Naturally, its attempts to do this should be futile!
|
||||
*/
|
||||
void tst_QEventLoop::symbianNestedActiveSchedulerLoop()
|
||||
{
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
QSKIP("This is a Symbian only test.", SkipAll);
|
||||
#else
|
||||
QFETCH(int, processEventFlags);
|
||||
|
||||
ActiveSchedulerThread thread((QEventLoop::ProcessEventsFlag)processEventFlags);
|
||||
thread.start();
|
||||
thread.wait(2000);
|
||||
|
||||
QVERIFY(thread.succeeded);
|
||||
#endif
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(QThread*)
|
||||
|
||||
namespace DeliverInDefinedOrder_QTBUG19637 {
|
||||
|
@ -13,14 +13,3 @@ QT += widgets sql
|
||||
# plugFiles.path = sqldrivers
|
||||
# DEPLOYMENT += plugFiles
|
||||
#}
|
||||
|
||||
symbian {
|
||||
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
|
||||
qt_not_deployed {
|
||||
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
|
||||
sqlite.path = /sys/bin
|
||||
sqlite.files = sqlite3.dll
|
||||
DEPLOYMENT += sqlite
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1323,7 +1323,7 @@ Q_DECLARE_METATYPE(PropertyObject::Priority)
|
||||
|
||||
void tst_QObject::threadSignalEmissionCrash()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
int loopCount = 100;
|
||||
#else
|
||||
int loopCount = 1000;
|
||||
@ -1577,17 +1577,8 @@ void tst_QObject::moveToThread()
|
||||
|
||||
connect(object, SIGNAL(theSignal()), &thread, SLOT(quit()), Qt::DirectConnection);
|
||||
|
||||
#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
|
||||
// usually fail unless timers are farther apart.
|
||||
child->startTimer(100);
|
||||
object->startTimer(150);
|
||||
#else
|
||||
child->startTimer(90);
|
||||
object->startTimer(100);
|
||||
#endif
|
||||
|
||||
QCOMPARE(object->thread(), currentThread);
|
||||
QCOMPARE(child->thread(), currentThread);
|
||||
@ -2815,9 +2806,7 @@ void tst_QObject::dynamicProperties()
|
||||
|
||||
void tst_QObject::recursiveSignalEmission()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
QSKIP("Emulator builds in Symbian do not support launching processes linking to Qt", SkipAll);
|
||||
#elif defined(QT_NO_PROCESS)
|
||||
#if defined(QT_NO_PROCESS)
|
||||
QSKIP("Test requires QProcess", SkipAll);
|
||||
#else
|
||||
QProcess proc;
|
||||
|
@ -14,8 +14,3 @@ wince*: {
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
symbian: {
|
||||
addFiles.files = signalbug.exe
|
||||
addFiles.path = \\sys\\bin
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
|
@ -6,6 +6,4 @@ requires(contains(QT_CONFIG,private_tests))
|
||||
|
||||
include(../platformsocketengine/platformsocketengine.pri)
|
||||
|
||||
symbian: TARGET.CAPABILITY = NetworkServices
|
||||
|
||||
CONFIG += insignificant_test # QTBUG-21204
|
||||
|
@ -49,13 +49,8 @@
|
||||
#include <QtCore/QSocketNotifier>
|
||||
#include <QtNetwork/QTcpServer>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#include <private/qsymbiansocketengine_p.h>
|
||||
#define NATIVESOCKETENGINE QSymbianSocketEngine
|
||||
#else
|
||||
#include <private/qnativesocketengine_p.h>
|
||||
#define NATIVESOCKETENGINE QNativeSocketEngine
|
||||
#endif
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <private/qnet_unix_p.h>
|
||||
#include <sys/select.h>
|
||||
@ -129,9 +124,6 @@ signals:
|
||||
|
||||
void tst_QSocketNotifier::unexpectedDisconnection()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QSKIP("Symbian socket engine pseudo descriptors can't be used for QSocketNotifier", SkipAll);
|
||||
#else
|
||||
/*
|
||||
Given two sockets and two QSocketNotifiers registered on each
|
||||
their socket. If both sockets receive data, and the first slot
|
||||
@ -201,7 +193,6 @@ void tst_QSocketNotifier::unexpectedDisconnection()
|
||||
writeEnd1->close();
|
||||
writeEnd2->close();
|
||||
server.close();
|
||||
#endif
|
||||
}
|
||||
|
||||
class MixingWithTimersHelper : public QObject
|
||||
|
@ -92,9 +92,6 @@ private slots:
|
||||
|
||||
void QTBUG13633_dontBlockEvents();
|
||||
void postedEventsShouldNotStarveTimers();
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
void handleLeaks();
|
||||
#endif
|
||||
};
|
||||
|
||||
class TimerHelper : public QObject
|
||||
@ -169,13 +166,7 @@ void tst_QTimer::singleShotTimeout()
|
||||
QCOMPARE(helper.count, 1);
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Increase wait as emulator startup can cause unexpected delays, and
|
||||
// on hardware there are sometimes spikes right after process startup.
|
||||
#define TIMEOUT_TIMEOUT 2000
|
||||
#else
|
||||
#define TIMEOUT_TIMEOUT 200
|
||||
#endif
|
||||
|
||||
void tst_QTimer::timeout()
|
||||
{
|
||||
@ -417,14 +408,8 @@ void tst_QTimer::deleteLaterOnQTimer()
|
||||
QVERIFY(pointer.isNull());
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
// Increase wait as emulator startup can cause unexpected delays
|
||||
#define MOVETOTHREAD_TIMEOUT 200
|
||||
#define MOVETOTHREAD_WAIT 5000
|
||||
#else
|
||||
#define MOVETOTHREAD_TIMEOUT 200
|
||||
#define MOVETOTHREAD_WAIT 300
|
||||
#endif
|
||||
|
||||
void tst_QTimer::moveToThread()
|
||||
{
|
||||
@ -609,7 +594,7 @@ void tst_QTimer::cancelLongTimer()
|
||||
{
|
||||
QTimer timer;
|
||||
timer.setSingleShot(true);
|
||||
timer.start(1000 * 60 * 60); //set timer for 1 hour (which would overflow Symbian RTimer)
|
||||
timer.start(1000 * 60 * 60); //set timer for 1 hour
|
||||
QCoreApplication::processEvents();
|
||||
QVERIFY(timer.isActive()); //if the timer completes immediately with an error, then this will fail
|
||||
timer.stop();
|
||||
@ -755,40 +740,5 @@ void tst_QTimer::postedEventsShouldNotStarveTimers()
|
||||
QVERIFY(timerHelper.count > 5);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
void tst_QTimer::handleLeaks()
|
||||
{
|
||||
const int timercount = 5;
|
||||
int processhandles_start;
|
||||
int threadhandles_start;
|
||||
RThread().HandleCount(processhandles_start, threadhandles_start);
|
||||
{
|
||||
TimerHelper timerHelper;
|
||||
QList<QTimer*> timers;
|
||||
for (int i=0;i<timercount;i++) {
|
||||
QTimer* timer = new QTimer;
|
||||
timers.append(timer);
|
||||
connect(timer, SIGNAL(timeout()), &timerHelper, SLOT(timeout()));
|
||||
timer->setSingleShot(true);
|
||||
timer->start(i); //test both zero and normal timeouts
|
||||
}
|
||||
int processhandles_mid;
|
||||
int threadhandles_mid;
|
||||
RThread().HandleCount(processhandles_mid, threadhandles_mid);
|
||||
qDebug() << threadhandles_mid - threadhandles_start << "new thread owned handles";
|
||||
QTest::qWait(100);
|
||||
QCOMPARE(timerHelper.count, timercount);
|
||||
qDeleteAll(timers);
|
||||
}
|
||||
int processhandles_end;
|
||||
int threadhandles_end;
|
||||
RThread().HandleCount(processhandles_end, threadhandles_end);
|
||||
QCOMPARE(threadhandles_end, threadhandles_start); //RTimer::CreateLocal creates a thread owned handle
|
||||
//Can not verify process handles because QObject::connect may create up to 2 mutexes
|
||||
//from a QMutexPool (4 process owned handles with open C imp.)
|
||||
//QCOMPARE(processhandles_end, processhandles_start);
|
||||
}
|
||||
#endif
|
||||
|
||||
QTEST_MAIN(tst_QTimer)
|
||||
#include "tst_qtimer.moc"
|
||||
|
@ -7,7 +7,7 @@ mac:CONFIG -= app_bundle
|
||||
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:!symbian {
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
}
|
||||
|
||||
|
@ -46,13 +46,6 @@
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// In Symbian OS test data is located in applications private dir
|
||||
// And underlying Open C have application private dir in default search path
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
|
||||
#define EXISTING_SHARE "existing"
|
||||
|
||||
class tst_QSystemLock : public QObject
|
||||
|
@ -63,25 +63,6 @@ union qt_semun {
|
||||
|
||||
#define tr(x) QT_TRANSLATE_NOOP(QLatin1String("QSystemLock"), (x))
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
int createUnixKeyFile(const QString &fileName)
|
||||
{
|
||||
if (QFile::exists(fileName))
|
||||
return 0;
|
||||
|
||||
int fd = open(QFile::encodeName(fileName).constData(),
|
||||
O_EXCL | O_CREAT | O_RDWR, 0640);
|
||||
if (-1 == fd) {
|
||||
if (errno == EEXIST)
|
||||
return 0;
|
||||
return -1;
|
||||
} else {
|
||||
close(fd);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
QSystemLockPrivate::QSystemLockPrivate() :
|
||||
semaphore(-1), lockCount(0),
|
||||
error(QSystemLock::NoError), unix_key(-1), createdFile(false), createdSemaphore(false)
|
||||
@ -125,11 +106,7 @@ key_t QSystemLockPrivate::handle()
|
||||
}
|
||||
|
||||
// Create the file needed for ftok
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
int built = createUnixKeyFile(fileName);
|
||||
#else
|
||||
int built = QSharedMemoryPrivate::createUnixKeyFile(fileName);
|
||||
#endif
|
||||
if (-1 == built)
|
||||
return -1;
|
||||
createdFile = (1 == built);
|
||||
|
@ -24,14 +24,6 @@ addFiles.files = $$OUT_PWD/../../lackey/lackey.exe ../../lackey/scripts
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
DEFINES += SRCDIR=\\\".\\\"
|
||||
}else:symbian{
|
||||
requires(contains(QT_CONFIG,script))
|
||||
QT += gui script
|
||||
addFiles.files = ../../lackey/scripts
|
||||
addFiles.path = /data/qsharedmemorytemp/lackey
|
||||
addBin.files = lackey.exe
|
||||
addBin.path = /sys/bin
|
||||
DEPLOYMENT += addFiles addBin
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
}
|
||||
|
@ -50,10 +50,7 @@
|
||||
#define EXISTING_SHARE "existing"
|
||||
#define EXISTING_SIZE 1024
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR "c:/data/qsharedmemorytemp/lackey/"
|
||||
#define LACKEYDIR SRCDIR "lackey"
|
||||
#elif defined(Q_OS_WINCE)
|
||||
#if defined(Q_OS_WINCE)
|
||||
#define LACKEYDIR SRCDIR
|
||||
#else
|
||||
#define LACKEYDIR "../lackey"
|
||||
@ -433,9 +430,6 @@ void tst_QSharedMemory::readOnly()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
QSKIP("This test opens a crash dialog on Windows", SkipSingle);
|
||||
#endif
|
||||
#if defined (Q_OS_SYMBIAN)
|
||||
QSKIP("Readonly shared memory is not supported in symbian", SkipAll);
|
||||
#endif
|
||||
QString program = LACKEYDIR "/lackey";
|
||||
QStringList arguments;
|
||||
@ -559,9 +553,7 @@ void tst_QSharedMemory::simpleProducerConsumer()
|
||||
char *get = (char*)consumer.data();
|
||||
// On Windows CE you always have ReadWrite access. Thus
|
||||
// ViewMapOfFile returns the same pointer
|
||||
// On Symbian, the address will always be same, as
|
||||
// write protection of chunks is not currently supported by Symbian
|
||||
#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QVERIFY(put != get);
|
||||
#endif
|
||||
for (int i = 0; i < size; ++i) {
|
||||
@ -643,10 +635,6 @@ public:
|
||||
QVERIFY(producer.isAttached());
|
||||
char *memory = (char*)producer.data();
|
||||
memory[1] = '0';
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Sleep a while to ensure that consumers start properly
|
||||
QTest::qSleep(1000);
|
||||
#endif
|
||||
QTime timer;
|
||||
timer.start();
|
||||
int i = 0;
|
||||
@ -699,25 +687,12 @@ void tst_QSharedMemory::simpleThreadedProducerConsumer()
|
||||
#endif
|
||||
|
||||
Producer p;
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
enum
|
||||
{
|
||||
/**
|
||||
* The maximum stack size.
|
||||
*/
|
||||
SymbianStackSize = 0x14000
|
||||
};
|
||||
p.setStackSize(SymbianStackSize);
|
||||
#endif
|
||||
if (producerIsThread)
|
||||
p.start();
|
||||
|
||||
QList<Consumer*> consumers;
|
||||
for (int i = 0; i < threads; ++i) {
|
||||
consumers.append(new Consumer());
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
consumers.last()->setStackSize(SymbianStackSize);
|
||||
#endif
|
||||
consumers.last()->start();
|
||||
}
|
||||
|
||||
@ -746,9 +721,6 @@ void tst_QSharedMemory::simpleProcessProducerConsumer_data()
|
||||
*/
|
||||
void tst_QSharedMemory::simpleProcessProducerConsumer()
|
||||
{
|
||||
#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll);
|
||||
#endif
|
||||
QFETCH(int, processes);
|
||||
|
||||
rememberKey("market");
|
||||
|
@ -21,18 +21,3 @@ lackey.files = $$OUT_PWD/../lackey/lackey.exe ../lackey/scripts
|
||||
lackey.path = .
|
||||
DEPLOYMENT += lackey
|
||||
}
|
||||
|
||||
symbian: {
|
||||
requires(contains(QT_CONFIG,script))
|
||||
# this test calls lackey, which then again depends on QtScript.
|
||||
# let's add it here so that it gets deployed easily
|
||||
QT += script
|
||||
|
||||
lackey.files = ../lackey/lackey.exe
|
||||
lackey.path = /sys/bin
|
||||
DEPLOYMENT += lackey
|
||||
|
||||
# PowerMgmt capability needed to kill lackey process
|
||||
TARGET.CAPABILITY = PowerMgmt
|
||||
}
|
||||
|
||||
|
@ -188,9 +188,6 @@ void tst_QSystemSemaphore::complexacquire()
|
||||
|
||||
void tst_QSystemSemaphore::basicProcesses()
|
||||
{
|
||||
#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll);
|
||||
#endif
|
||||
QSystemSemaphore sem("store", 0, QSystemSemaphore::Create);
|
||||
|
||||
QStringList acquireArguments = QStringList() << acquire_js();
|
||||
@ -223,9 +220,6 @@ void tst_QSystemSemaphore::processes_data()
|
||||
|
||||
void tst_QSystemSemaphore::processes()
|
||||
{
|
||||
#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll);
|
||||
#endif
|
||||
QSystemSemaphore sem("store", 1, QSystemSemaphore::Create);
|
||||
|
||||
QFETCH(int, processes);
|
||||
@ -265,7 +259,7 @@ void tst_QSystemSemaphore::processes()
|
||||
|
||||
void tst_QSystemSemaphore::undo()
|
||||
{
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QSKIP("This test only checks a unix behavior", SkipSingle);
|
||||
#endif
|
||||
|
||||
@ -287,9 +281,6 @@ void tst_QSystemSemaphore::undo()
|
||||
|
||||
void tst_QSystemSemaphore::initialValue()
|
||||
{
|
||||
#if defined (Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
|
||||
QSKIP("Cannot launch multiple Qt processes in Symbian emulator", SkipAll);
|
||||
#endif
|
||||
QSystemSemaphore sem("store", 1, QSystemSemaphore::Create);
|
||||
|
||||
QStringList acquireArguments = QStringList() << acquire_js();
|
||||
|
@ -3,7 +3,7 @@ QT += widgets
|
||||
SOURCES += tst_qtranslator.cpp
|
||||
RESOURCES += qtranslator.qrc
|
||||
|
||||
wince*|symbian: {
|
||||
wince* {
|
||||
addFiles.files = hellotr_la.qm msgfmt_from_po.qm
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
|
@ -12,6 +12,3 @@ win32-borland: DEFINES += WIN32_BORLAND
|
||||
|
||||
#no special install rule for the library used by test
|
||||
INSTALLS =
|
||||
|
||||
symbian: TARGET.CAPABILITY=ALL -TCB
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)
|
||||
#define LIB_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define LIB_EXPORT
|
||||
|
@ -14,42 +14,23 @@ win32-borland: DEFINES += WIN32_BORLAND
|
||||
# Force a copy of the library to have an extension that is non-standard.
|
||||
# We want to test if we can load a shared library with *any* filename...
|
||||
|
||||
!symbian {
|
||||
win32 {
|
||||
# vcproj and Makefile generators refer to target differently
|
||||
contains(TEMPLATE,vc.*) {
|
||||
src = $(TargetPath)
|
||||
} else {
|
||||
src = $(DESTDIR_TARGET)
|
||||
}
|
||||
files = mylib.dl2 system.trolltech.test.mylib.dll
|
||||
win32 {
|
||||
# vcproj and Makefile generators refer to target differently
|
||||
contains(TEMPLATE,vc.*) {
|
||||
src = $(TargetPath)
|
||||
} else {
|
||||
src = $(DESTDIR)$(TARGET)
|
||||
files = libmylib.so2 system.trolltech.test.mylib.so
|
||||
src = $(DESTDIR_TARGET)
|
||||
}
|
||||
for(file, files) {
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY $$src ..$$QMAKE_DIR_SEP$$file &&
|
||||
CLEAN_FILES += ../$$file
|
||||
}
|
||||
QMAKE_POST_LINK = $$member(QMAKE_POST_LINK, 0, -2)
|
||||
files = mylib.dl2 system.trolltech.test.mylib.dll
|
||||
} else {
|
||||
src = $(DESTDIR)$(TARGET)
|
||||
files = libmylib.so2 system.trolltech.test.mylib.so
|
||||
}
|
||||
|
||||
symbian-abld: {
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
FIXEDROOT = $$replace(EPOCROOT,/,\\)
|
||||
QMAKE_POST_LINK = \
|
||||
copy /Y $${FIXEDROOT}epoc32\\release\\$(PLATFORM)\\$(CFG)\\mylib.dll $${FIXEDROOT}epoc32\\release\\$(PLATFORM)\\$(CFG)\\mylib.dl2 && \
|
||||
copy /Y $${FIXEDROOT}epoc32\\release\\$(PLATFORM)\\$(CFG)\\mylib.dll $${FIXEDROOT}epoc32\\release\\$(PLATFORM)\\$(CFG)\\system.trolltech.test.mylib.dll && \
|
||||
IF NOT "$(PLATFORM)==WINSCW" copy /Y $${FIXEDROOT}epoc32\\release\\$(PLATFORM)\\$(CFG)\\mylib.dll ..\\tst\\mylib.dl2
|
||||
}
|
||||
|
||||
symbian-sbsv2: {
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
QMAKE_POST_LINK = \
|
||||
$(GNUCP) $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dl2 && \
|
||||
$(GNUCP) $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/system.trolltech.test.mylib.dll && \
|
||||
if test $(PLATFORM) != WINSCW;then $(GNUCP) $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)/mylib.dll $${PWD}/../tst/mylib.dl2; fi
|
||||
for(file, files) {
|
||||
QMAKE_POST_LINK += $$QMAKE_COPY $$src ..$$QMAKE_DIR_SEP$$file &&
|
||||
CLEAN_FILES += ../$$file
|
||||
}
|
||||
QMAKE_POST_LINK = $$member(QMAKE_POST_LINK, 0, -2)
|
||||
|
||||
#no special install rule for the library used by test
|
||||
INSTALLS =
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <qglobal.h>
|
||||
|
||||
#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)|| defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)
|
||||
#define LIB_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define LIB_EXPORT
|
||||
|
@ -2,15 +2,9 @@ QT -= gui
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
symbian: {
|
||||
# Can't build two versions of lib with same name in symbian, so just build one
|
||||
SUBDIRS = lib2 \
|
||||
tst
|
||||
} else {
|
||||
SUBDIRS = lib \
|
||||
lib2 \
|
||||
tst
|
||||
}
|
||||
TARGET = tst_qlibrary
|
||||
|
||||
# no special install rule for subdir
|
||||
|
@ -16,17 +16,6 @@ wince*: {
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
}else:symbian {
|
||||
binDep.files = \
|
||||
mylib.dll \
|
||||
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.
|
||||
custBinDep.files = mylib.dl2
|
||||
custBinDep.path = /sys/bin
|
||||
|
||||
DEPLOYMENT += binDep custBinDep
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
# define SUFFIX ".a"
|
||||
# define PREFIX "lib"
|
||||
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#elif defined(Q_OS_WIN)
|
||||
# undef dll_VALID
|
||||
# define dll_VALID true
|
||||
# undef DLL_VALID
|
||||
@ -103,12 +103,8 @@
|
||||
|
||||
static QString sys_qualifiedLibraryName(const QString &fileName)
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
return PREFIX + fileName + SUFFIX;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
return currDir + "/" + PREFIX + fileName + SUFFIX;
|
||||
#endif
|
||||
}
|
||||
|
||||
//TESTED_CLASS=
|
||||
@ -194,7 +190,7 @@ void tst_QLibrary::version()
|
||||
QFETCH( int, loadversion );
|
||||
QFETCH( int, resultversion );
|
||||
|
||||
#if !defined(Q_OS_AIX) && !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_AIX) && !defined(Q_OS_WIN)
|
||||
QString currDir = QDir::currentPath();
|
||||
QLibrary library( currDir + QLatin1Char('/') + lib, loadversion );
|
||||
bool ok = library.load();
|
||||
@ -217,11 +213,8 @@ void tst_QLibrary::load_data()
|
||||
QTest::addColumn<QString>("lib");
|
||||
QTest::addColumn<bool>("result");
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString currDir;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
#endif
|
||||
|
||||
QTest::newRow( "ok00" ) << currDir + "/mylib" << true;
|
||||
QTest::newRow( "notexist" ) << currDir + "/nolib" << false;
|
||||
QTest::newRow( "badlibrary" ) << currDir + "/qlibrary.pro" << false;
|
||||
@ -230,7 +223,7 @@ void tst_QLibrary::load_data()
|
||||
QTest::newRow("ok (libmylib ver. 1)") << currDir + "/libmylib" <<true;
|
||||
#endif
|
||||
|
||||
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
|
||||
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << true;
|
||||
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << true;
|
||||
QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.dll" << true;
|
||||
@ -261,11 +254,7 @@ void tst_QLibrary::unload_data()
|
||||
QTest::addColumn<QString>("lib");
|
||||
QTest::addColumn<bool>("result");
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString currDir;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
#endif
|
||||
|
||||
QTest::newRow( "mylib" ) << currDir + "/mylib" << true;
|
||||
#ifdef Q_WS_MAC
|
||||
@ -292,17 +281,12 @@ void tst_QLibrary::unload()
|
||||
|
||||
void tst_QLibrary::unload_after_implicit_load()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("SYMBIAN does not support symbols on non-STDDLL libraries.", SkipAll);
|
||||
#endif
|
||||
|
||||
QLibrary library( "./mylib" );
|
||||
QFunctionPointer p = library.resolve("mylibversion");
|
||||
QVERIFY(p); // Check if it was loaded
|
||||
QVERIFY(library.isLoaded());
|
||||
QVERIFY(library.unload());
|
||||
QCOMPARE(library.isLoaded(), false);
|
||||
|
||||
}
|
||||
|
||||
void tst_QLibrary::resolve_data()
|
||||
@ -311,11 +295,7 @@ void tst_QLibrary::resolve_data()
|
||||
QTest::addColumn<QString>("symbol");
|
||||
QTest::addColumn<bool>("goodPointer");
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString currDir;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
#endif
|
||||
|
||||
QTest::newRow( "ok00" ) << currDir + "/mylib" << QString("mylibversion") << true;
|
||||
QTest::newRow( "bad00" ) << currDir + "/mylib" << QString("nosym") << false;
|
||||
@ -324,10 +304,6 @@ void tst_QLibrary::resolve_data()
|
||||
|
||||
void tst_QLibrary::resolve()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QSKIP("SYMBIAN does not support symbols on non-STDDLL libraries.", SkipAll);
|
||||
#endif
|
||||
|
||||
typedef int (*testFunc)();
|
||||
QFETCH( QString, lib );
|
||||
QFETCH( QString, symbol );
|
||||
@ -380,7 +356,7 @@ void tst_QLibrary::isLibrary_data()
|
||||
QTest::newRow("good (libmylib.so.1.0.0)") << QString("libmylib.so.1.0.0") << true;
|
||||
|
||||
QTest::newRow("bad (libmylib.1.0.0.foo)") << QString("libmylib.1.0.0.foo") << false;
|
||||
#elif defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#elif defined(Q_OS_WIN)
|
||||
QTest::newRow("good (with many dots)" ) << "/system.trolltech.test.mylib.dll" << true;
|
||||
#endif
|
||||
}
|
||||
@ -400,15 +376,11 @@ void tst_QLibrary::errorString_data()
|
||||
QTest::addColumn<bool>("success");
|
||||
QTest::addColumn<QString>("errorString");
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString currDir;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
|
||||
QString srcDir = SRCDIR;
|
||||
if (srcDir.isEmpty())
|
||||
srcDir = currDir;
|
||||
#endif
|
||||
|
||||
QTest::newRow("bad load()") << (int)Load << QString("nosuchlib") << false << QString("Cannot load library nosuchlib: .*");
|
||||
QTest::newRow("call errorString() on QLibrary with no d-pointer (crashtest)") << (int)(Load | DontSetFileName) << QString() << false << QString("Unknown error");
|
||||
@ -423,8 +395,6 @@ void tst_QLibrary::errorString_data()
|
||||
QTest::newRow("bad load() with .dll suffix") << (int)Load << QString("nosuchlib.dll") << false << QString("Cannot load library nosuchlib.dll: The specified module could not be found.");
|
||||
// QTest::newRow("bad unload") << (int)Unload << QString("nosuchlib.dll") << false << QString("QLibrary::unload_sys: Cannot unload nosuchlib.dll (The specified module could not be found.)");
|
||||
#elif defined Q_OS_MAC
|
||||
#elif defined Q_OS_SYMBIAN
|
||||
QTest::newRow("load invalid file") << (int)Load << "tst_qlibrary.exe" << false << QString("Cannot load library.*");
|
||||
#else
|
||||
QTest::newRow("load invalid file") << (int)Load << srcDir + "/library_path/invalid.so" << false << QString("Cannot load library.*");
|
||||
#endif
|
||||
@ -437,13 +407,6 @@ void tst_QLibrary::errorString()
|
||||
QFETCH(bool, success);
|
||||
QFETCH(QString, errorString);
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
if ( success )
|
||||
{
|
||||
QSKIP("SYMBIAN does not support symbols on non-STDDLL libraries.", SkipSingle );
|
||||
}
|
||||
#endif
|
||||
|
||||
QLibrary lib;
|
||||
if (!(operation & DontSetFileName)) {
|
||||
lib.setFileName(fileName);
|
||||
@ -495,14 +458,10 @@ void tst_QLibrary::loadHints_data()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString currDir;
|
||||
#else
|
||||
QString currDir = QDir::currentPath();
|
||||
#endif
|
||||
|
||||
lh |= QLibrary::ResolveAllSymbolsHint;
|
||||
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
# if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
|
||||
QTest::newRow( "ok01 (with suffix)" ) << currDir + "/mylib.dll" << int(lh) << true;
|
||||
QTest::newRow( "ok02 (with non-standard suffix)" ) << currDir + "/mylib.dl2" << int(lh) << true;
|
||||
QTest::newRow( "ok03 (with many dots)" ) << currDir + "/system.trolltech.test.mylib.dll" << int(lh) << true;
|
||||
@ -566,7 +525,7 @@ void tst_QLibrary::fileName()
|
||||
}
|
||||
|
||||
QVERIFY(ok);
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WIN)
|
||||
QCOMPARE(lib.fileName().toLower(), expectedFilename.toLower());
|
||||
#else
|
||||
QCOMPARE(lib.fileName(), expectedFilename);
|
||||
@ -577,11 +536,7 @@ void tst_QLibrary::fileName()
|
||||
|
||||
void tst_QLibrary::multipleInstancesForOneLibrary()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
QString lib = "/mylib";
|
||||
#else
|
||||
QString lib = QDir::currentPath() + "/mylib";
|
||||
#endif
|
||||
|
||||
{
|
||||
QLibrary lib1(lib);
|
||||
|
@ -4,8 +4,3 @@ CONFIG -= release debug_and_release
|
||||
SOURCES = main.cpp
|
||||
QT = core
|
||||
DESTDIR = ../plugins
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCALLOWDLLDATA=1
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
}
|
||||
|
@ -4,8 +4,3 @@ CONFIG -= debug debug_and_release
|
||||
SOURCES = main.cpp
|
||||
QT = core
|
||||
DESTDIR = ../plugins
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCALLOWDLLDATA=1
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
}
|
||||
|
@ -8,9 +8,3 @@ wince*: {
|
||||
plugins.path = plugins
|
||||
DEPLOYMENT += plugins
|
||||
}
|
||||
|
||||
symbian: {
|
||||
rpDep.files = releaseplugin.dll debugplugin.dll
|
||||
rpDep.path = plugins
|
||||
DEPLOYMENT += rpDep dpDep
|
||||
}
|
||||
|
@ -11,8 +11,3 @@ win32-borland: DEFINES += WIN32_BORLAND
|
||||
|
||||
#no special install rule for the library used by test
|
||||
INSTALLS =
|
||||
|
||||
symbian: {
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ CONFIG += ordered
|
||||
SUBDIRS = lib \
|
||||
theplugin \
|
||||
tst
|
||||
!win32: !macx-*: !symbian: SUBDIRS += almostplugin
|
||||
!win32: !macx-*: SUBDIRS += almostplugin
|
||||
TARGET = tst_qpluginloader
|
||||
|
||||
# no special install rule for subdir
|
||||
|
@ -4,8 +4,3 @@ HEADERS = theplugin.h
|
||||
SOURCES = theplugin.cpp
|
||||
TARGET = $$qtLibraryTarget(theplugin)
|
||||
DESTDIR = ../bin
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCALLOWDLLDATA=1
|
||||
TARGET.CAPABILITY=ALL -TCB
|
||||
}
|
||||
|
@ -19,15 +19,6 @@ wince*: {
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
|
||||
symbian: {
|
||||
libDep.files = tst_qpluginloaderlib.dll
|
||||
libDep.path = /sys/bin
|
||||
pluginDep.files = theplugin.dll
|
||||
pluginDep.path = bin
|
||||
|
||||
DEPLOYMENT += libDep pluginDep
|
||||
}
|
||||
|
||||
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
|
||||
mac*:CONFIG+=insignificant_test
|
||||
|
||||
|
@ -87,12 +87,6 @@
|
||||
# endif
|
||||
# define PREFIX ""
|
||||
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
# undef dll_VALID
|
||||
# define dll_VALID true
|
||||
# define SUFFIX ".dll"
|
||||
# define PREFIX ""
|
||||
|
||||
#else // all other Unix
|
||||
# undef so_VALID
|
||||
# define so_VALID true
|
||||
@ -122,7 +116,6 @@ private slots:
|
||||
void errorString();
|
||||
void loadHints();
|
||||
void deleteinstanceOnUnload();
|
||||
void checkingStubsFromDifferentDrives();
|
||||
void loadDebugObj();
|
||||
void loadCorruptElf();
|
||||
void loadGarbage();
|
||||
@ -219,7 +212,7 @@ void tst_QPluginLoader::errorString()
|
||||
QVERIFY(loader.errorString() != unknown);
|
||||
}
|
||||
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HPUX && !defined Q_OS_SYMBIAN
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HPUX
|
||||
{
|
||||
QPluginLoader loader( sys_qualifiedLibraryName("almostplugin")); //a plugin with unresolved symbols
|
||||
loader.setLoadHints(QLibrary::ResolveAllSymbolsHint);
|
||||
@ -303,56 +296,6 @@ void tst_QPluginLoader::deleteinstanceOnUnload()
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QPluginLoader::checkingStubsFromDifferentDrives()
|
||||
{
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
|
||||
// This test needs C-drive + some additional drive (driveForStubs)
|
||||
|
||||
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);
|
||||
|
||||
// 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:
|
||||
QPluginLoader loader("C:/" + fullStubFileName);
|
||||
test2 = (loader.fileName() == fileInfo.absoluteFilePath());
|
||||
}
|
||||
|
||||
// clean up
|
||||
tempFile.close();
|
||||
if (!QFile::remove(driveForStubs + fullStubFileName))
|
||||
QWARN("Could not remove stub file");
|
||||
if (!dir.rmdir(driveForStubs + stubDir))
|
||||
QWARN("Could not remove stub directory");
|
||||
|
||||
// test after cleanup
|
||||
QVERIFY(test1);
|
||||
QVERIFY(test2);
|
||||
|
||||
#endif//Q_OS_SYMBIAN
|
||||
}
|
||||
|
||||
void tst_QPluginLoader::loadDebugObj()
|
||||
{
|
||||
#if defined (__ELF__)
|
||||
@ -391,7 +334,7 @@ if (sizeof(void*) == 8) {
|
||||
|
||||
void tst_QPluginLoader::loadGarbage()
|
||||
{
|
||||
#if defined (Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined (Q_OS_UNIX)
|
||||
for (int i=0; i<5; i++) {
|
||||
QPluginLoader lib(QString(SRCDIR "elftest/garbage%1.so").arg(i));
|
||||
QCOMPARE(lib.load(), false);
|
||||
|
@ -20,10 +20,3 @@ wince* {
|
||||
|
||||
DEPLOYMENT += addFile_processUniqueness
|
||||
}
|
||||
|
||||
symbian {
|
||||
binDep.files = testProcessUniqueness.exe
|
||||
binDep.path = \\sys\\bin
|
||||
|
||||
DEPLOYMENT += binDep
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qthread.cpp
|
||||
QT = core
|
||||
symbian:LIBS += -llibpthread
|
||||
CONFIG += parallel_test
|
||||
|
@ -665,9 +665,7 @@ void tst_QThread::usleep()
|
||||
typedef void (*FunctionPointer)(void *);
|
||||
void noop(void*) { }
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
typedef RThread ThreadHandle;
|
||||
#elif defined Q_OS_UNIX
|
||||
#if defined Q_OS_UNIX
|
||||
typedef pthread_t ThreadHandle;
|
||||
#elif defined Q_OS_WIN
|
||||
typedef HANDLE ThreadHandle;
|
||||
@ -698,7 +696,6 @@ public:
|
||||
protected:
|
||||
static void *runUnix(void *data);
|
||||
static unsigned WIN_FIX_STDCALL runWin(void *data);
|
||||
static int runSymbian(void *data);
|
||||
|
||||
FunctionPointer functionPointer;
|
||||
void *data;
|
||||
@ -708,10 +705,7 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data)
|
||||
{
|
||||
this->functionPointer = functionPointer;
|
||||
this->data = data;
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
qt_symbian_throwIfError(nativeThreadHandle.Create(KNullDesC(), NativeThreadWrapper::runSymbian, 1024, &User::Allocator(), this));
|
||||
nativeThreadHandle.Resume();
|
||||
#elif defined Q_OS_UNIX
|
||||
#if defined Q_OS_UNIX
|
||||
const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this);
|
||||
Q_UNUSED(state);
|
||||
#elif defined(Q_OS_WINCE)
|
||||
@ -731,12 +725,7 @@ void NativeThreadWrapper::startAndWait(FunctionPointer functionPointer, void *da
|
||||
|
||||
void NativeThreadWrapper::join()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
TRequestStatus stat;
|
||||
nativeThreadHandle.Logon(stat);
|
||||
User::WaitForRequest(stat);
|
||||
nativeThreadHandle.Close();
|
||||
#elif defined Q_OS_UNIX
|
||||
#if defined Q_OS_UNIX
|
||||
pthread_join(nativeThreadHandle, 0);
|
||||
#elif defined Q_OS_WIN
|
||||
WaitForSingleObject(nativeThreadHandle, INFINITE);
|
||||
@ -776,12 +765,6 @@ unsigned WIN_FIX_STDCALL NativeThreadWrapper::runWin(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NativeThreadWrapper::runSymbian(void *data)
|
||||
{
|
||||
runUnix(data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void NativeThreadWrapper::stop()
|
||||
{
|
||||
QMutexLocker lock(&mutex);
|
||||
@ -976,9 +959,6 @@ void tst_QThread::adoptMultipleThreadsOverlap()
|
||||
// need to test lots of threads, so that we exceed MAXIMUM_WAIT_OBJECTS in qt_adopted_thread_watcher()
|
||||
const int numThreads = 200;
|
||||
# endif
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
// stress the monitoring thread's add function
|
||||
const int numThreads = 100;
|
||||
#else
|
||||
const int numThreads = 5;
|
||||
#endif
|
||||
|
@ -134,7 +134,7 @@ void tst_QThreadOnce::sameThread()
|
||||
|
||||
void tst_QThreadOnce::multipleThreads()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_VXWORKS)
|
||||
const int NumberOfThreads = 20;
|
||||
#else
|
||||
const int NumberOfThreads = 100;
|
||||
|
@ -1,4 +1,3 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qthreadstorage.cpp
|
||||
QT = core
|
||||
symbian:LIBS += -llibpthread
|
||||
|
@ -47,13 +47,7 @@
|
||||
#include <qthread.h>
|
||||
#include <qwaitcondition.h>
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
// Symbian Open C has a bug that causes very short waits to fail sometimes
|
||||
#define COND_WAIT_TIME 50
|
||||
#else
|
||||
#define COND_WAIT_TIME 1
|
||||
#endif
|
||||
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
@ -326,12 +320,7 @@ void tst_QWaitCondition::wait_QReadWriteLock()
|
||||
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));
|
||||
#else
|
||||
QVERIFY(thread[x].cond.wait(&thread[x].readWriteLock, 1000));
|
||||
#endif
|
||||
thread[x].readWriteLock.unlock();
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ SOURCES += tst_qbytearray.cpp
|
||||
|
||||
QT = core core-private
|
||||
|
||||
wince*|symbian {
|
||||
wince* {
|
||||
addFile.files = rfc3252.txt
|
||||
addFile.path = .
|
||||
DEPLOYMENT += addFile
|
||||
@ -12,8 +12,6 @@ wince*|symbian {
|
||||
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\"./\\\"
|
||||
} else:symbian {
|
||||
TARGET.EPOCHEAPSIZE="0x100 0x800000"
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -53,10 +53,6 @@
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
class tst_QByteArray : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -3,14 +3,11 @@ SOURCES += tst_qchar.cpp
|
||||
|
||||
QT = core core-private
|
||||
|
||||
wince*|symbian: {
|
||||
deploy.files += NormalizationTest.txt
|
||||
DEPLOYMENT += deploy
|
||||
wince*: {
|
||||
deploy.files += NormalizationTest.txt
|
||||
DEPLOYMENT += deploy
|
||||
}
|
||||
|
||||
symbian: {
|
||||
DEFINES += SRCDIR=""
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
CONFIG += parallel_test
|
||||
|
@ -2,8 +2,4 @@ load(qttest_p4)
|
||||
SOURCES += tst_qcryptographichash.cpp
|
||||
QT = core
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCSTACKSIZE =0x5000
|
||||
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
|
||||
}
|
||||
CONFIG += parallel_test
|
||||
|
@ -4,9 +4,6 @@ QT -= gui
|
||||
SOURCES += tst_qelapsedtimer.cpp
|
||||
wince* {
|
||||
DEFINES += SRCDIR=\\\"\\\"
|
||||
} else:symbian {
|
||||
# do not define SRCDIR at all
|
||||
TARGET.EPOCHEAPSIZE = 0x100000 0x3000000
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -2,8 +2,4 @@ load(qttest_p4)
|
||||
SOURCES += tst_qhash.cpp
|
||||
QT = core
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCSTACKSIZE =0x5000
|
||||
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
|
||||
}
|
||||
CONFIG += parallel_test
|
||||
|
@ -985,7 +985,7 @@ void tst_QHash::rehash_isnt_quadratic()
|
||||
// this test should be incredibly slow if rehash() is quadratic
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
QHash<int, int> testHash;
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) // mobiles do not have infinite mem...
|
||||
#if defined(Q_OS_WINCE) // mobiles do not have infinite mem...
|
||||
for (int i = 0; i < 50000; ++i)
|
||||
#else
|
||||
for (int i = 0; i < 500000; ++i)
|
||||
|
@ -1,7 +1,6 @@
|
||||
load(qttest_p4)
|
||||
QT -= gui
|
||||
SOURCES += tst_qline.cpp
|
||||
unix:!mac:!symbian:!vxworks:LIBS+=-lm
|
||||
|
||||
unix:!mac:!vxworks:LIBS+=-lm
|
||||
|
||||
CONFIG += parallel_test
|
||||
|
@ -28,14 +28,3 @@ wince*: {
|
||||
addFiles.path = "\\Program Files\\tst_qlocale"
|
||||
DEPLOYMENT += addFiles
|
||||
}
|
||||
|
||||
symbian:contains(S60_VERSION,3.2) {
|
||||
# This test case compilation crashes on 3.2 for gcce if paging is on
|
||||
MMP_RULES -= PAGED
|
||||
custom_paged_rule = "$${LITERAL_HASH}ifndef GCCE"\
|
||||
"PAGED" \
|
||||
"$${LITERAL_HASH}endif"
|
||||
MMP_RULES += custom_paged_rule
|
||||
}
|
||||
|
||||
symbian: INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE # Needed for e32svr.h in S^3 envs
|
||||
|
@ -68,11 +68,6 @@ extern "C" DWORD GetThreadLocale(void) {
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# include <e32std.h>
|
||||
# include <private/qcore_symbian_p.h>
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(qlonglong)
|
||||
Q_DECLARE_METATYPE(QDate)
|
||||
Q_DECLARE_METATYPE(QLocale::FormatType)
|
||||
@ -135,9 +130,6 @@ private slots:
|
||||
void queryDateTime();
|
||||
void queryMeasureSystem_data();
|
||||
void queryMeasureSystem();
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
void symbianSystemLocale();
|
||||
#endif
|
||||
|
||||
void ampm();
|
||||
void currency();
|
||||
@ -371,8 +363,8 @@ void tst_QLocale::ctor()
|
||||
|
||||
void tst_QLocale::emptyCtor()
|
||||
{
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
QSKIP("Uses unsupported Windows CE / Symbian QProcess functionality (std streams, env)", SkipAll);
|
||||
#if defined(Q_OS_WINCE)
|
||||
QSKIP("Uses unsupported Windows CE QProcess functionality (std streams, env)", SkipAll);
|
||||
#endif
|
||||
#if defined(QT_NO_PROCESS)
|
||||
QSKIP("Qt was compiled with QT_NO_PROCESS", SkipAll);
|
||||
@ -1885,7 +1877,7 @@ void tst_QLocale::systemMeasurementSystems()
|
||||
// Theoretically, we could include HPUX in this test, but its setenv implementation
|
||||
// stinks. It's called putenv, and it requires you to keep the variable you pass
|
||||
// to it around forever.
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
QFETCH(QString, lcAllLocale);
|
||||
QFETCH(QString, lcMeasurementLocale);
|
||||
QFETCH(QString, langLocale);
|
||||
@ -1909,7 +1901,7 @@ void tst_QLocale::systemMeasurementSystems()
|
||||
qputenv("LC_MEASUREMENT", oldLcMeasurement.toLocal8Bit());
|
||||
qputenv("LANG", oldLang.toLocal8Bit());
|
||||
#else
|
||||
QSKIP("Test doesn't work on Mac, Windows or Symbian", SkipAll);
|
||||
QSKIP("Test doesn't work on Mac or Windows", SkipAll);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -2008,7 +2000,7 @@ void tst_QLocale::queryMeasureSystem()
|
||||
// Theoretically, we could include HPUX in this test, but its setenv implementation
|
||||
// stinks. It's called putenv, and it requires you to keep the variable you pass
|
||||
// to it around forever.
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
QFETCH(QString, lcAllLocale);
|
||||
QFETCH(QString, lcMeasurementLocale);
|
||||
QFETCH(QString, langLocale);
|
||||
@ -2032,7 +2024,7 @@ void tst_QLocale::queryMeasureSystem()
|
||||
qputenv("LC_MEASUREMENT", oldLcMeasurement.toLocal8Bit());
|
||||
qputenv("LANG", oldLang.toLocal8Bit());
|
||||
#else
|
||||
QSKIP("Test doesn't work on Mac, Windows or Symbian", SkipAll);
|
||||
QSKIP("Test doesn't work on Mac or Windows", SkipAll);
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_SYSTEMLOCALE
|
||||
@ -2153,34 +2145,6 @@ void tst_QLocale::standaloneMonthName()
|
||||
QCOMPARE(ru.standaloneMonthName(1, QLocale::NarrowFormat), QString::fromUtf8("\320\257"));
|
||||
}
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
void tst_QLocale::symbianSystemLocale()
|
||||
{
|
||||
# if defined(__SERIES60_31__)
|
||||
QSKIP("S60 3.1 doesn't support system format properly", SkipAll);
|
||||
# else
|
||||
// Simple test to verify that Symbian system locale works at all
|
||||
const QSystemLocale locale;
|
||||
TExtendedLocale s60Locale;
|
||||
s60Locale.LoadSystemSettings();
|
||||
|
||||
TTime s60Date(_L("20090117:")); // Symbian offsets day and month from zero
|
||||
QDate date(2009,2,18);
|
||||
|
||||
TPtrC s60DateFormat = s60Locale.GetShortDateFormatSpec();
|
||||
QString dateFormat = locale.query(QSystemLocale::DateFormatShort, QVariant()).toString();
|
||||
|
||||
TBuf<50> s60FormattedDate;
|
||||
TRAPD(err, s60Date.FormatL(s60FormattedDate, s60DateFormat));
|
||||
QVERIFY(err == KErrNone);
|
||||
QString s60FinalResult = qt_TDesC2QString(s60FormattedDate);
|
||||
QString finalResult = date.toString(dateFormat);
|
||||
|
||||
QCOMPARE(finalResult, s60FinalResult);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QLocale::currency()
|
||||
{
|
||||
const QLocale c(QLocale::C);
|
||||
|
@ -1047,7 +1047,7 @@ void tst_QRegExp::rainersSlowRegExpCopyBug()
|
||||
{
|
||||
// this test should take an extreme amount of time if QRegExp is broken
|
||||
QRegExp original(email);
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
#else
|
||||
for (int i = 0; i < 100000; ++i) {
|
||||
@ -1100,7 +1100,7 @@ void Thread::run()
|
||||
str += "abbbdekcz";
|
||||
int x;
|
||||
|
||||
#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
|
||||
#if defined(Q_OS_WINCE)
|
||||
for (int j = 0; j < 100; ++j) {
|
||||
#else
|
||||
for (int j = 0; j < 10000; ++j) {
|
||||
|
@ -2,8 +2,4 @@ load(qttest_p4)
|
||||
SOURCES += tst_qset.cpp
|
||||
QT = core
|
||||
|
||||
symbian: {
|
||||
TARGET.EPOCSTACKSIZE =0x5000
|
||||
TARGET.EPOCHEAPSIZE="0x100000 0x1000000" # // Min 1Mb, max 16Mb
|
||||
}
|
||||
CONFIG += parallel_test
|
||||
|
@ -52,10 +52,6 @@
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define DEFAULT_MAKESPEC "X:/STLsupport/mkspecs/symbian-abld/"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_MAKESPEC
|
||||
# error DEFAULT_MAKESPEC not defined
|
||||
#endif
|
||||
|
@ -1,8 +1,7 @@
|
||||
SOURCES += $$PWD/externaltests.cpp
|
||||
HEADERS += $$PWD/externaltests.h
|
||||
cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /)
|
||||
!symbian:DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\"
|
||||
DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\"
|
||||
|
||||
embedded:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED
|
||||
wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
|
||||
symbian: DEFINES += QTEST_CROSS_COMPILED
|
||||
|
@ -9,7 +9,7 @@ HEADERS += forwarddeclared.h \
|
||||
wrapper.h
|
||||
|
||||
QT = core
|
||||
!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
|
||||
include(externaltests.pri)
|
||||
CONFIG += parallel_test
|
||||
|
@ -59,10 +59,6 @@ namespace QtSharedPointer {
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR "."
|
||||
#endif
|
||||
|
||||
class tst_QSharedPointer: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -1,8 +1,6 @@
|
||||
load(qttest_p4)
|
||||
SOURCES += tst_qstring.cpp
|
||||
|
||||
symbian:LIBS += -llibm
|
||||
|
||||
QT = core
|
||||
|
||||
DEFINES += QT_NO_CAST_TO_ASCII
|
||||
|
@ -4322,9 +4322,6 @@ void tst_QString::localeAwareCompare_data()
|
||||
|
||||
void tst_QString::localeAwareCompare()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
QSKIP("QTBUG-16921: There is no way to set up the system locale, so this test is not reliable in Symbian.");
|
||||
#else
|
||||
#ifdef Q_OS_WIN
|
||||
# ifndef Q_OS_WINCE
|
||||
QSKIP("On others than Win CE, we cannot set the system or user locale.", SkipAll);
|
||||
@ -4429,7 +4426,6 @@ void tst_QString::localeAwareCompare()
|
||||
if (!locale.isEmpty())
|
||||
setlocale(LC_ALL, "");
|
||||
#endif
|
||||
#endif // Q_OS_SYMBIAN
|
||||
}
|
||||
|
||||
void tst_QString::split_data()
|
||||
|
@ -2,9 +2,9 @@ load(qttest_p4)
|
||||
QT = core
|
||||
HEADERS +=
|
||||
SOURCES += tst_qtextboundaryfinder.cpp
|
||||
!symbian:*:DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
|
||||
wince*|symbian:{
|
||||
wince* {
|
||||
addFiles.files = data
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
|
@ -48,9 +48,6 @@
|
||||
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=gui/text/qtextlayout.h corelib/tools/qtextboundaryfinder.cpp
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR "$$PWD"
|
||||
#endif
|
||||
|
||||
class tst_QTextBoundaryFinder : public QObject
|
||||
{
|
||||
|
@ -3,12 +3,11 @@ SOURCES += tst_qxmlstream.cpp
|
||||
|
||||
QT = core xml network
|
||||
|
||||
|
||||
wince*|symbian: {
|
||||
addFiles.files = data XML-Test-Suite
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
wince*:DEFINES += SRCDIR=\\\"\\\"
|
||||
wince* {
|
||||
addFiles.files = data XML-Test-Suite
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
wince*:DEFINES += SRCDIR=\\\"\\\"
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
||||
}
|
||||
|
@ -55,10 +55,6 @@
|
||||
//TESTED_CLASS=QXmlStreamReader QXmlStreamWriter
|
||||
//TESTED_FILES=corelib/xml/stream/qxmlutils.cpp corelib/xml/stream/qxmlstream.cpp corelib/xml/stream/qxmlstream_p.h
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define SRCDIR ""
|
||||
#endif
|
||||
|
||||
Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour)
|
||||
|
||||
static const char *const catalogFile = SRCDIR "XML-Test-Suite/xmlconf/finalCatalog.xml";
|
||||
|
@ -682,10 +682,7 @@ void tst_ExceptionSafety::exceptionEventLoop()
|
||||
}
|
||||
// here, we should have received on non-throwing event and one throwing one
|
||||
QCOMPARE(obj.throwEventCount, 3);
|
||||
#ifndef __SYMBIAN32__
|
||||
// symbian event loops will have absorbed the exceptions
|
||||
QCOMPARE(obj.noThrowEventCount, 1);
|
||||
#endif
|
||||
|
||||
// spin the event loop again
|
||||
qApp->processEvents();
|
||||
|
@ -39,14 +39,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <exception>
|
||||
|
||||
#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
|
||||
#if !defined(Q_OS_WIN)
|
||||
# include "3rdparty/memcheck.h"
|
||||
#endif
|
||||
|
||||
@ -197,82 +195,6 @@ static struct QCrtDebugRegistrator
|
||||
|
||||
} crtDebugRegistrator;
|
||||
|
||||
#elif defined(Q_OS_SYMBIAN)
|
||||
|
||||
struct QAllocFailAllocator : public RAllocator
|
||||
{
|
||||
QAllocFailAllocator() : allocator(User::Allocator())
|
||||
{
|
||||
User::SwitchAllocator(this);
|
||||
}
|
||||
|
||||
~QAllocFailAllocator()
|
||||
{
|
||||
User::SwitchAllocator(&allocator);
|
||||
}
|
||||
|
||||
RAllocator& allocator;
|
||||
|
||||
// from MAllocator
|
||||
TAny* Alloc(TInt aSize)
|
||||
{
|
||||
++mallocCount;
|
||||
if (mallocFailActive && --mallocFailIndex < 0)
|
||||
return 0; // simulate OOM
|
||||
return allocator.Alloc(aSize);
|
||||
}
|
||||
|
||||
void Free(TAny* aPtr)
|
||||
{
|
||||
allocator.Free(aPtr);
|
||||
}
|
||||
|
||||
TAny* ReAlloc(TAny* aPtr, TInt aSize, TInt aMode)
|
||||
{
|
||||
++mallocCount;
|
||||
if (mallocFailActive && --mallocFailIndex < 0)
|
||||
return 0; // simulate OOM
|
||||
return allocator.ReAlloc(aPtr, aSize, aMode);
|
||||
}
|
||||
|
||||
TInt AllocLen(const TAny* aCell) const
|
||||
{
|
||||
return allocator.AllocLen(aCell);
|
||||
}
|
||||
|
||||
TInt Compress()
|
||||
{
|
||||
return allocator.Compress();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
allocator.Reset();
|
||||
}
|
||||
|
||||
TInt AllocSize(TInt& aTotalAllocSize) const
|
||||
{
|
||||
return allocator.AllocSize(aTotalAllocSize);
|
||||
}
|
||||
|
||||
TInt Available(TInt& aBiggestBlock) const
|
||||
{
|
||||
return allocator.Available(aBiggestBlock);
|
||||
}
|
||||
|
||||
TInt DebugFunction(TInt aFunc, TAny* a1, TAny* a2)
|
||||
{
|
||||
return allocator.DebugFunction(aFunc, a1, a2);
|
||||
}
|
||||
|
||||
TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1)
|
||||
{
|
||||
return ((MAllocator&)allocator).Extension_(aExtensionId, a0, a1);
|
||||
}
|
||||
};
|
||||
|
||||
QAllocFailAllocator symbianTestAllocator;
|
||||
|
||||
#endif
|
||||
|
||||
struct AllocFailer
|
||||
@ -327,8 +249,6 @@ struct AllocFailer
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef Q_OS_SYMBIAN
|
||||
|
||||
static void *new_helper(std::size_t size)
|
||||
{
|
||||
void *ptr = malloc(size);
|
||||
@ -358,8 +278,6 @@ void operator delete[](void *ptr, const std::nothrow_t&) throw() { if (ptr) free
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// ignore placement new and placement delete - those don't allocate.
|
||||
|
||||
|
||||
|
@ -51,15 +51,12 @@ QT_USE_NAMESPACE
|
||||
// this test only works with
|
||||
// * GLIBC
|
||||
// * MSVC - only debug builds (we need the crtdbg.h helpers)
|
||||
// * SYMBIAN
|
||||
#if (defined(QT_NO_EXCEPTIONS) || (!defined(__GLIBC__) && !defined(Q_CC_MSVC) && !defined(Q_OS_SYMBIAN))) && !defined(Q_MOC_RUN)
|
||||
#if (defined(QT_NO_EXCEPTIONS) || (!defined(__GLIBC__) && !defined(Q_CC_MSVC))) && !defined(Q_MOC_RUN)
|
||||
QTEST_NOOP_MAIN
|
||||
#else
|
||||
|
||||
#include "oomsimulator.h"
|
||||
#if !defined(Q_OS_SYMBIAN)
|
||||
#include "3rdparty/memcheck.h"
|
||||
#endif
|
||||
|
||||
class tst_ExceptionSafety_Objects: public QObject
|
||||
{
|
||||
@ -328,12 +325,6 @@ void tst_ExceptionSafety_Objects::initTestCase()
|
||||
free(buf);
|
||||
QVERIFY(!buf2);
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// temporary workaround for INC138398
|
||||
std::new_handler nh_func = std::set_new_handler(0);
|
||||
(void) std::set_new_handler(nh_func);
|
||||
#endif
|
||||
|
||||
ObjectCreator<SelfTestObject> *selfTest = new ObjectCreator<SelfTestObject>;
|
||||
doOOMTest(*selfTest, 0);
|
||||
delete selfTest;
|
||||
@ -401,13 +392,6 @@ template <> struct WidgetCreator<QDesktopWidget> : public AbstractTester
|
||||
};
|
||||
void tst_ExceptionSafety_Objects::widgets_data()
|
||||
{
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
// Initialise the S60 rasteriser, which crashes if started while out of memory
|
||||
QImage image(20, 20, QImage::Format_RGB32);
|
||||
QPainter p(&image);
|
||||
p.drawText(0, 15, "foo");
|
||||
#endif
|
||||
|
||||
QTest::addColumn<AbstractTester *>("widgetCreator");
|
||||
|
||||
#undef NEWROW
|
||||
|
@ -155,6 +155,3 @@ win32:SUBDIRS -= qtextpiecetable
|
||||
qtipc \
|
||||
qtoolbar \
|
||||
|
||||
symbian:SUBDIRS -= \
|
||||
qsystemtrayicon \
|
||||
|
||||
|
@ -12,17 +12,6 @@ wince*: {
|
||||
}
|
||||
addPlugins.path = imageformats
|
||||
DEPLOYMENT += addFiles addPlugins
|
||||
} else:symbian {
|
||||
addFiles.files = icons
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
qt_not_deployed {
|
||||
addPlugins.files = qico.dll
|
||||
addPlugins.path = imageformats
|
||||
DEPLOYMENT += addPlugins
|
||||
}
|
||||
TARGET.UID3 = 0xE0340004
|
||||
DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x",""))
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
}
|
||||
|
@ -42,12 +42,6 @@
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#if defined(Q_OS_SYMBIAN)
|
||||
# define STRINGIFY(x) #x
|
||||
# define TOSTRING(x) STRINGIFY(x)
|
||||
# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
|
||||
#endif
|
||||
|
||||
class tst_QIcoImageFormat : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -15,16 +15,6 @@ wince* {
|
||||
|
||||
DEPLOYMENT_PLUGIN += qsvg
|
||||
DEFINES += SRCDIR=\\\".\\\"
|
||||
} else:symbian {
|
||||
QT += xml svg
|
||||
addFiles.files = *.png tst_qicon.cpp *.svg *.svgz
|
||||
addFiles.path = .
|
||||
DEPLOYMENT += addFiles
|
||||
qt_not_deployed {
|
||||
plugins.files = qsvgicon.dll
|
||||
plugins.path = iconengines
|
||||
DEPLOYMENT += plugins
|
||||
}
|
||||
} else {
|
||||
DEFINES += SRCDIR=\\\"$$PWD\\\"
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user