forked from qt-creator/qt-creator
Rename QmlModule::Location -> QmlModule::Path
This commit is contained in:
@@ -53,9 +53,9 @@ QmlModule::QmlModule(const QString &name, const QFileInfo &rootDir, const QFileI
|
|||||||
, qmlStandaloneApp(qmlStandaloneApp)
|
, qmlStandaloneApp(qmlStandaloneApp)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
QString QmlModule::path(Location location) const
|
QString QmlModule::path(Path path) const
|
||||||
{
|
{
|
||||||
switch (location) {
|
switch (path) {
|
||||||
case Root: {
|
case Root: {
|
||||||
return rootDir.canonicalFilePath();
|
return rootDir.canonicalFilePath();
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ QString QmlModule::path(Location location) const
|
|||||||
}
|
}
|
||||||
case DeployedContentBase: {
|
case DeployedContentBase: {
|
||||||
const QString modulesDir = qmlStandaloneApp->path(QmlStandaloneApp::ModulesDir);
|
const QString modulesDir = qmlStandaloneApp->path(QmlStandaloneApp::ModulesDir);
|
||||||
return modulesDir + QLatin1Char('/') + path(ContentBase);
|
return modulesDir + QLatin1Char('/') + this->path(ContentBase);
|
||||||
}
|
}
|
||||||
default: qFatal("QmlModule::path() needs more work");
|
default: qFatal("QmlModule::path() needs more work");
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ class QmlStandaloneApp;
|
|||||||
|
|
||||||
struct QmlModule
|
struct QmlModule
|
||||||
{
|
{
|
||||||
enum Location {
|
enum Path {
|
||||||
// Example: Module "com.foo.bar" in "c:/modules/".
|
// Example: Module "com.foo.bar" in "c:/modules/".
|
||||||
// "qmldir" file is in "c:/modules/com/foo/bar/".
|
// "qmldir" file is in "c:/modules/com/foo/bar/".
|
||||||
// Application .pro file is "c:/app/app.pro".
|
// Application .pro file is "c:/app/app.pro".
|
||||||
@@ -57,7 +57,7 @@ struct QmlModule
|
|||||||
|
|
||||||
QmlModule(const QString &name, const QFileInfo &rootDir, const QFileInfo &qmldir,
|
QmlModule(const QString &name, const QFileInfo &rootDir, const QFileInfo &qmldir,
|
||||||
bool isExternal, QmlStandaloneApp *qmlStandaloneApp);
|
bool isExternal, QmlStandaloneApp *qmlStandaloneApp);
|
||||||
QString path(Location location) const;
|
QString path(Path path) const;
|
||||||
const QString name; // "com.foo.bar"
|
const QString name; // "com.foo.bar"
|
||||||
const QFileInfo rootDir; // Location of "com/"
|
const QFileInfo rootDir; // Location of "com/"
|
||||||
const QFileInfo qmldir; // 'qmldir' file.
|
const QFileInfo qmldir; // 'qmldir' file.
|
||||||
|
Reference in New Issue
Block a user