Merge lp:~marcustomlinson/properties-cpp/fix_qt_keyword_clash into lp:properties-cpp

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 16
Merged at revision: 16
Proposed branch: lp:~marcustomlinson/properties-cpp/fix_qt_keyword_clash
Merge into: lp:properties-cpp
Diff against target: 119 lines (+18/-18)
1 file modified
include/core/signal.h (+18/-18)
To merge this branch: bzr merge lp:~marcustomlinson/properties-cpp/fix_qt_keyword_clash
Reviewer Review Type Date Requested Status
Thomas Voß (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+223056@code.launchpad.net

Commit message

Renamed "slots" to "slot_list" in signal.h as to avoid clashing with the "slots" Qt keyword.

Description of the change

Renamed "slots" to "slot_list" in signal.h as to avoid clashing with the "slots" Qt keyword.

http://paste.ubuntu.com/7638421/

To post a comment you must log in.
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This fix has been spurred on by compilation errors experienced when building scopes against the latest unity-scopes-api (which now includes a dependancy on properties-cpp).

http://paste.ubuntu.com/7638421/

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

LGTM.

review: Approve
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> LGTM.

Thanks Thomas. Let me know if you need me to do anything for landing this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/core/signal.h'
2--- include/core/signal.h 2013-11-28 07:35:14 +0000
3+++ include/core/signal.h 2014-06-13 11:48:50 +0000
4@@ -65,7 +65,7 @@
5 inline ~Signal()
6 {
7 std::lock_guard<std::mutex> lg(d->guard);
8- for (auto slot : d->slots)
9+ for (auto slot : d->slot_list)
10 slot.connection.reset();
11 }
12
13@@ -98,8 +98,8 @@
14
15 std::lock_guard<std::mutex> lg(d->guard);
16
17- auto result = d->slots.insert(
18- d->slots.end(),
19+ auto result = d->slot_list.insert(
20+ d->slot_list.end(),
21 SlotWrapper{slot, default_dispatcher, conn});
22
23 // We implicitly share our internal state with the connection here
24@@ -132,7 +132,7 @@
25 inline void operator()(Arguments... args)
26 {
27 std::lock_guard<std::mutex> lg(d->guard);
28- for(auto slot : d->slots)
29+ for(auto slot : d->slot_list)
30 {
31 slot(args...);
32 }
33@@ -141,23 +141,23 @@
34 private:
35 struct Private
36 {
37- typedef std::list<SlotWrapper> SlotContainer;
38+ typedef std::list<SlotWrapper> SlotList;
39
40- inline void disconnect_slot_for_iterator(typename SlotContainer::iterator it)
41+ inline void disconnect_slot_for_iterator(typename SlotList::iterator it)
42 {
43 std::lock_guard<std::mutex> lg(guard);
44- slots.erase(it);
45+ slot_list.erase(it);
46 }
47
48 inline void install_dispatcher_for_iterator(const Connection::Dispatcher& dispatcher,
49- typename SlotContainer::iterator it)
50+ typename SlotList::iterator it)
51 {
52 std::lock_guard<std::mutex> lg(guard);
53 it->dispatcher = dispatcher;
54 }
55
56 std::mutex guard;
57- SlotContainer slots;
58+ SlotList slot_list;
59 };
60 std::shared_ptr<Private> d;
61 };
62@@ -199,7 +199,7 @@
63 inline ~Signal()
64 {
65 std::lock_guard<std::mutex> lg(d->guard);
66- for (auto slot : d->slots)
67+ for (auto slot : d->slot_list)
68 slot.connection.reset();
69 }
70
71@@ -232,8 +232,8 @@
72
73 std::lock_guard<std::mutex> lg(d->guard);
74
75- auto result = d->slots.insert(
76- d->slots.end(),
77+ auto result = d->slot_list.insert(
78+ d->slot_list.end(),
79 SlotWrapper{slot, default_dispatcher, conn});
80
81 // We implicitly share our internal state with the connection here
82@@ -263,7 +263,7 @@
83 inline void operator()()
84 {
85 std::lock_guard<std::mutex> lg(d->guard);
86- for(auto slot : d->slots)
87+ for(auto slot : d->slot_list)
88 {
89 slot();
90 }
91@@ -272,23 +272,23 @@
92 private:
93 struct Private
94 {
95- typedef std::list<SlotWrapper> SlotContainer;
96+ typedef std::list<SlotWrapper> SlotList;
97
98- inline void disconnect_slot_for_iterator(typename SlotContainer::iterator it)
99+ inline void disconnect_slot_for_iterator(typename SlotList::iterator it)
100 {
101 std::lock_guard<std::mutex> lg(guard);
102- slots.erase(it);
103+ slot_list.erase(it);
104 }
105
106 inline void install_dispatcher_for_iterator(const Connection::Dispatcher& dispatcher,
107- typename SlotContainer::iterator it)
108+ typename SlotList::iterator it)
109 {
110 std::lock_guard<std::mutex> lg(guard);
111 it->dispatcher = dispatcher;
112 }
113
114 std::mutex guard;
115- SlotContainer slots;
116+ SlotList slot_list;
117 };
118 std::shared_ptr<Private> d;
119 };

Subscribers

People subscribed via source and target branches