Remove the remaining usages of deprecated APIs of qtbase
This change removes the leftovers form other cleanup commits. Task-number: QTBUG-76491 Change-Id: I61440f87c5a280f9666b78e19aac4d8ac603767e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
parent
a2c18fd10c
commit
d914a5ba4e
@ -105,7 +105,7 @@ public:
|
||||
m_green = new LightWidget(Qt::green);
|
||||
vbox->addWidget(m_green);
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::Background, Qt::black);
|
||||
pal.setColor(QPalette::Window, Qt::black);
|
||||
setPalette(pal);
|
||||
setAutoFillBackground(true);
|
||||
}
|
||||
|
@ -92,7 +92,9 @@ private slots:
|
||||
void priorityStart();
|
||||
void waitForDone();
|
||||
void clear();
|
||||
#if QT_DEPRECATED_SINCE(5, 9)
|
||||
void cancel();
|
||||
#endif
|
||||
void tryTake();
|
||||
void waitForDoneTimeout();
|
||||
void destroyingWaitsForTasksToFinish();
|
||||
@ -963,6 +965,7 @@ void tst_QThreadPool::clear()
|
||||
QCOMPARE(count.loadRelaxed(), threadPool.maxThreadCount());
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 9)
|
||||
void tst_QThreadPool::cancel()
|
||||
{
|
||||
QSemaphore sem(0);
|
||||
@ -1034,6 +1037,7 @@ void tst_QThreadPool::cancel()
|
||||
delete runnables[0]; //if the pool deletes them then we'll get double-free crash
|
||||
delete runnables[runs-1];
|
||||
}
|
||||
#endif
|
||||
|
||||
void tst_QThreadPool::tryTake()
|
||||
{
|
||||
|
@ -207,7 +207,10 @@ void tst_QLine::testIntersection()
|
||||
|
||||
|
||||
QPointF ip;
|
||||
QLineF::IntersectionType itype = a.intersect(b, &ip);
|
||||
QLineF::IntersectionType itype = a.intersects(b, &ip);
|
||||
#if QT_DEPRECATED_SINCE(5, 14)
|
||||
QCOMPARE(a.intersect(b, &ip), itype);
|
||||
#endif
|
||||
|
||||
QCOMPARE(int(itype), type);
|
||||
if (type != QLineF::NoIntersection) {
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
printf("ok\n");
|
||||
break;
|
||||
case UnconnectedClient:
|
||||
peerAddress = host;
|
||||
peerAddress = QHostAddress(host);
|
||||
peerPort = port;
|
||||
if (bind(QHostAddress::Any, port + 1, ShareAddress | ReuseAddressHint)) {
|
||||
startTimer(250);
|
||||
|
@ -302,10 +302,12 @@ void tst_QPrinterInfo::testConstructors()
|
||||
QCOMPARE(copy1.minimumPhysicalPageSize(), printers.at(i).minimumPhysicalPageSize());
|
||||
QCOMPARE(copy1.maximumPhysicalPageSize(), printers.at(i).maximumPhysicalPageSize());
|
||||
QCOMPARE(copy1.supportedPageSizes(), printers.at(i).supportedPageSizes());
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QCOMPARE(copy1.supportedSizesWithNames(), printers.at(i).supportedSizesWithNames());
|
||||
QT_WARNING_POP
|
||||
#endif
|
||||
QCOMPARE(copy1.supportedResolutions(), printers.at(i).supportedResolutions());
|
||||
QCOMPARE(copy1.defaultDuplexMode(), printers.at(i).defaultDuplexMode());
|
||||
QCOMPARE(copy1.supportedDuplexModes(), printers.at(i).supportedDuplexModes());
|
||||
@ -326,10 +328,12 @@ QT_WARNING_POP
|
||||
QCOMPARE(copy2.minimumPhysicalPageSize(), printers.at(i).minimumPhysicalPageSize());
|
||||
QCOMPARE(copy2.maximumPhysicalPageSize(), printers.at(i).maximumPhysicalPageSize());
|
||||
QCOMPARE(copy2.supportedPageSizes(), printers.at(i).supportedPageSizes());
|
||||
#if QT_DEPRECATED_SINCE(5, 3)
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
QCOMPARE(copy2.supportedSizesWithNames(), printers.at(i).supportedSizesWithNames());
|
||||
QT_WARNING_POP
|
||||
#endif
|
||||
QCOMPARE(copy2.supportedResolutions(), printers.at(i).supportedResolutions());
|
||||
QCOMPARE(copy2.defaultDuplexMode(), printers.at(i).defaultDuplexMode());
|
||||
QCOMPARE(copy2.supportedDuplexModes(), printers.at(i).supportedDuplexModes());
|
||||
|
Loading…
x
Reference in New Issue
Block a user