Rename QmlModule::Location -> QmlModule::Path

This commit is contained in:
Alessandro Portale
2010-08-16 19:59:21 +02:00
parent e97879206d
commit c424570a85
2 changed files with 6 additions and 6 deletions

View File

@@ -53,9 +53,9 @@ 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();
}
@@ -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");
}

View File

@@ -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.