summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-06 15:13:17 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-06 14:19:38 +0000
commitda2f08af67916ce09daf6dea185a118e0f8bcd6b (patch)
treed90eee7eb9a24e3f380e7259e147f5cf3bb6fa72 /tests
parente0c1663b87126f58613c846b56dc1e69e4e06404 (diff)
downloadqtscript-da2f08af67916ce09daf6dea185a118e0f8bcd6b.tar.gz
Fix some deprecation warningsv5.13.0-alpha1
debugging/qscriptedit.cpp:286:39: warning: ‘int QFontMetrics::width(QChar) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] debugging/qscriptedit.cpp:309:48: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:309:48: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:315:49: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:315:49: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:318:45: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] debugging/qscriptedit.cpp:318:45: warning: ‘Background’ is deprecated: Use QPalette::Window instead [-Wdeprecated-declarations] tst_qscriptvalue.cpp:1270:45: warning: ‘T qVariantValue(const QVariant&) [with T = QObject*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:343:64: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QLineEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:345:75: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QPlainTextEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:354:88: warning: ‘T qFindChild(const QObject*, const QString&) [with T = QPlainTextEdit*]’ is deprecated [-Wdeprecated-declarations] tst_qscriptenginedebugger.cpp:836:33: warning: ignoring return value of ‘bool QTest::qWaitForWindowExposed(QWidget*, int)’, declared with attribute nodiscard [-Wunused-result] context2d.cpp:473:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:486:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:500:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] context2d.cpp:627:46: warning: ‘void QPainter::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations] tetrixboard.cpp:104:76: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] tetrixboard.cpp:130:33: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations] tetrixboard.cpp:134:32: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations] Change-Id: I795c140c476541bba9c653effdcda0a50cbe9acd Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp6
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
index 2161bec..4dc1c66 100644
--- a/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
+++ b/tests/auto/qscriptenginedebugger/tst_qscriptenginedebugger.cpp
@@ -340,9 +340,9 @@ void tst_QScriptEngineDebugger::consoleCommands()
debugger.attachTo(&engine);
QWidget *consoleWidget = debugger.widget(QScriptEngineDebugger::ConsoleWidget);
- QLineEdit *inputEdit = qFindChild<QLineEdit*>(consoleWidget);
+ QLineEdit *inputEdit = consoleWidget->findChild<QLineEdit*>();
QVERIFY(inputEdit != 0);
- QPlainTextEdit *outputEdit = qFindChild<QPlainTextEdit*>(consoleWidget);
+ QPlainTextEdit *outputEdit = consoleWidget->findChild<QPlainTextEdit*>();
QVERIFY(outputEdit != 0);
QVERIFY(outputEdit->toPlainText().startsWith("Welcome to the Qt Script debugger."));
@@ -351,7 +351,7 @@ void tst_QScriptEngineDebugger::consoleCommands()
// print()
{
QWidget *debugOutputWidget = debugger.widget(QScriptEngineDebugger::DebugOutputWidget);
- QPlainTextEdit *debugOutputEdit = qFindChild<QPlainTextEdit*>(debugOutputWidget);
+ QPlainTextEdit *debugOutputEdit = debugOutputWidget->findChild<QPlainTextEdit*>();
QVERIFY(debugOutputEdit != 0);
QVERIFY(debugOutputEdit->toPlainText().isEmpty());
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 47e040e..195fe0c 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -1267,7 +1267,7 @@ void tst_QScriptValue::toVariant()
{
QVariant var = qobject.toVariant();
QCOMPARE(var.userType(), int(QMetaType::QObjectStar));
- QCOMPARE(qVariantValue<QObject*>(var), (QObject *)this);
+ QCOMPARE(qvariant_cast<QObject*>(var), (QObject *)this);
}
{