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

Proposed by Michał Sawicz
Status: Merged
Approved by: Michael Terry
Approved revision: 484
Merged at revision: 493
Proposed branch: lp:~unity-team/qtmir/centralizeLoggingCategories
Merge into: lp:qtmir
Prerequisite: lp:~alan-griffiths/qtmir/MirServer-is-not-a-context-object
Diff against target: 145 lines (+27/-17)
10 files modified
src/modules/Unity/Application/application_manager.cpp (+0/-2)
src/modules/Unity/Application/mirsurfacemanager.cpp (+0/-2)
src/modules/Unity/Application/sessionmanager.cpp (+0/-2)
src/platforms/mirserver/CMakeLists.txt (+1/-0)
src/platforms/mirserver/clipboard.cpp (+0/-2)
src/platforms/mirserver/logging.cpp (+26/-0)
src/platforms/mirserver/mirserver.cpp (+0/-3)
src/platforms/mirserver/qteventfeeder.cpp (+0/-2)
src/platforms/mirserver/screen.cpp (+0/-2)
src/platforms/mirserver/screensmodel.cpp (+0/-2)
To merge this branch: bzr merge lp:~unity-team/qtmir/centralizeLoggingCategories
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
Unity8 CI Bot (community) continuous-integration Approve
Gerry Boland Pending
Review via email: mp+293984@code.launchpad.net

This proposal supersedes a proposal from 2016-05-03.

Commit message

Centralize logging categories

The header part is already centralized. Make the cpp the same.

Moves all logging category symbols to the mirserver lib.

Enables mirserver to use logging categories that were previously declared in the Unity.Application module.

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No

* 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?
Not applicable

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

PASSED: Continuous integration, rev:483
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/200/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1500
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1465
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1465
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1465/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1465/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1465/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1465/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1465/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1465
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1465/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Looks good

review: Approve
Revision history for this message
Michał Sawicz (saviq) wrote : Posted in a previous version of this proposal

This conflicts with lp:~alan-griffiths/qtmir/MirServer-is-not-a-context-object - please merge it and make a prerequisite here.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:484
https://unity8-jenkins.ubuntu.com/job/lp-qtmir-ci/205/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1530
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1490
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1490
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1490/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1490/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1490/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1490/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1490/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1490
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1490/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

