qt5base-lts/tests/auto
Stephen Kelly 43325a23f3 Delete the QVariant ctors taking global Qt enum values.
They have unexpected results in Qt 5 (the Qt::GlobalColor one works
as expected in Qt 4, but was removed in Qt 5):

 QVariant v = QVariant(Qt::red);
 qDebug() << v; // QVariant(int, 7)
 v = Qt::red;
 qDebug() << v; // QVariant(int, 7)

The correct way is to use:

 QVariant v = QVariant::fromValue(QColor(Qt::red));

The deleted constructors are the ones for which there is a class
with an implicit constructor taking the enum, and that class is
a built-in metatype.

QLocale::Language and QKeySequence::StandardKey would also fit
the description, but I can't include the header for QKeySequence
as it is in QtGui, and I don't want to include the qlocale header
in qvariant.h. Putting a QLocale::Language is probably very
uncommon anyway.

The QTextFormat test is doing the wrong thing, but the result isn't
being tested. Added new tests which fail before the patch.

Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-10 08:45:22 +02:00
..
cmake CMake: Improve QT5_GET_MOC_FLAGS macro 2012-10-04 11:58:48 +02:00
compilerwarnings/data Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
concurrent Include qexception.h instead of qtconcurrentexception.h 2012-09-28 23:50:10 +02:00
corelib Change QDateTime::addSecs() and QDateTime::secsTo() to use qint64. 2012-10-10 08:45:22 +02:00
dbus Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
gui Delete the QVariant ctors taking global Qt enum values. 2012-10-10 08:45:22 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
network typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_data 2012-10-02 08:06:11 +02:00
opengl Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
other Fix #if 0 usage in collections autotest. 2012-10-04 03:03:17 +02:00
printsupport QtPrintSupport: allow slight deviations from pre-defined paper sizes in tests 2012-09-26 10:08:59 +02:00
shared Auto tests: add PlatformClipboard::isAvailable() 2012-09-27 06:07:13 +02:00
sql QSqlQuery::value string overload 2012-10-08 08:55:28 +02:00
testlib Make QUrl::errorString() usable for QtTest output in invalid URLs 2012-10-02 22:34:42 +02:00
tools Use jom in tst_qmake. 2012-10-08 08:46:21 +02:00
widgets tst_qfiledialog: fixed typo causing semi-random completer() failure 2012-10-09 00:25:57 +02:00
xml Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
auto.pro Test: Redo remove QSKIP from printsupport tests 2012-09-13 19:33:08 +02:00
network-settings.h Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
platformquirks.h Auto tests: remove PlatformQuirks::isAutoMaximizing() 2012-09-26 10:08:59 +02:00
test.pl Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00