on xenial help sign in
Slightly better...
commitf8c18e62ee894fb2ac4fd8f7d58243ab045e771d authorMirco Müller <mirco.mueller@ubuntu.com> dateTue 20 Jan 2015, 16:05 (12 years ago) parentd19090f
3 files changed+10−8
tests/mocks/Unity/Notifications/MockNotification.cpp+1−1 tests/mocks/Unity/Notifications/MockNotificationModel.cpp+2 tests/qmltests/Notifications/tst_Notifications.qml+7−7
tests/mocks/Unity/Notifications/MockNotification.cpp+1−1
@@ -173,6 +173,6 @@ void MockNotification::invokeAction(const QString &action) {
173173}
174174
175175void MockNotification::close() {
176− qDebug() << "close() called";
176+ qDebug() << "close() called, " << p->id;
177177 Q_EMIT completed(p->id);
178178}
tests/mocks/Unity/Notifications/MockNotificationModel.cpp+2
@@ -119,6 +119,7 @@ bool MockNotificationModel::hasNotification(unsigned int id) const {
119119}
120120
121121void MockNotificationModel::remove(const unsigned int id) {
122+ qDebug() << "remove(" << id << ")";
122123 for(int i = 0; i < m_queue.size(); i++) {
123124 if(m_queue[i]->getID() == id) {
124125 deleteFromVisible(i);
@@ -135,6 +136,7 @@ void MockNotificationModel::deleteFirst() {
135136}
136137
137138void MockNotificationModel::deleteFromVisible(int loc) {
139+ qDebug() << "deleteFromVisible(" << loc << ")";
138140 QModelIndex deletePoint = QModelIndex();
139141 beginRemoveRows(deletePoint, loc, loc);
140142 m_queue.erase(m_queue.begin() + loc);
tests/qmltests/Notifications/tst_Notifications.qml+7−7
@@ -43,7 +43,7 @@ Item {
4343 secondaryIcon: ""
4444 rawActions: ["reply_id", "Dummy"]
4545 Component.onCompleted: {
46− n0.completed.connect(mockModel.remove)
46+ n0.completed.connect(mockModel.onCompleted)
4747 }
4848 },
4949 Notification {
@@ -59,7 +59,7 @@ Item {
5959 "snooze_id", "Snooze",
6060 "view_id", "View"]
6161 Component.onCompleted: {
62− n1.completed.connect(mockModel.remove)
62+ n1.completed.connect(mockModel.onCompleted)
6363 }
6464 },
6565 Notification {
@@ -72,7 +72,7 @@ Item {
7272 secondaryIcon: "../graphics/applicationIcons/facebook.png"
7373 rawActions: ["reply_id", "Dummy"]
7474 Component.onCompleted: {
75− n2.completed.connect(mockModel.remove)
75+ n2.completed.connect(mockModel.onCompleted)
7676 }
7777 },
7878 Notification {
@@ -86,7 +86,7 @@ Item {
8686 secondaryIcon: ""
8787 rawActions: ["reply_id", "Dummy"]
8888 Component.onCompleted: {
89− n3.completed.connect(mockModel.remove)
89+ n3.completed.connect(mockModel.onCompleted)
9090 }
9191 },
9292 Notification {
@@ -100,7 +100,7 @@ Item {
100100 secondaryIcon: ""
101101 rawActions: ["reply_id", "Dummy"]
102102 Component.onCompleted: {
103− n4.completed.connect(mockModel.remove)
103+ n4.completed.connect(mockModel.onCompleted)
104104 }
105105 },
106106 Notification {
@@ -128,7 +128,7 @@ Item {
128128 value: 50
129129 rawActions: ["reply_id", "Dummy"]
130130 Component.onCompleted: {
131− n6.completed.connect(mockModel.remove)
131+ n6.completed.connect(mockModel.onCompleted)
132132 }
133133 },
134134 Notification {
@@ -144,7 +144,7 @@ Item {
144144 value: 85
145145 rawActions: ["reply_id", "Dummy"]
146146 Component.onCompleted: {
147− n7.completed.connect(mockModel.remove)
147+ n7.completed.connect(mockModel.onCompleted)
148148 }
149149 }
150150 ]