diff options
author | David Faure <faure@kde.org> | 2011-10-22 11:33:06 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-23 15:28:25 +0200 |
commit | dfa24768a3243eda68d91f573050bf23f96da2dd (patch) | |
tree | 40437c86c50a7ed1557caf8559129724899cd918 /tests/auto/gui | |
parent | 59f91c0194f1ac83ae78e4b22f466e25873e1282 (diff) |
Deprecate QDesktopServices::storageLocation/displayName
Which required porting the related unittests to qstandardpaths
Change-Id: I6eb63c46845f05cd29cc42b59872707526277c90
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp index 270674d31f..64af6c9613 100644 --- a/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp +++ b/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices.cpp @@ -61,11 +61,6 @@ private slots: void cleanup(); void openUrl(); void handlers(); - void storageLocation_data(); - void storageLocation(); - - void storageLocationDoesNotEndWithSlash_data(); - void storageLocationDoesNotEndWithSlash(); }; tst_qdesktopservices::tst_qdesktopservices() @@ -126,44 +121,5 @@ void tst_qdesktopservices::handlers() QCOMPARE(barHandler.lastHandledUrl.toString(), barUrl.toString()); } -Q_DECLARE_METATYPE(QDesktopServices::StandardLocation) -void tst_qdesktopservices::storageLocation_data() -{ - QTest::addColumn<QDesktopServices::StandardLocation>("location"); - QTest::newRow("DesktopLocation") << QDesktopServices::DesktopLocation; - QTest::newRow("DocumentsLocation") << QDesktopServices::DocumentsLocation; - QTest::newRow("FontsLocation") << QDesktopServices::FontsLocation; - QTest::newRow("ApplicationsLocation") << QDesktopServices::ApplicationsLocation; - QTest::newRow("MusicLocation") << QDesktopServices::MusicLocation; - QTest::newRow("MoviesLocation") << QDesktopServices::MoviesLocation; - QTest::newRow("PicturesLocation") << QDesktopServices::PicturesLocation; - QTest::newRow("TempLocation") << QDesktopServices::TempLocation; - QTest::newRow("HomeLocation") << QDesktopServices::HomeLocation; - QTest::newRow("DataLocation") << QDesktopServices::DataLocation; -} - -void tst_qdesktopservices::storageLocation() -{ - QFETCH(QDesktopServices::StandardLocation, location); - QDesktopServices::storageLocation(location); - QDesktopServices::displayName(location); -} - -void tst_qdesktopservices::storageLocationDoesNotEndWithSlash_data() -{ - storageLocation_data(); -} - -void tst_qdesktopservices::storageLocationDoesNotEndWithSlash() -{ - // Currently all desktop locations return their storage location - // with "Unix-style" paths (i.e. they use a slash, not backslash). - QFETCH(QDesktopServices::StandardLocation, location); - QString loc = QDesktopServices::storageLocation(location); - if (loc.size() > 1) // workaround for unlikely case of locations that return '/' - QCOMPARE(loc.endsWith(QLatin1Char('/')), false); -} - - QTEST_MAIN(tst_qdesktopservices) #include "tst_qdesktopservices.moc" |