aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/tools/buildgraphlocker.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-20 13:43:42 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-05-21 09:49:31 +0000
commit3a1280c5b51488599c98e6c0fabef41464dd857f (patch)
treeae7db821df45c229790938cc77f0676c3bf4d4de /src/lib/corelib/tools/buildgraphlocker.h
parentc004522ff281ccc1fbb16e7a8f60d9c1e0a90be2 (diff)
Clean up directories created as part of dry run builds.
We always need to create a lock file, which in turn can cause directories to be created. Remove these afterwards if no other files were created within them. Task-number: QTCREATORBUG-14482 Change-Id: If990614fbe53444addb45aa6d9490e9128c354d2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/tools/buildgraphlocker.h')
-rw-r--r--src/lib/corelib/tools/buildgraphlocker.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/corelib/tools/buildgraphlocker.h b/src/lib/corelib/tools/buildgraphlocker.h
index a378b7c47..327aa57ef 100644
--- a/src/lib/corelib/tools/buildgraphlocker.h
+++ b/src/lib/corelib/tools/buildgraphlocker.h
@@ -31,12 +31,11 @@
#ifndef QBS_BUILDGRAPHLOCKER_H
#define QBS_BUILDGRAPHLOCKER_H
-#include <QLockFile>
#include <logging/logger.h>
-QT_BEGIN_NAMESPACE
-class QString;
-QT_END_NAMESPACE
+#include <QLockFile>
+#include <QQueue>
+#include <QString>
namespace qbs {
namespace Internal {
@@ -48,8 +47,12 @@ public:
~BuildGraphLocker();
private:
+ void rememberCreatedDirectories(const QString &buildDir);
+ void removeEmptyCreatedDirectories();
+
QLockFile m_lockFile;
Logger m_logger;
+ QQueue<QString> m_createdParentDirs;
};
} // namespace Internal