forked from qt-creator/qt-creator
Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -51,7 +51,7 @@ QmlBundle BasicBundleProvider::defaultBundle(const QString &bundleInfoName)
|
||||
{
|
||||
static bool wroteErrors = false;
|
||||
QmlBundle res;
|
||||
const Utils::FilePath defaultBundlePath = Core::ICore::resourcePath() / "qml-type-descriptions"
|
||||
const Utils::FilePath defaultBundlePath = Core::ICore::resourcePath("qml-type-descriptions")
|
||||
/ bundleInfoName;
|
||||
if (!defaultBundlePath.exists()) {
|
||||
qWarning() << "BasicBundleProvider: ERROR " << defaultBundlePath
|
||||
|
||||
@@ -220,7 +220,7 @@ void ModelManager::delayedInitialization()
|
||||
|
||||
ViewerContext qbsVContext;
|
||||
qbsVContext.language = Dialect::QmlQbs;
|
||||
qbsVContext.paths.append(ICore::resourcePath().pathAppended("qbs").toString());
|
||||
qbsVContext.paths.append(ICore::resourcePath("qbs").toString());
|
||||
setDefaultVContext(qbsVContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,7 @@ void QmlJSToolsPlugin::test_basic()
|
||||
{
|
||||
ModelManagerInterface *modelManager = ModelManagerInterface::instance();
|
||||
|
||||
const QString qmlFilePath = Core::ICore::resourcePath()
|
||||
.pathAppended(
|
||||
const QString qmlFilePath = Core::ICore::resourcePath(
|
||||
"qmldesigner/itemLibraryQmlSources/ItemDelegate.qml")
|
||||
.toString();
|
||||
modelManager->updateSourceFiles(QStringList(qmlFilePath), false);
|
||||
|
||||
Reference in New Issue
Block a user