Merge lp:~unity-team/qtmir/build_with_clang into lp:qtmir

Proposed by Michał Sawicz
Status: Merged
Approved by: Gerry Boland
Approved revision: 390
Merged at revision: 413
Proposed branch: lp:~unity-team/qtmir/build_with_clang
Merge into: lp:qtmir
Prerequisite: lp:~unity-team/qtmir/liveCaption
Diff against target: 134 lines (+12/-12)
8 files modified
src/modules/Unity/Application/desktopfilereader.cpp (+2/-1)
src/modules/Unity/Application/mirsurfaceitem.h (+1/-1)
src/modules/Unity/Application/objectlistmodel.h (+1/-1)
src/platforms/mirserver/qmirserver.cpp (+1/-1)
src/platforms/mirserver/qmirserver_p.h (+2/-1)
tests/modules/common/fake_mirsurface.h (+1/-3)
tests/modules/common/qtmir_test.h (+1/-1)
tests/modules/common/stub_scene_surface.h (+3/-3)
To merge this branch: bzr merge lp:~unity-team/qtmir/build_with_clang
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Alan Griffiths Pending
Review via email: mp+273115@code.launchpad.net

This proposal supersedes a proposal from 2015-09-30.

Commit message

Build with clang (tests/gmock fails and is unfixable on our side i'd say)

Description of the change

* Are there any related MPs required for this MP to build/function as expected?
No, but https://code.launchpad.net/~aacid/mir/fix_forward_declarations/+merge/272751 is needed to get qtmir to actually build with clang :D

 * 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

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

- argv[argc] = '\0';
+ argv[argc] = "\0";

This changes the meaning to be incorrect. It should be:

    argv[argc] = nullptr;

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote : Posted in a previous version of this proposal

-struct QMirServerPrivate
+class QMirServerPrivate

It looks like a struct to me.

review: Abstain
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

> -struct QMirServerPrivate
> +class QMirServerPrivate
>
> It looks like a struct to me.

but it's used in a
  Q_DECLARE_PRIVATE(QMirServer)
that forward declares it as a class.

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Test build shows all CLang errors are due to:
1. gtest/gmock
2. Qt private headers
3. Mir (for which a fix has landed upstream)
Thus I'm happy.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/desktopfilereader.cpp'
2--- src/modules/Unity/Application/desktopfilereader.cpp 2015-08-11 12:08:32 +0000
3+++ src/modules/Unity/Application/desktopfilereader.cpp 2015-10-01 17:55:42 +0000
4@@ -37,8 +37,9 @@
5
6 typedef GObjectScopedPointer<GAppInfo> GAppInfoPointer;
7
8-struct DesktopFileReaderPrivate
9+class DesktopFileReaderPrivate
10 {
11+public:
12 DesktopFileReaderPrivate(DesktopFileReader *parent):
13 q_ptr( parent )
14 {}
15
16=== modified file 'src/modules/Unity/Application/mirsurfaceitem.h'
17--- src/modules/Unity/Application/mirsurfaceitem.h 2015-09-18 20:11:50 +0000
18+++ src/modules/Unity/Application/mirsurfaceitem.h 2015-10-01 17:55:42 +0000
19@@ -103,7 +103,7 @@
20
21 void touchEvent(QTouchEvent *event) override;
22
23- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *);
24+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
25
26 void releaseResources() override;
27
28
29=== modified file 'src/modules/Unity/Application/objectlistmodel.h'
30--- src/modules/Unity/Application/objectlistmodel.h 2014-08-29 11:15:51 +0000
31+++ src/modules/Unity/Application/objectlistmodel.h 2015-10-01 17:55:42 +0000
32@@ -78,7 +78,7 @@
33 return QVariant();
34 }
35
36- QHash<int, QByteArray> roleNames() const
37+ QHash<int, QByteArray> roleNames() const override
38 {
39 QHash<int, QByteArray> roleNames;
40 roleNames.insert(RoleModelData, "modelData");
41
42=== modified file 'src/platforms/mirserver/qmirserver.cpp'
43--- src/platforms/mirserver/qmirserver.cpp 2015-05-19 15:36:17 +0000
44+++ src/platforms/mirserver/qmirserver.cpp 2015-10-01 17:55:42 +0000
45@@ -38,7 +38,7 @@
46 argv[i] = new char[strlen(arguments.at(i).toStdString().c_str())+1];
47 memcpy(argv[i], arguments.at(i).toStdString().c_str(), strlen(arguments.at(i).toStdString().c_str())+1);
48 }
49- argv[argc] = '\0';
50+ argv[argc] = nullptr;
51
52 d->server = QSharedPointer<MirServer>(new MirServer(argc, const_cast<const char**>(argv)));
53
54
55=== modified file 'src/platforms/mirserver/qmirserver_p.h'
56--- src/platforms/mirserver/qmirserver_p.h 2015-05-18 18:30:33 +0000
57+++ src/platforms/mirserver/qmirserver_p.h 2015-10-01 17:55:42 +0000
58@@ -31,8 +31,9 @@
59 class QMirServer;
60 class MirServerThread;
61
62-struct QMirServerPrivate
63+class QMirServerPrivate
64 {
65+public:
66 QSharedPointer<MirServer> server;
67 MirServerThread *serverThread;
68 };
69
70=== modified file 'tests/modules/common/fake_mirsurface.h'
71--- tests/modules/common/fake_mirsurface.h 2015-09-25 17:30:26 +0000
72+++ tests/modules/common/fake_mirsurface.h 2015-10-01 17:55:42 +0000
73@@ -51,7 +51,6 @@
74 FakeMirSurface(QObject *parent = nullptr)
75 : MirSurfaceInterface(parent)
76 , m_isFirstFrameDrawn(false)
77- , m_session(nullptr)
78 , m_isFrameDropperRunning(true)
79 , m_live(true)
80 , m_state(Mir::RestoredState)
81@@ -64,7 +63,7 @@
82 // unity.shell.application.MirSurfaceInterface
83 Mir::Type type() const override { return Mir::NormalType; }
84
85- QString name() const { return QString("Fake MirSurface"); }
86+ QString name() const override { return QString("Fake MirSurface"); }
87
88 QSize size() const override { return m_size; }
89
90@@ -183,7 +182,6 @@
91 private:
92
93 bool m_isFirstFrameDrawn;
94- SessionInterface *m_session;
95 bool m_isFrameDropperRunning;
96 bool m_live;
97 Mir::State m_state;
98
99=== modified file 'tests/modules/common/qtmir_test.h'
100--- tests/modules/common/qtmir_test.h 2015-08-11 12:08:32 +0000
101+++ tests/modules/common/qtmir_test.h 2015-10-01 17:55:42 +0000
102@@ -51,7 +51,7 @@
103 void PrintTo(const SessionInterface::State& state, ::std::ostream* os);
104
105 // Initialization of mir::Server needed for by tests
106-class TestMirServerInit : virtual mir::Server
107+class TestMirServerInit : public virtual mir::Server
108 {
109 public:
110 TestMirServerInit()
111
112=== modified file 'tests/modules/common/stub_scene_surface.h'
113--- tests/modules/common/stub_scene_surface.h 2015-08-11 12:08:32 +0000
114+++ tests/modules/common/stub_scene_surface.h 2015-10-01 17:55:42 +0000
115@@ -72,7 +72,7 @@
116 void resize(geometry::Size const&) override {}
117 void set_transformation(glm::mat4 const&) override {}
118 void set_alpha(float) override {}
119- void set_orientation(MirOrientation) {}
120+ void set_orientation(MirOrientation) override {}
121
122 void add_observer(std::shared_ptr<scene::SurfaceObserver> const&) override {}
123 void remove_observer(std::weak_ptr<scene::SurfaceObserver> const&) override {}
124@@ -80,8 +80,8 @@
125 void set_reception_mode(input::InputReceptionMode mode) override { input_mode = mode; }
126 void consume(MirEvent const&) override {}
127
128- void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& /* image */) {}
129- std::shared_ptr<graphics::CursorImage> cursor_image() const { return {}; }
130+ void set_cursor_image(std::shared_ptr<graphics::CursorImage> const& /* image */) override {}
131+ std::shared_ptr<graphics::CursorImage> cursor_image() const override { return {}; }
132
133 bool supports_input() const override { return true;}
134 int client_input_fd() const override { return fd;}

Subscribers

People subscribed via source and target branches