summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfilesystemmodel
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/qfilesystemmodel
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/qfilesystemmodel')
-rw-r--r--tests/auto/qfilesystemmodel/qfilesystemmodel.pro10
-rw-r--r--tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp45
2 files changed, 3 insertions, 52 deletions
diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
index b0b6d7a18d..a7d042ce5e 100644
--- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
+++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
@@ -5,13 +5,3 @@ QT += core-private gui
SOURCES += tst_qfilesystemmodel.cpp
TARGET = tst_qfilesystemmodel
-
-symbian: {
- HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h
-
- # need to deploy something to create the private directory
- dummyDeploy.files = tst_qfilesystemmodel.cpp
- dummyDeploy.path = .
- DEPLOYMENT += dummyDeploy
- LIBS += -lefsrv
-}
diff --git a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
index a9a4fc7fc3..5e353d5735 100644
--- a/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -52,9 +52,7 @@
#include <QTime>
#include <QStyle>
#include <QtGlobal>
-#if defined(Q_OS_SYMBIAN)
-# include <f32file.h>
-#endif
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -70,23 +68,6 @@
} \
} while(0)
-#if defined(Q_OS_SYMBIAN)
-static HBufC* qt_QString2HBufCNewL(const QString& aString)
-{
- HBufC *buffer;
-#ifdef QT_NO_UNICODE
- TPtrC8 ptr(reinterpret_cast<const TUint8*>(aString.toLocal8Bit().constData()));
- buffer = HBufC8::NewL(ptr.Length());
- buffer->Des().Copy(ptr);
-#else
- TPtrC16 ptr(reinterpret_cast<const TUint16*>(aString.utf16()));
- buffer = HBufC16::NewL(ptr.Length());
- buffer->Des().Copy(ptr);
-#endif
- return buffer;
-}
-#endif
-
class tst_QFileSystemModel : public QObject {
Q_OBJECT
@@ -150,9 +131,6 @@ protected:
private:
QFileSystemModel *model;
QString flatDirTestPath;
-#if defined(Q_OS_SYMBIAN)
- RFs rfs;
-#endif
};
tst_QFileSystemModel::tst_QFileSystemModel() : model(0)
@@ -163,16 +141,10 @@ tst_QFileSystemModel::tst_QFileSystemModel() : model(0)
qsrand(midnight.secsTo(QTime::currentTime()));
// generating unique temporary directory name
flatDirTestPath = QDir::temp().path() + '/' + QString("flatdirtest.") + QString::number(qrand());
-#if defined(Q_OS_SYMBIAN)
- rfs.Connect();
-#endif
}
tst_QFileSystemModel::~tst_QFileSystemModel()
{
-#if defined(Q_OS_SYMBIAN)
- rfs.Close();
-#endif
QString tmp = flatDirTestPath;
QDir dir(tmp);
if (dir.exists() && !dir.rmdir(tmp))
@@ -212,7 +184,7 @@ void tst_QFileSystemModel::cleanup()
void tst_QFileSystemModel::indexPath()
{
-#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WIN)
int depth = QDir::currentPath().count('/');
model->setRootPath(QDir::currentPath());
QTest::qWait(WAITTIME);
@@ -436,12 +408,6 @@ bool tst_QFileSystemModel::createFiles(const QString &test_path, const QStringLi
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if (initial_files.at(i)[0] == '.')
QProcess::execute(QString("attrib +h %1").arg(file.fileName()));
-#elif defined(Q_OS_SYMBIAN)
- if (initial_files.at(i)[0] == '.') {
- HBufC* buffer = qt_QString2HBufCNewL(QDir::toNativeSeparators(file.fileName()));
- rfs.SetAtt(*buffer, KEntryAttHidden, 0);
- delete buffer;
- }
#endif
//qDebug() << test_path + '/' + initial_files.at(i) << (QFile::exists(test_path + '/' + initial_files.at(i)));
}
@@ -630,7 +596,7 @@ void tst_QFileSystemModel::filters_data()
QTest::addColumn<int>("dirFilters");
QTest::addColumn<QStringList>("nameFilters");
QTest::addColumn<int>("rowCount");
-#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_WINCE)
QTest::newRow("no dirs") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs) << QStringList() << 2;
QTest::newRow("no dirs - dot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDot) << QStringList() << 1;
QTest::newRow("no dirs - dotdot") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::NoDotDot) << QStringList() << 1;
@@ -665,12 +631,7 @@ void tst_QFileSystemModel::filters_data()
QTest::newRow("no dir + hidden") << (QStringList() << "a" << "b" << "c") << QStringList() << (int)(QDir::Dirs | QDir::Hidden) << QStringList() << 0;
QTest::newRow("dir+hid+files") << (QStringList() << "a" << "b" << "c") << QStringList() <<
(int)(QDir::Dirs | QDir::Files | QDir::Hidden) << QStringList() << 3;
-#if defined(Q_OS_SYMBIAN)
- // Some symbian envs have a bug that causes "A" and ".A" to be considered same name in file system.
- QTest::newRow("dir+file+hid-dot .D") << (QStringList() << "a" << "b" << "c") << (QStringList() << ".D") <<
-#else
QTest::newRow("dir+file+hid-dot .A") << (QStringList() << "a" << "b" << "c") << (QStringList() << ".A") <<
-#endif
(int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot) << QStringList() << 4;
QTest::newRow("dir+files+hid+dot A") << (QStringList() << "a" << "b" << "c") << (QStringList() << "AFolder") <<
(int)(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot) << (QStringList() << "A*") << 2;