summaryrefslogtreecommitdiff
path: root/src/main-lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix QScopedPointer::take deprecation warningRobert Griebl2022-11-253-6/+8
| | | | | | | | | | Also replaced the remaining usages of QScopedPointer with std::unique_ptr for consistency. Change-Id: Ic63d1b3ea03a4562e4e40c3e9c7992459fde716e Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit c81cd64bf589adef4213a3bf25872efa1528e0f9) Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Add explicit include for std::abort (part 2)Robert Griebl2022-08-161-0/+1
| | | | | | | Change-Id: I4d6bf4d4d29133202c0b7dfd088d09cf2a64d1c0 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit 50255bf75103520c288f7ed31d2eddc22bcb18a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make tests pass for "no-dbus" buildsBernd Weimer2022-07-011-6/+0
| | | | | | | | | | | Achieved by unconditionally supporting dbus option, like any other option. Also removed start-session-dbus option completely and added parameters to JS functions in intents test. Change-Id: I8057bc23fd0072c997c8a42539ef23a6c7a9e28a Reviewed-by: Robert Griebl <robert.griebl@qt.io> (cherry picked from commit 093ee2d43eab7e4dfbdd9b41a4f3a3e039049067) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Prevent linking of AppMan modules into user pluginsRobert Griebl2022-06-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | As the AppMan modules are static libraries, linking any of them into a QML plugin (that later gets loaded into the system-ui) will lead to a bunch of problems: 1) due to symbol duplication and duplicate static data, a lot of singletons may exist twice 2) all static constructors (logging, crash-handling, etc.) are run a second time, overriding any custom configuration that was applied after config parsing. If you are legitimately building a custom appman binary, a custom launcher or a native app using launcher-lib, you need to flag this via compile-time defines now: Either AM_COMPILING_APPMAN or AM_COMPILING_LAUNCHER AM_COMPILING_LAUNCHER is also used for native apps using launcher-lib. Change-Id: I0c1a3fb7e0c7121f92d44c764c2c1eeb720e7041 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit a1c90ed4605b08c39d380d2605d26b684d340c64) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add support for managing multiple instances from appman-controllerRobert Griebl2022-06-305-10/+50
| | | | | | | | | | | | | Added an optional instance-id, which can be set via command line option or via am-config.yaml in the appman process. appman-controller also gained a new option --instance-id to address the given instance, instead of the default, unnamed one. Change-Id: I582d0ea69ed0697ee9ac7353725f93c50df05e34 Fixes: AUTOSUITE-1678 Reviewed-by: Dominik Holland <dominik.holland@qt.io> (cherry picked from commit 8f4fbe0665f7e83c89364e44711f01c4408ff59f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use SPDX license identifiersDominik Holland2022-06-1511-330/+44
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I09660e42dea769d720ff30e652485d9861cea965 Reviewed-by: Robert Griebl <robert.griebl@qt.io> (cherry picked from commit 91d3881b78a3507ac71cca3e460d06765ef76ac1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use real file names when creating the wrappersRobert Griebl2022-05-301-4/+4
| | | | | | | | | | We can't rely on the targets being set-up the way we expect them, especially when cross-compiling against a tools-only host build. Change-Id: I6f33be8697be9c0fa3734cc64ec171149623b026 Fixes: QTBUG-101508 Pick-to: 6.3 6.2 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Document all environment variablesRobert Griebl2022-05-171-6/+16
| | | | | | | | | | Also make sure to check the values against what is actually documented. Also make sure to forward all relevant variables to apps, even if they might be running in custom containers. Change-Id: Ie016383d49ed5fc575fadc32087ed585efc5ce99 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove merge artifactRobert Griebl2022-05-171-42/+1
| | | | | | | | | The ${...} replacement is already done in substituteVars(), so doing the same thing again - and only for ui.mainQml - just doesn't make any sense at all. Change-Id: I3a1e1dde057e7ff1c7ea34a60e933b75843f741f Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix DBus error handling when set to "auto"Robert Griebl2022-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | Problem 1: A Qt plugin calls QDBusConnection::sessionBus() before we fork off our own, private session bus. In this case, Qt caches the old bus address and we try to register our objects on the wrong bus. -> register on our own bus explicitly. Problem 2: If "Problem 1" happened, every QML application would block for 100 * ~25sec on startup, trying to call "Introspect" on the non- existing Notification interface (on the wrong dbus). The delay loop was written for the P2P case, which doesn't block in the QDBusInterface constructor, resulting in a more reasonable 100 * 1msec timeout. -> check if the service is available at all first and also check for time-elapsed instead of trying 100 times. Change-Id: I34ade2bee2da27753eda09b6c0f3562882f40bc3 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix broken cmake auto test setupsRobert Griebl2022-05-121-1/+1
| | | | | Change-Id: Id278f3e333ded080a3677a5035b8da8b51126c5b Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Disable the Wayland watchdog when running autotestsRobert Griebl2022-05-124-4/+11
| | | | | | | | If tests are running into timeouts in the CI, we most of run into the Wayland timeout before, messing up the tests' results. Change-Id: I054f07ff860f77a1e8dfd6a411b049b92555dad0 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Better debug output when failing to load resourcesRobert Griebl2022-04-271-2/+5
| | | | | Change-Id: I30bbd0d62d2e9ed07ca425424cbcb1c3d64e72f1 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the QML tst_installer to run on WindowsRobert Griebl2022-04-261-1/+1
| | | | | | Change-Id: Ic6a24d2d849a3d00e4e44f83ef6410bab4aca7c2 Pick-to: 5.15 6.2 6.3 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix QScopedPointer::take deprecation warningMÃ¥rten Nordheim2022-03-241-2/+3
| | | | | | | | | By switching to unique_ptr. Fixes: QTBUG-101999 Pick-to: 6.3 Change-Id: I39959da8561991b1657d1210692afff0c25e36a1 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Add a new flag to allow surfaces from unknown Wayland clientsRobert Griebl2022-03-235-7/+21
| | | | | | | | | | Before, this was only possible by running with the "noSecurity" flag, which disabled all security checks completely. Change-Id: I06fbd1cca414be518a19b2250b28e114687e7f93 Fixes: QTBUG-101703 Pick-to: 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Handle an empty or invalid documentDir correctlyRobert Griebl2022-03-221-0/+9
| | | | | | | | | | | | | | | | Not specifying the documentDir, but enabling the installer would - unexpectedly - use $PWD as documentDir. The code does now follow the documentation: if not set, no document directories will be created on package installation. Also, we now fail early if the documentDir and installationDir are sub-directories of each other, as that would lead to mayhem on PackageManager::cleanupBrokenInstallations(). Change-Id: Id8d89f82bf0d63c771f3d86a963c66681f43f195 Fixes: QTBUG-101881 Pick-to: 6.3 6.2 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Fix memory leaks introduced by adding the PackageInfo mechanismRobert Griebl2022-03-211-1/+1
| | | | | | | | Found by the Linux/gcc/ASAN leak checker. Change-Id: I3c85515b994ad21b8718349baa81f9fc52a20615 Pick-to: 6.3 6.3.0 6.2 6.2.4 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Re-enable running autotests on macOSRobert Griebl2022-03-211-5/+5
| | | | | | | | | | We could theoretically also run them on Windows now, but the tst_main test non-deterministically freezes regardless of compiler (MSVC or MingW) and OS (Win 10 or Win 11). Change-Id: Ic55063e277ab28ec087cf644e5007744f9f2303a Pick-to: 6.3 6.3.0 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix the userIdSeparation check on startupRobert Griebl2022-03-211-1/+1
| | | | | | Change-Id: I7c109d378fd06bd9d3efdf8d495e2e4407ea1dd1 Pick-to: 6.2 6.2.4 6.3 6.3.0 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Remove the touch emulation featureRobert Griebl2022-03-175-36/+5
| | | | | | | | | This feature was implemented before Qt's pointer handlers were introduced and thanks to those it really isn't needed nowadays. Plus, it was only ever working on X11, limiting its usefulness. Change-Id: Icb03e2e8ede4fc5b62564fc70c20a460fe2d0134 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Create extra sockets only just before the Wayland compositor is createdRobert Griebl2022-03-021-50/+64
| | | | | | | | | | Otherwise there will be a window where the socket already exists in file system, but is not adopted by the compositor yet, leading to "connection refused" errors should a client try to connect. Change-Id: Ic96c51c7e8175ab5e9ac40fc70b5f8dc97c11b71 Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add an option to configure how very long log messages are passed to DLTRobert Griebl2022-02-254-2/+24
| | | | | | | | | This commit was already planned for the 5.12 release, had to be reverted due to a SC break in QtGeniviExtras and was subsequentially forgotten. Change-Id: I76ab4af4b1ee847a33ad0eb523b79021cf666d43 Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Delay loading packages until a specified partition is mountedRobert Griebl2022-02-025-8/+36
| | | | | | | | | | This adds a new config option applications/installationDirMountPoint. If set, package database loading will be delayed until the specified mount point has been mounted. Change-Id: Icf43128031438f62ba4d0c401bb84bdd2d42701e Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Improve examplesBernd Weimer2022-01-191-2/+2
| | | | | | | | Fixed build issues, avoided warnings and improved output. Pick-to: 6.2 6.3 Change-Id: I07f2e950399fb7b5a934686e5efe48cfaf7135e4 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Rename main.cpp generated by qt6_am_add_systemui_wrapper in cmake examplesDominik Holland2021-12-071-2/+2
| | | | | | | | | | | | | | This is needed as our doc build will otherwise pick up the generated main.cpp as an important source file for the examples-manifest.xml But because the referenced main.cpp doesn't exist in the source tree QtCreator will complain when opening such an example. Renaming the file to wrapper.cpp fixes it as qdoc doesn't pick that up. Fixes: QTBUG-98797 Pick-to: 6.2 6.2.2 Change-Id: Id6b20ae7c113b2bb8dd38fb9e4f8c5ddcb44f4f2 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* CMake: Fix qt6_am_add_systemui_wrapper to work with standalone examplesDominik Holland2021-12-011-1/+6
| | | | | | | | | We cannot rely on qt_internal_collect_command_environment outside of the module build and need to calculate the paths ourself instead. Pick-to: 6.2 6.2.2 Change-Id: I201c3d2037ceb40989e555c84d37fb17a42cdc39 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Add the missing "allowUnsignedPackages" flag to the config parserRobert Griebl2021-11-161-0/+2
| | | | | | | | | I forgot to add the flag to the YAML parser, when I added this feature back in commit 7ead83968af5676dab0724fbba84cb00bffca750 Pick-to: 6.2 5.15 Change-Id: I8bd3ac7a2d167d5f95f3cbc9ae9e42b3228df675 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Fix broken QtWaylandCompositor dependencyRobert Griebl2021-10-261-0/+4
| | | | | | Change-Id: Ie6e3af20605135ba40ca4f59ac648d08e7c2f2fa Pick-to: 6.2 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Clazy: fix srcRobert Griebl2021-08-203-4/+4
| | | | | Change-Id: I043882780fac7bed5d9dd75424ede46b54caa187 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Make the ApplicationManager and PackageManager connections implicitRobert Griebl2021-08-061-11/+0
| | | | | | | | | This fixes a half-broken unit test, plus it makes the whole setup in main-lib look less complicated. Change-Id: I4b0c21163299db7c73987f4189b505e69004a67b Pick-to: 5.15 Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
* Remove the old deprecated ApplicationIPCManager IPC mechanismRobert Griebl2021-07-272-11/+0
| | | | | | | | The unit tests that needed an IPC side channel have been updated to use intents instead. Change-Id: Ifbd82728557eadaea08425e9eacf2cbf8a08293e Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Version bump for the ConfigurationData serializationRobert Griebl2021-07-091-1/+1
| | | | | | | | This should have been part of f3f519ad9fafefebae5dc7099e2f81da109b2c2e Pick-to: 5.15 Change-Id: Ia9c2b01dd9e9d20607c60402a9342cc28cd52459 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: remove all comments from the pro2cmake tool conversionRobert Griebl2021-06-301-5/+0
| | | | | Change-Id: Id162a38debf7c801dfefb519274a7761e742b7f1 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: remove qmake build system (except in examples/)Robert Griebl2021-06-301-44/+0
| | | | | Change-Id: I8d00047f8e03bb77863041eaa99f1bba13a15a32 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: Fix qml-only tests/example wrapper generationDominik Holland2021-06-303-20/+21
| | | | | | | | | | | | | | | Use the binary from the build folder inside the wrapper instead of the installed binary location. Make sure the wrapper is regenerated correctly when the CMake variables change. Set PATH and QT_PLUGIN_PATH in the wrapper scripts similar to the autotest cmake wrappers. This should make sure to always use the correct executables. Change-Id: I318ed549d419363e5e4b194f715f067575cb8596 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Add support for running qml-only autotestsDominik Holland2021-06-301-7/+108
| | | | | | | | This adds a new qt_am_internal_add_qml_test function which takes care to create the wrappers for all configurations we want to test. Change-Id: I717cb5aff20ef5aa9ad156d9531a29c547f5d836 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Make all qml-only examples usable from within QtCreatorDominik Holland2021-06-282-0/+130
| | | | | | | | | This adds a new qt6_am_add_systemui_wrapper cmake function which generates a wrapper script and makes sure this is callable from within QtCreator. Change-Id: I8270d31167ef5572514d294d634f55962af04355 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* cmake: Re-enable and fix the doc targetRobert Griebl2021-06-261-4/+6
| | | | | | | Also re-added the hardware-id configuration. Change-Id: I8f5aeba91f8dc6c9cec13eb8f9ffe48b94208ac9 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Re-enable DLT logging and prefix all features to prevent naming clashesRobert Griebl2021-06-261-3/+3
| | | | | Change-Id: I531a35615e430809242f5a7638e740070b214fba Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Do not try to create the installation and document directories on the targetRobert Griebl2021-06-221-4/+6
| | | | | | | | | | | Both these directories are under control of the target's system and might not be directly accessible at the time of this check. The mkpath() call is still useful on the desktop though where the user is in control. Pick-to: 5.15 Change-Id: Ib597cc90cf71ddcdec1e7f6d03f5c90201cd4ce6 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: documenting workaround and optimizationsRobert Griebl2021-06-213-2/+9
| | | | | Change-Id: I2f090c75e600eb0721e76e950b8057aa70d04331 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* cmake: Nearly full cmake buildRobert Griebl2021-06-182-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | Had to rename a lot of things to conform with the standard Qt module layout that the cmake system expects: - all non-manual tests were moved to a sub-dir named auto/ - the benchmark was moved to tests/ - the 3rdparty folder was moved into src/ Other changes: - libyaml was updated to 2.2.5 while fixing a weird build issue that led to crashes on 64bit systems. - fixed build issues with the new 8.1 MingW compiler. - added support for QT_NO_OPENGL builds. The remaining issues are: - examples still don't build with qmake due to a potential bug in module.pri generation. - tests do run, but the test data is not generated yet dynamically. - qml-only tests are not built and run yet. - qml-only examples are not built yet. Fixes: AUTOSUITE-1632 Change-Id: Ic5fe0148e738b05835c73bed78e624b55861b75e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Update copyright headers to 2021 an finally switch to the GPLRobert Griebl2021-06-0111-272/+143
| | | | | | | | | Also removed all the SPDX tags and -QTAS license extensions. Change-Id: Ibd10fe37afcbba832831d027cf2f1891ca0226c0 Fixes: AUTOSUITE-1648 Fixes: AUTOSUITE-1646 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Add a flag to allow installation of unsigned packagesRobert Griebl2021-04-235-10/+19
| | | | | | | | | | Internally this flag was always available, but you could only set it from the outside, by running with --no-security, which disabled all security related checks. Change-Id: I0f09208ad984a19e3b1337715ff00638f791abd1 Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Ignore unparseable info.yaml manifest fileRobert Griebl2021-04-231-0/+2
| | | | | | | | | | Otherwise a broken 3rd party manifest could prevent the startup of the system-ui. This is a regression that was introduced when we implemented the caching mechanism for manifests. Change-Id: I723a2fa741afff95fbe7f54b46cbed61ecc5b37e Pick-to: 5.15 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
* Remove legacy functionality: headless, pssdp and pshellserverRobert Griebl2020-11-285-172/+21
| | | | | Change-Id: Iffeaa944cce5d09d0a1d1af2d85aa5f5034b7f71 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Qt6 port, part 2 .. compiling with cmakeRobert Griebl2020-11-281-5/+5
| | | | | Change-Id: I0b3b0bd420fc2b5a5d263439ef263a8214bbdb4b Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Qt 6 port, part 1 .. without cmakeRobert Griebl2020-11-281-2/+5
| | | | | | | | | All C++ and QML unit-tests pass. The QML "windowitem" test is very unstable though and often crashes in the RHI layer. Change-Id: Ia42fc71ad69d2ba74b8b631ded7569b48cf458ee Reviewed-by: Robert Griebl <robert.griebl@qt.io>
* Fix lists not being merged when using multiple config filesRobert Griebl2020-09-243-15/+8
| | | | | | | | | Also adds a complete auto-test to not only test the generic, low-level YAML parsing and merging, but also the concrete implementation in Configuration. Change-Id: Idd7057af39423a57aa7b5100b41cb7c34a0da336 Task-number: AUTOSUITE-1620 Reviewed-by: Bernd Weimer <bernd.weimer@pelagicore.com>