diff options
author | Katja Marttila <katja.marttila@qt.io> | 2024-03-21 14:59:15 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@qt.io> | 2024-04-02 08:39:16 +0000 |
commit | 7715fdfef978ffeea4879849a7a3fbedc232d3a1 (patch) | |
tree | 4f4f047e7a7b4ace1c78bfc58e653a8c166311af | |
parent | 18ed44bdbfcf6714e91a47c18b5eeb5edc0f6188 (diff) |
Fix QDesktopServices properties
QStandardPaths has changed in Qt 6.6, changing the script properties for
script usage accordingly.
Task-number: QTIFW-3334
Change-Id: Ib0bf1f0370d8f8691436df0df28a445e39bdb39f
Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rw-r--r-- | doc/scripting-api/qdesktopservices.qdoc | 8 | ||||
-rw-r--r-- | src/libs/installer/scriptengine.cpp | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/doc/scripting-api/qdesktopservices.qdoc b/doc/scripting-api/qdesktopservices.qdoc index 0fc6cf898..a9c8a149f 100644 --- a/doc/scripting-api/qdesktopservices.qdoc +++ b/doc/scripting-api/qdesktopservices.qdoc @@ -56,14 +56,18 @@ \li DesktopServices.PicturesLocation \li DesktopServices.TempLocation \li DesktopServices.HomeLocation - \li DesktopServices.DataLocation + \li DesktopServices.AppLocalDataLocation \li DesktopServices.CacheLocation + \li DesktopServices.GenericCacheLocation \li DesktopServices.GenericDataLocation \li DesktopServices.RuntimeLocation \li DesktopServices.ConfigLocation \li DesktopServices.DownloadLocation - \li DesktopServices.GenericCacheLocation \li DesktopServices.GenericConfigLocation + \li DesktopServices.AppDataLocation + \li DesktopServices.AppConfigLocation + \li DesktopServices.PublicShareLocation + \li DesktopServices.TemplatesLocation \endlist The enum values correspond to the values of the diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index cb05ddaea..7e3e69eb2 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -624,14 +624,19 @@ QJSValue ScriptEngine::generateDesktopServicesObject() SETPROPERTY(desktopServices, PicturesLocation, QStandardPaths) SETPROPERTY(desktopServices, TempLocation, QStandardPaths) SETPROPERTY(desktopServices, HomeLocation, QStandardPaths) - SETPROPERTY(desktopServices, AppDataLocation, QStandardPaths) + SETPROPERTY(desktopServices, AppLocalDataLocation, QStandardPaths) SETPROPERTY(desktopServices, CacheLocation, QStandardPaths) + SETPROPERTY(desktopServices, GenericCacheLocation, QStandardPaths) SETPROPERTY(desktopServices, GenericDataLocation, QStandardPaths) SETPROPERTY(desktopServices, RuntimeLocation, QStandardPaths) SETPROPERTY(desktopServices, ConfigLocation, QStandardPaths) SETPROPERTY(desktopServices, DownloadLocation, QStandardPaths) SETPROPERTY(desktopServices, GenericCacheLocation, QStandardPaths) SETPROPERTY(desktopServices, GenericConfigLocation, QStandardPaths) + SETPROPERTY(desktopServices, AppDataLocation, QStandardPaths) + SETPROPERTY(desktopServices, AppConfigLocation, QStandardPaths) + SETPROPERTY(desktopServices, PublicShareLocation, QStandardPaths) + SETPROPERTY(desktopServices, TemplatesLocation, QStandardPaths) QJSValue object = m_engine.newQObject(new QDesktopServicesProxy(this)); object.setPrototype(desktopServices); // attach the properties |