summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-10-11 00:15:31 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-10-11 00:15:31 +0300
commit0e70a654b1fa1b1aa3cc7166bde7b099a7b04de2 (patch)
tree97b0ab317f2de9ad97f121873b475110f1635f69
parent48b7b06093070b643056c759bd31f30a6b8752fb (diff)
parenteb9b0d3812567908e817ff0a767edc1c9939f888 (diff)
Merge tag 'v6.5.7-lts' into tqtc/lts-6.5-opensourcev6.5.7-lts-lgpl6.5
Qt 6.5.7-lts release Conflicts solved: dependencies.yaml Change-Id: I59e5fb5095413538bd95107101a0980605601be5
-rw-r--r--.cmake.conf2
-rw-r--r--coin/module_config.yaml7
-rw-r--r--dependencies.yaml10
-rw-r--r--src/3rdparty/libbacktrace/libbacktrace/config.h3
-rw-r--r--src/common-lib/CMakeLists.txt2
-rw-r--r--src/common-lib/qtyaml.cpp157
-rw-r--r--src/dbus-lib/packagemanagerdbuscontextadaptor.cpp8
-rw-r--r--src/intent-server-lib/intentserver.cpp4
-rw-r--r--src/main-lib/Qt6AppManMainPrivateMacros.cmake2
-rw-r--r--src/main-lib/cmake-macros.qdoc2
-rw-r--r--src/main-lib/configuration.cpp7
-rw-r--r--src/manager-lib/applicationmanager.cpp25
-rw-r--r--src/manager-lib/applicationmanager.h2
-rw-r--r--src/manager-lib/installationtask.cpp48
-rw-r--r--src/tools/controller/controller.cpp6
-rw-r--r--src/tools/packager/packagingjob.cpp5
-rw-r--r--tests/auto/qml/simple/tst_applicationmanager.qml2
-rw-r--r--tests/auto/runtime/tst_runtime.cpp2
18 files changed, 165 insertions, 129 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 8b61d211..0ea483ac 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1 +1 @@
-set(QT_REPO_MODULE_VERSION "6.5.6")
+set(QT_REPO_MODULE_VERSION "6.5.7")
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 23190306..b5fb510f 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -63,13 +63,6 @@ instructions:
- type: EnvironmentVariable
variableName: AM_NO_CRASH_HANDLER
variableValue: 1
- - type: EnvironmentVariable
- variableName: WAYLAND_DISPLAY
- variableValue: ""
- enable_if:
- condition: property
- property: osVersion
- contains_value: Debian_11_6
- type: Group
instructions:
- !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml"
diff --git a/dependencies.yaml b/dependencies.yaml
index 963b41a2..1accf0b7 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
dependencies:
../tqtc-qtbase:
- ref: 5d8e9a8415562ba004b38508d91e1fa0254c17d3
+ ref: fc0e66eefe3a08428ca4a6e92c66f37ac126d3c4
required: true
- ../tqtc-qtdeclarative:
- ref: ff0a47c8f267e905113b82c53af2742027f0eca6
+ ../tqtc-qtwebsockets:
+ ref: 40af0582a02548d6a5f17e331c9742cd24aa78c7
required: true
../tqtc-qttools:
- ref: 786bdcbf8cdc7ba3d4e5a8c15e1ead03c5926967
+ ref: cf5106463bd3aeb78a6a51839673b0e4f008fd82
required: false
../tqtc-qtwayland:
- ref: f8311fcc9afee8ef334ef626dc7fe37d27fdae64
+ ref: 958a7c69fff5838a51f1dfed7ef1b2feed22e4b7
required: false
diff --git a/src/3rdparty/libbacktrace/libbacktrace/config.h b/src/3rdparty/libbacktrace/libbacktrace/config.h
index 88f27c9b..715e5371 100644
--- a/src/3rdparty/libbacktrace/libbacktrace/config.h
+++ b/src/3rdparty/libbacktrace/libbacktrace/config.h
@@ -7,4 +7,5 @@
#define HAVE_SYNC_FUNCTIONS 1
#define HAVE_LIBDWARF_DWARF_H 1
#define HAVE_LINK_H 1
-
+#define HAVE_LSTAT 1
+#define HAVE_READLINK 1
diff --git a/src/common-lib/CMakeLists.txt b/src/common-lib/CMakeLists.txt
index 26a0f240..f43886bc 100644
--- a/src/common-lib/CMakeLists.txt
+++ b/src/common-lib/CMakeLists.txt
@@ -35,7 +35,7 @@ qt_internal_add_module(AppManCommonPrivate
AM_COMPILING_APPMAN
)
-qt_internal_extend_target(AppManCommonPrivate CONDITION TARGET Qt::DltLogging
+qt_internal_extend_target(AppManCommonPrivate CONDITION QT_FEATURE_am_dltlogging
PUBLIC_LIBRARIES
Qt::DltLogging
)
diff --git a/src/common-lib/qtyaml.cpp b/src/common-lib/qtyaml.cpp
index 2d64a3c9..3db9cdd6 100644
--- a/src/common-lib/qtyaml.cpp
+++ b/src/common-lib/qtyaml.cpp
@@ -21,6 +21,77 @@ QT_BEGIN_NAMESPACE_AM
namespace QtYaml {
+enum ValueIndex {
+ ValueNull,
+ ValueTrue,
+ ValueFalse,
+ ValueNaN,
+ ValueInf
+};
+
+struct StaticMapping
+{
+ QString text;
+ ValueIndex index = ValueNull;
+};
+
+static const StaticMapping staticMappings[] = { // keep this sorted for bsearch !!
+ { qSL(".INF"), ValueInf },
+ { qSL(".Inf"), ValueInf },
+ { qSL(".NAN"), ValueNaN },
+ { qSL(".NaN"), ValueNaN },
+ { qSL(".inf"), ValueInf },
+ { qSL(".nan"), ValueNaN },
+ { qSL("FALSE"), ValueFalse },
+ { qSL("False"), ValueFalse },
+ { qSL("N"), ValueFalse },
+ { qSL("NO"), ValueFalse },
+ { qSL("NULL"), ValueNull },
+ { qSL("No"), ValueFalse },
+ { qSL("Null"), ValueNull },
+ { qSL("OFF"), ValueFalse },
+ { qSL("Off"), ValueFalse },
+ { qSL("ON"), ValueTrue },
+ { qSL("On"), ValueTrue },
+ { qSL("TRUE"), ValueTrue },
+ { qSL("True"), ValueTrue },
+ { qSL("Y"), ValueTrue },
+ { qSL("YES"), ValueTrue },
+ { qSL("Yes"), ValueTrue },
+ { qSL("false"), ValueFalse },
+ { qSL("n"), ValueFalse },
+ { qSL("no"), ValueFalse },
+ { qSL("null"), ValueNull },
+ { qSL("off"), ValueFalse },
+ { qSL("on"), ValueTrue },
+ { qSL("true"), ValueTrue },
+ { qSL("y"), ValueTrue },
+ { qSL("yes"), ValueTrue },
+ { qSL("~"), ValueNull }
+};
+
+
+static inline StaticMapping *findStaticMapping(const QString &str)
+{
+ static const QString firstCharStaticMappings = qSL(".FNOTYfnoty~");
+ const QChar firstChar = str.isEmpty() ? QChar(0) : str.at(0);
+
+ if (firstCharStaticMappings.contains(firstChar)) { // cheap check to avoid expensive bsearch
+ StaticMapping key { str, ValueNull };
+ auto found = bsearch(&key,
+ staticMappings,
+ sizeof(staticMappings) / sizeof(staticMappings[0]),
+ sizeof(staticMappings[0]),
+ [](const void *m1, const void *m2) {
+ return static_cast<const StaticMapping *>(m1)->text.compare(static_cast<const StaticMapping *>(m2)->text);
+ });
+
+ return static_cast<StaticMapping *>(found);
+ }
+ return nullptr;
+};
+
+
static inline void yerr(int result) Q_DECL_NOEXCEPT_EXPR(false)
{
if (!result)
@@ -86,7 +157,16 @@ static void emitYaml(yaml_emitter_t *e, const QVariant &value, YamlStyle style)
QVariantMap map = value.toMap();
for (auto it = map.constBegin(); it != map.constEnd(); ++it) {
- emitYamlScalar(e, it.key().toUtf8());
+ const QString &key = it.key();
+ // We could just quote everything, but this would break backwards compatibility
+ // inside the AM itself (e.g. HMAC calculations for installation-report.yaml)
+ bool needsQuoting = key.isEmpty() || findStaticMapping(key);
+ if (!needsQuoting) {
+ char16_t firstChar = key.at(0).unicode();
+ needsQuoting = ((firstChar >= u'0' && firstChar <= u'9')
+ || firstChar == u'+' || firstChar == u'-' || firstChar == u'.');
+ }
+ emitYamlScalar(e, key.toUtf8(), needsQuoting);
emitYaml(e, it.value(), style);
}
@@ -143,6 +223,7 @@ QByteArray yamlFromVariantDocuments(const QVector<QVariant> &documents, YamlStyl
} // namespace QtYaml
+using namespace QtYaml;
class YamlParserPrivate
{
@@ -295,20 +376,6 @@ QVariant YamlParser::parseScalar() const
return scalar;
}
- enum ValueIndex {
- ValueNull,
- ValueTrue,
- ValueFalse,
- ValueNaN,
- ValueInf
- };
-
- struct StaticMapping
- {
- QString text;
- ValueIndex index;
- };
-
static const QVariant staticValues[] = {
QVariant::fromValue(nullptr), // ValueNull
QVariant(true), // ValueTrue
@@ -317,61 +384,15 @@ QVariant YamlParser::parseScalar() const
QVariant(qInf()), // ValueInf
};
- static const StaticMapping staticMappings[] = { // keep this sorted for bsearch !!
- { qSL(""), ValueNull },
- { qSL(".INF"), ValueInf },
- { qSL(".Inf"), ValueInf },
- { qSL(".NAN"), ValueNaN },
- { qSL(".NaN"), ValueNaN },
- { qSL(".inf"), ValueInf },
- { qSL(".nan"), ValueNaN },
- { qSL("FALSE"), ValueFalse },
- { qSL("False"), ValueFalse },
- { qSL("N"), ValueFalse },
- { qSL("NO"), ValueFalse },
- { qSL("NULL"), ValueNull },
- { qSL("No"), ValueFalse },
- { qSL("Null"), ValueNull },
- { qSL("OFF"), ValueFalse },
- { qSL("Off"), ValueFalse },
- { qSL("ON"), ValueTrue },
- { qSL("On"), ValueTrue },
- { qSL("TRUE"), ValueTrue },
- { qSL("True"), ValueTrue },
- { qSL("Y"), ValueTrue },
- { qSL("YES"), ValueTrue },
- { qSL("Yes"), ValueTrue },
- { qSL("false"), ValueFalse },
- { qSL("n"), ValueFalse },
- { qSL("no"), ValueFalse },
- { qSL("null"), ValueNull },
- { qSL("off"), ValueFalse },
- { qSL("on"), ValueTrue },
- { qSL("true"), ValueTrue },
- { qSL("y"), ValueTrue },
- { qSL("yes"), ValueTrue },
- { qSL("~"), ValueNull }
- };
+ if (scalar.isEmpty())
+ return staticValues[ValueNull];
- static const char *firstCharStaticMappings = ".FNOTYfnoty~";
- char firstChar = scalar.isEmpty() ? 0 : scalar.at(0).toLatin1();
-
- if (strchr(firstCharStaticMappings, firstChar)) { // cheap check to avoid expensive bsearch
- StaticMapping key { scalar, ValueNull };
- auto found = bsearch(&key,
- staticMappings,
- sizeof(staticMappings) / sizeof(staticMappings[0]),
- sizeof(staticMappings[0]),
- [](const void *m1, const void *m2) {
- return static_cast<const StaticMapping *>(m1)->text.compare(static_cast<const StaticMapping *>(m2)->text);
- });
-
- if (found)
- return staticValues[static_cast<StaticMapping *>(found)->index];
- }
+ if (auto sm = findStaticMapping(scalar))
+ return staticValues[sm->index];
- if ((firstChar >= '0' && firstChar <= '9') // cheap check to avoid expensive regexps
- || firstChar == '+' || firstChar == '-' || firstChar == '.') {
+ char16_t firstChar = scalar.at(0).unicode();
+ if ((firstChar >= u'0' && firstChar <= u'9') // cheap check to avoid expensive regexps
+ || firstChar == u'+' || firstChar == u'-' || firstChar == u'.') {
// We are using QRegularExpressions in multiple threads here, although the class is not
// marked thread-safe. We are relying on the const match() function to behave thread-safe
// which it does. There's an autotest (tst_yaml / parallel) to make sure we catch changes
diff --git a/src/dbus-lib/packagemanagerdbuscontextadaptor.cpp b/src/dbus-lib/packagemanagerdbuscontextadaptor.cpp
index 5a1b31b0..907bac9f 100644
--- a/src/dbus-lib/packagemanagerdbuscontextadaptor.cpp
+++ b/src/dbus-lib/packagemanagerdbuscontextadaptor.cpp
@@ -66,10 +66,10 @@ PackageManagerAdaptor::PackageManagerAdaptor(QObject *parent)
const auto apps = package->applications(); // these are QObject * (legacy API)
QVariantList appList;
appList.reserve(apps.size());
- for (const auto *obj : apps) {
- QVariantMap app = ApplicationManager::instance()->get(obj->property("id").toString());
- app.remove(qSL("application")); // cannot marshall QObject *
- appList.append(app);
+ for (auto *app : apps) {
+ QVariantMap appMap = ApplicationManager::instance()->get(qobject_cast<Application *>(app));
+ appMap.remove(qSL("application")); // cannot marshall QObject *
+ appList.append(appMap);
}
map.insert(qSL("applications"), appList);
map = convertToDBusVariant(map).toMap();
diff --git a/src/intent-server-lib/intentserver.cpp b/src/intent-server-lib/intentserver.cpp
index c6cd7718..adc0ffa7 100644
--- a/src/intent-server-lib/intentserver.cpp
+++ b/src/intent-server-lib/intentserver.cpp
@@ -175,6 +175,10 @@ IntentServer::IntentServer(IntentServerSystemInterface *systemInterface, QObject
IntentServer::~IntentServer()
{
+ qDeleteAll(m_requestQueue);
+ qDeleteAll(m_disambiguationQueue);
+ qDeleteAll(m_startingAppQueue);
+ qDeleteAll(m_sentToAppQueue);
qDeleteAll(m_intents);
s_instance = nullptr;
}
diff --git a/src/main-lib/Qt6AppManMainPrivateMacros.cmake b/src/main-lib/Qt6AppManMainPrivateMacros.cmake
index a1193ebf..da57e774 100644
--- a/src/main-lib/Qt6AppManMainPrivateMacros.cmake
+++ b/src/main-lib/Qt6AppManMainPrivateMacros.cmake
@@ -145,7 +145,7 @@ exec ${ARG_EXECUTABLE} ${CMD_ARGS_STR} ${CMD_EXTRA_ARGS_STR} ${ARG_MAIN_QML_FILE
add_dependencies(${target} ${target}_deploy)
set(EXTRA_COMMAND "")
- if ("${WRAPPER_SUFFIX}" STREQUAL ".sh")
+ if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
set(EXTRA_COMMAND COMMAND chmod +x ${WRAPPER_SCRIPT})
endif()
diff --git a/src/main-lib/cmake-macros.qdoc b/src/main-lib/cmake-macros.qdoc
index 853b9651..d7d35249 100644
--- a/src/main-lib/cmake-macros.qdoc
+++ b/src/main-lib/cmake-macros.qdoc
@@ -6,7 +6,7 @@
\ingroup cmake-macros-qtapplicationmanager
\title qt_am_add_systemui_wrapper
-\target qt6_am_add_systemui_wrapper
+\keyword qt6_am_add_systemui_wrapper
\brief Creates a basic wrapper script to run a System UI using the appman binary.
diff --git a/src/main-lib/configuration.cpp b/src/main-lib/configuration.cpp
index 18c2724a..f966f898 100644
--- a/src/main-lib/configuration.cpp
+++ b/src/main-lib/configuration.cpp
@@ -1246,13 +1246,6 @@ QString Configuration::waylandSocketName() const
if (!socketName.isEmpty())
return socketName;
- const char *envName = "WAYLAND_DISPLAY";
- if (qEnvironmentVariableIsSet(envName)) {
- socketName = qEnvironmentVariable(envName);
- if (!QGuiApplication::platformName().startsWith(qSL("wayland")) || (socketName != qSL("wayland-0")))
- return socketName;
- }
-
if (!m_data->wayland.socketName.isEmpty())
return m_data->wayland.socketName;
diff --git a/src/manager-lib/applicationmanager.cpp b/src/manager-lib/applicationmanager.cpp
index 49e578a0..e950e10a 100644
--- a/src/manager-lib/applicationmanager.cpp
+++ b/src/manager-lib/applicationmanager.cpp
@@ -564,6 +564,17 @@ QVector<Application *> ApplicationManager::mimeTypeHandlers(const QString &mimeT
return handlers;
}
+QVariantMap ApplicationManager::get(Application *app) const
+{
+ QVariantMap map;
+ if (app) {
+ const QHash<int, QByteArray> roles = roleNames();
+ for (auto it = roles.begin(); it != roles.end(); ++it)
+ map.insert(QString::fromLatin1(it.value()), dataForRole(app, it.key()));
+ }
+ return map;
+}
+
void ApplicationManager::registerMimeTypes()
{
#if defined(QT_GUI_LIB)
@@ -1254,7 +1265,11 @@ QVariant ApplicationManager::data(const QModelIndex &index, int role) const
return QVariant();
Application *app = d->apps.at(index.row());
+ return dataForRole(app, role);
+}
+QVariant ApplicationManager::dataForRole(Application *app, int role) const
+{
switch (role) {
case AMRoles::Id:
return app->id();
@@ -1325,12 +1340,7 @@ QVariantMap ApplicationManager::get(int index) const
qCWarning(LogSystem) << "ApplicationManager::get(index): invalid index:" << index;
return QVariantMap();
}
-
- QVariantMap map;
- QHash<int, QByteArray> roles = roleNames();
- for (auto it = roles.begin(); it != roles.end(); ++it)
- map.insert(qL1S(it.value()), data(this->index(index), it.key()));
- return map;
+ return get(d->apps.at(index));
}
/*!
@@ -1421,8 +1431,7 @@ QStringList ApplicationManager::applicationIds() const
*/
QVariantMap ApplicationManager::get(const QString &id) const
{
- int index = indexOfApplication(id);
- return (index < 0) ? QVariantMap{} : get(index);
+ return get(application(id));
}
Am::RunState ApplicationManager::applicationRunState(const QString &id) const
diff --git a/src/manager-lib/applicationmanager.h b/src/manager-lib/applicationmanager.h
index 3b69b7d2..9fd37edd 100644
--- a/src/manager-lib/applicationmanager.h
+++ b/src/manager-lib/applicationmanager.h
@@ -72,6 +72,7 @@ public:
Application *fromSecurityToken(const QByteArray &securityToken) const;
QVector<Application *> schemeHandlers(const QString &scheme) const;
QVector<Application *> mimeTypeHandlers(const QString &mimeType) const;
+ QVariantMap get(Application *app) const;
bool startApplicationInternal(const QString &appId, const QString &documentUrl = QString(),
const QString &documentMimeType = QString(),
@@ -95,6 +96,7 @@ public:
// the item model part
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
+ QVariant dataForRole(Application *app, int role) const;
QHash<int, QByteArray> roleNames() const override;
int count() const;
diff --git a/src/manager-lib/installationtask.cpp b/src/manager-lib/installationtask.cpp
index 69ebdace..eda70995 100644
--- a/src/manager-lib/installationtask.cpp
+++ b/src/manager-lib/installationtask.cpp
@@ -150,8 +150,7 @@ void InstallationTask::execute()
connect(m_extractor, &PackageExtractor::progress, this, &AsynchronousTask::progress);
- m_extractor->setFileExtractedCallback(std::bind(&InstallationTask::checkExtractedFile,
- this, std::placeholders::_1));
+ m_extractor->setFileExtractedCallback([this](const QString &f) { checkExtractedFile(f); });
if (!m_extractor->extract())
throw Exception(m_extractor->errorCode(), m_extractor->errorString());
@@ -291,6 +290,9 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
}
if (m_foundIcon && m_foundInfo) {
+ // we're not interested in any other files from here on...
+ m_extractor->setFileExtractedCallback(nullptr);
+
bool doubleInstallation = false;
QMetaObject::invokeMethod(PackageManager::instance(), [this, &doubleInstallation]() {
doubleInstallation = PackageManager::instance()->isPackageInstallationActive(m_packageId);
@@ -298,22 +300,6 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
if (doubleInstallation)
throw Exception(Error::Package, "Cannot install the same package %1 multiple times in parallel").arg(m_packageId);
- qCDebug(LogInstaller) << "emit taskRequestingInstallationAcknowledge" << id() << "for package" << m_package->id();
-
- // this is a temporary just for the signal emission below
- m_tempPackageForAcknowledge.reset(new Package(m_package.get(), Package::BeingInstalled));
- m_tempPackageForAcknowledge->moveToThread(m_pm->thread());
- const auto &applicationInfos = m_package.get()->applications();
- for (const auto &applicationInfo : applicationInfos) {
- auto tempApp = new Application(applicationInfo, m_tempPackageForAcknowledge.get());
- tempApp->moveToThread(m_pm->thread());
- m_tempPackageForAcknowledge->addApplication(tempApp);
- m_tempApplicationsForAcknowledge.emplace_back(tempApp);
- }
- emit m_pm->taskRequestingInstallationAcknowledge(id(), m_tempPackageForAcknowledge.get(),
- m_extractor->installationReport().extraMetaData(),
- m_extractor->installationReport().extraSignedMetaData());
-
QDir oldDestinationDirectory = m_extractor->destinationDirectory();
startInstallation();
@@ -346,6 +332,28 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
if (!m_managerApproval)
throw Exception("PackageManager declined the installation of %1").arg(packageId);
+ qCDebug(LogInstaller) << "emit taskRequestingInstallationAcknowledge" << id() << "for package" << packageId;
+
+ // Create temporary objects for QML just for the signal emission.
+ // The problem here is that the PackageInfo instance backing the Package object is also
+ // temporary and the ownership is with the C++ side of the PackageManager.
+ // Ideally we should have kept the 'package' parameter as a dumb QVariantMap, but changing
+ // that back would be a huge API break nowadays as the QML APIs are fully typed.
+ // At least we have to make sure NOT to change anything in the PackageInfo instance after
+ // the signal emission below.
+ m_tempPackageForAcknowledge.reset(new Package(newPackage->info(), Package::BeingInstalled));
+ m_tempPackageForAcknowledge->moveToThread(m_pm->thread());
+ const auto &applicationInfos = newPackage->info()->applications();
+ for (const auto &applicationInfo : applicationInfos) {
+ auto tempApp = new Application(applicationInfo, m_tempPackageForAcknowledge.get());
+ tempApp->moveToThread(m_pm->thread());
+ m_tempPackageForAcknowledge->addApplication(tempApp);
+ m_tempApplicationsForAcknowledge.emplace_back(tempApp);
+ }
+ emit m_pm->taskRequestingInstallationAcknowledge(id(), m_tempPackageForAcknowledge.get(),
+ m_extractor->installationReport().extraMetaData(),
+ m_extractor->installationReport().extraSignedMetaData());
+
// if any of the apps in the package were running before, we now need to wait until all of
// them have actually stopped
while (!m_canceled && newPackage && !newPackage->areAllApplicationsStoppedDueToBlock())
@@ -353,9 +361,6 @@ void InstallationTask::checkExtractedFile(const QString &file) Q_DECL_NOEXCEPT_E
if (m_canceled || newPackage.isNull())
throw Exception(Error::Canceled, "canceled");
-
- // we're not interested in any other files from here on...
- m_extractor->setFileExtractedCallback(nullptr);
}
}
@@ -429,7 +434,6 @@ void InstallationTask::finishInstallation() Q_DECL_NOEXCEPT_EXPR(false)
// POSIX cannot atomically rename directories, if the destination directory exists
// and is non-empty. We need to do a double-rename in this case, which might fail!
- // The image is a file, so this limitation does not apply!
ScopedRenamer renameApplication;
diff --git a/src/tools/controller/controller.cpp b/src/tools/controller/controller.cpp
index a52631ac..535c473a 100644
--- a/src/tools/controller/controller.cpp
+++ b/src/tools/controller/controller.cpp
@@ -579,7 +579,11 @@ void startOrDebugApplication(const QString &debugWrapper, const QString &appId,
// pass 0: normal stop / pass 1: force kill
for (int pass = 0; !isStopped && (pass < 2); ++pass) {
- stopApplication(appId, pass == 0 ? false : true);
+
+ auto stopReply = dbus.manager()->stopApplication(appId, pass > 0 /*forceKill*/);
+ stopReply.waitForFinished();
+ if (stopReply.isError())
+ throw Exception(Error::IO, "failed to call stopApplication via DBus: %1").arg(stopReply.error().message());
static const int checksPerSecond = 10;
diff --git a/src/tools/packager/packagingjob.cpp b/src/tools/packager/packagingjob.cpp
index 3462325c..9a95c212 100644
--- a/src/tools/packager/packagingjob.cpp
+++ b/src/tools/packager/packagingjob.cpp
@@ -167,7 +167,10 @@ void PackagingJob::execute() Q_DECL_NOEXCEPT_EXPR(false)
if (applications.isEmpty())
throw Exception(Error::Package, "no applications defined in package");
for (const auto application : applications) {
- if (!QFile::exists(source.absoluteFilePath(application->codeFilePath()))) {
+ const auto code = application->codeFilePath();
+ if (code.startsWith(qSL(":/"))) // we just have to accept resource paths as is
+ continue;
+ if (!QFile::exists(source.absoluteFilePath(code))) {
throw Exception(Error::Package, "missing the file referenced by the 'code' field for application '%1'")
.arg(application->id());
}
diff --git a/tests/auto/qml/simple/tst_applicationmanager.qml b/tests/auto/qml/simple/tst_applicationmanager.qml
index a2e6a408..fad06b27 100644
--- a/tests/auto/qml/simple/tst_applicationmanager.qml
+++ b/tests/auto/qml/simple/tst_applicationmanager.qml
@@ -30,6 +30,8 @@ TestCase {
ListView {
id: listView
+ width: 200
+ height: 200
model: ApplicationManager
delegate: Item {
property var modelData: model
diff --git a/tests/auto/runtime/tst_runtime.cpp b/tests/auto/runtime/tst_runtime.cpp
index d3591f64..1c1589be 100644
--- a/tests/auto/runtime/tst_runtime.cpp
+++ b/tests/auto/runtime/tst_runtime.cpp
@@ -93,7 +93,7 @@ void tst_Runtime::factory()
QVERIFY(rf.get() == RuntimeFactory::instance());
QVERIFY(rf->runtimeIds().isEmpty());
- QVERIFY(rf->registerRuntime(new TestRuntimeManager(qSL("foo"), qApp)));
+ QVERIFY(rf->registerRuntime(new TestRuntimeManager(qSL("foo"), QCoreApplication::instance())));
QVERIFY(rf->runtimeIds() == QStringList() << qSL("foo"));
QVERIFY(!rf->create(nullptr, nullptr));