diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-24 13:35:22 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-31 19:56:59 +0000 |
commit | 50b9e30970effae249010338880f74641f188f76 (patch) | |
tree | 472e644f7b4799a562cdcfea9ed327341925ecad /tests/auto/gui | |
parent | 1ca789bfe3c5617efdec698e4f5377c0611589d2 (diff) |
qtbase tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.
Fix usage of API that is marked deprecated.
Change-Id: Ie31b6ee029c5b5f015fe52fb9bcd8e94b22d6cd0
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/kernel/qkeysequence/qkeysequence.pro | 1 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/painting/qpainter/qpainter.pro | 1 | ||||
-rw-r--r-- | tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 2 | ||||
-rw-r--r-- | tests/auto/gui/text/qfont/qfont.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/text/qfont/tst_qfont.cpp | 4 |
6 files changed, 5 insertions, 10 deletions
diff --git a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro index 7c1e8d52de..82c471e803 100644 --- a/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro +++ b/tests/auto/gui/kernel/qkeysequence/qkeysequence.pro @@ -8,4 +8,3 @@ QT += core-private gui-private SOURCES += tst_qkeysequence.cpp RESOURCES += qkeysequence.qrc -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index 3fcbd0a16f..84680fb7a6 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -250,7 +250,7 @@ void tst_QKeySequence::operatorQString() seq = QKeySequence( modifiers | keycode ); - QCOMPARE( (QString)seq, keystring ); + QCOMPARE( seq.toString(QKeySequence::NativeText), keystring ); } // this verifies that the constructors can handle the same strings in and out @@ -260,7 +260,7 @@ void tst_QKeySequence::symetricConstructors() QFETCH( int, keycode ); QKeySequence seq1( modifiers | keycode ); - QKeySequence seq2( (QString)seq1 ); + QKeySequence seq2( seq1.toString(QKeySequence::NativeText) ); QVERIFY( seq1 == seq2 ); } diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro index e90b516ef2..d0d8b89c94 100644 --- a/tests/auto/gui/painting/qpainter/qpainter.pro +++ b/tests/auto/gui/painting/qpainter/qpainter.pro @@ -9,7 +9,6 @@ SOURCES += tst_qpainter.cpp TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \ task217400.png -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 android: !android-no-sdk { RESOURCES += \ diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index e8d90edd2d..210939c7f0 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -4487,7 +4487,7 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate() TestWidget *widget = new TestWidget(); proxy->setWidget(widget); scene->addItem(proxy); - proxy->rotate(45); + proxy->setTransform(QTransform().rotate(45)); w->resize(scene->sceneRect().size().toSize()); w->show(); diff --git a/tests/auto/gui/text/qfont/qfont.pro b/tests/auto/gui/text/qfont/qfont.pro index ced66c226c..d3088fffd0 100644 --- a/tests/auto/gui/text/qfont/qfont.pro +++ b/tests/auto/gui/text/qfont/qfont.pro @@ -5,6 +5,3 @@ QT += testlib QT += core-private gui-private qtHaveModule(widgets): QT += widgets SOURCES += tst_qfont.cpp - - -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 462e5115b4..1e0c3d0a75 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -504,7 +504,7 @@ void tst_QFont::isCopyOf() void tst_QFont::insertAndRemoveSubstitutions() { - QFont::removeSubstitution("BogusFontFamily"); + QFont::removeSubstitutions("BogusFontFamily"); // make sure it is empty before we start QVERIFY(QFont::substitutes("BogusFontFamily").isEmpty()); QVERIFY(QFont::substitutes("bogusfontfamily").isEmpty()); @@ -521,7 +521,7 @@ void tst_QFont::insertAndRemoveSubstitutions() QCOMPARE(QFont::substitutes("BogusFontFamily").count(), 3); QCOMPARE(QFont::substitutes("bogusfontfamily").count(), 3); - QFont::removeSubstitution("BogusFontFamily"); + QFont::removeSubstitutions("BogusFontFamily"); // make sure it is empty again QVERIFY(QFont::substitutes("BogusFontFamily").isEmpty()); QVERIFY(QFont::substitutes("bogusfontfamily").isEmpty()); |