summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/artifact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/buildgraph/artifact.cpp')
-rw-r--r--src/lib/buildgraph/artifact.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/lib/buildgraph/artifact.cpp b/src/lib/buildgraph/artifact.cpp
index c14d3eecd..e2de97d75 100644
--- a/src/lib/buildgraph/artifact.cpp
+++ b/src/lib/buildgraph/artifact.cpp
@@ -31,6 +31,7 @@
#include "transformer.h"
#include "buildgraph.h"
+#include <language/language.h>
#include <language/propertymapinternal.h>
#include <logging/logger.h>
#include <tools/fileinfo.h>
@@ -56,22 +57,30 @@ QT_END_NAMESPACE
namespace qbs {
namespace Internal {
-Artifact::Artifact(BuildProject *p)
- : project(p)
- , product(0)
- , transformer(0)
- , artifactType(Unknown)
- , buildState(Untouched)
- , inputsScanned(false)
- , timestampRetrieved(false)
- , alwaysUpdated(true)
+Artifact::Artifact()
{
+ initialize();
+}
+
+Artifact::Artifact(const ResolvedProjectPtr &project)
+ : project(project)
+{
+ initialize();
}
Artifact::~Artifact()
{
}
+void Artifact::initialize()
+{
+ artifactType = Unknown;
+ buildState = Untouched;
+ inputsScanned = false;
+ timestampRetrieved = false;
+ alwaysUpdated = true;
+}
+
void Artifact::setFilePath(const QString &filePath)
{
m_filePath = filePath;