summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-24 13:35:22 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-31 19:56:59 +0000
commit50b9e30970effae249010338880f74641f188f76 (patch)
tree472e644f7b4799a562cdcfea9ed327341925ecad /tests/auto
parent1ca789bfe3c5617efdec698e4f5377c0611589d2 (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')
-rw-r--r--tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp2
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro1
-rw-r--r--tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp7
-rw-r--r--tests/auto/gui/kernel/qkeysequence/qkeysequence.pro1
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp4
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro1
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp2
-rw-r--r--tests/auto/gui/text/qfont/qfont.pro3
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp4
-rw-r--r--tests/auto/other/languagechange/languagechange.pro1
-rw-r--r--tests/auto/other/languagechange/tst_languagechange.cpp2
-rw-r--r--tests/auto/other/modeltest/dynamictreemodel.cpp3
-rw-r--r--tests/auto/other/modeltest/modeltest.pro4
-rw-r--r--tests/auto/other/qaccessibility/qaccessibility.pro1
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp6
17 files changed, 17 insertions, 27 deletions
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
index f57b419ae5..6de1ffaca2 100644
--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/qidentityproxymodel.pro
@@ -7,4 +7,3 @@ INCLUDEPATH += $$PWD/$${mtdir}
QT += testlib
SOURCES += tst_qidentityproxymodel.cpp $${mtdir}/dynamictreemodel.cpp $${mtdir}/modeltest.cpp
HEADERS += $${mtdir}/dynamictreemodel.h $${mtdir}/modeltest.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
index 1b6279ba1b..5a543c23be 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/qitemselectionmodel.pro
@@ -3,4 +3,3 @@ CONFIG += parallel_test
TARGET = tst_qitemselectionmodel
QT += testlib
SOURCES += tst_qitemselectionmodel.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
index 3a0c8b83dd..9d1e1c9657 100644
--- a/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
+++ b/tests/auto/corelib/itemmodels/qitemselectionmodel/tst_qitemselectionmodel.cpp
@@ -1512,7 +1512,7 @@ class MyStandardItemModel: public QStandardItemModel
Q_OBJECT
public:
inline MyStandardItemModel(int i1, int i2): QStandardItemModel(i1, i2) {}
- inline void reset() { QStandardItemModel::reset(); }
+ inline void reset() { beginResetModel(); endResetModel(); }
};
void tst_QItemSelectionModel::resetModel()
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
index 25947990a7..df8302529f 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/qsortfilterproxymodel.pro
@@ -8,4 +8,3 @@ mtdir = ../../../other/modeltest
INCLUDEPATH += $$PWD/$${mtdir}
SOURCES += tst_qsortfilterproxymodel.cpp $${mtdir}/dynamictreemodel.cpp $${mtdir}/modeltest.cpp
HEADERS += $${mtdir}/dynamictreemodel.h $${mtdir}/modeltest.h
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
index bf8276614a..c37d8cd468 100644
--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
+++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
@@ -2581,7 +2581,7 @@ void tst_QSortFilterProxyModel::hiddenColumns()
public:
MyStandardItemModel() : QStandardItemModel(0,5) {}
void reset()
- { QStandardItemModel::reset(); }
+ { beginResetModel(); endResetModel(); }
friend class tst_QSortFilterProxyModel;
} model;
QSortFilterProxyModel proxy;
@@ -3377,7 +3377,10 @@ void tst_QSortFilterProxyModel::resetInvalidate()
{
switch (test) {
case 0: break;
- case 1: reset(); break;
+ case 1:
+ beginResetModel();
+ endResetModel();
+ break;
case 2: invalidate(); break;
case 3: invalidateFilter(); break;
}
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());
diff --git a/tests/auto/other/languagechange/languagechange.pro b/tests/auto/other/languagechange/languagechange.pro
index 0b9c04d2ed..25dbcc19be 100644
--- a/tests/auto/other/languagechange/languagechange.pro
+++ b/tests/auto/other/languagechange/languagechange.pro
@@ -4,4 +4,3 @@ win32:testcase.timeout = 1800 # test runtime varies greatly on Windows, QTBUG-
TARGET = tst_languagechange
QT += widgets core-private gui-private testlib
SOURCES += tst_languagechange.cpp
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/languagechange/tst_languagechange.cpp b/tests/auto/other/languagechange/tst_languagechange.cpp
index 788993ef35..7658aaa8e0 100644
--- a/tests/auto/other/languagechange/tst_languagechange.cpp
+++ b/tests/auto/other/languagechange/tst_languagechange.cpp
@@ -253,7 +253,7 @@ void tst_languageChange::retranslatability()
switch (dialogType) {
case InputDialog:
stateMachine.start();
- QInputDialog::getInteger(0, QLatin1String("title"), QLatin1String("label"));
+ QInputDialog::getInt(0, QLatin1String("title"), QLatin1String("label"));
break;
case ColorDialog:
diff --git a/tests/auto/other/modeltest/dynamictreemodel.cpp b/tests/auto/other/modeltest/dynamictreemodel.cpp
index c7cf04231f..bdf2b604fd 100644
--- a/tests/auto/other/modeltest/dynamictreemodel.cpp
+++ b/tests/auto/other/modeltest/dynamictreemodel.cpp
@@ -299,7 +299,8 @@ bool ModelResetCommand::emitPreSignal(const QModelIndex &srcParent, int srcStart
void ModelResetCommand::emitPostSignal()
{
- m_model->reset();
+ m_model->beginResetModel();
+ m_model->endResetModel();
}
ModelResetCommandFixed::ModelResetCommandFixed(DynamicTreeModel* model, QObject* parent)
diff --git a/tests/auto/other/modeltest/modeltest.pro b/tests/auto/other/modeltest/modeltest.pro
index 045299e095..8e96058449 100644
--- a/tests/auto/other/modeltest/modeltest.pro
+++ b/tests/auto/other/modeltest/modeltest.pro
@@ -3,7 +3,3 @@ TARGET = tst_modeltest
QT += widgets testlib
SOURCES += tst_modeltest.cpp modeltest.cpp dynamictreemodel.cpp
HEADERS += modeltest.h dynamictreemodel.h
-
-
-
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/qaccessibility/qaccessibility.pro b/tests/auto/other/qaccessibility/qaccessibility.pro
index 1d6fc6bcd1..ef3b469ba1 100644
--- a/tests/auto/other/qaccessibility/qaccessibility.pro
+++ b/tests/auto/other/qaccessibility/qaccessibility.pro
@@ -21,4 +21,3 @@ win32 {
LIBS += -luuid
!winphone: LIBS += -loleacc -loleaut32 -lole32
}
-DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index 69007bd250..a4da17e9b7 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -1763,7 +1763,7 @@ void tst_QAccessibility::textEditTest()
}
edit.show();
- QTest::qWaitForWindowShown(&edit);
+ QTest::qWaitForWindowExposed(&edit);
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&edit);
QCOMPARE(iface->text(QAccessible::Value), edit.toPlainText());
QVERIFY(iface->state().focusable);
@@ -2175,7 +2175,7 @@ void tst_QAccessibility::lineEditTest()
QLineEdit le(QStringLiteral("My characters have geometries."), toplevel);
// characterRect()
le.show();
- QTest::qWaitForWindowShown(&le);
+ QTest::qWaitForWindowExposed(&le);
QAccessibleInterface *iface(QAccessible::queryAccessibleInterface(&le));
QAccessibleTextInterface* textIface = iface->textInterface();
QVERIFY(textIface);
@@ -3576,7 +3576,7 @@ void tst_QAccessibility::comboBoxTest()
// Fully decorated windows have a minimum width of 160 on Windows.
combo.setMinimumWidth(200);
combo.show();
- QVERIFY(QTest::qWaitForWindowShown(&combo));
+ QVERIFY(QTest::qWaitForWindowExposed(&combo));
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(&combo);
QCOMPARE(verifyHierarchy(iface), 0);