Wrap all Latin 1 strings with QString::fromLatin1 or QLatin1Strings
Change-Id: I1a1891b9126a2546c1872ec25aba9581cc84bb2f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>bb10
parent
ac7afd5ea7
commit
4a6d3fcab6
|
|
@ -528,8 +528,10 @@ void tst_QTextCodec::utf8Codec_data()
|
|||
|
||||
QTest::newRow("str0") << QByteArray("abcdefgh") << QString("abcdefgh") << -1;
|
||||
QTest::newRow("str0-len") << QByteArray("abcdefgh") << QString("abc") << 3;
|
||||
QTest::newRow("str1") << QByteArray("\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205") << QString("\366\344\374\326\304\334\370\346\345\330\306\305") << -1;
|
||||
QTest::newRow("str1-len") << QByteArray("\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205") << QString("\366\344\374\326\304") << 10;
|
||||
QTest::newRow("str1") << QByteArray("\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205")
|
||||
<< QString::fromLatin1("\366\344\374\326\304\334\370\346\345\330\306\305") << -1;
|
||||
QTest::newRow("str1-len") << QByteArray("\303\266\303\244\303\274\303\226\303\204\303\234\303\270\303\246\303\245\303\230\303\206\303\205")
|
||||
<< QString::fromLatin1("\366\344\374\326\304") << 10;
|
||||
|
||||
str += QChar(0x05e9);
|
||||
str += QChar(0x05d3);
|
||||
|
|
@ -1565,7 +1567,7 @@ void tst_QTextCodec::utf8bom_data()
|
|||
|
||||
QTest::newRow("nobom")
|
||||
<< QByteArray("\302\240", 2)
|
||||
<< QString("\240");
|
||||
<< QString::fromLatin1("\240");
|
||||
|
||||
{
|
||||
static const ushort data[] = { 0x201d };
|
||||
|
|
|
|||
|
|
@ -419,28 +419,28 @@ void tst_QTextStream::generateLineData(bool for_QString)
|
|||
// one line
|
||||
QTest::newRow("utf16-BE/nothing")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65", 8) << (QStringList() << "\345ge");
|
||||
"\x00\xe5\x00\x67\x00\x65", 8) << (QStringList() << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf16-LE/nothing")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00", 8) << (QStringList() << "\345ge");
|
||||
"\xe5\x00\x67\x00\x65\x00", 8) << (QStringList() << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf16-BE/lf")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 10) << (QStringList() << "\345ge");
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 10) << (QStringList() << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf16-LE/lf")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 10) << (QStringList() << "\345ge");
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 10) << (QStringList() << QLatin1String("\345ge"));
|
||||
|
||||
// two lines
|
||||
QTest::newRow("utf16-BE/twolines")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 18)
|
||||
<< (QStringList() << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf16-LE/twolines")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 18)
|
||||
<< (QStringList() << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
|
||||
// three lines
|
||||
QTest::newRow("utf16-BE/threelines")
|
||||
|
|
@ -448,32 +448,32 @@ void tst_QTextStream::generateLineData(bool for_QString)
|
|||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 26)
|
||||
<< (QStringList() << "\345ge" << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf16-LE/threelines")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 26)
|
||||
<< (QStringList() << "\345ge" << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
|
||||
// utf-32
|
||||
QTest::newRow("utf32-BE/twolines")
|
||||
<< QByteArray("\x00\x00\xfe\xff"
|
||||
"\x00\x00\x00\xe5\x00\x00\x00\x67\x00\x00\x00\x65\x00\x00\x00\x0a"
|
||||
"\x00\x00\x00\xe5\x00\x00\x00\x67\x00\x00\x00\x65\x00\x00\x00\x0a", 36)
|
||||
<< (QStringList() << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
QTest::newRow("utf32-LE/twolines")
|
||||
<< QByteArray("\xff\xfe\x00\x00"
|
||||
"\xe5\x00\x00\x00\x67\x00\x00\x00\x65\x00\x00\x00\x0a\x00\x00\x00"
|
||||
"\xe5\x00\x00\x00\x67\x00\x00\x00\x65\x00\x00\x00\x0a\x00\x00\x00", 36)
|
||||
<< (QStringList() << "\345ge" << "\345ge");
|
||||
<< (QStringList() << QLatin1String("\345ge") << QLatin1String("\345ge"));
|
||||
}
|
||||
|
||||
// partials
|
||||
QTest::newRow("cr") << QByteArray("\r") << (QStringList() << "");
|
||||
QTest::newRow("oneline/cr") << QByteArray("ole\r") << (QStringList() << "ole");
|
||||
if (!for_QString)
|
||||
QTest::newRow("utf16-BE/cr") << QByteArray("\xfe\xff\x00\xe5\x00\x67\x00\x65\x00\x0d", 10) << (QStringList() << "\345ge");
|
||||
QTest::newRow("utf16-BE/cr") << QByteArray("\xfe\xff\x00\xe5\x00\x67\x00\x65\x00\x0d", 10) << (QStringList() << QLatin1String("\345ge"));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
|
@ -702,34 +702,34 @@ void tst_QTextStream::generateAllData(bool for_QString)
|
|||
// one line
|
||||
QTest::newRow("utf16-BE/nothing")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65", 8) << QString("\345ge");
|
||||
"\x00\xe5\x00\x67\x00\x65", 8) << QString::fromLatin1("\345ge");
|
||||
QTest::newRow("utf16-LE/nothing")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00", 8) << QString("\345ge");
|
||||
"\xe5\x00\x67\x00\x65\x00", 8) << QString::fromLatin1("\345ge");
|
||||
QTest::newRow("utf16-BE/lf")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 10) << QString("\345ge\n");
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 10) << QString::fromLatin1("\345ge\n");
|
||||
QTest::newRow("utf16-LE/lf")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 10) << QString("\345ge\n");
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 10) << QString::fromLatin1("\345ge\n");
|
||||
QTest::newRow("utf16-BE/crlf")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0d\x00\x0a", 12) << QString("\345ge\r\n");
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0d\x00\x0a", 12) << QString::fromLatin1("\345ge\r\n");
|
||||
QTest::newRow("utf16-LE/crlf")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0d\x00\x0a\x00", 12) << QString("\345ge\r\n");
|
||||
"\xe5\x00\x67\x00\x65\x00\x0d\x00\x0a\x00", 12) << QString::fromLatin1("\345ge\r\n");
|
||||
|
||||
// two lines
|
||||
QTest::newRow("utf16-BE/twolines")
|
||||
<< QByteArray("\xfe\xff"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 18)
|
||||
<< QString("\345ge\n\345ge\n");
|
||||
<< QString::fromLatin1("\345ge\n\345ge\n");
|
||||
QTest::newRow("utf16-LE/twolines")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 18)
|
||||
<< QString("\345ge\n\345ge\n");
|
||||
<< QString::fromLatin1("\345ge\n\345ge\n");
|
||||
|
||||
// three lines
|
||||
QTest::newRow("utf16-BE/threelines")
|
||||
|
|
@ -737,13 +737,13 @@ void tst_QTextStream::generateAllData(bool for_QString)
|
|||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a"
|
||||
"\x00\xe5\x00\x67\x00\x65\x00\x0a", 26)
|
||||
<< QString("\345ge\n\345ge\n\345ge\n");
|
||||
<< QString::fromLatin1("\345ge\n\345ge\n\345ge\n");
|
||||
QTest::newRow("utf16-LE/threelines")
|
||||
<< QByteArray("\xff\xfe"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00"
|
||||
"\xe5\x00\x67\x00\x65\x00\x0a\x00", 26)
|
||||
<< QString("\345ge\n\345ge\n\345ge\n");
|
||||
<< QString::fromLatin1("\345ge\n\345ge\n\345ge\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2042,9 +2042,9 @@ void tst_QTextStream::generateStringData(bool for_QString)
|
|||
|
||||
if (!for_QString) {
|
||||
QTest::newRow("utf16-BE (empty)") << QByteArray("\xff\xfe", 2) << QByteArray() << QString();
|
||||
QTest::newRow("utf16-BE (corrupt)") << QByteArray("\xff", 1) << QByteArray("\xff") << QString("\xff");
|
||||
QTest::newRow("utf16-BE (corrupt)") << QByteArray("\xff", 1) << QByteArray("\xff") << QString::fromLatin1("\xff");
|
||||
QTest::newRow("utf16-LE (empty)") << QByteArray("\xfe\xff", 2) << QByteArray() << QString();
|
||||
QTest::newRow("utf16-LE (corrupt)") << QByteArray("\xfe", 1) << QByteArray("\xfe") << QString("\xfe");
|
||||
QTest::newRow("utf16-LE (corrupt)") << QByteArray("\xfe", 1) << QByteArray("\xfe") << QString::fromLatin1("\xfe");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3419,7 +3419,7 @@ void tst_QVariant::moreCustomTypes()
|
|||
PLAY_WITH_VARIANT( qint32(17), false, "17", 17, true);
|
||||
PLAY_WITH_VARIANT(quint64(18), false, "18", 18, true);
|
||||
PLAY_WITH_VARIANT( qint64(19), false, "19", 19, true);
|
||||
PLAY_WITH_VARIANT( qint8(-12), false, "\xf4", -12, true);
|
||||
PLAY_WITH_VARIANT( qint8(-12), false, QLatin1String("\xf4"), -12, true); // qint8 is char, so it gets converted via QChar
|
||||
PLAY_WITH_VARIANT( qint16(-13), false, "-13", -13, true);
|
||||
PLAY_WITH_VARIANT( qint32(-14), false, "-14", -14, true);
|
||||
PLAY_WITH_VARIANT( qint64(-15), false, "-15", -15, true);
|
||||
|
|
|
|||
|
|
@ -197,26 +197,26 @@ void tst_QKeySequence::operatorQString_data()
|
|||
QTest::addColumn<int>("keycode");
|
||||
QTest::addColumn<QString>("keystring");
|
||||
|
||||
QTest::newRow( "No modifier" ) << 0 << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "\x0c5" );
|
||||
QTest::newRow( "No modifier" ) << 0 << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString::fromLatin1( "\x0c5" );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
QTest::newRow( "Ctrl+Left" ) << int(Qt::CTRL) << int(Qt::Key_Left) << QString( "Ctrl+Left" );
|
||||
QTest::newRow( "Ctrl+," ) << int(Qt::CTRL) << int(Qt::Key_Comma) << QString( "Ctrl+," );
|
||||
QTest::newRow( "Alt+Left" ) << int(Qt::ALT) << int(Qt::Key_Left) << QString( "Alt+Left" );
|
||||
QTest::newRow( "Alt+Shift+Left" ) << int(Qt::ALT | Qt::SHIFT) << int(Qt::Key_Left) << QString( "Alt+Shift+Left" );
|
||||
QTest::newRow( "Ctrl" ) << int(Qt::CTRL) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "Ctrl+\x0c5" );
|
||||
QTest::newRow( "Alt" ) << int(Qt::ALT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "Alt+\x0c5" );
|
||||
QTest::newRow( "Shift" ) << int(Qt::SHIFT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "Shift+\x0c5" );
|
||||
QTest::newRow( "Meta" ) << int(Qt::META) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString( "Meta+\x0c5" );
|
||||
QTest::newRow( "Ctrl" ) << int(Qt::CTRL) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString::fromLatin1( "Ctrl+\x0c5" );
|
||||
QTest::newRow( "Alt" ) << int(Qt::ALT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString::fromLatin1( "Alt+\x0c5" );
|
||||
QTest::newRow( "Shift" ) << int(Qt::SHIFT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString::fromLatin1( "Shift+\x0c5" );
|
||||
QTest::newRow( "Meta" ) << int(Qt::META) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << QString::fromLatin1( "Meta+\x0c5" );
|
||||
#else
|
||||
QTest::newRow( "Ctrl+Left" ) << int(Qt::CTRL) << int(Qt::Key_Left) << MacCtrl + macSymbolForQtKey(Qt::Key_Left);
|
||||
QTest::newRow( "Ctrl+," ) << int(Qt::CTRL) << int(Qt::Key_Comma) << MacCtrl + ",";
|
||||
QTest::newRow( "Alt+Left" ) << int(Qt::ALT) << int(Qt::Key_Left) << MacAlt + macSymbolForQtKey(Qt::Key_Left);
|
||||
QTest::newRow( "Alt+Shift+Left" ) << int(Qt::ALT | Qt::SHIFT) << int(Qt::Key_Left) << MacAlt + MacShift + macSymbolForQtKey(Qt::Key_Left);
|
||||
QTest::newRow( "Ctrl" ) << int(Qt::CTRL) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacCtrl + "\x0c5";
|
||||
QTest::newRow( "Alt" ) << int(Qt::ALT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacAlt + "\x0c5";
|
||||
QTest::newRow( "Shift" ) << int(Qt::SHIFT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacShift + "\x0c5";
|
||||
QTest::newRow( "Meta" ) << int(Qt::META) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacMeta + "\x0c5";
|
||||
QTest::newRow( "Ctrl" ) << int(Qt::CTRL) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacCtrl + QLatin1String("\x0c5");
|
||||
QTest::newRow( "Alt" ) << int(Qt::ALT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacAlt + QLatin1String("\x0c5");
|
||||
QTest::newRow( "Shift" ) << int(Qt::SHIFT) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacShift + QLatin1String("\x0c5");
|
||||
QTest::newRow( "Meta" ) << int(Qt::META) << int(Qt::Key_Aring | Qt::UNICODE_ACCEL) << MacMeta + QLatin1String("\x0c5");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -448,10 +448,10 @@ void tst_QKeySequence::toString_data()
|
|||
QTest::newRow("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left") << QString("Ctrl+Left");
|
||||
QTest::newRow("Alt+Left") << QString("Alt+Left") << QString("Alt+Left") << QString("Alt+Left");
|
||||
QTest::newRow("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left") << QString("Alt+Shift+Left");
|
||||
QTest::newRow("Ctrl") << QString("Ctrl+\x0c5") << QString("Ctrl+\x0c5") << QString("Ctrl+\x0c5");
|
||||
QTest::newRow("Alt") << QString("Alt+\x0c5") << QString("Alt+\x0c5") << QString("Alt+\x0c5");
|
||||
QTest::newRow("Shift") << QString("Shift+\x0c5") << QString("Shift+\x0c5") << QString("Shift+\x0c5");
|
||||
QTest::newRow("Meta") << QString("Meta+\x0c5") << QString("Meta+\x0c5") << QString("Meta+\x0c5");
|
||||
QTest::newRow("Ctrl") << QString::fromLatin1("Ctrl+\x0c5") << QString::fromLatin1("Ctrl+\x0c5") << QString::fromLatin1("Ctrl+\x0c5");
|
||||
QTest::newRow("Alt") << QString::fromLatin1("Alt+\x0c5") << QString::fromLatin1("Alt+\x0c5") << QString::fromLatin1("Alt+\x0c5");
|
||||
QTest::newRow("Shift") << QString::fromLatin1("Shift+\x0c5") << QString::fromLatin1("Shift+\x0c5") << QString::fromLatin1("Shift+\x0c5");
|
||||
QTest::newRow("Meta") << QString::fromLatin1("Meta+\x0c5") << QString::fromLatin1("Meta+\x0c5") << QString::fromLatin1("Meta+\x0c5");
|
||||
QTest::newRow("Ctrl+Plus") << QString("Ctrl++") << QString("Ctrl++") << QString("Ctrl++");
|
||||
QTest::newRow("Ctrl+,") << QString("Ctrl+,") << QString("Ctrl+,") << QString("Ctrl+,");
|
||||
QTest::newRow("Ctrl+,,Ctrl+,") << QString("Ctrl+,,Ctrl+,") << QString("Ctrl+,, Ctrl+,") << QString("Ctrl+,, Ctrl+,");
|
||||
|
|
@ -467,10 +467,10 @@ void tst_QKeySequence::toString_data()
|
|||
<< MacAlt + MacShift + macSymbolForQtKey(Qt::Key_Left);
|
||||
*/
|
||||
QTest::newRow("Ctrl+Right,Left") << MacCtrl + "Right, Left" << QString("Ctrl+Right, Left") << MacCtrl + macSymbolForQtKey(Qt::Key_Right) + QString(", ") + macSymbolForQtKey(Qt::Key_Left);
|
||||
QTest::newRow("Ctrl") << MacCtrl + "\x0c5" << QString("Ctrl+\x0c5") << MacCtrl + "\x0c5";
|
||||
QTest::newRow("Alt") << MacAlt + "\x0c5" << QString("Alt+\x0c5") << MacAlt + "\x0c5";
|
||||
QTest::newRow("Shift") << MacShift + "\x0c5" << QString("Shift+\x0c5") << MacShift + "\x0c5";
|
||||
QTest::newRow("Meta") << MacMeta + "\x0c5" << QString("Meta+\x0c5") << MacMeta + "\x0c5";
|
||||
QTest::newRow("Ctrl") << MacCtrl + QLatin1String("\x0c5") << QString::fromLatin1("Ctrl+\x0c5") << MacCtrl + QLatin1String("\x0c5");
|
||||
QTest::newRow("Alt") << MacAlt + QLatin1String("\x0c5") << QString::fromLatin1("Alt+\x0c5") << MacAlt + QLatin1String("\x0c5");
|
||||
QTest::newRow("Shift") << MacShift + QLatin1String("\x0c5") << QString::fromLatin1("Shift+\x0c5") << MacShift + QLatin1String("\x0c5");
|
||||
QTest::newRow("Meta") << MacMeta + QLatin1String("\x0c5") << QString::fromLatin1("Meta+\x0c5") << MacMeta + QLatin1String("\x0c5");
|
||||
QTest::newRow("Ctrl+Plus") << MacCtrl + "+" << QString("Ctrl++") << MacCtrl + "+";
|
||||
QTest::newRow("Ctrl+,") << MacCtrl + "," << QString("Ctrl+,") << MacCtrl + ",";
|
||||
QTest::newRow("Ctrl+,,Ctrl+,") << MacCtrl + ",, " + MacCtrl + "," << QString("Ctrl+,, Ctrl+,") << MacCtrl + ",, " + MacCtrl + ",";
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ void tst_QFontMetrics::bypassShaping()
|
|||
|
||||
template<class FontMetrics> void elidedMultiLength_helper()
|
||||
{
|
||||
QString text1 = "Long Text 1\x9cShorter\x9csmall";
|
||||
QString text1 = QLatin1String("Long Text 1\x9cShorter\x9csmall");
|
||||
QString text1_long = "Long Text 1";
|
||||
QString text1_short = "Shorter";
|
||||
QString text1_small = "small";
|
||||
|
|
|
|||
|
|
@ -580,8 +580,8 @@ void tst_QShortcut::text_data()
|
|||
Qt::UNICODE_ACCEL + Qt::Key_K
|
||||
*/
|
||||
/* see comments above on the #ifdef'ery */
|
||||
QTest::newRow("T06 - slot1") << SetupAccel << TriggerSlot1 << QString("\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||
QTest::newRow("T07 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift+\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||
QTest::newRow("T06 - slot1") << SetupAccel << TriggerSlot1 << QString::fromLatin1("\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||
QTest::newRow("T07 - slot2") << SetupAccel << TriggerSlot2 << QString::fromLatin1("Shift+\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||
QTest::newRow("T08 - slot2") << SetupAccel << TriggerSlot1 << QString("K") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
|
||||
QTest::newRow("T:Qt::Key_aring") << TestAccel << NoWidget << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
|
||||
QTest::newRow("T:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
|
||||
|
|
|
|||
Loading…
Reference in New Issue