changed debian/source/format to native

This commit is contained in:
openKylinBot 2022-05-14 17:42:42 +08:00
parent 0d4b7be309
commit e5cb78daf3
12 changed files with 1 additions and 790 deletions

View File

@ -1,77 +0,0 @@
From: =?utf-8?q?Sandro_Knau=C3=9F?= <bugs@sandroknauss.de>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: Disable all tests that fails with xvfb
So far some tests need real OpenGL support
Origin: Debian
Forwarded: not-needed - it is a limitation so far inside Debian
Last-Update: 2019-03-14
---
tests/auto/auto.pro | 1 -
tests/auto/qml/debugger/debugger.pro | 1 -
tests/auto/qml/qml.pro | 5 -----
tests/auto/quick/quick.pro | 4 +---
4 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 1e80f1b..591fe27 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -11,7 +11,6 @@ SUBDIRS=\
qtHaveModule(gui):qtConfig(opengl(es1|es2)?) {
SUBDIRS += particles
- qtHaveModule(widgets): SUBDIRS += quickwidgets
}
diff --git a/tests/auto/qml/debugger/debugger.pro b/tests/auto/qml/debugger/debugger.pro
index 890e722..292faab 100644
--- a/tests/auto/qml/debugger/debugger.pro
+++ b/tests/auto/qml/debugger/debugger.pro
@@ -8,7 +8,6 @@ PUBLICTESTS += \
qqmlenginedebugservice \
qqmldebugjs \
qqmlinspector \
- qqmlprofilerservice \
qpacketprotocol \
qqmlenginedebuginspectorintegrationtest \
qqmlenginecontrol \
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index 621e8bb..8cacaac 100644
--- a/tests/auto/qml/qml.pro
+++ b/tests/auto/qml/qml.pro
@@ -25,7 +25,6 @@ PUBLICTESTS += \
qqmlmoduleplugin \
qqmlnotifier \
qqmlqt \
- qqmlxmlhttprequest \
qqmlpromise \
qtqmlmodules \
qquickfolderlistmodel \
@@ -95,10 +94,6 @@ qtConfig(process) {
}
}
-qtConfig(library) {
- SUBDIRS += qqmlextensionplugin
-}
-
qtConfig(private_tests): \
SUBDIRS += $$PRIVATETESTS
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index 45bcf8a..ab2bcc2 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -6,9 +6,7 @@ PUBLICTESTS += \
qtConfig(opengl(es1|es2)?) {
PUBLICTESTS += \
- drawingmodes \
- rendernode
- qtHaveModule(widgets): PUBLICTESTS += nodes
+ drawingmodes
QUICKTESTS += \
qquickanimatedsprite \

View File

@ -1,112 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: fix sweep step for tainted QObject JavaScript wrappers
Currently, whenever the garbage collector runs, it will destroy all
valid tainted wrappers.
Only null or undefined wrappers will be preserved in the
m_multiplyWrappedQObjects map.
It seems like "!" was overlooked in
3b5d37ce3841c4bfdf1c629d33f0e33b881b47fb. Prior to that change, it
was "!it.value()->markBit()", so calling erase() in the then branch
did make sense. But with "!it.value().isNullOrUndefined()", erase()
will be called for every valid wrapper, which is the opposite what we
want.
Origin: upstream, https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e6b2f88d892dcf39
Last-Update: 2022-02-13
---
src/qml/memory/qv4mm.cpp | 2 +-
tests/auto/qml/qjsengine/tst_qjsengine.cpp | 39 ++++++++++++++++++++++++++++++
tests/auto/qml/qv4mm/tst_qv4mm.cpp | 6 ++---
3 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index 06caf04..da149a6 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -981,7 +981,7 @@ void MemoryManager::sweep(bool lastSweep, ClassDestroyStatsCallback classCountPt
if (MultiplyWrappedQObjectMap *multiplyWrappedQObjects = engine->m_multiplyWrappedQObjects) {
for (MultiplyWrappedQObjectMap::Iterator it = multiplyWrappedQObjects->begin(); it != multiplyWrappedQObjects->end();) {
- if (!it.value().isNullOrUndefined())
+ if (it.value().isNullOrUndefined())
it = multiplyWrappedQObjects->erase(it);
else
++it;
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 3b7d74d..b75bf82 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -102,6 +102,7 @@ private slots:
void valueConversion_RegularExpression();
void castWithMultipleInheritance();
void collectGarbage();
+ void collectGarbageNestedWrappersTwoEngines();
void gcWithNestedDataStructure();
void stacktrace();
void numberParsing_data();
@@ -1809,6 +1810,44 @@ void tst_QJSEngine::collectGarbage()
QVERIFY(ptr.isNull());
}
+class TestObjectContainer : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QObject *dummy MEMBER m_dummy CONSTANT)
+
+public:
+ TestObjectContainer() : m_dummy(new QObject(this)) {}
+
+private:
+ QObject *m_dummy;
+};
+
+void tst_QJSEngine::collectGarbageNestedWrappersTwoEngines()
+{
+ QJSEngine engine1;
+ QJSEngine engine2;
+
+ TestObjectContainer container;
+ QQmlEngine::setObjectOwnership(&container, QQmlEngine::CppOwnership);
+
+ engine1.globalObject().setProperty("foobar", engine1.newQObject(&container));
+ engine2.globalObject().setProperty("foobar", engine2.newQObject(&container));
+
+ engine1.evaluate("foobar.dummy.baz = 42");
+ engine2.evaluate("foobar.dummy.baz = 43");
+
+ QCOMPARE(engine1.evaluate("foobar.dummy.baz").toInt(), 42);
+ QCOMPARE(engine2.evaluate("foobar.dummy.baz").toInt(), 43);
+
+ engine1.collectGarbage();
+ engine2.collectGarbage();
+
+ // The GC should not collect dummy object wrappers neither in engine1 nor engine2, we
+ // verify that by checking whether the baz property still has its previous value.
+ QCOMPARE(engine1.evaluate("foobar.dummy.baz").toInt(), 42);
+ QCOMPARE(engine2.evaluate("foobar.dummy.baz").toInt(), 43);
+}
+
void tst_QJSEngine::gcWithNestedDataStructure()
{
// The GC must be able to traverse deeply nested objects, otherwise this
diff --git a/tests/auto/qml/qv4mm/tst_qv4mm.cpp b/tests/auto/qml/qv4mm/tst_qv4mm.cpp
index 5d635aa..824fd89 100644
--- a/tests/auto/qml/qv4mm/tst_qv4mm.cpp
+++ b/tests/auto/qml/qv4mm/tst_qv4mm.cpp
@@ -76,10 +76,10 @@ void tst_qv4mm::multiWrappedQObjects()
QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 1);
QCOMPARE(engine2.memoryManager->m_pendingFreedObjectWrapperValue.size(), 0);
- // Moves the additional WeakValue from m_multiplyWrappedQObjects to
- // m_pendingFreedObjectWrapperValue. It's still alive after all.
+ // The additional WeakValue from m_multiplyWrappedQObjects hasn't been moved
+ // to m_pendingFreedObjectWrapperValue yet. It's still alive after all.
engine1.memoryManager->runGC();
- QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 2);
+ QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 1);
// engine2 doesn't own the object as engine1 was the first to wrap it above.
// Therefore, no effect here.

