Merge lp:~aacid/unity8/noMoveEmpty into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2869
Merged at revision: 2892
Proposed branch: lp:~aacid/unity8/noMoveEmpty
Merge into: lp:unity8
Diff against target: 71 lines (+1/-13)
2 files modified
tests/mocks/Unity/Application/ApplicationManager.cpp (+0/-7)
tests/mocks/Unity/Application/ApplicationManager.h (+1/-6)
To merge this branch: bzr merge lp:~aacid/unity8/noMoveEmpty
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+320602@code.launchpad.net

Commit message

mock: Remove empty property and move invokable

They are not part of the interface

Description of the change

 * Are there any related MPs required for this MP to build/function as expected?
No, but it kind of goes together with https://code.launchpad.net/~aacid/qtmir/remove_non_interface_things/+merge/320600

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2869
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3488/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4605
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2785
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2785
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4633
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4460/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4460/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4460/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4460/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4460/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4460
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4460/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3488/rebuild

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

LGTM, makes sense, CI passing too

* Did you perform an exploratory manual test run of the code change and any related functionality?

Yes

* Did CI run pass? If not, please explain why.

Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/mocks/Unity/Application/ApplicationManager.cpp'
--- tests/mocks/Unity/Application/ApplicationManager.cpp 2017-02-24 15:43:46 +0000
+++ tests/mocks/Unity/Application/ApplicationManager.cpp 2017-03-22 09:00:55 +0000
@@ -172,7 +172,6 @@
172172
173 endInsertRows();173 endInsertRows();
174 Q_EMIT countChanged();174 Q_EMIT countChanged();
175 if (count() == 1) Q_EMIT emptyChanged(isEmpty()); // was empty but not anymore
176175
177 return true;176 return true;
178}177}
@@ -189,7 +188,6 @@
189 endRemoveRows();188 endRemoveRows();
190 m_modelBusy = false;189 m_modelBusy = false;
191 Q_EMIT countChanged();190 Q_EMIT countChanged();
192 if (isEmpty()) Q_EMIT emptyChanged(isEmpty());
193 DEBUG_MSG(application->appId() << " after: " << qPrintable(toString()));191 DEBUG_MSG(application->appId() << " after: " << qPrintable(toString()));
194 }192 }
195}193}
@@ -502,11 +500,6 @@
502 return appIds;500 return appIds;
503}501}
504502
505bool ApplicationManager::isEmpty() const
506{
507 return m_runningApplications.isEmpty();
508}
509
510ApplicationInfo *ApplicationManager::findApplication(MirSurface* surface)503ApplicationInfo *ApplicationManager::findApplication(MirSurface* surface)
511{504{
512 for (ApplicationInfo *app : m_runningApplications) {505 for (ApplicationInfo *app : m_runningApplications) {
513506
=== modified file 'tests/mocks/Unity/Application/ApplicationManager.h'
--- tests/mocks/Unity/Application/ApplicationManager.h 2016-12-07 11:19:17 +0000
+++ tests/mocks/Unity/Application/ApplicationManager.h 2017-03-22 09:00:55 +0000
@@ -40,7 +40,6 @@
40class ApplicationManager : public ApplicationManagerInterface {40class ApplicationManager : public ApplicationManagerInterface {
41 Q_OBJECT41 Q_OBJECT
4242
43 Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged)
44 Q_PROPERTY(QStringList availableApplications READ availableApplications NOTIFY availableApplicationsChanged)43 Q_PROPERTY(QStringList availableApplications READ availableApplications NOTIFY availableApplicationsChanged)
4544
46 public:45 public:
@@ -56,8 +55,6 @@
56 Q_INVOKABLE ApplicationInfo *findApplication(const QString &appId) const override;55 Q_INVOKABLE ApplicationInfo *findApplication(const QString &appId) const override;
57 unity::shell::application::ApplicationInfoInterface *findApplicationWithSurface(unity::shell::application::MirSurfaceInterface* surface) const override;56 unity::shell::application::ApplicationInfoInterface *findApplicationWithSurface(unity::shell::application::MirSurfaceInterface* surface) const override;
5857
59 Q_INVOKABLE void move(int from, int to);
60
61 // Application control methods58 // Application control methods
62 Q_INVOKABLE bool requestFocusApplication(const QString &appId) override;59 Q_INVOKABLE bool requestFocusApplication(const QString &appId) override;
63 Q_INVOKABLE ApplicationInfo *startApplication(const QString &appId, const QStringList &arguments = QStringList()) override;60 Q_INVOKABLE ApplicationInfo *startApplication(const QString &appId, const QStringList &arguments = QStringList()) override;
@@ -71,17 +68,15 @@
7168
72 QModelIndex findIndex(ApplicationInfo* application);69 QModelIndex findIndex(ApplicationInfo* application);
7370
74 bool isEmpty() const;
75
76 Q_SIGNALS:71 Q_SIGNALS:
77 void focusRequested(const QString &appId);72 void focusRequested(const QString &appId);
78 void emptyChanged(bool empty);
79 void availableApplicationsChanged(QStringList list);73 void availableApplicationsChanged(QStringList list);
8074
81 private Q_SLOTS:75 private Q_SLOTS:
82 void raiseApp(const QString &appId);76 void raiseApp(const QString &appId);
8377
84 private:78 private:
79 void move(int from, int to);
85 bool add(ApplicationInfo *application);80 bool add(ApplicationInfo *application);
86 void remove(ApplicationInfo* application);81 void remove(ApplicationInfo* application);
87 void buildListOfAvailableApplications();82 void buildListOfAvailableApplications();

Subscribers

People subscribed via source and target branches