Commit c424570a authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Rename QmlModule::Location -> QmlModule::Path

parent e9787920
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment