Merge lp:~dandrader/unity-api/initialSurfaceGeom into lp:unity-api

Proposed by Daniel d'Andrada
Status: Merged
Approved by: Nick Dedekind
Approved revision: no longer in the source branch.
Merged at revision: 207
Proposed branch: lp:~dandrader/unity-api/initialSurfaceGeom
Merge into: lp:unity-api
Diff against target: 61 lines (+13/-1)
2 files modified
include/unity/shell/application/ApplicationInfoInterface.h (+10/-1)
test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h (+3/-0)
To merge this branch: bzr merge lp:~dandrader/unity-api/initialSurfaceGeom
Reviewer Review Type Date Requested Status
Nick Dedekind (community) Approve
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Unity8 CI Bot continuous-integration Needs Fixing
Review via email: mp+283222@code.launchpad.net

Commit message

Added ApplicationInfoInterface.initialSurfaceSize

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

FAILED: Continuous integration, rev:207
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/8/
Executed test runs:

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-1-ci/8/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

LGTM

review: Approve
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

LGTM too

review: Approve
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Tested and working

207. By Daniel d'Andrada

Added ApplicationInfoInterface.initialSurfaceSize

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/unity/shell/application/ApplicationInfoInterface.h'
2--- include/unity/shell/application/ApplicationInfoInterface.h 2015-12-03 19:03:29 +0000
3+++ include/unity/shell/application/ApplicationInfoInterface.h 2016-02-02 18:01:09 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright 2013,2015 Canonical Ltd.
7+ * Copyright 2013,2015,2016 Canonical Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published by
11@@ -22,6 +22,7 @@
12 #include <QtCore/QObject>
13 #include <QtCore/QUrl>
14 #include <QColor>
15+#include <QSize>
16
17 namespace unity
18 {
19@@ -211,6 +212,11 @@
20 */
21 Q_PROPERTY(bool exemptFromLifecycle READ exemptFromLifecycle WRITE setExemptFromLifecycle NOTIFY exemptFromLifecycleChanged)
22
23+ /**
24+ * @brief The size to be given for new surfaces created by this application
25+ */
26+ Q_PROPERTY(QSize initialSurfaceSize READ initialSurfaceSize WRITE setInitialSurfaceSize NOTIFY initialSurfaceSizeChanged)
27+
28 protected:
29 /// @cond
30 ApplicationInfoInterface(const QString &appId, QObject* parent = 0): QObject(parent) { Q_UNUSED(appId) }
31@@ -284,6 +290,8 @@
32 virtual bool isTouchApp() const = 0;
33 virtual bool exemptFromLifecycle() const = 0;
34 virtual void setExemptFromLifecycle(bool) = 0;
35+ virtual QSize initialSurfaceSize() const = 0;
36+ virtual void setInitialSurfaceSize(const QSize &size) = 0;
37 /// @endcond
38
39 Q_SIGNALS:
40@@ -296,6 +304,7 @@
41 void requestedStateChanged(RequestedState value);
42 void focusedChanged(bool focused);
43 void exemptFromLifecycleChanged(bool exemptFromLifecycle);
44+ void initialSurfaceSizeChanged(const QSize &size);
45 /// @endcond
46 };
47
48
49=== modified file 'test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h'
50--- test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2015-12-03 17:07:15 +0000
51+++ test/qmltest/mocks/plugins/Unity/Application/Mocks/MockApplicationInfo.h 2016-02-02 18:01:09 +0000
52@@ -59,6 +59,9 @@
53 bool exemptFromLifecycle() const override;
54 void setExemptFromLifecycle(bool exemptFromLifecycle) override;
55
56+ QSize initialSurfaceSize() const override { return QSize(); }
57+ void setInitialSurfaceSize(const QSize &) override {}
58+
59 private:
60 QString m_appId;
61 QString m_name;

Subscribers

People subscribed via source and target branches

to all changes: