diff options
Diffstat (limited to 'tests/auto/qsslkey')
-rw-r--r-- | tests/auto/qsslkey/qsslkey.pro | 9 | ||||
-rw-r--r-- | tests/auto/qsslkey/tst_qsslkey.cpp | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/tests/auto/qsslkey/qsslkey.pro b/tests/auto/qsslkey/qsslkey.pro index 5cab3d5..32138f8 100644 --- a/tests/auto/qsslkey/qsslkey.pro +++ b/tests/auto/qsslkey/qsslkey.pro @@ -2,7 +2,7 @@ load(qttest_p4) SOURCES += tst_qsslkey.cpp !wince*:win32:LIBS += -lws2_32 -QT += network +QT = core network TARGET = tst_qsslkey @@ -14,11 +14,14 @@ win32 { } } -wince*: { +wince*|symbian: { keyFiles.sources = keys keyFiles.path = . DEPLOYMENT += keyFiles +} + +wince*: { DEFINES += SRCDIR=\\\".\\\" -} else { +} else:!symbian { DEFINES+= SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/qsslkey/tst_qsslkey.cpp b/tests/auto/qsslkey/tst_qsslkey.cpp index fc0e18e..7a41e5b 100644 --- a/tests/auto/qsslkey/tst_qsslkey.cpp +++ b/tests/auto/qsslkey/tst_qsslkey.cpp @@ -47,6 +47,12 @@ #include <QtNetwork/qhostaddress.h> #include <QtNetwork/qnetworkproxy.h> +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +// Current path (C:\private\<UID>) contains only ascii chars +#define SRCDIR QDir::currentPath().toAscii() +#endif + class tst_QSslKey : public QObject { Q_OBJECT @@ -101,7 +107,7 @@ tst_QSslKey::tst_QSslKey() #ifdef Q_WS_MAC // applicationDirPath() points to a path inside the app bundle on Mac. QDir dir(qApp->applicationDirPath() + QLatin1String("/../../../keys")); -#elif defined(Q_OS_WIN) +#elif defined(Q_OS_WIN) || defined (Q_OS_SYMBIAN) QDir dir(SRCDIR + QLatin1String("/keys")); // prefer this way to avoid ifdeffery and support shadow builds? #else QDir dir(qApp->applicationDirPath() + QLatin1String("/keys")); |