aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2016-11-14 14:18:15 +0100
committerChristian Stenger <christian.stenger@qt.io>2016-11-14 13:31:47 +0000
commita4e213b775d41f5184d1543fae6a3a794595e6b5 (patch)
treefc8a730188a71b2116a85a1628f1c36f3ac6f5c8
parente4e1bdb27a04579913f8bd079b4ee2643e06a458 (diff)
ProjectExplorer: Avoid accessing nullptr for unconfigured projects
Task-number: QTCREATORBUG-17256 Change-Id: I586c7267cbb4f9f16134c1be08aa4a738e990e80 Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--src/plugins/projectexplorer/projectimporter.h2
-rw-r--r--src/plugins/projectexplorer/targetsetuppage.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/projectimporter.h b/src/plugins/projectexplorer/projectimporter.h
index 50d98b275a..62d1350559 100644
--- a/src/plugins/projectexplorer/projectimporter.h
+++ b/src/plugins/projectexplorer/projectimporter.h
@@ -39,7 +39,7 @@ class Project;
class Target;
// Documentation inside.
-class PROJECTEXPLORER_EXPORT ProjectImporter
+class PROJECTEXPLORER_EXPORT ProjectImporter : public QObject
{
public:
ProjectImporter(const QString &path);
diff --git a/src/plugins/projectexplorer/targetsetuppage.h b/src/plugins/projectexplorer/targetsetuppage.h
index d004143634..8f58950629 100644
--- a/src/plugins/projectexplorer/targetsetuppage.h
+++ b/src/plugins/projectexplorer/targetsetuppage.h
@@ -32,6 +32,7 @@
#include <utils/wizardpage.h>
+#include <QPointer>
#include <QString>
#include <QMap>
@@ -109,7 +110,7 @@ private:
KitMatcher m_requiredMatcher;
KitMatcher m_preferredMatcher;
- ProjectImporter *m_importer = nullptr;
+ QPointer<ProjectImporter> m_importer = nullptr;
QLayout *m_baseLayout = nullptr;
QString m_projectPath;
QString m_defaultShadowBuildLocation;