summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-09-27 19:53:01 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-29 06:41:42 +0200
commit95cebd34ebc5b4d39b11dc91610309a35e488663 (patch)
tree90ceffef5acea093dd2b8f8f7e8c30593023b85a /tests/auto/gui/kernel
parentab061e3e436fab35eac8666f3e950e98f66c4d3e (diff)
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>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/kernel.pro3
-rw-r--r--tests/auto/gui/kernel/qclipboard/test/test.pro16
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp84
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro6
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/test.pro3
-rw-r--r--tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp135
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp4
7 files changed, 4 insertions, 247 deletions
diff --git a/tests/auto/gui/kernel/kernel.pro b/tests/auto/gui/kernel/kernel.pro
index 58cb247573..c77ea2be2e 100644
--- a/tests/auto/gui/kernel/kernel.pro
+++ b/tests/auto/gui/kernel/kernel.pro
@@ -13,6 +13,3 @@ SUBDIRS=\
qshortcut \
qtouchevent \
-symbian {
- SUBDIRS += qsoftkeymanager
-}
diff --git a/tests/auto/gui/kernel/qclipboard/test/test.pro b/tests/auto/gui/kernel/qclipboard/test/test.pro
index 12c6b6ce4f..38552273c3 100644
--- a/tests/auto/gui/kernel/qclipboard/test/test.pro
+++ b/tests/auto/gui/kernel/qclipboard/test/test.pro
@@ -10,23 +10,11 @@ win32 {
}
}
-wince*|symbian: {
+wince* {
copier.files = ../copier/copier.exe
copier.path = copier
paster.files = ../paster/paster.exe
paster.path = paster
- symbian: {
- LIBS += -lbafl -lestor -letext
-
- load(data_caging_paths)
- rsc.files = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/copier.rsc
- rsc.files += $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/paster.rsc
- rsc.path = $$APP_RESOURCE_DIR
- reg_resource.files = $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/copier_reg.rsc
- reg_resource.files += $${EPOCROOT}$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR/paster_reg.rsc
- reg_resource.path = $$REG_RESOURCE_IMPORT_DIR
- }
-
DEPLOYMENT += copier paster rsc reg_resource
-} \ No newline at end of file
+}
diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
index 4d3bb29e13..34bc581396 100644
--- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
+++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp
@@ -47,14 +47,6 @@
#ifdef Q_WS_MAC
#include <Carbon/Carbon.h>
#endif
-#ifdef Q_OS_SYMBIAN
-#include "private/qcore_symbian_p.h"
-#include "txtetext.h"
-#include <baclipb.h>
-#endif
-#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
-#include "txtclipboard.h"
-#endif
//TESTED_CLASS=
//TESTED_FILES=
@@ -70,10 +62,6 @@ private slots:
void testSignals();
void setMimeData();
void clearBeforeSetText();
-#ifdef Q_OS_SYMBIAN
- void pasteCopySymbian();
- void copyPasteSymbian();
-#endif
private:
bool nativeClipboardWorking();
@@ -208,8 +196,6 @@ void tst_QClipboard::copy_exit_paste()
#if defined Q_WS_X11 || defined Q_WS_QWS || defined (Q_WS_QPA)
QSKIP("This test does not make sense on X11 and embedded, copied data disappears from the clipboard when the application exits ", SkipAll);
// ### It's still possible to test copy/paste - just keep the apps running
-#elif defined (Q_OS_SYMBIAN) && defined (Q_CC_NOKIAX86)
- QSKIP("emulator cannot launch multiple processes",SkipAll);
#endif
if (!nativeClipboardWorking())
QSKIP("Native clipboard not working in this setup", SkipAll);
@@ -347,76 +333,6 @@ void tst_QClipboard::clearBeforeSetText()
QCOMPARE(QApplication::clipboard()->text(), text);
}
-/*
- Test that text copied from qt application
- can be pasted with symbian clipboard
-*/
-#ifdef Q_OS_SYMBIAN
-// ### This test case only makes sense in symbian
-void tst_QClipboard::pasteCopySymbian()
-{
- if (!nativeClipboardWorking())
- QSKIP("Native clipboard not working in this setup", SkipAll);
- const QString string("Test string symbian.");
- QApplication::clipboard()->setText(string);
-
- const TInt KPlainTextBegin = 0;
- RFs fs = qt_s60GetRFs();
- CClipboard* cb = CClipboard::NewForReadingLC(fs);
-
- CPlainText* text = CPlainText::NewL();
- CleanupStack::PushL(text);
- TInt dataLength = text->PasteFromStoreL(cb->Store(), cb->StreamDictionary(),
- KPlainTextBegin);
- if (dataLength == 0) {
- User::Leave(KErrNotFound);
- }
- HBufC* hBuf = HBufC::NewL(dataLength);
- TPtr buf = hBuf->Des();
- text->Extract(buf, KPlainTextBegin, dataLength);
-
- QString storeString = qt_TDesC2QString(buf);
- CleanupStack::PopAndDestroy(text);
- CleanupStack::PopAndDestroy(cb);
-
- QCOMPARE(string, storeString);
-}
-#endif
-
-/*
- Test that text copied to symbian clipboard
- can be pasted to qt clipboard
-*/
-#ifdef Q_OS_SYMBIAN
-// ### This test case only makes sense in symbian
-void tst_QClipboard::copyPasteSymbian()
-{
- if (!nativeClipboardWorking())
- QSKIP("Native clipboard not working in this setup", SkipAll);
- const QString string("Test string symbian.");
- const TInt KPlainTextBegin = 0;
-
- RFs fs = qt_s60GetRFs();
- CClipboard* cb = CClipboard::NewForWritingLC(fs);
- CStreamStore& store = cb->Store();
- CStreamDictionary& dict = cb->StreamDictionary();
- RStoreWriteStream symbianStream;
- TStreamId symbianStId = symbianStream.CreateLC(cb->Store());
-
- CPlainText* text = CPlainText::NewL();
- CleanupStack::PushL(text);
- TPtrC textPtr(qt_QString2TPtrC(string));
- text->InsertL(KPlainTextBegin, textPtr);
- text->CopyToStoreL(store, dict, KPlainTextBegin, textPtr.Length());
- CleanupStack::PopAndDestroy(text);
- (cb->StreamDictionary()).AssignL(KClipboardUidTypePlainText, symbianStId);
- cb->CommitL();
- CleanupStack::PopAndDestroy(2, cb);
-
- QCOMPARE(QApplication::clipboard()->text(), string);
-}
-#endif
-
QTEST_MAIN(tst_QClipboard)
#include "tst_qclipboard.moc"
diff --git a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
index cb61b82e38..7de7b2ec57 100644
--- a/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
+++ b/tests/auto/gui/kernel/qfileopenevent/qfileopeneventexternal/qfileopeneventexternal.pro
@@ -2,9 +2,3 @@ TEMPLATE = app
TARGET = qfileopeneventexternal
QT += core gui widgets
SOURCES += qfileopeneventexternal.cpp
-symbian: {
- RSS_RULES += "embeddability=KAppEmbeddable;"
- RSS_RULES.datatype_list += "priority = EDataTypePriorityHigh; type = \"application/x-tst_qfileopenevent\";"
- LIBS += -lapparc \
- -leikcore -lefsrv -lcone
-}
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/test.pro b/tests/auto/gui/kernel/qfileopenevent/test/test.pro
index 3f16dcf6ee..1a813bca20 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/test.pro
+++ b/tests/auto/gui/kernel/qfileopenevent/test/test.pro
@@ -2,6 +2,3 @@ load(qttest_p4)
TARGET = tst_qfileopenevent
HEADERS +=
SOURCES += tst_qfileopenevent.cpp
-symbian {
- LIBS+=-lefsrv -lapgrfx -lapmime
-}
diff --git a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
index 3916f420a6..00008a80f0 100644
--- a/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
+++ b/tests/auto/gui/kernel/qfileopenevent/test/tst_qfileopenevent.cpp
@@ -42,11 +42,6 @@
#include <QtTest/QtTest>
#include <QtGui/qevent.h>
-#ifdef Q_OS_SYMBIAN
-#include <apgcli.h>
-#include "private/qcore_symbian_p.h"
-#endif
-
class tst_qfileopenevent : public QObject
{
Q_OBJECT
@@ -63,39 +58,15 @@ private slots:
void handleLifetime();
void multiOpen();
void sendAndReceive();
- void external_data();
- void external();
private:
-#ifdef Q_OS_SYMBIAN
- RFile createRFile(const TDesC& filename, const TDesC8& content);
-#else
void createFile(const QString &filename, const QByteArray &content);
-#endif
QFileOpenEvent * createFileAndEvent(const QString &filename, const QByteArray &content);
void checkReadAndWrite(QFileOpenEvent& event, const QByteArray& readContent, const QByteArray& writeContent, bool writeOk);
QByteArray readFileContent(QFileOpenEvent& event);
bool appendFileContent(QFileOpenEvent& event, const QByteArray& writeContent);
bool event(QEvent *);
-
-private:
-#ifdef Q_OS_SYMBIAN
- struct AutoRFs : public RFs
- {
- AutoRFs()
- {
- qt_symbian_throwIfError(Connect());
- qt_symbian_throwIfError(ShareProtected());
- }
-
- ~AutoRFs()
- {
- Close();
- }
- };
- AutoRFs fsSession;
-#endif
};
tst_qfileopenevent::~tst_qfileopenevent()
@@ -106,15 +77,6 @@ void tst_qfileopenevent::initTestCase()
{
}
-#ifdef Q_OS_SYMBIAN
-RFile tst_qfileopenevent::createRFile(const TDesC& filename, const TDesC8& content)
-{
- RFile file;
- qt_symbian_throwIfError(file.Replace(fsSession, filename, EFileWrite));
- qt_symbian_throwIfError(file.Write(content));
- return file;
-}
-#else
void tst_qfileopenevent::createFile(const QString &filename, const QByteArray &content)
{
QFile file(filename);
@@ -122,18 +84,11 @@ void tst_qfileopenevent::createFile(const QString &filename, const QByteArray &c
file.write(content);
file.close();
}
-#endif
QFileOpenEvent * tst_qfileopenevent::createFileAndEvent(const QString &filename, const QByteArray &content)
{
-#ifdef Q_OS_SYMBIAN
- RFile rFile = createRFile(qt_QString2TPtrC(filename), TPtrC8((TText8*)content.constData(), content.size()));
- QScopedPointer<RFile, QScopedPointerRCloser<RFile> > closeRFile(&rFile);
- return new QFileOpenEvent(rFile);
-#else
createFile(filename, content);
return new QFileOpenEvent(filename);
-#endif
}
void tst_qfileopenevent::constructor()
@@ -145,16 +100,6 @@ void tst_qfileopenevent::constructor()
// check that url get/set works
QFileOpenEvent urlTest(QUrl(QLatin1String("file:///urlNameTest")));
QCOMPARE(urlTest.url().toString(), QLatin1String("file:///urlNameTest"));
-
-#ifdef Q_OS_SYMBIAN
- // check that RFile construction works
- RFile rFile = createRFile(_L("testRFile"), _L8("test content"));
- QFileOpenEvent rFileTest(rFile);
- QString targetName(QLatin1String("testRFile"));
- QCOMPARE(rFileTest.file().right(targetName.size()), targetName);
- QCOMPARE(rFileTest.url().toString().right(targetName.size()), targetName);
- rFile.Close();
-#endif
}
QByteArray tst_qfileopenevent::readFileContent(QFileOpenEvent& event)
@@ -184,26 +129,7 @@ void tst_qfileopenevent::checkReadAndWrite(QFileOpenEvent& event, const QByteArr
void tst_qfileopenevent::fileOpen()
{
-#ifdef Q_OS_SYMBIAN
- // create writeable file
- {
- RFile rFile = createRFile(_L("testFileOpen"), _L8("test content"));
- QFileOpenEvent rFileTest(rFile);
- checkReadAndWrite(rFileTest, QByteArray("test content"), QByteArray("+RFileWrite"), true);
- rFile.Close();
- }
-
- // open read-only RFile
- {
- RFile rFile;
- int err = rFile.Open(fsSession, _L("testFileOpen"), EFileRead);
- QFileOpenEvent rFileTest(rFile);
- checkReadAndWrite(rFileTest, QByteArray("test content+RFileWrite"), QByteArray("+RFileRead"), false);
- rFile.Close();
- }
-#else
createFile(QLatin1String("testFileOpen"), QByteArray("test content+RFileWrite"));
-#endif
// filename event
QUrl fileUrl; // need to get the URL during the file test, for use in the URL test
@@ -297,66 +223,5 @@ void tst_qfileopenevent::sendAndReceive()
QFile::remove(QLatin1String("testSendAndReceive"));
}
-void tst_qfileopenevent::external_data()
-{
- QTest::addColumn<QString>("filename");
- QTest::addColumn<QByteArray>("targetContent");
- QTest::addColumn<bool>("sendHandle");
-
- QString privateName(QLatin1String("tst_qfileopenevent_external"));
- QString publicName(QLatin1String("C:\\Data\\tst_qfileopenevent_external"));
- QByteArray writeSuccess("original+external");
- QByteArray writeFail("original");
- QTest::newRow("public name") << publicName << writeSuccess << false;
- QTest::newRow("data caged name") << privateName << writeFail << false;
- QTest::newRow("public handle") << publicName << writeSuccess << true;
- QTest::newRow("data caged handle") << privateName << writeSuccess << true;
-}
-
-void tst_qfileopenevent::external()
-{
-#ifndef Q_OS_SYMBIAN
- QSKIP("external app file open test only valid in Symbian", SkipAll);
-#else
-
- QFETCH(QString, filename);
- QFETCH(QByteArray, targetContent);
- QFETCH(bool, sendHandle);
-
- RFile rFile = createRFile(qt_QString2TPtrC(filename), _L8("original"));
-
- // launch app with the file
- RApaLsSession apa;
- QCOMPARE(apa.Connect(), KErrNone);
- TThreadId threadId;
- TDataType type(_L8("application/x-tst_qfileopenevent"));
- if (sendHandle) {
- QCOMPARE(apa.StartDocument(rFile, type, threadId), KErrNone);
- rFile.Close();
- } else {
- TFileName fullName;
- rFile.FullName(fullName);
- rFile.Close();
- QCOMPARE(apa.StartDocument(fullName, type, threadId), KErrNone);
- }
-
- // wait for app exit
- RThread appThread;
- if (appThread.Open(threadId) == KErrNone) {
- TRequestStatus status;
- appThread.Logon(status);
- User::WaitForRequest(status);
- }
-
- // check the contents
- QFile check(filename);
- QCOMPARE(check.open(QFile::ReadOnly), true);
- QCOMPARE(check.readAll(), targetContent);
- bool ok = check.remove();
-
- QFile::remove(filename);
-#endif
-}
-
QTEST_MAIN(tst_qfileopenevent)
#include "tst_qfileopenevent.moc"
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 5753fb8df4..4c9fc149e5 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -567,8 +567,8 @@ void tst_QKeySequence::translated()
QFETCH(QString, compKey);
#ifdef Q_WS_MAC
QSKIP("No need to translate modifiers on Mac OS X", SkipAll);
-#elif defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
- QSKIP("No need to translate modifiers on WinCE or Symbian", SkipAll);
+#elif defined(Q_OS_WINCE)
+ QSKIP("No need to translate modifiers on WinCE", SkipAll);
#endif
qApp->installTranslator(ourTranslator);