on xenial help sign in
rename hinting signal
commit6e142387a8c36bcfe7db1a5842134fa4794d96e5 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 21 Oct 2014, 20:15 (12 years ago) parentfab32a5
6 files changed+10−10
plugins/Unity/Launcher/launchermodel.cpp+2−2 qml/Launcher/Launcher.qml+1−1 tests/mocks/Unity/Launcher/MockLauncherModel.cpp+2−2 tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1 tests/plugins/Unity/Launcher/launchermodeltest.cpp+1−1 tests/qmltests/Launcher/tst_Launcher.qml+3−3
plugins/Unity/Launcher/launchermodel.cpp+2−2
@@ -347,7 +347,7 @@ void LauncherModel::countVisibleChanged(const QString &appId, int countVisible)
347347 beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
348348 m_list.append(item);
349349 endInsertRows();
350− Q_EMIT hintChanged();
350+ Q_EMIT hint();
351351 }
352352 }
353353}
@@ -428,7 +428,7 @@ void LauncherModel::refresh()
428428 }
429429
430430 if (changed) {
431− Q_EMIT hintChanged();
431+ Q_EMIT hint();
432432 }
433433}
434434
qml/Launcher/Launcher.qml+1−1
@@ -115,7 +115,7 @@ Item {
115115
116116 Connections {
117117 target: LauncherModel
118− onHintChanged: hint();
118+ onHint: hint();
119119 }
120120
121121 SequentialAnimation {
tests/mocks/Unity/Launcher/MockLauncherModel.cpp+2−2
@@ -209,9 +209,9 @@ void MockLauncherModel::setApplicationManager(unity::shell::application::Applica
209209 Q_UNUSED(applicationManager)
210210}
211211
212−void MockLauncherModel::emitHintChanged()
212+void MockLauncherModel::emitHint()
213213{
214− Q_EMIT hintChanged();
214+ Q_EMIT hint();
215215}
216216
217217unity::shell::application::ApplicationManagerInterface *MockLauncherModel::applicationManager() const
tests/mocks/Unity/Launcher/MockLauncherModel.h+1−1
@@ -50,7 +50,7 @@ public:
5050 void setApplicationManager(unity::shell::application::ApplicationManagerInterface *applicationManager);
5151
5252 // For testing
53− Q_INVOKABLE void emitHintChanged();
53+ Q_INVOKABLE void emitHint();
5454
5555Q_SIGNALS:
5656 void quickListTriggered(const QString &appId, int index);
tests/plugins/Unity/Launcher/launchermodeltest.cpp+1−1
@@ -430,7 +430,7 @@ private Q_SLOTS:
430430
431431 void testSettings() {
432432 GSettings *settings = launcherModel->m_settings;
433− QSignalSpy spy(launcherModel, SIGNAL(hintChanged()));
433+ QSignalSpy spy(launcherModel, SIGNAL(hint()));
434434
435435 // Nothing pinned at startup
436436 QCOMPARE(settings->storedApplications().count(), 0);
tests/qmltests/Launcher/tst_Launcher.qml+3−3
@@ -75,9 +75,9 @@ Item {
7575 }
7676
7777 Button {
78− anchors { top: parent.top; right: parent.right; margins: units.gu(1) }
78+ anchors { bottom: parent.bottom; right: parent.right; margins: units.gu(1) }
7979 text: "emit hinting signal"
80− onClicked: LauncherModel.emitHintChanged()
80+ onClicked: LauncherModel.emitHint()
8181 }
8282
8383 SignalSpy {
@@ -243,7 +243,7 @@ Item {
243243 launcher.maxPanelX = -launcher.panelWidth
244244 // change it
245245 LauncherModel.move(0, 1)
246− LauncherModel.emitHintChanged();
246+ LauncherModel.emitHint();
247247
248248 // make sure it opened fully and hides again without delay
249249 tryCompare(launcher, "maxPanelX", 0)