View File

@ -1,319 +0,0 @@
From: =?utf-8?q?Sandro_Knau=C3=9F?= <bugs@sandroknauss.de>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: Make sure that tests run with just compiled versions of tools
Origin: Debian
Last-Update: 2020-09-08
---
.qmake.conf | 3 +++
.../qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp | 2 +-
.../qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp | 3 +--
tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp | 7 +++----
tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp | 6 ++----
.../tst_qqmldebugtranslationservice.cpp | 2 +-
.../auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp | 2 +-
.../tst_qqmlenginedebuginspectorintegration.cpp | 2 +-
tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp | 2 +-
tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp | 2 +-
.../qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp | 3 +--
tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 2 +-
tests/auto/qml/qmlformat/tst_qmlformat.cpp | 2 +-
tests/auto/qml/qmllint/tst_qmllint.cpp | 4 ++--
tests/auto/qml/qmlmin/tst_qmlmin.cpp | 2 +-
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp | 2 +-
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 +-
tests/auto/qml/qv4assembler/tst_qv4assembler.cpp | 2 +-
tests/auto/quick/examples/tst_examples.cpp | 4 ++--
19 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/.qmake.conf b/.qmake.conf
index 4e82106..11c9b29 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,6 +1,9 @@
load(qt_build_config)
CONFIG += warning_clean
+QMAKE_CXXFLAGS += -DTESTBINDIR=\\\"$$PWD/bin\\\"
+QMAKE_CXXFLAGS += -DTESTEXAMPLEDIR=\\\"$$PWD/examples\\\"
+
DEFINES += QT_NO_LINKED_LIST
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
diff --git a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
index ec7ee15..73fec02 100644
--- a/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
+++ b/tests/auto/qml/debugger/qdebugmessageservice/tst_qdebugmessageservice.cpp
@@ -135,7 +135,7 @@ QList<QQmlDebugClient *> tst_QDebugMessageService::createClients()
void tst_QDebugMessageService::retrieveDebugOutput()
{
- QCOMPARE(QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+ QCOMPARE(QQmlDebugTest::connectTo(TESTBINDIR "/qml",
QString(), testFile(QMLFILE), true), ConnectSuccess);
QTRY_VERIFY(m_client->logBuffer.size() >= 2);
diff --git a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
index 37118f4..866cb9a 100644
--- a/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
+++ b/tests/auto/qml/debugger/qqmldebuggingenabler/qqmldebuggingenabler/tst_qqmldebuggingenabler.cpp
@@ -102,8 +102,7 @@ void tst_QQmlDebuggingEnabler::qmlscene()
QFETCH(bool, blockMode);
QFETCH(QStringList, services);
- m_process = new QQmlDebugProcess(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+ m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
m_process->setMaximumBindErrors(1);
m_process->start(QStringList()
<< QString::fromLatin1("-qmljsdebugger=connector:%1%2%3%4")
diff --git a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
index 91470e0..a6070ac 100644
--- a/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
+++ b/tests/auto/qml/debugger/qqmldebugjs/tst_qqmldebugjs.cpp
@@ -178,7 +178,7 @@ QQmlDebugTest::ConnectResult tst_QQmlDebugJS::init(bool qmlscene, const QString
bool blockMode, bool restrictServices)
{
const QString executable = qmlscene
- ? QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene"
+ ? TESTBINDIR "/qmlscene"
: debugJsServerPath("qqmldebugjs");
return QQmlDebugTest::connectTo(
executable, restrictServices ? QStringLiteral("V8Debugger") : QString(),
@@ -471,7 +471,7 @@ void tst_QQmlDebugJS::setBreakpointInJavaScript()
if (seedCache) { // Make sure there is a qmlc file that the engine should _not_ laod.
QProcess process;
- process.start(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+ process.start(QStringLiteral(TESTBINDIR "/qmlscene"),
{ testFile(QUITINJS_QMLFILE) });
QTRY_COMPARE(process.state(), QProcess::NotRunning);
}
@@ -853,8 +853,7 @@ void tst_QQmlDebugJS::evaluateInLocalScope()
void tst_QQmlDebugJS::evaluateInContext()
{
m_connection = new QQmlDebugConnection();
- m_process = new QQmlDebugProcess(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene", this);
+ m_process = new QQmlDebugProcess(TESTBINDIR "/qmlscene", this);
m_client = new QV4DebugClient(m_connection);
QScopedPointer<QQmlEngineDebugClient> engineClient(new QQmlEngineDebugClient(m_connection));
m_process->start(QStringList() << QLatin1String(BLOCKMODE) << testFile(ONCOMPLETED_QMLFILE));
diff --git a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
index 3557940..66e7027 100644
--- a/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
+++ b/tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
@@ -106,8 +106,7 @@ void tst_QQmlDebugService::checkPortRange()
{
QScopedPointer<QQmlDebugConnection> connection1(new QQmlDebugConnection());
QScopedPointer<QQmlDebugProcess> process1(
- new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
- + "/qmlscene", this));
+ new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
process1->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
<< testFile("test.qml"));
@@ -123,8 +122,7 @@ void tst_QQmlDebugService::checkPortRange()
// Second instance
QScopedPointer<QQmlDebugConnection> connection2(new QQmlDebugConnection());
QScopedPointer<QQmlDebugProcess> process2(
- new QQmlDebugProcess(QLibraryInfo::location(QLibraryInfo::BinariesPath)
- + "/qmlscene", this));
+ new QQmlDebugProcess(TESTBINDIR "/qmlscene", this));
process2->start(QStringList() << QLatin1String("-qmljsdebugger=port:3782,3792")
<< testFile("test.qml"));
diff --git a/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp b/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp
index 01ee805..7bb422c 100644
--- a/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp
+++ b/tests/auto/qml/debugger/qqmldebugtranslationservice/tst_qqmldebugtranslationservice.cpp
@@ -66,7 +66,7 @@ QList<QQmlDebugClient *> tst_QQmlDebugTranslationService::createClients()
void tst_QQmlDebugTranslationService::pluginConnection()
{
- auto executable = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml";
+ auto executable = QStringLiteral(TESTBINDIR "/qml");
auto services = "DebugTranslation";
auto extraArgs = testFile(QMLFILE);
auto block = true;
diff --git a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
index c8915fb..9b574bc 100644
--- a/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
+++ b/tests/auto/qml/debugger/qqmlenginecontrol/tst_qqmlenginecontrol.cpp
@@ -82,7 +82,7 @@ private slots:
QQmlDebugTest::ConnectResult tst_QQmlEngineControl::connectTo(const QString &file,
bool restrictServices)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene",
+ return QQmlDebugTest::connectTo(TESTBINDIR "/qmlscene",
restrictServices ? QStringLiteral("EngineControl") : QString(),
testFile(file), true);
}
diff --git a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
index 9830f1a..eedf904 100644
--- a/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
+++ b/tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
@@ -88,7 +88,7 @@ QQmlEngineDebugObjectReference tst_QQmlEngineDebugInspectorIntegration::findRoot
QQmlDebugTest::ConnectResult tst_QQmlEngineDebugInspectorIntegration::init(bool restrictServices)
{
return QQmlDebugTest::connectTo(
- QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+ TESTBINDIR "/qml",
restrictServices ? QStringLiteral("QmlDebugger,QmlInspector") : QString(),
testFile("qtquick2.qml"), true);
}
diff --git a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
index b5f45f1..f03fd82 100644
--- a/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
+++ b/tests/auto/qml/debugger/qqmlinspector/tst_qqmlinspector.cpp
@@ -64,7 +64,7 @@ private slots:
QQmlDebugTest::ConnectResult tst_QQmlInspector::startQmlProcess(const QString &qmlFile,
bool restrictServices)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+ return QQmlDebugTest::connectTo(TESTBINDIR "/qml",
restrictServices ? QStringLiteral("QmlInspector") : QString(),
testFile(qmlFile), true);
}
diff --git a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
index 2de525d..dd7bb51 100644
--- a/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
+++ b/tests/auto/qml/debugger/qqmlpreview/tst_qqmlpreview.cpp
@@ -74,7 +74,7 @@ private slots:
QQmlDebugTest::ConnectResult tst_QQmlPreview::startQmlProcess(const QString &qmlFile)
{
- return QQmlDebugTest::connectTo(QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qml",
+ return QQmlDebugTest::connectTo(QStringLiteral(TESTBINDIR "/qml"),
QStringLiteral("QmlPreview"), testFile(qmlFile), true);
}
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index c2a774b..c8a7d77 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -203,8 +203,7 @@ private:
ConnectResult connectTo(bool block, const QString &file, bool recordFromStart = true,
uint flushInterval = 0, bool restrictServices = true,
- const QString &executable
- = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmlscene");
+ const QString &executable = QStringLiteral(TESTBINDIR "/qmlscene"));
void checkProcessTerminated();
void checkTraceReceived();
void checkJsHeap();
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 3810f50..3b686df 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -107,7 +107,7 @@ static bool generateCache(const QString &qmlFileName, QByteArray *capturedStderr
QProcess proc;
if (capturedStderr == nullptr)
proc.setProcessChannelMode(QProcess::ForwardedChannels);
- proc.setProgram(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() + QLatin1String("qmlcachegen"));
+ proc.setProgram(TESTBINDIR "/qmlcachegen");
proc.setArguments(QStringList() << qmlFileName);
proc.start();
if (!proc.waitForFinished())
diff --git a/tests/auto/qml/qmlformat/tst_qmlformat.cpp b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
index 413dc5f..6f4ac1f 100644
--- a/tests/auto/qml/qmlformat/tst_qmlformat.cpp
+++ b/tests/auto/qml/qmlformat/tst_qmlformat.cpp
@@ -84,7 +84,7 @@ private:
void TestQmlformat::initTestCase()
{
QQmlDataTest::initTestCase();
- m_qmlformatPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlformat");
+ m_qmlformatPath = QStringLiteral(TESTBINDIR "/qmlformat");
#ifdef Q_OS_WIN
m_qmlformatPath += QLatin1String(".exe");
#endif
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 8697495..a538d79 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -59,7 +59,7 @@ private:
void TestQmllint::initTestCase()
{
QQmlDataTest::initTestCase();
- m_qmllintPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmllint");
+ m_qmllintPath = QLatin1String(TESTBINDIR "/qmllint");
#ifdef Q_OS_WIN
m_qmllintPath += QLatin1String(".exe");
#endif
@@ -214,7 +214,7 @@ void TestQmllint::cleanQmlCode()
QString TestQmllint::runQmllint(const QString &fileToLint, bool shouldSucceed)
{
- auto qmlImportDir = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+ auto qmlImportDir = QString::fromUtf8(qgetenv("QML2_IMPORT_PATH"));
QStringList args;
args << QStringLiteral("-U") << testFile(fileToLint)
<< QStringLiteral("-I") << qmlImportDir
diff --git a/tests/auto/qml/qmlmin/tst_qmlmin.cpp b/tests/auto/qml/qmlmin/tst_qmlmin.cpp
index cc028d9..7c7fd95 100644
--- a/tests/auto/qml/qmlmin/tst_qmlmin.cpp
+++ b/tests/auto/qml/qmlmin/tst_qmlmin.cpp
@@ -68,7 +68,7 @@ tst_qmlmin::tst_qmlmin()
void tst_qmlmin::initTestCase()
{
#if QT_CONFIG(process) && !defined(QTEST_CROSS_COMPILED) // sources not available when cross compiled
- qmlminPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmlmin");
+ qmlminPath = QStringLiteral(TESTBINDIR "/qmlmin");
#ifdef Q_OS_WIN
qmlminPath += QLatin1String(".exe");
#endif
diff --git a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
index 72356a4..7e6f089 100644
--- a/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
+++ b/tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
@@ -62,7 +62,7 @@ tst_qmlplugindump::tst_qmlplugindump()
void tst_qmlplugindump::initTestCase()
{
QQmlDataTest::initTestCase();
- qmlplugindumpPath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+ qmlplugindumpPath = QLatin1String(TESTBINDIR);
#if defined(Q_OS_WIN)
qmlplugindumpPath += QLatin1String("/qmlplugindump.exe");
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 9198d3b..eaec4a1 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -9249,7 +9249,7 @@ void tst_qqmlecmascript::hugeStack()
void tst_qqmlecmascript::gcCrashRegressionTest()
{
- const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs";
+ const QString qmljs = QStringLiteral(TESTBINDIR "/qmljs");
if (!QFile::exists(qmljs)) {
QSKIP("Tets requires qmljs");
}
diff --git a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
index 5dd8e9d..c84ace2 100644
--- a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
+++ b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
@@ -62,7 +62,7 @@ void tst_QV4Assembler::perfMapFile()
#if !defined(Q_OS_LINUX) || defined(Q_OS_ANDROID)
QSKIP("perf map files are only generated on linux");
#else
- const QString qmljs = QLibraryInfo::location(QLibraryInfo::BinariesPath) + "/qmljs";
+ const QString qmljs = QStringLiteral(TESTBINDIR "/qmljs");
QProcess process;
QTemporaryFile infile;
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp
index fdefa85..cd77427 100644
--- a/tests/auto/quick/examples/tst_examples.cpp
+++ b/tests/auto/quick/examples/tst_examples.cpp
@@ -167,8 +167,8 @@ void tst_examples::namingConvention(const QDir &d)
void tst_examples::namingConvention()
{
QStringList examplesLocations;
- examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/qml");
- examplesLocations << QLibraryInfo::location(QLibraryInfo::ExamplesPath) + QLatin1String("/quick");
+ examplesLocations << QLatin1String(TESTEXAMPLEDIR "/qml");
+ examplesLocations << QLatin1String(TESTEXAMPLEDIR "/quick");
foreach(const QString &examples, examplesLocations) {
QDir d(examples);

View File

@ -1,59 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: build fixes for GCC 11
Origin: upstream, commits:
https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=eb6525f126f680f9
https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=367293b18ab0d0a0
https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=db58b8518e157b76
Last-Update: 2021-08-18
---
src/3rdparty/masm/yarr/Yarr.h | 1 +
src/qml/compiler/qv4bytecodegenerator_p.h | 4 ++--
src/qmldebug/qqmlprofilerevent_p.h | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/masm/yarr/Yarr.h b/src/3rdparty/masm/yarr/Yarr.h
index ccf78f9..2955ea7 100644
--- a/src/3rdparty/masm/yarr/Yarr.h
+++ b/src/3rdparty/masm/yarr/Yarr.h
@@ -28,6 +28,7 @@
#pragma once
#include <limits.h>
+#include <limits>
#include "YarrErrorCode.h"
namespace JSC { namespace Yarr {
diff --git a/src/qml/compiler/qv4bytecodegenerator_p.h b/src/qml/compiler/qv4bytecodegenerator_p.h
index 1895a34..5244c44 100644
--- a/src/qml/compiler/qv4bytecodegenerator_p.h
+++ b/src/qml/compiler/qv4bytecodegenerator_p.h
@@ -186,13 +186,13 @@ QT_WARNING_POP
Q_REQUIRED_RESULT Jump jumpNotUndefined()
{
- Instruction::JumpNotUndefined data;
+ Instruction::JumpNotUndefined data{};
return addJumpInstruction(data);
}
Q_REQUIRED_RESULT Jump jumpNoException()
{
- Instruction::JumpNoException data;
+ Instruction::JumpNoException data{};
return addJumpInstruction(data);
}
diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h
index a7e37d1..01b2f58 100644
--- a/src/qmldebug/qqmlprofilerevent_p.h
+++ b/src/qmldebug/qqmlprofilerevent_p.h
@@ -48,6 +48,7 @@
#include <QtCore/qmetatype.h>
#include <initializer_list>
+#include <limits>
#include <type_traits>
//

View File

@ -1,70 +0,0 @@
From: Max Lin <mlin@suse.com>
Date: Sat, 14 May 2022 17:42:42 +0800
Subject: make qtdeclarative build with Python 3
Origin: OpenSUSE, https://build.opensuse.org/package/view_file/KDE:Qt:5.12/libqt5-qtdeclarative/qtdeclarative-switch-to-python3.patch
Forwarded: not-yet
Last-Update: 2020-01-01
---
src/3rdparty/masm/disassembler/udis86/itab.py | 4 ++--
src/3rdparty/masm/disassembler/udis86/ud_optable.py | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/3rdparty/masm/disassembler/udis86/itab.py b/src/3rdparty/masm/disassembler/udis86/itab.py
index 07e20a6..3d50ad0 100644
--- a/src/3rdparty/masm/disassembler/udis86/itab.py
+++ b/src/3rdparty/masm/disassembler/udis86/itab.py
@@ -268,13 +268,13 @@ class UdItabGenerator( ud_opcode.UdOpcodeTables ):
opr = e[ 'operands' ]
for i in range(len(opr)):
if not (opr[i] in self.OperandDict.keys()):
- print "error: invalid operand declaration: %s\n" % opr[i]
+ print("error: invalid operand declaration: %s\n" % opr[i])
opr_c[i] = "O_" + opr[i]
opr = "%s %s %s" % (opr_c[0] + ",", opr_c[1] + ",", opr_c[2])
for p in e['prefixes']:
if not ( p in self.PrefixDict.keys() ):
- print "error: invalid prefix specification: %s \n" % pfx
+ print("error: invalid prefix specification: %s \n" % pfx)
pfx_c.append( self.PrefixDict[p] )
if len(e['prefixes']) == 0:
pfx_c.append( "P_none" )
diff --git a/src/3rdparty/masm/disassembler/udis86/ud_optable.py b/src/3rdparty/masm/disassembler/udis86/ud_optable.py
index 5b5c55d..3a246c7 100644
--- a/src/3rdparty/masm/disassembler/udis86/ud_optable.py
+++ b/src/3rdparty/masm/disassembler/udis86/ud_optable.py
@@ -50,7 +50,7 @@ class UdOptableXmlParser:
elif def_node.localName == 'vendor':
ven = ( def_node.firstChild.data );
else:
- print "warning: invalid node - %s" % def_node.localName
+ print("warning: invalid node - %s" % def_node.localName)
continue
return ( pfx, opc, opr, ven )
@@ -65,7 +65,7 @@ class UdOptableXmlParser:
if not insnNode.localName:
continue
if insnNode.localName != "instruction":
- print "warning: invalid insn node - %s" % insnNode.localName
+ print("warning: invalid insn node - %s" % insnNode.localName)
continue
mnemonic = insnNode.getElementsByTagName( 'mnemonic' )[ 0 ].firstChild.data
@@ -84,11 +84,11 @@ class UdOptableXmlParser:
def printFn( pfx, mnm, opc, opr, ven ):
- print 'def: ',
+ print('def: ', end='')
if len( pfx ):
- print ' '.join( pfx ),
- print "%s %s %s %s" % \
- ( mnm, ' '.join( opc ), ' '.join( opr ), ven )
+ print(' '.join( pfx ), end='')
+ print("%s %s %s %s" % \
+ ( mnm, ' '.join( opc ), ' '.join( opr ), ven ))
def parse( xml, callback ):

View File

@ -1,27 +0,0 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: replace YouTube iframe with YouTube link
Forwarded: not-needed
Last-Update: 2019-12-19
---
src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
index 7695bb5..9e9ef7a 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
@@ -41,10 +41,8 @@ QObjectList or a \l QAbstractItemModel. The first three are useful for exposing
simpler datasets, while QAbstractItemModel provides a more flexible solution for
more complex models.
-Here is a video tutorial that takes you through the whole process of exposing a C++
-model to QML:
-
-\youtube 9BcAYDlpuT8
+Here is a \l{https://www.youtube.com/watch?v=9BcAYDlpuT8}{video tutorial} that
+takes you through the whole process of exposing a C++ model to QML.
\section2 QStringList-based Model

View File

@ -1,24 +0,0 @@
From: Aurelien Jarno <aurel32@debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: link with -latomic on riscv64
Forwarded: no
Last-Update: 2020-01-01
---
src/qml/qml.pro | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qml/qml.pro b/src/qml/qml.pro
index 7d5a92a..0ec1161 100644
--- a/src/qml/qml.pro
+++ b/src/qml/qml.pro
@@ -20,6 +20,9 @@ solaris-cc*:QMAKE_CXXFLAGS_RELEASE -= -O2
# Ensure this gcc optimization is switched off for mips platforms to avoid trouble with JIT.
gcc:isEqual(QT_ARCH, "mips"): QMAKE_CXXFLAGS += -fno-reorder-blocks
+# Link with -latomic on riscv64. Ideally qmake should use -pthread instead of -lpthread
+isEqual(QT_ARCH, "riscv64"): QMAKE_LIBS += -latomic
+
DEFINES += QT_NO_FOREACH
exists("qqml_enable_gcov") {

10
debian/patches/series vendored
View File

@ -1,10 +0,0 @@
gcc_11.patch
tst_qmldiskcache_big_endian.patch
support_apos_in_styled_text.patch
fix_sweep_step.patch
disableopengltests.patch
fix_test_remove_qlibraryinfo.patch
wait_for_window_exposed.patch
remove_youtube_iframe.patch
riscv64-latomic.patch
python3.patch

View File

@ -1,39 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: Support &apos; in styled text and document it
This ensures that some translations really look ok.
Origin: https://invent.kde.org/qt/qt/qtdeclarative/-/merge_requests/3/diffs
Forwarded: not-needed
Applied-Upstream: https://invent.kde.org/qt/qt/qtdeclarative/-/commit/0dda47d9f1a22567ad8f1266be2f0cd8a9226c7f
---
src/quick/items/qquicktext.cpp | 2 +-
src/quick/util/qquickstyledtext.cpp | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index b18d03a..459dea8 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2168,7 +2168,7 @@ void QQuickText::resetMaximumLineCount()
<img src="" align="top,middle,bottom" width="" height=""> - inline images
<ol type="">, <ul type=""> and <li> - ordered and unordered lists
<pre></pre> - preformatted
- &gt; &lt; &amp;
+ &gt; &lt; &amp; &quot; &nbsp; &apos;
\endcode
\c Text.StyledText parser is strict, requiring tags to be correctly nested.
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 660852b..e81240d 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -562,6 +562,8 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
textOut += QChar(60);
else if (entity == QLatin1String("amp"))
textOut += QChar(38);
+ else if (entity == QLatin1String("apos"))
+ textOut += QChar(39);
else if (entity == QLatin1String("quot"))
textOut += QChar(34);
else if (entity == QLatin1String("nbsp"))

View File

@ -1,27 +0,0 @@
From: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: make tst_qmldiskcache::regenerateAfterChange() pass on big endian
systems
Origin: upstream, https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=dab0d62b655ce9a4
Last-Update: 2021-02-11
---
tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
index 3c59f7b..997128a 100644
--- a/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
+++ b/tests/auto/qml/qmldiskcache/tst_qmldiskcache.cpp
@@ -376,9 +376,8 @@ void tst_qmldiskcache::regenerateAfterChange()
QCOMPARE(quint32(obj->nBindings), quint32(2));
QCOMPARE(quint32(obj->bindingTable()->type), quint32(QV4::CompiledData::Binding::Type_Number));
- QCOMPARE(reinterpret_cast<const QV4::Value *>(testUnit->constants())
- [obj->bindingTable()->value.constantValueIndex].doubleValue(),
- double(42));
+ const QV4::Value value(testUnit->constants()[obj->bindingTable()->value.constantValueIndex]);
+ QCOMPARE(value.doubleValue(), double(42));
QCOMPARE(quint32(testUnit->functionTableSize), quint32(1));

View File

@ -1,25 +0,0 @@
From: Dmitry Shachnev <mitya57@debian.org>
Date: Sat, 14 May 2022 17:42:41 +0800
Subject: use qWaitForWindowExposed instead of qWaitForWindowActive
The qWaitForWindowActive() function returns false when the test is
run inside Xvfb and there is no window manager.
Forwarded: no
Last-Update: 2019-04-21
---
tests/auto/quicktest/signalspy/tst_signalspy.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/auto/quicktest/signalspy/tst_signalspy.cpp b/tests/auto/quicktest/signalspy/tst_signalspy.cpp
index 0806f43..32bbced 100644
--- a/tests/auto/quicktest/signalspy/tst_signalspy.cpp
+++ b/tests/auto/quicktest/signalspy/tst_signalspy.cpp
@@ -73,7 +73,7 @@ void tst_SignalSpy::testCount()
window.resize(200, 200);
window.setSource(testFileUrl("signalspy.qml"));
window.show();
- QVERIFY(QTest::qWaitForWindowActive(&window));
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
QVERIFY(window.rootObject() != nullptr);
QObject *mouseSpy = window.rootObject()->findChild<QObject*>("mouseSpy");

View File

@ -1 +1 @@
3.0 (quilt) 3.0 (native)