summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/artifact.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-07-30 10:18:40 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-08-01 11:10:12 +0200
commit1ce74f4c5e7d9e9ccb854c22fa8540ebcaded154 (patch)
tree9fd3169fbe0406501a6e80923a2661d1f7718471 /src/lib/buildgraph/artifact.cpp
parent7e547f8458c0305c33e4ee35b40fe6f480a2eff3 (diff)
downloadqbs-1ce74f4c5e7d9e9ccb854c22fa8540ebcaded154.tar.gz
move file dependencies to dedicated class
File dependencies are a very simple variant of artifact. We save space and structure the code more clearly by introducing the FileDependency class. Change-Id: I36b95794f9d6d3d739ea4836ebc831848a89de98 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph/artifact.cpp')
-rw-r--r--src/lib/buildgraph/artifact.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/buildgraph/artifact.cpp b/src/lib/buildgraph/artifact.cpp
index 75a284a45..a14c84c58 100644
--- a/src/lib/buildgraph/artifact.cpp
+++ b/src/lib/buildgraph/artifact.cpp
@@ -79,22 +79,15 @@ void Artifact::initialize()
alwaysUpdated = true;
}
-void Artifact::setFilePath(const QString &filePath)
-{
- m_filePath = filePath;
- FileInfo::splitIntoDirectoryAndFileName(m_filePath, &m_dirPath, &m_fileName);
-}
-
void Artifact::load(PersistentPool &pool)
{
- setFilePath(pool.idLoadString());
+ FileResourceBase::load(pool);
properties = pool.idLoadS<PropertyMapInternal>();
transformer = pool.idLoadS<Transformer>();
unsigned char c;
pool.stream()
>> fileTags
>> artifactType
- >> timestamp
>> autoMocTimestamp
>> c;
alwaysUpdated = c;
@@ -102,13 +95,12 @@ void Artifact::load(PersistentPool &pool)
void Artifact::store(PersistentPool &pool) const
{
- pool.storeString(m_filePath);
+ FileResourceBase::store(pool);
pool.store(properties);
pool.store(transformer);
pool.stream()
<< fileTags
<< artifactType
- << timestamp
<< autoMocTimestamp
<< static_cast<unsigned char>(alwaysUpdated);
}