QWidgets tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0.

Fix usage of API that is marked deprecated.

Change-Id: I04970ca7f8e09d3f0fd6adb87da046ae70c3eb38
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-08-24 11:50:33 +02:00
parent 50b9e30970
commit e979ca5eda
6 changed files with 11 additions and 8 deletions

View File

@ -5,4 +5,3 @@ QT += widgets widgets-private testlib
QT += core-private gui-private
SOURCES += tst_qgraphicseffect.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -549,7 +549,7 @@ void tst_QGraphicsEffect::drawPixmapItem()
QVERIFY(QTest::qWaitForWindowExposed(&view));
QTRY_VERIFY(effect->repaints >= 1);
item->rotate(180);
item->setTransform(QTransform().rotate(180), true);
QTRY_VERIFY(effect->repaints >= 2);
}
@ -593,7 +593,7 @@ void tst_QGraphicsEffect::deviceCoordinateTranslateCaching()
QTRY_VERIFY(item->numRepaints >= 1);
int numRepaints = item->numRepaints;
item->translate(10, 0);
item->setTransform(QTransform::fromTranslate(10, 0), true);
QTRY_COMPARE(item->numRepaints, numRepaints);
}

View File

@ -5,4 +5,3 @@ QT += core-private gui-private
TARGET.EPOCHEAPSIZE = 0x200000 0x800000
SOURCES += tst_qtableview.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -415,7 +415,8 @@ public:
void reset()
{
QAbstractTableModel::reset();
beginResetModel();
endResetModel();
}
int row_count;
@ -3606,7 +3607,11 @@ public:
{
return QVariant();
}
void res() { reset(); }
void res()
{
beginResetModel();
endResetModel();
}
int rows;
int columns;

View File

@ -2,4 +2,3 @@ CONFIG += testcase
TARGET = tst_qcombobox
QT += widgets widgets-private gui-private core-private testlib
SOURCES += tst_qcombobox.cpp
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -2687,7 +2687,8 @@ void tst_QComboBox::resetModel()
void reset()
{
QStringListModel::reset();
QStringListModel::beginResetModel();
QStringListModel::endResetModel();
}
};
QComboBox cb;