diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-04-19 11:04:43 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-05-23 15:32:46 +0200 |
| commit | 64c9bf5e3696834c5b865205e92cb4da675c7c97 (patch) | |
| tree | 8130cecae3d0c8a486d5aeb7192301d568513d90 /src/lib/buildgraph/buildgraph.cpp | |
| parent | 03f6ea7f86088399879aea6ee93d4e3a09674dcb (diff) | |
| download | qbs-64c9bf5e3696834c5b865205e92cb4da675c7c97.tar.gz | |
Use private implementation in API classes.
While we do not promise a stable ABI at the moment,
this is conceptually correct and has to be done sooner or
later, with increasing effort the longer we delay it.
Change-Id: Icc98443974e54d377167480ace601db4981ed43c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/buildgraph.cpp')
| -rw-r--r-- | src/lib/buildgraph/buildgraph.cpp | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/buildgraph/buildgraph.cpp b/src/lib/buildgraph/buildgraph.cpp index a9ddbf7d8..6e311bad3 100644 --- a/src/lib/buildgraph/buildgraph.cpp +++ b/src/lib/buildgraph/buildgraph.cpp @@ -191,8 +191,9 @@ void setupScriptEngineForProduct(ScriptEngine *engine, const ResolvedProductCons QVariant(reinterpret_cast<qulonglong>(product->project.data()))); QScriptValue projectScriptValue; projectScriptValue = engine->newObject(); - projectScriptValue.setProperty("filePath", product->project->location.fileName); - projectScriptValue.setProperty("path", FileInfo::path(product->project->location.fileName)); + projectScriptValue.setProperty("filePath", product->project->location.fileName()); + projectScriptValue.setProperty("path", + FileInfo::path(product->project->location.fileName())); const QVariantMap &projectProperties = product->project->projectProperties(); for (QVariantMap::const_iterator it = projectProperties.begin(); it != projectProperties.end(); ++it) @@ -463,8 +464,9 @@ BuildGraphLoader::LoadResult BuildGraphLoader::load(const SetupProjectParameters m_result = LoadResult(); m_evalContext = evalContext; - const QString projectId = ResolvedProject::deriveId(parameters.buildConfiguration); - const QString buildDir = ResolvedProject::deriveBuildDirectory(parameters.buildRoot, projectId); + const QString projectId = ResolvedProject::deriveId(parameters.buildConfiguration()); + const QString buildDir + = ResolvedProject::deriveBuildDirectory(parameters.buildRoot(), projectId); const QString buildGraphFilePath = ProjectBuildData::deriveBuildGraphFilePath(buildDir, projectId); @@ -472,7 +474,7 @@ BuildGraphLoader::LoadResult BuildGraphLoader::load(const SetupProjectParameters m_logger.qbsDebug() << "[BG] trying to load: " << buildGraphFilePath; if (!pool.load(buildGraphFilePath)) return m_result; - if (!isConfigCompatible(parameters.buildConfiguration, pool.headData().projectConfig)) { + if (!isConfigCompatible(parameters.buildConfiguration(), pool.headData().projectConfig)) { m_logger.qbsDebug() << "[BG] Cannot use stored build graph: " "Incompatible project configuration."; return m_result; @@ -496,12 +498,12 @@ BuildGraphLoader::LoadResult BuildGraphLoader::load(const SetupProjectParameters } } - if (QFileInfo(project->location.fileName) != QFileInfo(parameters.projectFilePath)) { + if (QFileInfo(project->location.fileName()) != QFileInfo(parameters.projectFilePath())) { QString errorMessage = Tr::tr("Stored build graph is for project file '%1', but " "input file is '%2'. ") - .arg(QDir::toNativeSeparators(project->location.fileName), - QDir::toNativeSeparators(parameters.projectFilePath)); - if (!parameters.ignoreDifferentProjectFilePath) { + .arg(QDir::toNativeSeparators(project->location.fileName()), + QDir::toNativeSeparators(parameters.projectFilePath())); + if (!parameters.ignoreDifferentProjectFilePath()) { errorMessage += Tr::tr("Aborting."); throw Error(errorMessage); } @@ -512,7 +514,7 @@ BuildGraphLoader::LoadResult BuildGraphLoader::load(const SetupProjectParameters } foreach (const ResolvedProductPtr &p, project->products) p->project = project; - project->location = CodeLocation(parameters.projectFilePath, 1, 1); + project->location = CodeLocation(parameters.projectFilePath(), 1, 1); project->setBuildConfiguration(pool.headData().projectConfig); project->buildDirectory = buildDir; m_result.loadedProject = project; @@ -526,7 +528,7 @@ void BuildGraphLoader::trackProjectChanges(const SetupProjectParameters ¶met { const FileInfo bgfi(buildGraphFilePath); const bool projectFileChanged - = bgfi.lastModified() < FileInfo(parameters.projectFilePath).lastModified(); + = bgfi.lastModified() < FileInfo(parameters.projectFilePath()).lastModified(); if (projectFileChanged) m_logger.qbsTrace() << "Project file changed, must re-resolve project."; @@ -541,7 +543,7 @@ void BuildGraphLoader::trackProjectChanges(const SetupProjectParameters ¶met bool referencedProductRemoved = false; QList<ResolvedProductPtr> changedProducts; foreach (const ResolvedProductPtr &product, restoredProject->products) { - const FileInfo pfi(product->location.fileName); + const FileInfo pfi(product->location.fileName()); if (!pfi.exists()) { referencedProductRemoved = true; } else if (bgfi.lastModified() < pfi.lastModified()) { @@ -569,7 +571,7 @@ void BuildGraphLoader::trackProjectChanges(const SetupProjectParameters ¶met } Loader ldr(m_evalContext->engine(), m_logger); - ldr.setSearchPaths(parameters.searchPaths); + ldr.setSearchPaths(parameters.searchPaths()); m_result.newlyResolvedProject = ldr.loadProject(parameters); QMap<QString, ResolvedProductPtr> freshProductsByName; |
