summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-04-13 14:52:34 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-19 10:09:39 +0200
commitff55d64f6788563a6ef9da2b6d0b6dc23bb936aa (patch)
tree127307cf68730ea4b133c4563c9048cf9750c65f /tests/auto/corelib
parent10c88faf79de45f86a0826d104e202b4e12eba6b (diff)
Remove QVariant constructor taking Qt::GlobalColor.
The constructor is wrong, it creates instance of QVariant encapsulating a QColor instance. QVariant should not implicitly convert data, never. Change-Id: Idc794ecdecb42d8b53fee3f993bf51ddd43f595d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp2
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp9
2 files changed, 1 insertions, 10 deletions
diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
index f9a6bae087..dc9fc19a21 100644
--- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
+++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp
@@ -97,7 +97,7 @@ void tst_QMimeData::colorData() const
QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), red);
// change, verify
- mimeData.setColorData(Qt::blue);
+ mimeData.setColorData(QColor(Qt::blue));
QVERIFY(mimeData.hasColor());
QCOMPARE(qvariant_cast<QColor>(mimeData.colorData()), blue);
}
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index 6a6460d17b..7d821f038b 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -235,8 +235,6 @@ private slots:
void saveLoadCustomTypes();
- void globalColor();
-
void variantMap();
void variantHash();
@@ -2447,13 +2445,6 @@ void tst_QVariant::url()
QCOMPARE(v3.toString(), str);
}
-void tst_QVariant::globalColor()
-{
- QVariant variant(Qt::blue);
- QVERIFY(variant.type() == QVariant::Color);
- QVERIFY(qVariantValue<QColor>(variant) == QColor(Qt::blue));
-}
-
void tst_QVariant::variantMap()
{
QMap<QString, QVariant> map;