forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "utils/fileextractor.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <designerpaths.h>
|
||||
#include <qmldesignerconstants.h>
|
||||
#include <qmldesignerplugin.h>
|
||||
|
||||
@@ -122,8 +123,7 @@ ContentLibraryWidget::ContentLibraryWidget()
|
||||
m_texturesUrl = m_baseUrl + "/Textures";
|
||||
m_environmentsUrl = m_baseUrl + "/Environments";
|
||||
|
||||
m_downloadPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)
|
||||
+ "/QtDesignStudio/bundles";
|
||||
m_downloadPath = Paths::bundlesPathSetting();
|
||||
|
||||
loadTextureBundle();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user