QmlDesigner: Fix materials download path not using the configured path

In Preferences, the User can configure the download path for bundles.
However, this configured the path only for the textures, while the
materials kept using the hardcoded path.

Task-number: QDS-9622
Change-Id: Id4ac82f899542eac5c2ce9cc51053113327aef2c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Samuel Ghinet
2023-05-03 15:03:57 +03:00
parent 26acabe625
commit 84f75a7ffb
2 changed files with 5 additions and 4 deletions

View File

@@ -7,6 +7,8 @@
#include "contentlibrarymaterial.h"
#include "contentlibrarymaterialscategory.h"
#include "contentlibrarywidget.h"
#include <designerpaths.h>
#include "filedownloader.h"
#include "fileextractor.h"
#include "multifiledownloader.h"
@@ -30,8 +32,7 @@ ContentLibraryMaterialsModel::ContentLibraryMaterialsModel(ContentLibraryWidget
: QAbstractListModel(parent)
, m_widget(parent)
{
m_downloadPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)
+ "/QtDesignStudio/bundles/Materials";
m_downloadPath = Paths::bundlesPathSetting() + "/Materials";
m_baseUrl = QmlDesignerPlugin::settings()
.value(DesignerSettingsKey::DOWNLOADABLE_BUNDLES_URL)