summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXizhi Zhu <xizhi.zhu@nokia.com>2011-08-11 15:37:02 +0300
committerQt by Nokia <qt-info@nokia.com>2011-08-11 14:39:39 +0200
commite30da6595a7eef5984f88acb523823e025e3e7d9 (patch)
tree77ad815a0de5d0ee4e102d87ef87c6dc7dbb1ef4 /tests
parent1102fe901cfafda9df914a25a4a77c9c6049eb00 (diff)
Fix unit tests.
Change-Id: Ic7317930a8d44ed0e6c86682ff6c7f451d59ea5a Reviewed-on: http://codereview.qt.nokia.com/2867 Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdocumentgallery/qdocumentgallery.pro2
-rw-r--r--tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp26
2 files changed, 15 insertions, 13 deletions
diff --git a/tests/auto/qdocumentgallery/qdocumentgallery.pro b/tests/auto/qdocumentgallery/qdocumentgallery.pro
index 88ce357..e506b1d 100644
--- a/tests/auto/qdocumentgallery/qdocumentgallery.pro
+++ b/tests/auto/qdocumentgallery/qdocumentgallery.pro
@@ -2,4 +2,6 @@ include(../auto.pri)
SOURCES += tst_qdocumentgallery.cpp
+linux-*: contains(QT_CONFIG, dbus): contains(tracker_enabled, yes): DEFINES += QT_TRACKER_ENABLED
+
symbian: TARGET.CAPABILITY = ReadDeviceData ReadUserData WriteDeviceData
diff --git a/tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp b/tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp
index f2ebb30..0a98e04 100644
--- a/tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp
+++ b/tests/auto/qdocumentgallery/tst_qdocumentgallery.cpp
@@ -63,7 +63,7 @@ private:
void tst_QDocumentGallery::isRequestSupported()
{
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS) || defined (Q_OS_SYMBIAN)
+#if (defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)) || defined (Q_OS_SYMBIAN)
const bool platformSupported = true;
#else
const bool platformSupported = false;
@@ -84,7 +84,7 @@ void tst_QDocumentGallery::itemTypeProperties_data()
QTest::newRow("non-existent item type") << QString::fromLatin1("Hello") << QStringList();
const QStringList fileProperties = QStringList()
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS)
+#if defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)
<< QDocumentGallery::author
<< QDocumentGallery::comments
<< QDocumentGallery::copyright
@@ -107,11 +107,11 @@ void tst_QDocumentGallery::itemTypeProperties_data()
<< QDocumentGallery::url
<< QDocumentGallery::fileName
<< QDocumentGallery::filePath
- << QDocumentGallery::fileSize
+ << QDocumentGallery::fileSize
<< QDocumentGallery::lastModified
<< QDocumentGallery::title
<< QDocumentGallery::mimeType
- << QDocumentGallery::author
+ << QDocumentGallery::author
<< QDocumentGallery::copyright
<< QDocumentGallery::description
<< QDocumentGallery::comments
@@ -121,7 +121,7 @@ void tst_QDocumentGallery::itemTypeProperties_data()
QTest::newRow("File") << QString(QDocumentGallery::File) << (QStringList(fileProperties));
QTest::newRow("Audio") << QString(QDocumentGallery::Audio) << (QStringList(fileProperties)
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS)
+#if defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)
<< QDocumentGallery::albumArtist
<< QDocumentGallery::albumTitle
<< QDocumentGallery::artist
@@ -150,12 +150,12 @@ void tst_QDocumentGallery::itemTypeProperties_data()
<< QDocumentGallery::albumArtist
<< QDocumentGallery::artist
<< QDocumentGallery::composer
- << QDocumentGallery::genre
+ << QDocumentGallery::genre
#endif
);
QTest::newRow("Album") << QString(QDocumentGallery::Album) << (QStringList()
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS)
+#if defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)
<< QDocumentGallery::albumArtist
<< QDocumentGallery::albumTitle
<< QDocumentGallery::artist
@@ -165,14 +165,14 @@ void tst_QDocumentGallery::itemTypeProperties_data()
#endif
);
QTest::newRow("PhotoAlbum") << QString(QDocumentGallery::PhotoAlbum) << (QStringList()
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS)
+#if defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)
<< QDocumentGallery::count
<< QDocumentGallery::title
#elif defined (Q_OS_SYMBIAN)
<< QDocumentGallery::url
<< QDocumentGallery::title
#endif
- );
+ );
#if defined (Q_OS_SYMBIAN)
QTest::newRow("Image") << QString(QDocumentGallery::Image) << (QStringList(fileProperties)
@@ -250,7 +250,7 @@ void tst_QDocumentGallery::propertyAttributes_data()
QTest::newRow("File.fileName")
<< QString(QDocumentGallery::File)
<< QString(QDocumentGallery::fileName)
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS) || defined (Q_OS_SYMBIAN)
+#if (defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)) || defined (Q_OS_SYMBIAN)
<< (QGalleryProperty::CanRead
| QGalleryProperty::CanFilter
| QGalleryProperty::CanSort);
@@ -260,7 +260,7 @@ void tst_QDocumentGallery::propertyAttributes_data()
QTest::newRow("File.filePath")
<< QString(QDocumentGallery::File)
<< QString(QDocumentGallery::filePath)
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS) || defined (Q_OS_SYMBIAN)
+#if (defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)) || defined (Q_OS_SYMBIAN)
<< (QGalleryProperty::CanRead | QGalleryProperty::CanFilter);
#else
<< QGalleryProperty::Attributes();
@@ -269,7 +269,7 @@ void tst_QDocumentGallery::propertyAttributes_data()
QTest::newRow("Audio.albumTitle")
<< QString(QDocumentGallery::Audio)
<< QString(QDocumentGallery::albumTitle)
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS) || defined (Q_OS_SYMBIAN)
+#if (defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)) || defined (Q_OS_SYMBIAN)
<< (QGalleryProperty::CanRead
| QGalleryProperty::CanFilter
| QGalleryProperty::CanSort);
@@ -279,7 +279,7 @@ void tst_QDocumentGallery::propertyAttributes_data()
QTest::newRow("Album.duration")
<< QString(QDocumentGallery::Album)
<< QString(QDocumentGallery::duration)
-#if defined(Q_OS_LINUX) && !defined(QT_NO_DBUS)
+#if defined(Q_OS_LINUX) && defined(QT_TRACKER_ENABLED)
<< (QGalleryProperty::CanRead
| QGalleryProperty::CanFilter
| QGalleryProperty::CanSort);