Lines 1-4
Link Here
|
1 |
--- src/plugins/projectexplorer/runconfiguration.h.orig 2016-06-21 13:37:35 UTC |
1 |
--- src/plugins/projectexplorer/runconfiguration.h.orig 2016-06-24 12:44:00 UTC |
2 |
+++ src/plugins/projectexplorer/runconfiguration.h |
2 |
+++ src/plugins/projectexplorer/runconfiguration.h |
3 |
@@ -159,6 +159,7 @@ public: |
3 |
@@ -159,6 +159,7 @@ public: |
4 |
virtual ~ClonableConcept() = default; |
4 |
virtual ~ClonableConcept() = default; |
Lines 8-14
Link Here
|
8 |
}; |
8 |
}; |
9 |
|
9 |
|
10 |
template <class T> |
10 |
template <class T> |
11 |
@@ -168,11 +169,14 @@ public: |
11 |
@@ -168,11 +169,16 @@ public: |
12 |
ClonableModel(const T &data) : m_data(data) { } |
12 |
ClonableModel(const T &data) : m_data(data) { } |
13 |
~ClonableModel() Q_DECL_NOEXCEPT { } // gcc 4.7.3 |
13 |
~ClonableModel() Q_DECL_NOEXCEPT { } // gcc 4.7.3 |
14 |
ClonableConcept *clone() const override { return new ClonableModel(*this); } |
14 |
ClonableConcept *clone() const override { return new ClonableModel(*this); } |
Lines 18-23
Link Here
|
18 |
{ |
18 |
{ |
19 |
- auto that = dynamic_cast<const ClonableModel<T> *>(other.get()); |
19 |
- auto that = dynamic_cast<const ClonableModel<T> *>(other.get()); |
20 |
- return that && m_data == that->m_data; |
20 |
- return that && m_data == that->m_data; |
|
|
21 |
+ if (!other.get()) |
22 |
+ return false; |
21 |
+ if (other->typeId() != typeId()) |
23 |
+ if (other->typeId() != typeId()) |
22 |
+ return false; |
24 |
+ return false; |
23 |
+ auto that = static_cast<const ClonableModel<T> *>(other.get()); |
25 |
+ auto that = static_cast<const ClonableModel<T> *>(other.get()); |
Lines 25-31
Link Here
|
25 |
} |
27 |
} |
26 |
|
28 |
|
27 |
T m_data; |
29 |
T m_data; |
28 |
@@ -189,7 +193,7 @@ public: |
30 |
@@ -189,7 +195,7 @@ public: |
29 |
void operator=(Runnable other) { d = std::move(other.d); } |
31 |
void operator=(Runnable other) { d = std::move(other.d); } |
30 |
|
32 |
|
31 |
template <class T> bool is() const { |
33 |
template <class T> bool is() const { |
Lines 34-40
Link Here
|
34 |
} |
36 |
} |
35 |
|
37 |
|
36 |
template <class T> const T &as() const { |
38 |
template <class T> const T &as() const { |
37 |
@@ -213,7 +217,7 @@ public: |
39 |
@@ -213,7 +219,7 @@ public: |
38 |
void operator=(Connection other) { d = std::move(other.d); } |
40 |
void operator=(Connection other) { d = std::move(other.d); } |
39 |
|
41 |
|
40 |
template <class T> bool is() const { |
42 |
template <class T> bool is() const { |