I'll just copy Gerry's approval from the pre-merge version over, for silo bookkeeping.

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/application_manager.cpp'
2--- src/modules/Unity/Application/application_manager.cpp 2016-05-06 08:42:04 +0000
3+++ src/modules/Unity/Application/application_manager.cpp 2016-05-06 08:42:04 +0000
4@@ -53,8 +53,6 @@
5
6 namespace ms = mir::scene;
7
8-Q_LOGGING_CATEGORY(QTMIR_APPLICATIONS, "qtmir.applications")
9-
10 namespace unityapi = unity::shell::application;
11
12 #define DEBUG_MSG qCDebug(QTMIR_APPLICATIONS).nospace() << "ApplicationManager::" << __func__
13
14=== modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp'
15--- src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:42:04 +0000
16+++ src/modules/Unity/Application/mirsurfacemanager.cpp 2016-05-06 08:42:04 +0000
17@@ -39,8 +39,6 @@
18 #include <mir/scene/surface.h>
19
20
21-Q_LOGGING_CATEGORY(QTMIR_SURFACES, "qtmir.surfaces")
22-
23 namespace ms = mir::scene;
24
25 namespace qtmir {
26
27=== modified file 'src/modules/Unity/Application/sessionmanager.cpp'
28--- src/modules/Unity/Application/sessionmanager.cpp 2016-04-29 15:41:00 +0000
29+++ src/modules/Unity/Application/sessionmanager.cpp 2016-05-06 08:42:04 +0000
30@@ -33,8 +33,6 @@
31 #include <mir/scene/prompt_session.h>
32 #include <mir/scene/prompt_session_manager.h>
33
34-Q_LOGGING_CATEGORY(QTMIR_SESSIONS, "qtmir.sessions")
35-
36 namespace ms = mir::scene;
37
38 namespace qtmir {
39
40=== modified file 'src/platforms/mirserver/CMakeLists.txt'
41--- src/platforms/mirserver/CMakeLists.txt 2016-04-26 08:30:26 +0000
42+++ src/platforms/mirserver/CMakeLists.txt 2016-05-06 08:42:04 +0000
43@@ -52,6 +52,7 @@
44 ${CMAKE_SOURCE_DIR}/src/common/debughelpers.cpp
45 ${CMAKE_SOURCE_DIR}/src/common/timestamp.cpp
46 cursor.cpp
47+ logging.cpp
48 mircursorimages.cpp
49 mirdisplayconfigurationpolicy.cpp
50 mirwindowmanager.cpp
51
52=== modified file 'src/platforms/mirserver/clipboard.cpp'
53--- src/platforms/mirserver/clipboard.cpp 2015-08-11 12:08:32 +0000
54+++ src/platforms/mirserver/clipboard.cpp 2016-05-06 08:42:04 +0000
55@@ -24,8 +24,6 @@
56 #include <QDBusError>
57 #include <QMimeData>
58
59-Q_LOGGING_CATEGORY(QTMIR_CLIPBOARD, "qtmir.clipboard")
60-
61 // FIXME(loicm) The clipboard data format is not defined by Ubuntu Platform API
62 // which makes it impossible to have non-Qt applications communicate with Qt
63 // applications through the clipboard API. The solution would be to have
64
65=== added file 'src/platforms/mirserver/logging.cpp'
66--- src/platforms/mirserver/logging.cpp 1970-01-01 00:00:00 +0000
67+++ src/platforms/mirserver/logging.cpp 2016-05-06 08:42:04 +0000
68@@ -0,0 +1,26 @@
69+/*
70+ * Copyright (C) 2016 Canonical, Ltd.
71+ *
72+ * This program is free software: you can redistribute it and/or modify it under
73+ * the terms of the GNU Lesser General Public License version 3, as published by
74+ * the Free Software Foundation.
75+ *
76+ * This program is distributed in the hope that it will be useful, but WITHOUT
77+ * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
78+ * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
79+ * Lesser General Public License for more details.
80+ *
81+ * You should have received a copy of the GNU Lesser General Public License
82+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
83+ */
84+
85+#include "logging.h"
86+
87+Q_LOGGING_CATEGORY(QTMIR_APPLICATIONS, "qtmir.applications")
88+Q_LOGGING_CATEGORY(QTMIR_SESSIONS, "qtmir.sessions")
89+Q_LOGGING_CATEGORY(QTMIR_SURFACES, "qtmir.surfaces")
90+Q_LOGGING_CATEGORY(QTMIR_MIR_INPUT, "qtmir.mir.input", QtWarningMsg)
91+Q_LOGGING_CATEGORY(QTMIR_MIR_MESSAGES, "qtmir.mir")
92+Q_LOGGING_CATEGORY(QTMIR_CLIPBOARD, "qtmir.clipboard")
93+Q_LOGGING_CATEGORY(QTMIR_SENSOR_MESSAGES, "qtmir.sensor")
94+Q_LOGGING_CATEGORY(QTMIR_SCREENS, "qtmir.screens")
95
96=== modified file 'src/platforms/mirserver/mirserver.cpp'
97--- src/platforms/mirserver/mirserver.cpp 2016-05-06 08:42:04 +0000
98+++ src/platforms/mirserver/mirserver.cpp 2016-05-06 08:42:04 +0000
99@@ -48,9 +48,6 @@
100 namespace msh = mir::shell;
101 namespace ms = mir::scene;
102
103-Q_LOGGING_CATEGORY(QTMIR_MIR_MESSAGES, "qtmir.mir")
104-
105-
106 MirServer::MirServer(int &argc, char **argv,
107 const QSharedPointer<ScreensModel> &screensModel, QObject* parent)
108 : QObject(parent)
109
110=== modified file 'src/platforms/mirserver/qteventfeeder.cpp'
111--- src/platforms/mirserver/qteventfeeder.cpp 2016-04-13 14:25:42 +0000
112+++ src/platforms/mirserver/qteventfeeder.cpp 2016-05-06 08:42:04 +0000
113@@ -35,8 +35,6 @@
114 // common dir
115 #include <debughelpers.h>
116
117-Q_LOGGING_CATEGORY(QTMIR_MIR_INPUT, "qtmir.mir.input", QtWarningMsg)
118-
119 // XKB Keysyms which do not map directly to Qt types (i.e. Unicode points)
120 static const uint32_t KeyTable[] = {
121 // misc keys
122
123=== modified file 'src/platforms/mirserver/screen.cpp'
124--- src/platforms/mirserver/screen.cpp 2016-04-29 15:41:00 +0000
125+++ src/platforms/mirserver/screen.cpp 2016-05-06 08:42:04 +0000
126@@ -38,8 +38,6 @@
127
128 namespace mg = mir::geometry;
129
130-Q_LOGGING_CATEGORY(QTMIR_SENSOR_MESSAGES, "qtmir.sensor")
131-
132 namespace {
133 bool isLittleEndian() {
134 unsigned int i = 1;
135
136=== modified file 'src/platforms/mirserver/screensmodel.cpp'
137--- src/platforms/mirserver/screensmodel.cpp 2016-04-29 15:41:00 +0000
138+++ src/platforms/mirserver/screensmodel.cpp 2016-05-06 08:42:04 +0000
139@@ -35,8 +35,6 @@
140 // std
141 #include <memory>
142
143-Q_LOGGING_CATEGORY(QTMIR_SCREENS, "qtmir.screens")
144-
145 namespace mg = mir::graphics;
146
147

Subscribers

People subscribed via source and target branches