qt5base-lts/tests/auto/gui/text
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
..
qabstracttextdocumentlayout Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qcssparser Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qfont Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qfontdatabase Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qfontmetrics Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qglyphrun Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qrawfont Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qstatictext Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qsyntaxhighlighter Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextblock Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextcursor Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextdocument Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextdocumentfragment Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextdocumentlayout Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextformat Delete the QVariant ctors taking global Qt enum values. 2012-10-10 08:45:22 +02:00
qtextlayout Handle additional format ranges when itemizing. 2012-10-08 17:22:56 +02:00
qtextlist Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextobject Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextodfwriter Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextpiecetable Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtextscriptengine Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qtexttable Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qzip Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
text.pro Start running some disabled tests again on Mac OS. 2012-04-23 09:46:22 +02:00