summaryrefslogtreecommitdiffstats
diff options
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-02-14 17:20:30 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-02-14 17:20:30 +0200
commite9737957d3f3f5783506f6ce11ca540705dc79fe (patch)
tree5f92be1e2be0d78e3c87b9596e64a136512f3c6b
parentccf81a7b2a3b22c19264b45da374b2bd08890308 (diff)
parentbca39735f98bca520ff39da99a45dc9ba2e2ec11 (diff)
Merge tag 'v6.5.5-lts' into tqtc/lts-6.5-opensourcev6.5.5-lts-lgpl6.5
Qt 6.5.5-lts release Conflicts solved: dependencies.yaml Change-Id: I9aa6f0d9c6634f82a71e1e4ed6a752a5e0c25890
-rw-r--r--.cmake.conf2
-rw-r--r--CMakeLists.txt11
-rw-r--r--dependencies.yaml8
-rw-r--r--doc/online/style/qt5-sidebar.html2
-rw-r--r--examples/applicationmanager/custom-appman/custom-appman.cpp1
-rw-r--r--src/intent-server-lib/intent.cpp7
-rw-r--r--src/intent-server-lib/intent.h3
-rw-r--r--src/intent-server-lib/intentserver.cpp5
-rw-r--r--src/intent-server-lib/intentserverrequest.cpp23
-rw-r--r--src/intent-server-lib/intentserverrequest.h10
-rw-r--r--src/main-lib/configuration.cpp2
-rw-r--r--src/main-lib/main.cpp4
-rw-r--r--src/manager-lib/CMakeLists.txt6
-rw-r--r--src/manager-lib/asynchronoustask.cpp23
-rw-r--r--src/manager-lib/asynchronoustask.h3
-rw-r--r--src/manager-lib/deinstallationtask.cpp11
-rw-r--r--src/manager-lib/deinstallationtask.h2
-rw-r--r--src/manager-lib/installationtask.cpp6
-rw-r--r--src/manager-lib/intentaminterface.cpp16
-rw-r--r--src/manager-lib/nativeruntime.cpp2
-rw-r--r--src/manager-lib/notificationmanager.cpp7
-rw-r--r--src/manager-lib/packagemanager.cpp13
-rw-r--r--src/monitor-lib/processreader.cpp2
-rw-r--r--src/notification-lib/notification.cpp2
-rw-r--r--src/shared-main-lib/monitormodel.cpp2
-rw-r--r--src/window-lib/waylandcompositor.cpp1
-rw-r--r--tests/auto/CMakeLists.txt5
-rw-r--r--tests/auto/qml/quicklaunch/tst_quicklaunch.qml1
-rw-r--r--tests/auto/signature/BLACKLIST1
-rw-r--r--tests/data/CMakeLists.txt5
30 files changed, 122 insertions, 64 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 1193d1ed..8f509afa 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1 +1 @@
-set(QT_REPO_MODULE_VERSION "6.5.4")
+set(QT_REPO_MODULE_VERSION "6.5.5")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f476775..3040ad55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,6 +104,17 @@ if(AM_COVERAGE)
)
endif()
+## SANITIZE ###########################################################
+
+if (AM_SANITIZE)
+ if (MSVC)
+ set(ECM_ENABLE_SANITIZERS address)
+ else()
+ set(ECM_ENABLE_SANITIZERS address undefined)
+ endif()
+ include(3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers)
+endif()
+
## BUILD ##############################################################
qt_build_repo()
diff --git a/dependencies.yaml b/dependencies.yaml
index 1b990849..62a5fc16 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
dependencies:
../tqtc-qtbase:
- ref: 8ff0b254e4c3db81254782262d827f7831d15f6b
+ ref: fdf57f5df57e7d12cf871699d857a71acf272e0c
required: true
../tqtc-qtdeclarative:
- ref: 9edb471d3a35b3dc40def86c395789086edaa983
+ ref: 7ac842cba18be081ac835bf40ac475ec4c47d30b
required: true
../tqtc-qttools:
- ref: 066161834ed0fa101b72f4df9d45441df187750e
+ ref: 523fe4c15e8e962d13ca17bc0645468ab867c926
required: false
../tqtc-qtwayland:
- ref: 522edbc1e184f133d1e5cd9d704a8b8e9c3d7a45
+ ref: c8863f4533189b804aa7c69992257078a384f7b6
required: false
diff --git a/doc/online/style/qt5-sidebar.html b/doc/online/style/qt5-sidebar.html
index 33679de9..54219c04 100644
--- a/doc/online/style/qt5-sidebar.html
+++ b/doc/online/style/qt5-sidebar.html
@@ -14,7 +14,7 @@
<li><a href="debugging.html">Logging and Debugging</a></li>
<li><a href="singlevsmultiprocess.html">Single-Process vs. Multi-Process</a></li>
<li><a href="use-qt-resources.html">Using Qt Resources</a></li>
- <li><a href="migration-guide-6-2.html">Migration Guide</a></li>
+ <li><a href="whatsnew.html">What's New</a></li>
<li><a href="troubleshoot.html">Troubleshooting</a></li>
<li><a href="index.html#examples">Examples</a></li>
</ul>
diff --git a/examples/applicationmanager/custom-appman/custom-appman.cpp b/examples/applicationmanager/custom-appman/custom-appman.cpp
index 896f82ed..1b0e3149 100644
--- a/examples/applicationmanager/custom-appman/custom-appman.cpp
+++ b/examples/applicationmanager/custom-appman/custom-appman.cpp
@@ -7,7 +7,6 @@
#include <QtAppManCommon/logging.h>
#include <QtAppManMain/main.h>
#include <QtAppManMain/configuration.h>
-#include <QtAppManPackage/packageutilities.h>
#include <QtAppManManager/sudo.h>
diff --git a/src/intent-server-lib/intent.cpp b/src/intent-server-lib/intent.cpp
index 95992a8b..4049f9db 100644
--- a/src/intent-server-lib/intent.cpp
+++ b/src/intent-server-lib/intent.cpp
@@ -178,6 +178,13 @@ Intent::Intent(const QString &id, const QString &packageId, const QString &appli
{
}
+Intent *Intent::copy() const
+{
+ return new Intent(m_intentId, m_packageId, m_applicationId, m_requiredCapabilities,
+ m_visibility, m_parameterMatch, m_names, m_descriptions, m_icon,
+ m_categories, m_handleOnlyWhenRunning);
+}
+
QString Intent::intentId() const
{
return m_intentId;
diff --git a/src/intent-server-lib/intent.h b/src/intent-server-lib/intent.h
index 155d416b..1b348178 100644
--- a/src/intent-server-lib/intent.h
+++ b/src/intent-server-lib/intent.h
@@ -70,6 +70,8 @@ private:
const QMap<QString, QString> &descriptions, const QUrl &icon,
const QStringList &categories, bool handleOnlyWhenRunning);
+ Intent *copy() const; // needed during long-lived disambiguation requests
+
QString m_intentId;
Visibility m_visibility = Private;
QStringList m_requiredCapabilities;
@@ -87,6 +89,7 @@ private:
friend class IntentServer;
friend class IntentServerHandler;
+ friend class IntentServerRequest;
friend class TestPackageLoader; // for auto tests only
};
diff --git a/src/intent-server-lib/intentserver.cpp b/src/intent-server-lib/intentserver.cpp
index 56a12f8a..c6cd7718 100644
--- a/src/intent-server-lib/intentserver.cpp
+++ b/src/intent-server-lib/intentserver.cpp
@@ -537,7 +537,7 @@ void IntentServer::processRequestQueue()
if (!handlerIPC) {
qCDebug(LogIntents) << "Intent handler" << isr->selectedIntent()->applicationId() << "is not running";
- if (isr->potentialIntents().constFirst()->handleOnlyWhenRunning()) {
+ if (isr->selectedIntent()->handleOnlyWhenRunning()) {
qCDebug(LogIntents) << " * skipping, because 'handleOnlyWhenRunning' is set";
isr->setRequestFailed(qSL("Skipping delivery due to handleOnlyWhenRunning"));
} else {
@@ -601,8 +601,7 @@ void IntentServer::processRequestQueue()
m_systemInterface->replyFromSystem(clientIPC, isr);
}
}
- QMetaObject::invokeMethod(this, [isr]() { delete isr; }, Qt::QueuedConnection); // aka deleteLater for non-QObject
- isr = nullptr;
+ isr->deleteLater();
}
triggerRequestQueue();
diff --git a/src/intent-server-lib/intentserverrequest.cpp b/src/intent-server-lib/intentserverrequest.cpp
index 9641ccbb..0aaa1125 100644
--- a/src/intent-server-lib/intentserverrequest.cpp
+++ b/src/intent-server-lib/intentserverrequest.cpp
@@ -20,11 +20,17 @@ IntentServerRequest::IntentServerRequest(const QString &requestingApplicationId,
Q_ASSERT(!potentialIntents.isEmpty());
Q_ASSERT(!broadcast || (potentialIntents.size() == 1));
- for (auto *intent : potentialIntents)
- m_potentialIntents << intent;
+ // Intents may die during handling (app removal), so we create shadow copies for QML
+ m_potentialIntents.reserve(potentialIntents.size());
+ for (auto *intent : potentialIntents) {
+ Q_ASSERT(intent);
+ auto copy = intent->copy();
+ copy->setParent(this); // for automatic deletion and ownership
+ m_potentialIntents << copy;
+ }
if (potentialIntents.size() == 1)
- setSelectedIntent(potentialIntents.constFirst());
+ m_selectedIntent = m_potentialIntents.constFirst();
}
IntentServerRequest::State IntentServerRequest::state() const
@@ -49,17 +55,12 @@ QString IntentServerRequest::requestingApplicationId() const
Intent *IntentServerRequest::selectedIntent() const
{
- return m_selectedIntent.get();
+ return m_selectedIntent;
}
QVector<Intent *> IntentServerRequest::potentialIntents() const
{
- QVector<Intent *> out;
- for (auto &intent : m_potentialIntents) {
- if (intent)
- out << intent.get();
- }
- return out;
+ return m_potentialIntents;
}
QVariantMap IntentServerRequest::parameters() const
@@ -104,7 +105,7 @@ void IntentServerRequest::setState(IntentServerRequest::State newState)
void IntentServerRequest::setSelectedIntent(Intent *intent)
{
- if (m_potentialIntents.contains(intent))
+ if (!intent || m_potentialIntents.contains(intent))
m_selectedIntent = intent;
}
diff --git a/src/intent-server-lib/intentserverrequest.h b/src/intent-server-lib/intentserverrequest.h
index 8d767193..6d9bce13 100644
--- a/src/intent-server-lib/intentserverrequest.h
+++ b/src/intent-server-lib/intentserverrequest.h
@@ -18,9 +18,9 @@ QT_BEGIN_NAMESPACE_AM
class IntentServer;
-class IntentServerRequest
+class IntentServerRequest : public QObject
{
- Q_GADGET
+ Q_OBJECT
public:
IntentServerRequest(const QString &requestingApplicationId, const QString &intentId,
@@ -63,8 +63,10 @@ private:
bool m_broadcast = false;
QString m_intentId;
QString m_requestingApplicationId;
- QPointer<Intent> m_selectedIntent;
- QVector<QPointer<Intent>> m_potentialIntents;
+ // These are copies of the real intents, as QML cannot cope with QPointer<Intent> and the
+ // real Intent pointers could die during handling, due to app removal.
+ Intent *m_selectedIntent = nullptr;
+ QVector<Intent *> m_potentialIntents;
QVariantMap m_parameters;
QVariantMap m_result;
};
diff --git a/src/main-lib/configuration.cpp b/src/main-lib/configuration.cpp
index 7ce2b3da..18c2724a 100644
--- a/src/main-lib/configuration.cpp
+++ b/src/main-lib/configuration.cpp
@@ -623,6 +623,7 @@ void ConfigurationData::mergeFrom(const ConfigurationData *from)
QByteArray ConfigurationData::substituteVars(const QByteArray &sourceContent, const QString &fileName)
{
QByteArray string = sourceContent;
+ QByteArray path;
int posBeg = -1;
int posEnd = -1;
while (true) {
@@ -635,7 +636,6 @@ QByteArray ConfigurationData::substituteVars(const QByteArray &sourceContent, co
QByteArray varValue;
if (varName == "CONFIG_PWD") {
- static QByteArray path;
if (path.isEmpty() && !fileName.isEmpty())
path = QFileInfo(fileName).path().toUtf8();
varValue = path;
diff --git a/src/main-lib/main.cpp b/src/main-lib/main.cpp
index b79c0a6c..cd39d003 100644
--- a/src/main-lib/main.cpp
+++ b/src/main-lib/main.cpp
@@ -13,7 +13,9 @@
# include "dbusdaemon.h"
# include "dbuspolicy.h"
# include "applicationmanagerdbuscontextadaptor.h"
-# include "packagemanagerdbuscontextadaptor.h"
+# if !defined(AM_DISABLE_INSTALLER)
+# include "packagemanagerdbuscontextadaptor.h"
+# endif
# include "notificationmanagerdbuscontextadaptor.h"
#endif
diff --git a/src/manager-lib/CMakeLists.txt b/src/manager-lib/CMakeLists.txt
index 2e4f3481..59553cab 100644
--- a/src/manager-lib/CMakeLists.txt
+++ b/src/manager-lib/CMakeLists.txt
@@ -32,6 +32,7 @@ qt_internal_add_module(AppManManagerPrivate
qmlinprocessruntime.cpp qmlinprocessruntime.h
quicklauncher.cpp quicklauncher.h
runtimefactory.cpp runtimefactory.h
+ sudo.cpp sudo.h
LIBRARIES
Qt::AppManApplicationPrivate
Qt::AppManCommonPrivate
@@ -69,11 +70,6 @@ if (QT_FEATURE_am_multi_process)
)
endif()
-qt_internal_extend_target(AppManManagerPrivate CONDITION (TARGET Qt::WaylandCompositor OR QT_FEATURE_am_installer)
- SOURCES
- sudo.cpp sudo.h
-)
-
qt_internal_extend_target(AppManManagerPrivate CONDITION QT_FEATURE_am_installer
SOURCES
deinstallationtask.cpp deinstallationtask.h
diff --git a/src/manager-lib/asynchronoustask.cpp b/src/manager-lib/asynchronoustask.cpp
index 17871da8..d750946f 100644
--- a/src/manager-lib/asynchronoustask.cpp
+++ b/src/manager-lib/asynchronoustask.cpp
@@ -25,29 +25,29 @@ QString AsynchronousTask::id() const
AsynchronousTask::TaskState AsynchronousTask::state() const
{
+ QMutexLocker locker(&m_mutex);
return m_state;
}
void AsynchronousTask::setState(AsynchronousTask::TaskState state)
{
+ QMutexLocker locker(&m_mutex);
if (m_state != state) {
m_state = state;
- emit stateChanged(m_state);
+ locker.unlock();
+ emit stateChanged(state);
}
}
-bool AsynchronousTask::hasFailed() const
-{
- return (m_state == Failed);
-}
-
Error AsynchronousTask::errorCode() const
{
+ QMutexLocker locker(&m_mutex);
return m_errorCode;
}
QString AsynchronousTask::errorString() const
{
+ QMutexLocker locker(&m_mutex);
return m_errorString;
}
@@ -59,7 +59,7 @@ bool AsynchronousTask::cancel()
bool AsynchronousTask::forceCancel()
{
- if (m_state == Queued) {
+ if (state() == Queued) {
setError(Error::Canceled, qSL("canceled"));
return true;
}
@@ -68,6 +68,7 @@ bool AsynchronousTask::forceCancel()
QString AsynchronousTask::packageId() const
{
+ QMutexLocker locker(&m_mutex);
return m_packageId;
}
@@ -83,8 +84,12 @@ bool AsynchronousTask::postExecute()
void AsynchronousTask::setError(Error errorCode, const QString &errorString)
{
- m_errorCode = errorCode;
- m_errorString = errorString;
+ {
+ // setState() also locks
+ QMutexLocker locker(&m_mutex);
+ m_errorCode = errorCode;
+ m_errorString = errorString;
+ }
setState(Failed);
}
diff --git a/src/manager-lib/asynchronoustask.h b/src/manager-lib/asynchronoustask.h
index 97c9690a..3c8fce0e 100644
--- a/src/manager-lib/asynchronoustask.h
+++ b/src/manager-lib/asynchronoustask.h
@@ -39,7 +39,6 @@ public:
TaskState state() const;
void setState(TaskState state);
- bool hasFailed() const;
Error errorCode() const;
QString errorString() const;
@@ -61,7 +60,7 @@ protected:
void run() override final;
protected:
- QMutex m_mutex;
+ mutable QMutex m_mutex;
QString m_id;
QString m_packageId;
diff --git a/src/manager-lib/deinstallationtask.cpp b/src/manager-lib/deinstallationtask.cpp
index 7f0b778b..9b4f2d31 100644
--- a/src/manager-lib/deinstallationtask.cpp
+++ b/src/manager-lib/deinstallationtask.cpp
@@ -29,6 +29,7 @@ DeinstallationTask::DeinstallationTask(const QString &packageId, const QString &
bool DeinstallationTask::cancel()
{
+ QMutexLocker locker(&m_mutex);
if (m_canBeCanceled)
m_canceled = true;
return m_canceled;
@@ -70,10 +71,12 @@ void DeinstallationTask::execute()
while (!m_canceled && !package->areAllApplicationsStoppedDueToBlock())
QThread::msleep(30);
- // there's a small race condition here, but not doing a planned cancellation isn't harmful
- m_canBeCanceled = false;
- if (m_canceled)
- throw Exception(Error::Canceled, "canceled");
+ {
+ QMutexLocker locker(&m_mutex);
+ m_canBeCanceled = false;
+ if (m_canceled)
+ throw Exception(Error::Canceled, "canceled");
+ }
ScopedRenamer docDirRename;
ScopedRenamer appDirRename;
diff --git a/src/manager-lib/deinstallationtask.h b/src/manager-lib/deinstallationtask.h
index 63e6613b..3159a3d1 100644
--- a/src/manager-lib/deinstallationtask.h
+++ b/src/manager-lib/deinstallationtask.h
@@ -30,7 +30,7 @@ private:
QString m_documentPath;
bool m_keepDocuments;
bool m_canBeCanceled = true;
- bool m_canceled = false;
+ QAtomicInteger<bool> m_canceled = false; // atomic for easy access in "busy" wait loop
};
QT_END_NAMESPACE_AM
diff --git a/src/manager-lib/installationtask.cpp b/src/manager-lib/installationtask.cpp
index 193d20d5..69ebdace 100644
--- a/src/manager-lib/installationtask.cpp
+++ b/src/manager-lib/installationtask.cpp
@@ -16,13 +16,15 @@
#include "applicationinfo.h"
#include "exception.h"
#include "packagemanager.h"
-#include "sudo.h"
#include "utilities.h"
#include "signature.h"
#include "sudo.h"
#include "installationtask.h"
#include <memory>
+#ifdef Q_OS_UNIX
+# include <unistd.h>
+#endif
/*
Overview of what happens on an installation of an app with <id> to <location>:
@@ -262,7 +264,9 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
if (m_iconFileName.isEmpty())
throw Exception(Error::Package, "the 'icon' field in info.yaml cannot be empty or absent.");
+ m_mutex.lock();
m_packageId = m_package->id();
+ m_mutex.unlock();
m_foundInfo = true;
} else if (m_extractedFileCount == 2) {
diff --git a/src/manager-lib/intentaminterface.cpp b/src/manager-lib/intentaminterface.cpp
index c7c9b28c..73db3728 100644
--- a/src/manager-lib/intentaminterface.cpp
+++ b/src/manager-lib/intentaminterface.cpp
@@ -404,11 +404,14 @@ void IntentServerInProcessIpcConnection::requestToApplication(IntentServerReques
{
// we need decouple the server/client interface at this point to have a consistent
// behavior in single- and multi-process mode
- QMetaObject::invokeMethod(this, [this, isr]() {
+ QMetaObject::invokeMethod(this, [this, requestId = isr->requestId(), intentId = isr->intentId(),
+ requestingApplicationId = isr->isBroadcast() ? qSL(":broadcast:")
+ : isr->requestingApplicationId(),
+ applicationId = isr->selectedIntent()->applicationId(),
+ parameters = isr->parameters()]() {
auto clientInterface = m_interface->intentClientSystemInterface();
- emit clientInterface->requestToApplication(isr->requestId(), isr->intentId(),
- isr->isBroadcast() ? qSL(":broadcast:") : isr->requestingApplicationId(),
- isr->selectedIntent()->applicationId(), isr->parameters());
+ emit clientInterface->requestToApplication(requestId, intentId, requestingApplicationId,
+ applicationId, parameters);
}, Qt::QueuedConnection);
}
@@ -416,9 +419,10 @@ void IntentServerInProcessIpcConnection::replyFromSystem(IntentServerRequest *is
{
// we need decouple the server/client interface at this point to have a consistent
// behavior in single- and multi-process mode
- QMetaObject::invokeMethod(this, [this, isr]() {
+ QMetaObject::invokeMethod(this, [this, requestId = isr->requestId(), error = !isr->succeeded(),
+ result = isr->result()]() {
auto clientInterface = m_interface->intentClientSystemInterface();
- emit clientInterface->replyFromSystem(isr->requestId(), !isr->succeeded(), isr->result());
+ emit clientInterface->replyFromSystem(requestId, error, result);
}, Qt::QueuedConnection);
}
diff --git a/src/manager-lib/nativeruntime.cpp b/src/manager-lib/nativeruntime.cpp
index 326b9c9c..58c66cdb 100644
--- a/src/manager-lib/nativeruntime.cpp
+++ b/src/manager-lib/nativeruntime.cpp
@@ -283,7 +283,7 @@ bool NativeRuntime::start()
for (const auto *var : {
"AM_STARTUP_TIMER", "AM_NO_CUSTOM_LOGGING", "AM_NO_CRASH_HANDLER", "AM_FORCE_COLOR_OUTPUT",
- "AM_TIMEOUT_FACTOR", "QT_MESSAGE_PATTERN" }) {
+ "AM_TIMEOUT_FACTOR", "QT_MESSAGE_PATTERN", "ASAN_OPTIONS", "LSAN_OPTIONS", "TSAN_OPTIONS" }) {
if (qEnvironmentVariableIsSet(var))
env.insert(QString::fromLatin1(var), qEnvironmentVariable(var));
}
diff --git a/src/manager-lib/notificationmanager.cpp b/src/manager-lib/notificationmanager.cpp
index df1a7f7c..338645f7 100644
--- a/src/manager-lib/notificationmanager.cpp
+++ b/src/manager-lib/notificationmanager.cpp
@@ -425,6 +425,8 @@ void NotificationManager::acknowledgeNotification(uint id)
\qmlmethod NotificationManager::triggerNotificationAction(int id, string actionId)
This function needs to be called by the System UI when the user triggered a notification action.
+ Unless the notification is made resident (\c {dismissOnAction} is \c false), the notification
+ will also be dismissed.
The notification is identified by \a id and the action by \a actionId.
@@ -432,6 +434,8 @@ void NotificationManager::acknowledgeNotification(uint id)
\l {Notification::}{actions} role). However, the application manager will accept and forward any
arbitrary string. Be aware that this string is broadcast on the session D-Bus when running in
multi-process mode.
+
+ \sa dismissNotification()
*/
void NotificationManager::triggerNotificationAction(uint id, const QString &actionId)
{
@@ -453,6 +457,9 @@ void NotificationManager::triggerNotificationAction(uint id, const QString &acti
<< (actionId.length() > 20 ? (actionId.left(20) + qSL("...")) : actionId);
}
emit ActionInvoked(id, actionId);
+
+ if (n->dismissOnAction)
+ dismissNotification(id);
}
}
diff --git a/src/manager-lib/packagemanager.cpp b/src/manager-lib/packagemanager.cpp
index 2e1665da..d966209f 100644
--- a/src/manager-lib/packagemanager.cpp
+++ b/src/manager-lib/packagemanager.cpp
@@ -852,10 +852,14 @@ QVariantMap PackageManager::documentLocation() const
bool PackageManager::isPackageInstallationActive(const QString &packageId) const
{
+#if !defined(AM_DISABLE_INSTALLER)
for (const auto *t : std::as_const(d->installationTaskList)) {
if (t->packageId() == packageId)
return true;
}
+#else
+ Q_UNUSED(packageId)
+#endif
return false;
}
@@ -1276,9 +1280,7 @@ void PackageManager::executeNextTask()
AsynchronousTask *task = d->incomingTaskList.takeFirst();
- if (task->hasFailed()) {
- task->setState(AsynchronousTask::Failed);
-
+ if (task->state() == AsynchronousTask::Failed) {
handleFailure(task);
task->deleteLater();
@@ -1307,11 +1309,10 @@ void PackageManager::executeNextTask()
});
connect(task, &AsynchronousTask::finished, this, [this, task]() {
- task->setState(task->hasFailed() ? AsynchronousTask::Failed : AsynchronousTask::Finished);
-
- if (task->hasFailed()) {
+ if (task->state() == AsynchronousTask::Failed) {
handleFailure(task);
} else {
+ task->setState(AsynchronousTask::Finished);
qCDebug(LogInstaller) << "emit finished" << task->id();
emit taskFinished(task->id());
}
diff --git a/src/monitor-lib/processreader.cpp b/src/monitor-lib/processreader.cpp
index ae092ce8..03a48135 100644
--- a/src/monitor-lib/processreader.cpp
+++ b/src/monitor-lib/processreader.cpp
@@ -146,7 +146,7 @@ bool ProcessReader::readSmaps(const QByteArray &smapsFile, Memory &mem)
ok = false;
int blockLen = 0;
while (fgets(line, lineLen, sf.file) != nullptr && !ok) {
- if (!(line[0] < '0' || line[0] > '9') && (line[0] < 'a' || line[0] > 'f'))
+ if ((line[0] >= '0' && line[0] <= '9') || (line[0] >= 'a' && line[0] <= 'f'))
ok = true;
++blockLen;
}
diff --git a/src/notification-lib/notification.cpp b/src/notification-lib/notification.cpp
index f04b623c..66940dca 100644
--- a/src/notification-lib/notification.cpp
+++ b/src/notification-lib/notification.cpp
@@ -258,7 +258,7 @@ QVariantList Notification::actions() const
\qmlproperty bool Notification::showActionsAsIcons
Holds a hint supplied by the client on how to present the \c actions. If this property is \c false,
- the notification actions should be shown in text form. Otherwise, the \c actionText should be
+ the notification actions should be shown in text form. Otherwise, the \c actionId should be
taken as an icon name conforming to the \c freedesktop.org icon naming specification (in a
closed system, these could also be any icon specification string that the notification server
understands).
diff --git a/src/shared-main-lib/monitormodel.cpp b/src/shared-main-lib/monitormodel.cpp
index 3986c8bd..774aeeb3 100644
--- a/src/shared-main-lib/monitormodel.cpp
+++ b/src/shared-main-lib/monitormodel.cpp
@@ -131,7 +131,9 @@ MonitorModel::MonitorModel(QObject *parent)
MonitorModel::~MonitorModel()
{
+ // avoid calling clear, as this would emit signals
qDeleteAll(m_rows);
+ qDeleteAll(m_dataSources);
}
/*!
diff --git a/src/window-lib/waylandcompositor.cpp b/src/window-lib/waylandcompositor.cpp
index 9348c80e..61df0c85 100644
--- a/src/window-lib/waylandcompositor.cpp
+++ b/src/window-lib/waylandcompositor.cpp
@@ -154,6 +154,7 @@ WaylandCompositor::WaylandCompositor(QQuickWindow *window, const QString &waylan
connect(m_xdgShell, &QWaylandXdgShell::pong, this, &WaylandCompositor::onXdgPongReceived);
auto wmext = new QWaylandQtWindowManager(this);
+ wmext->setParent(this);
connect(wmext, &QWaylandQtWindowManager::openUrl, this, [](QWaylandClient *client, const QUrl &url) {
if (!ApplicationManager::instance()->fromProcessId(client->processId()).isEmpty())
ApplicationManager::instance()->openUrl(url.toString());
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index ca646a23..7d015acf 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -1,4 +1,9 @@
+if (NOT QT_FEATURE_am_installer)
+ message(WARNING "QT_FEATURE_am_installer is disabled, skipping all auto tests")
+ return()
+endif()
+
add_subdirectory(application)
add_subdirectory(applicationinfo)
add_subdirectory(applicationinstaller)
diff --git a/tests/auto/qml/quicklaunch/tst_quicklaunch.qml b/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
index f308a8fe..d83793bc 100644
--- a/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
+++ b/tests/auto/qml/quicklaunch/tst_quicklaunch.qml
@@ -34,6 +34,7 @@ TestCase {
onRequestReceived: function(request) {
acknowledged = true
+ request.sendReply({ })
}
}
diff --git a/tests/auto/signature/BLACKLIST b/tests/auto/signature/BLACKLIST
index 4f8b4739..1d405a06 100644
--- a/tests/auto/signature/BLACKLIST
+++ b/tests/auto/signature/BLACKLIST
@@ -1,3 +1,4 @@
[crossPlatform]
# QTBUG-109756
rhel-9.0
+rhel-9.2
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
index 521749b9..31b64799 100644
--- a/tests/data/CMakeLists.txt
+++ b/tests/data/CMakeLists.txt
@@ -1,4 +1,9 @@
+if (NOT QT_FEATURE_am_installer)
+ message(WARNING "QT_FEATURE_am_installer is disabled, cannot generate test packages")
+ return()
+endif()
+
file(GLOB_RECURSE TEST_DATA_FILES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
certificates/*