summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix some more obvious issues in GPU readerBernd Weimer2023-05-123-27/+20
| | | | | | | | | | | Reference count has been fixed to properly terminate underlying GPU memory tracing process, no warning is printed any more when the process finishes and parsing intel_gpu_top output has been adapted to pick the actual load value (subject to future changes in the tool). Change-Id: I7f02e7b48b826da2d6b10f1d67470b560a3c7c21 Pick-to: 6.5 6.2 5.15 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Force our session bus to be a file-based socket on Linux. (part 3)Robert Griebl2023-05-111-2/+2
| | | | | | | | | | Manually constructing a socket path on macOS and legacy Linux was wrong and prevent the start of the dbus-daemon: /tmpam/... instead of /tmp/am/... Pick-to: 6.5 6.2 5.15 Change-Id: I101f74b50ba0477cbf49b59bfc76982c60dc7e0b Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Force our session bus to be a file-based socket on Linux. (part 2)Robert Griebl2023-05-111-1/+26
| | | | | | | | | Detect if we are running against an old D-Bus library where the "unix:dir=..." syntax is not supported. Change-Id: Icc4ac38868e0bc2ea2675d86384c4ff33aa11cdb Pick-to: 6.5 6.2 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Ensure that process title code isn't optimized outBernd Weimer2023-05-111-1/+1
| | | | | | | | | Some compilers optimzed out the ProcessTitleInitialize function in the .init_array section, since it isn't called explicitly. Change-Id: Ifd1fbdf9afd9e991a28590aeab7068223f5a132a Pick-to: 5.15 6.2 6.5 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Limit WAYLAND_DISPLAY to control only client sideBernd Weimer2023-05-111-7/+0
| | | | | | | | | | | The WAYLAND_DISPLAY environment variable not only controlled what server to connect to as a client in a nested setup, but also what server socket was established. This led to many unusable configurations (either the socket was already locked or not available). The server socket should be provided via the CL or configuration file only. Change-Id: I7fa54c7cc5b5f2baa49b8b68f8de4f98edfc94c0 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Unbreak the submodule integrationRobert Griebl2023-05-111-41/+52
| | | | | | | | | | | | | | Commit 3bf5b5f8944dd417530b09dd6f1cd568717c8cc1 in qtbase broke our pattern of using the result of std::bind() as a QMetaObject::invokeMethod parameter (at least on gcc-10). The C++ standard describes the return value of std::bind as "undefined" and that probably doesn't work with the new return value detection in qtbase on every compiler/c++lib combination. Change-Id: I66ba16fe2535f1a55b2c0d4c6aadd093aa7543be Fixes: QTBUG-113501 Reviewed-by: Zoltan Gera <zoltan.gera@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Fix linking to org.freedesktop.Notifications specificationTopi Reinio2023-05-092-10/+6
| | | | | | | | | | | The \externalpage entry and hard-coded URLs were pointing to a location that no longer exists; Update it, move the \externalpage to doc/external-pages.qdoc, and fix associated linking. Pick-to: 6.5 Fixes: QTBUG-113297 Change-Id: I19d6847d645e445498ba7b80bc5c44856d76b57c Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Also expose applications in taskRequestingInstallationAcknowledgeRobert Griebl2023-05-093-0/+22
| | | | | | | | | | Since switching to the new multiple-apps-per-package architecture, the actual infos about the apps in the package were not exposed via the requesting-acknowledge signal anymore. Change-Id: Id535c5d8710998ce26043ec8e56cd1881961628d Pick-to: 5.15 6.2 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix API breakage introduced in 6.5.0Robert Griebl2023-05-042-2/+2
| | | | | | | | | | The DBus API cleanup commit 4a14abf206c548b80f2942c4d42e23b0e97ddeb1 for 6.5.0 accidentally broke the NotificationManager.count and the ApplicationManager.containerSelectionFunction properties. Change-Id: I87ccd8c695e8b9d18a5e4d09aaebd335bc8457c9 Pick-to: 6.5 6.5.1 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Force our session bus to be a file-based socket on LinuxRobert Griebl2023-05-031-1/+6
| | | | | | | | | | Different versions of libdbus handle the default listen address (unix:tmpdir=/tmp) differently: you may get a file-based socket (Debian/sid), but you also may get an abstract socket (Ubuntu 22.04). Change-Id: I703679e5f9b0315027a4b2cabd5db1800870ab00 Pick-to: 6.5 6.2 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Make it possible to specify directories to read config files fromRobert Griebl2023-03-231-1/+12
| | | | | | | | | | This extends the existing -c/--config-file option to also accept directories, effectively expanding the argument to all *.yaml files in the given directory. Change-Id: I83f197e8f67ba363bf27b0f511c7821402bb7033 Pick-to: 5.15 6.5 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* yaml: missing values are actually null/~, not empty stringsRobert Griebl2023-03-211-70/+74
| | | | | | Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I6ca98e219bf4c3de9a1eaaae5ddeb7e7cfa27107 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix configuration version conflict between the Qt 5 and Qt 6 AMRobert Griebl2023-03-101-1/+1
| | | | | | | | | | | | | | The configuration caches are versioned, but the Qt 5 and 6 versions got their cache version numbers bumped independently. This led to a situation where 5.15.12 and 6.4.2 both ended up at version '9', although they are binary incompatible. The fix here is to encode the major Qt version into the cache header as well, to make caches incompatible between Qt major versions. Change-Id: I7bbf7cb97cc1ea8bc4f16285588958ba11c19833 Pick-to: 6.2 6.4 6.5 6.5.0 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* appman-controller: detect broken D-Bus connections and quit with errorRobert Griebl2023-03-021-39/+107
| | | | | | | | | | | | | | | | | | | | In case the AM crashed or the bus died during an install-package command, the appman-controller would have waited for a taskFail / taskFinished signal infinitely. We now detect a D-Bus service owner change (the AM crashed) and a disconnected D-Bus (the bus died). Even though the D-Bus daemon dying sounds unlikely, it is the norm when running the AM with --dbus=auto (the default). If the AM crashes (or gets terminated by an IDE), the private dbus-daemon just quits. This makes the controller much more suitable for scripting. Also fixed a bunch of clang/clazy warnings in this file. Change-Id: I01a3772fd8773d707984a07d38cbce1d7ab36c94 Pick-to: 5.15 6.5 6.5.0 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix D-Bus registration error handlingRobert Griebl2023-03-021-17/+12
| | | | | | | | | | | | | The inner try/catch block is a merge artifact and is actually hampering correct error handling, as the exit(2) call is a no-op before the event loop is started. We really want all exceptions that are supposed to stop the startup process to bubble up into setup(). Change-Id: Ic8f056346bfe927d89a21be740a9676f579cfdaa Pick-to: 6.5 6.5.0 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Update libarchive 3rd-party code from 3.6.1 to 3.6.2Robert Griebl2023-02-2214-22/+80
| | | | | | Change-Id: I4b40a2f820e52bdfa8c4165b7a10b25d7e941e17 Pick-to: 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Allow the registration of custom runtimes without patchingRobert Griebl2023-02-165-8/+29
| | | | | | | | | | The new configuration key runtimes.registerCustomIds will now allow a configuration based registration of custom runtimes. Change-Id: Id94ab614a8460e4d941b97d8ed008f75b3d88d27 Task-number: QTBUG-107886 Pick-to: 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Cleanup the D-Bus interfacesRobert Griebl2023-02-1513-57/+142
| | | | | | | | | | - most of the newer PackageManager signals were not exposed at all - some properties were not exposed consistently or used the wrong type - clarified the D-Bus policy settings in regards to properties Change-Id: I6875c0a0613a0a63af2386d311a1a6c7c0031b7b Pick-to: 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Re-enable dbus xml generation from sourceRobert Griebl2023-02-154-10/+36
| | | | | | | | | | | Somehow qdbuscpp2xml is unable to cope with QT_PREPEND_NAMESPACE_AM in Qt6, so we need to detect it and work around the issue. Long-term the tool needs a Q_DBUSCPP2XML_RUN define, to make the identification of this pre-compiler more robust. Pick-to: 6.5 Change-Id: I88fd50669e7e5c9942fbc96c02aa452cda5171c8 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix race condition when un-installing running appsRobert Griebl2023-02-071-7/+14
| | | | | | | | | | | | It is very unlikely, but there is a race condition between the installer thread and the main thread regarding the life time of the Application object that is currently being uninstalled. We have a clear backtrace from a production system pointing to this error, but we cannot reproduce this problem in an unit test. Change-Id: I290582f270455c64e8653813c5e9d47c294f60e1 Pick-to: 5.15 6.2 6.4 6.5 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the broken tests after the retirement of qt_parse_all_argumentsAmir Masoud Abdol2023-02-022-7/+7
| | | | | | | | | | As we are now processing the arguments with cmake_parse_arguments(PARSE_ARGV, we don't need to pass the escape characters anymore. Task-number: QTBUG-99238 Change-Id: Ib2c8930b5a747140c0c8b877f994db083ad7bec6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Handle missing wayland display gracefullyBernd Weimer2023-01-301-0/+5
| | | | | | | | | | | | When the wayland socket didn't exist, the appman-launcher-qml would terminate with an abort. This could happen for instance inside a container when the socket file was not mapped. This has been mitigated to only show a critical error message in the am.runtime.qml logging category and exit gracefully (with an error return code). Pick-to: 6.5 5.15 Change-Id: Id29d0e79e260726d1ffd9b940eac806b483b8a19 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Port from qAsConst to std::as_constMarc Mutz2023-01-1417-47/+47
| | | | | | | | QT_NO_AS_CONST is now globally enabled in qtbase. Pick-to: 6.5 Change-Id: Ifc2eab1c902e75f5dbfc38ef9a62b29b5c91bc61 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* cmake: do not find_package the packager tool when building the AMRobert Griebl2023-01-142-1/+2
| | | | | | | | Also fixed a minor cmake warning while at it. Pick-to: 6.5 Change-Id: Iad3f48df689d6e80e1381443639aeb9f0e27a0e2 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Try to deal with the non-standard OpenSSL3 setup in Coin VMsRobert Griebl2023-01-143-2/+5
| | | | | | | | | | | | | | * The system's OpenSSL libs might be different (even 1.x based) than the 3.x libs Qt is built against. * macOS still cannot handle the new default algorithms used by OpenSSL 3 for PKCS#12, so we have to create these using "-legacy". * Also be lenient in the packager and try to use old certificates, if the user specifies them: they might be deployed to a legacy system. Pick-to: 6.5 Change-Id: Icbcb8e53d6d0d102bb51b28780712adb4e919401 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Always compile dbus-utilities.hRobert Griebl2022-12-121-3/+1
| | | | | | | | The code was already written to have a dummy API implementation, if QtDBus is not available. Change-Id: I93a701aad32ce80b9bd07c2aad463481d4e7fe98 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: mark qt6_am_add_systemui_wrapper as TPRobert Griebl2022-12-121-2/+5
| | | | | | | | Also put more emphasis on the scaling issue. This was decided in the 6.5 CMake API review. Change-Id: I4ad8d39434bb514513a4864ec7081a264d928d42 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* CMake: Fix missing waylandwindow.h include errorAlexandru Croitor2022-12-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | The header stopped being generated by syncqt/cpp on certain platforms because we only generate headers that meet the qt_internal_extend_target conditions. In this case qtwayland is not available on macOS, and thus the waylandwindow.h header is not generated. Fix windowframetimer.cpp to include it conditionally only if the multi process feature is enabled. Not generating the header is fine in this case, because the whole module is Private, even though the header has no _p.h suffix. This unblocks the build with syncqt/cpp. Fixes: QTBUG-109337 Change-Id: I0a38af6d23e5d1c9e040281a52a3b719106382b9 Reviewed-by: Zoltan Gera <zoltan.gera@qt.io> Reviewed-by: Robert Griebl <robert.griebl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix include style to what's mandated for public headersAlexandru Croitor2022-12-1284-275/+275
| | | | | | | | | | This fixes errors for the developer-build. Task-number: QTBUG-109337 Change-Id: I145e5eb5074f6e8b03e3304f58f0dd57ee1dfe95 Reviewed-by: Zoltan Gera <zoltan.gera@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Adjust module to work with syncqt.cppAlexey Edelev2022-12-083-0/+12
| | | | | | | | | Add interface dependencies to fix top-level builds. Add PRIVATE_HEADER_FILTERS for the generated wayland code. Task-number: QTBUG-87480 Change-Id: I6f35777786bf4356cd8cd2c31709601a08407912 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Forward keyboard focus to applicationsBernd Weimer2022-12-014-11/+50
| | | | | | | | | | | | | | | | | Key events were not passed to applications, when the focus moved to a WindowItem in the System UI, since the item representing the application window is actually a child of the WindowItem. A possible solution would be to explicitly send the key events to the application item, though the approach taken here is to forward the keyboard focus. This results in key events always reaching the application first (even when the System UI would actually consume the events) and in single-process mode, if the application consumes the event the System UI won't get it any more. Fixes: QTBUG-108837 Change-Id: I1699556f1a67057e8be2848e37c846c2ee33a646 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fix build without openglSamuli Piippo2022-10-212-2/+3
| | | | | | | | After qtbase commit 8539e641f6f48a605547f66c47266d19e537f74e, opengl headers are not available if the feature is disabled. Change-Id: Ib5f30f67b83a07f98053c8afdea4125d215558b6 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fix a potential crash when trying to start applicationsRobert Griebl2022-10-122-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | If you were calling startApplication() and the runtime failed to execute the app's binary in a container, it would call deleteLater() on the failed runtime object. The problem was that if you immediately called startApplication() once more in the same event loop iteration, the Application object still had the to-be-deleted runtime attached, which in turn prevents the allocation of a new container, so the AM tried to start the application again, but this time with "container" set to nullptr. The actual fix is to NOT call deleteLater, but directly delete the runtime object. In addition, when startApplication() is called for an application, we have to make sure that the application's runtime object can not be in the state NotRunning: the AM could still end up in this state, if a Container plugin is either not reporting shutdown correctly, or if the container's "ready" state is delayed. Change-Id: Ied1baec8c90d4e0a980c296cbc7cd87b12629524 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix a template compile error with Debian's gcc 12.1Robert Griebl2022-10-111-2/+2
| | | | | | Change-Id: I29142dccb62f4f9689a13f0dd5d9b1d4f9f81e05 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix a few documentation inconsistenciesRobert Griebl2022-09-271-0/+3
| | | | | | Change-Id: I33b43f1af4f052ef70fdad80b6abf8cec91f5930 Pick-to: 6.4 6.3 6.2 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* CMake: document qt6_am_add_systemui_wrapperRobert Griebl2022-09-272-6/+67
| | | | | | Fixes: AUTOSUITE-1673 Change-Id: I95bb5768aa96f35a9941ea29492d52eb789d4075 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove the outdated package-uploader tool from this repoRobert Griebl2022-09-273-171/+0
| | | | | | | | In case the qtauto-deployment-server repo will be updated in the future, this tool will move to that repo. Change-Id: I93109a8f08bfd6cab6d96242115099eba48231b6 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* CMake: our tools are really apps as far as the build system is concernedRobert Griebl2022-09-267-68/+48
| | | | | | | | | | | | | | | | | The tool syntax got ported over from the old qmake system, but this leads to problems nowadays on cross or multi-config builds, where the tools are not built at all, unless they are built explicitly. What we call tools, really are apps for Qt's cmake build system, so all of those (except the packager and uploader (*), which really are build- time tools) have been converted to be built as apps. (*) the uploader should be retired or moved to the qt-apps/qtauto-deployment-server repository anyway. Change-Id: I7be0ce63625e53d0bc65387c5e5200c71c00b48a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* 3rdparty update: libarchive from 3.5.1 to 3.6.1Robert Griebl2022-09-1630-455/+668
| | | | | | Change-Id: I1e31754344e4880cb493b5f118e98be2ae725960 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Intents: allow intent injection via DBus when in developmentModeRobert Griebl2022-09-164-1/+177
| | | | | | | | This makes testing and debugging Intents a lot easier, especially since you can even fake the requesting application id. Change-Id: Ie5d46bd2e3a9962ca533bf75d7262c20f95d42b6 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Intents: add broadcastsRobert Griebl2022-09-1618-121/+307
| | | | | | | | | | | | | | | This commit adds a new intent type: a broadcast. Broadcasts will be delivered to all applications (*), but they do not have the possibility to return a reply back to the sender. Implementation wise, they are just treated as normal requests that are multiplexed for every application. (*) This can be limited with the new handleOnlyWhenRunning flag. Change-Id: If9f954cf5e52707624b95c80c8e984dfd6c4315a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* 3rdparty update: libbacktraceRobert Griebl2022-09-135-16/+35
| | | | | | Change-Id: Ibfbfa43ea68fac81ae001197e67d8fe9596ab277 Pick-to: 6.4 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix appman-qmltestrunner initializationDominik Holland2022-09-011-1/+0
| | | | | | | | | | | Don't call QTestRootObject::init() before starting the test. This causes all variables to be reset, including hasTestCase and causes the event loop not to be started. Pick-to: 6.2 6.3 6.4 Fixes: QTBUG-106088 Change-Id: Idaa114efaed1a306aca3affd6f255d918f1a6d29 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Fix the developmentMode flag not being set, if the installer was offRobert Griebl2022-08-232-7/+7
| | | | | | | | This was not a big problem until now, as only the installer itself was using this flag. Change-Id: I1b7a749c5066aa13959dd4d798bd545c3070bac7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the internal IntentHandler map getting corrupted on closing appsRobert Griebl2022-08-171-3/+1
| | | | | | | | | | | | | | | std::remove_if() on a QMap should result in a compile-time error, but it somehow doesn't. Instead the erase(remove_if()) algorithm leaves a corrupted QMap. This is especially noticeable in single-process mode, where the wrong intent handlers are being called after closing any single application, which registered IntentHandlers before. This bug was introduced while fixing clazy warnings. Change-Id: I144c051591ce8564e2653402d12bb926ef32eb76 Pick-to: 6.4 6.3 6.2 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Work around unused result issue in gccRobert Griebl2022-08-161-2/+3
| | | | | | | | | This fixes compilation errors even for older versions of glibc. Change-Id: I930010d20cff1dac7340c5897e39a929b3054cbd Fixes: QTBUG-105688 Pick-to: 6.4 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add explicit include for std::abort (part 2)Robert Griebl2022-08-162-0/+2
| | | | | | Change-Id: I4d6bf4d4d29133202c0b7dfd088d09cf2a64d1c0 Pick-to: 5.15 6.4 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add explicit include for std::abortBernd Weimer2022-08-121-0/+1
| | | | | | Change-Id: Ia71cf0b596b4e90d38fba0ca5d1c6134e96e721f Pick-to: 5.15 6.4 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Intents: prevent a crash if a sent request is gc'ed too earlyRobert Griebl2022-08-053-3/+15
| | | | | | | | | | | Not saving the result of IntentClient.sendIntentRequest could lead to the GC deleting the IntentClientRequest before it was even delivered to the receiver, leaving a dangling pointer. Change-Id: I8972795d166fa46dd736005dd4df33b9a7ea2463 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Adapt to qvariant_p.h removal in QtCoreRobert Griebl2022-07-283-3/+0
| | | | | Change-Id: I660f4010ab3c90ff045b90773773a58ff52cf287 Reviewed-by: Dominik Holland <dominik.holland@qt.io>