forked from qt-creator/qt-creator
Rename QmlModule::Location -> QmlModule::Path
This commit is contained in:
@@ -53,14 +53,14 @@ QmlModule::QmlModule(const QString &name, const QFileInfo &rootDir, const QFileI
|
||||
, qmlStandaloneApp(qmlStandaloneApp)
|
||||
{}
|
||||
|
||||
QString QmlModule::path(Location location) const
|
||||
QString QmlModule::path(Path path) const
|
||||
{
|
||||
switch (location) {
|
||||
switch (path) {
|
||||
case Root: {
|
||||
return rootDir.canonicalFilePath();
|
||||
}
|
||||
case ContentDir: {
|
||||
const QDir proFile(qmlStandaloneApp->path(QmlStandaloneApp::AppProfilePath));
|
||||
const QDir proFile(qmlStandaloneApp->path(QmlStandaloneApp::AppProfilePath));
|
||||
return proFile.relativeFilePath(qmldir.canonicalPath());
|
||||
}
|
||||
case ContentBase: {
|
||||
@@ -72,7 +72,7 @@ QString QmlModule::path(Location location) const
|
||||
}
|
||||
case DeployedContentBase: {
|
||||
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");
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ class QmlStandaloneApp;
|
||||
|
||||
struct QmlModule
|
||||
{
|
||||
enum Location {
|
||||
enum Path {
|
||||
// Example: Module "com.foo.bar" in "c:/modules/".
|
||||
// "qmldir" file is in "c:/modules/com/foo/bar/".
|
||||
// Application .pro file is "c:/app/app.pro".
|
||||
@@ -57,7 +57,7 @@ struct QmlModule
|
||||
|
||||
QmlModule(const QString &name, const QFileInfo &rootDir, const QFileInfo &qmldir,
|
||||
bool isExternal, QmlStandaloneApp *qmlStandaloneApp);
|
||||
QString path(Location location) const;
|
||||
QString path(Path path) const;
|
||||
const QString name; // "com.foo.bar"
|
||||
const QFileInfo rootDir; // Location of "com/"
|
||||
const QFileInfo qmldir; // 'qmldir' file.
|
||||
|
Reference in New Issue
Block a user