summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs
diff options
context:
space:
mode:
authorDebao Zhang <dbzhang800@gmail.com>2012-04-29 00:11:28 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-02 08:30:59 +0200
commitade888860334d207f5f070b0bc9c4c98deaf3862 (patch)
tree133a3bde54e8ef5fa8857814a45cc5000ee5b287 /tests/auto/widgets/dialogs
parent6102ab8d646d76a68bb460885394501e90b4fd1f (diff)
Don't use obsolete qVariantValue, qVariantCanConvert, etc.
qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto/widgets/dialogs')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 14c2be5bd8..e8fc5ad603 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -1061,11 +1061,11 @@ void tst_QFiledialog::historyBack()
QCOMPARE(backButton->isEnabled(), true);
QCOMPARE(forwardButton->isEnabled(), true);
QCOMPARE(spy.count(), 3);
- QString currentPath = qVariantValue<QString>(spy.last().first());
+ QString currentPath = qvariant_cast<QString>(spy.last().first());
QCOMPARE(model->index(currentPath), model->index(temp));
backButton->click();
- currentPath = qVariantValue<QString>(spy.last().first());
+ currentPath = qvariant_cast<QString>(spy.last().first());
QCOMPARE(currentPath, home);
QCOMPARE(backButton->isEnabled(), false);
QCOMPARE(forwardButton->isEnabled(), true);
@@ -1101,39 +1101,39 @@ void tst_QFiledialog::historyForward()
backButton->click();
QCOMPARE(forwardButton->isEnabled(), true);
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(temp));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(temp));
forwardButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(desktop));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(desktop));
QCOMPARE(backButton->isEnabled(), true);
QCOMPARE(forwardButton->isEnabled(), false);
QCOMPARE(spy.count(), 4);
backButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(temp));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(temp));
QCOMPARE(backButton->isEnabled(), true);
backButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(home));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(home));
QCOMPARE(backButton->isEnabled(), false);
QCOMPARE(forwardButton->isEnabled(), true);
QCOMPARE(spy.count(), 6);
forwardButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(temp));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(temp));
backButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(home));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(home));
QCOMPARE(spy.count(), 8);
forwardButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(temp));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(temp));
forwardButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(desktop));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(desktop));
backButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(temp));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(temp));
backButton->click();
- QCOMPARE(model->index(qVariantValue<QString>(spy.last().first())), model->index(home));
+ QCOMPARE(model->index(qvariant_cast<QString>(spy.last().first())), model->index(home));
fd.setDirectory(desktop);
QCOMPARE(forwardButton->isEnabled(), false);
}