Merge lp:~nick-dedekind/qtubuntu/menuTheme into lp:qtubuntu
| Status: | Merged |
|---|---|
| Approved by: | Gerry Boland on 2017-01-11 |
| Approved revision: | 319 |
| Merged at revision: | 362 |
| Proposed branch: | lp:~nick-dedekind/qtubuntu/menuTheme |
| Merge into: | lp:qtubuntu |
| Diff against target: |
2206 lines (+1850/-36) 28 files modified
README (+3/-2) debian/control (+12/-0) debian/gles-patches/convert-to-gles.patch (+23/-10) debian/qtubuntu-appmenutheme.install (+1/-0) debian/rules (+1/-0) src/src.pro (+1/-1) src/ubuntuappmenu/com.ubuntu.MenuRegistrar.xml (+83/-0) src/ubuntuappmenu/gmenumodelexporter.cpp (+350/-0) src/ubuntuappmenu/gmenumodelexporter.h (+83/-0) src/ubuntuappmenu/gmenumodelplatformmenu.cpp (+526/-0) src/ubuntuappmenu/gmenumodelplatformmenu.h (+181/-0) src/ubuntuappmenu/logging.h (+27/-0) src/ubuntuappmenu/menuregistrar.cpp (+137/-0) src/ubuntuappmenu/menuregistrar.h (+59/-0) src/ubuntuappmenu/registry.cpp (+97/-0) src/ubuntuappmenu/registry.h (+56/-0) src/ubuntuappmenu/theme.cpp (+46/-13) src/ubuntuappmenu/theme.h (+9/-4) src/ubuntuappmenu/themeplugin.cpp (+36/-0) src/ubuntuappmenu/themeplugin.h (+34/-0) src/ubuntuappmenu/ubuntuappmenu.json (+3/-0) src/ubuntuappmenu/ubuntuappmenu.pro (+41/-0) src/ubuntumirclient/integration.cpp (+24/-3) src/ubuntumirclient/nativeinterface.cpp (+3/-0) src/ubuntumirclient/plugin.cpp (+3/-0) src/ubuntumirclient/ubuntumirclient.pro (+4/-3) src/ubuntumirclient/window.cpp (+5/-0) src/ubuntumirclient/window.h (+2/-0) |
| To merge this branch: | bzr merge lp:~nick-dedekind/qtubuntu/menuTheme |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gerry Boland | 2016-06-09 | Approve on 2017-01-11 | |
| Unity8 CI Bot | continuous-integration | Approve on 2017-01-11 | |
| Timo Jyrinki | Approve on 2017-01-03 | ||
|
Review via email:
|
|||
Commit Message
Added a QPlatformTheme for exporting gmenumodel for qt menus.
Description of the Change
Added a QPlatformTheme for exporting a gmenumodel for qt menus.
Theme packaged in qtubuntu-
Theme is loadable through QT_QPA_
Changed categories logging to ubuntu.mirclient, ubuntu.appmenu
Requires registry implementation to function:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:285
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:287
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:288
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:292
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:293
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:295
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:296
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:297
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:298
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Gerry Boland (gerboland) wrote : | # |
Hey,
this was bigger than I was expecting!
Questions:
1. how do I test this?
2. is the theme plugin totally independent from the QPA plugin? I see you moved the QPA's theme code into the Integration code. Why? Just to indicate the majority of the theming is elsewhere?
~/dev/projects/
src.pro ubuntuappmenu/ ubuntumirclient/
~/dev/projects/
ubuntuappmenu/ ubuntumirclient/
/me hating how we prefix everything with "ubuntu".
I'm just looking at the QPA for now
- you add persistentSurfaceId - can it be a QByteArray instead of QString?
+ // queue the windowPropertyC
+ QMetaObject:
+ Q_ARG(QPlatform
+ Q_ARG(QString, "persistentSurf
How does a persistent Surface ID ever change?
+ return QStringList(
QStringLiteral please.
-Q_LOGGING_
+Q_LOGGING_
Why? This breaks the standard elsewhere in the code. Check the README too.
| Gerry Boland (gerboland) wrote : | # |
=== modified file 'debian/control'
What dependency will pull in this new qtubuntu-
+Build-Depends: ${misc:Depends},
+ ${shlibs:Depends},
bad indent
| Nick Dedekind (nick-dedekind) wrote : | # |
> === modified file 'debian/control'
> What dependency will pull in this new qtubuntu-
I would probably say it's whatever pulls in unity8/qtubuntu. unity8-
>
> +Build-Depends: ${misc:Depends},
> + ${shlibs:Depends},
> bad indent
Fixed.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:300
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Nick Dedekind (nick-dedekind) wrote : | # |
>
> I'm just looking at the QPA for now
> - you add persistentSurfaceId - can it be a QByteArray instead of QString?
Done.
>
> + // queue the windowPropertyC
> platformWindow will not yet be set for the window.
> + QMetaObject:
> Qt::QueuedConne
> + Q_ARG(QPlatform
> + Q_ARG(QString, "persistentSurf
> How does a persistent Surface ID ever change?
It doesn't change but the platform window is created after the QWindow, and therefore could be created after an attached menubar; so when the exporter initially asks for the surface id, it wont be set yet, therefore we need to be notified when it is.
>
> + return QStringList(
> QStringLiteral please.
Done
>
> -Q_LOGGING_
> QtWarningMsg)
> +Q_LOGGING_
> QtWarningMsg)
> Why? This breaks the standard elsewhere in the code. Check the README too.
I've changed it everywhere in the code now. Since it's kind of like a url i think it should be this way for better "domain" control.
We also have "ubuntu.appmenu" so to get all the logging from qtubuntu, we can do "QT_LOGGING_
* I think it should really be "qtubuntu.
| Nick Dedekind (nick-dedekind) wrote : | # |
If you'd rather just leave the log categories as ubuntumirclient
| Nick Dedekind (nick-dedekind) wrote : | # |
> Hey,
> this was bigger than I was expecting!
>
> Questions:
> 1. how do I test this?
I'll sort out something to test with.
> 2. is the theme plugin totally independent from the QPA plugin? I see you
> moved the QPA's theme code into the Integration code. Why? Just to indicate
> the majority of the theming is elsewhere?
They're both independent of each other, but ubuntuappmenu relies on a persistent surface id to be set to work correctly, so there is a "soft" dependence their.
The theme in the integration is just a fallback theme in case ubuntuappmenu isn't installed. I didn't think it really needed it's own files since it isn't instantiable outside the integration (No QT_QPA_
The reason for separating the theme into a different package was so that it is very easy to revert or replace. Just uninstall the package.
>
>
> ~/dev/projects/
> src.pro ubuntuappmenu/ ubuntumirclient/
> ~/dev/projects/
> ubuntuappmenu/ ubuntumirclient/
> /me hating how we prefix everything with "ubuntu".
>
yes...
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:302
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Nick Dedekind (nick-dedekind) wrote : | # |
Righty'O
I've added a testing file to https:/
You'll need to build this because it has the server side of the menu registry, but otherwise the test file sits in isolation to any thing else.
The test file is in "qml/Applicatio
So:
1) Get and build deps for unity8 branch.
lp:~unity-team/unity-api/persistent_surface_id
2) Get and build lp:~nick-dedekind/unity8/menus.
3) Start test with: QML2_IMPORT_
4) new term
5) mir_demo_server
6) new term
7) create a qml example with menus. (MenuAPI.qml example graciously provided by dednick http://
8) Build and install this qtubuntu branch
9) QT_LOGGING_
Tadaa. hopefully. you should see a bunch of log output from ubuntu.appmenu, and from ubuntu.
The Test.qml should also contain a pretty printed output of the exported menus it's picked up from dbus.
| Gerry Boland (gerboland) wrote : | # |
=== modified file 'README'
+ * ubuntu.mirclient - For all other messages frm the ubuntumirclient QPA.
+ * ubuntu.appmenu - For all messages frm the ubuntuappmenu QPA theme.
typo: "from"
=== modified file 'debian/control'
+ appmenutheme provides you with an integrated application menu in your global
+ menu bar. It functions as a QPA platformtheme plugin.
I just want to edit this to remove the subject from the sentence:
Appmenutheme enables the export of application menus to a global menu bar. It is implemented in a QPA platform theme plugin.
=== added file 'src/ubuntuappm
+ main interface is docuemented here: @ref com::ubuntu:
typo: "documented"
+ ensure this method is called with the same connection that implmenets the object.
and one more "implements"
+ Associates a gmenumodel with a application
typo: "an application"
+ <arg name="menuObjec
+ <dox:d>The object on the dbus interface implementing the gmenumodel interface</dox:d>
+ </arg>
+ <arg name="actionObj
+ <dox:d>The object on the dbus interface implementing the gmenumodel interface</dox:d>
Documentation text could be slightly better (in both RegisterAppMenu and RegisterSurface
+ A method to allow removing a application menu from the database.
same typo: "an application"
+ ensure this method is called with the same connection that implmenets the object.
"implements" again
| Gerry Boland (gerboland) wrote : | # |
+++ src/ubuntuappme
+class GMenuModelExporter : public QObject
I was curious if this really needed to be a QObject, but you do use that fact to ensure lifetimes of the objects in signal/lambda connections are correct. So it's ok.
+ QList<QMetaObje
I understand why you do this, because QObject::disconnect must have a sender (i.e. first argument) set.
But GMenuModelPlatf
+++ src/ubuntuappme
+inline QString getActionString
opening brace on newline - just for consistency.
+ for(auto iter = parts.begin(); iter != parts.end(); ++iter) {
space after the "for" - could you not use Q_FOREACH(const auto &part, parts) and save messing with iterators?
I'd also appreciate an explanatory comment of what "getActionString" is doing.
+ auto item = (GMenuModelPlat
Use C++ static_cast<> please
+#define MENU_OBJECT_PATH QString(
QStringLiteral would work. But odd to define more than a character constant here,
#define MENU_OBJECT_PATH "/com/ubuntu/
would be more typical
+ GMenuModelBarEx
+ auto iter = bar->menus(
+ for (; iter != bar->menus().end(); ++iter) {
Q_FOREACH nicer, no? You use these style loops everywhere, any reason?
Also, a quick comment explaining the purpose of these classes and each method would help other readers. I'm especially obsessed with documenting methods that return GThing* pointers, to clearly indicate if or how the returned GThings* should be cleaned up by the consumer.
+ GError *error = NULL;
I see lots of NULL here, can we not use nullptr, or is G stuff incompatible with it? /me obsessed with C++11 goodies
+ bus = g_bus_get_sync (G_BUS_
leak, is never unref-ed.
+ m_exportedModel = g_dbus_
g_dbus_
+ error = NULL;
Leak, you should be doing g_error_free (err)
+ GMenuModelPlatf
I see this a bunch of places, it can be simpler:
auto gplatformMenu = static_
+void GMenuModelExpor
There's a lot going on here, quick comment explaining the intention would be good. I'm just looking at the code, it appears fine. Q_FOREACH not suitable, but you can use static_cast instead of qobject_cast here.
+ bool checkable(
I prefer = instead of () assignment for simple types - same line could be misinterpreted as a function declaration
same for "checked" inside the conditional.
+ std::function<
perf...
| Gerry Boland (gerboland) wrote : | # |
QList<QMetaObje
Please use QVector instead of QList here. Ref:
http://
as I suspect (not 100%) that the type is bigger than a pointer
| Gerry Boland (gerboland) wrote : | # |
=== added file 'src/ubuntuappm
+ GMenuModelExporter* m_exporter;
+ MenuRegistrar* m_registrar;
If you used QScopedPointer, you would not need to worry about deleting them in a destructor. And then can have a trivial destructor
+class Q_DECL_EXPORT GMenuModelPlatf
+ GMenuModelExporter* m_exporter;
+ MenuRegistrar* m_registrar;
same as above, but you'll need to set them with reset(). Note you're leaking these currently.
=== added file 'src/ubuntuappm
+int logRecusion = 0;
polluting the global namespace, please stuck in an anonymous NS.
+ connect(menu, SIGNAL(
new style connect statement gives us compile-time checking of this, please convert. I see this 2 times
for (auto iter = m_menus.begin(); iter != m_menus.end(); ++iter) {
I think there's the odd loop you could convert to Q_FOREACH. menuForTag & menuItemForTag anyway
+QDebug GMenuModelPlatf
+ auto myMenu = qobject_
static_cast works
+void GMenuModelPlatf
underscore, yuk! :) Just "ready" please
=== added file 'src/ubuntuappm
+bool isMirClient() {
+ return qgetenv(
+}
move to anonymous NS please, and qGuiApp-
+ : m_registeredPro
Putting my security hat on for a second, it is not impossible for an application to have a pid ~0, and also pid 0 (I believe pids can wrap around). Highly unlikely, but an attack vector. Consequences here aren't dire, so I'm ok with it.
std::optional is nice to avoid such munging of set/unset with value.
+ bus = g_bus_get_sync (G_BUS_
leaked again here. NULLs!
+ if (!bus) {
+ qCWarning(
error leaked here
+void MenuRegistrar:
+{
+ if (!UbuntuMenuReg
+ m_registeredPro
+ return;
+ }
+ UbuntuMenuRegis
+ m_registeredPro
+}
m_registeredPro
| Gerry Boland (gerboland) wrote : | # |
=== added file 'src/ubuntuappm
+ #include <QObject>
space, and please have a newline between it and the class declarations
+ QDBusServiceWat
+ ComUbuntuMenuRe
QScopedPointer to ease lifetime (even though they'll probably leak anyway since it is a singleton) and simplify destructor
=== added file 'src/ubuntuappm
+ Q_UNUSED(oldOwner);
+ if (serviceName != REGISTRAR_SERVICE) return;
+
+ if (oldOwner != newOwner) {
this is why I don't like Q_UNUSED. oldOwner is actually used.
I prefer commenting out the variable name in the method if it really is unused.
+++ src/ubuntuappme
+bool useLocalMenu() {
anonymous NS please
- return QVariant(
+ return QVariant(
How is this related to this MP? And who decided to change the icon theme?
+++ src/ubuntuappme
learning our lesson about Q_UNUSED, please comment out the variable names instead
| Gerry Boland (gerboland) wrote : | # |
+ // queue the windowPropertyC
+ QMetaObject:
+ Q_ARG(QPlatform
+ Q_ARG(QString, "persistentSurf
Why pass the PlatformWindow, why not the QWindow? I see you only using the QWindow in the appmenu stuff:
+ connect(
+ if (property != QStringLiteral(
+ return;
+ }
+ if (window->window() == m_window) {
+ registerMenuFor
+ }
| Gerry Boland (gerboland) wrote : | # |
I think for name collision safety all of ubuntuappmenu should be either within its own namespace, or all the class names prefixed with "Ubuntu"
This is something the mirclient QPA needs to do too
| Gerry Boland (gerboland) wrote : | # |
> If you'd rather just leave the log categories as
> ubuntumirclient
Can you just put the ubuntumirclient ones back? This MP is big enough as it is.
I do agree with your thinking that the category names should be better namespaced.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:303
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:306
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Nick Dedekind (nick-dedekind) wrote : | # |
> + // queue the windowPropertyC
> platformWindow will not yet be set for the window.
> + QMetaObject:
> Qt::QueuedConne
> + Q_ARG(QPlatform
> + Q_ARG(QString, "persistentSurf
>
> Why pass the PlatformWindow, why not the QWindow? I see you only using the
> QWindow in the appmenu stuff:
>
> + connect(
> &QPlatformNativ
> [this](
> + if (property != QStringLiteral(
> + return;
> + }
> + if (window->window() == m_window) {
> + registerMenuFor
> + }
Because the QPlatformNative
| Nick Dedekind (nick-dedekind) wrote : | # |
> +++ src/ubuntuappme
> +class GMenuModelExporter : public QObject
> I was curious if this really needed to be a QObject, but you do use that fact
> to ensure lifetimes of the objects in signal/lambda connections are correct.
> So it's ok.
>
> + QList<QMetaObje
> I understand why you do this, because QObject::disconnect must have a sender
> (i.e. first argument) set.
>
> But GMenuModelPlatf
> their connections. Is that not enough? Do they clean up too late?
When the structure of the menu changes (for additions/removals from menu), we re-process all the menus so need to re-connect. Just because we remove a menu doesn't mean it's necessarily been deleted.
>
>
> +++ src/ubuntuappme
> +inline QString getActionString
> opening brace on newline - just for consistency.
>
> + for(auto iter = parts.begin(); iter != parts.end(); ++iter) {
> space after the "for" - could you not use Q_FOREACH(const auto &part, parts)
> and save messing with iterators?
>
> I'd also appreciate an explanatory comment of what "getActionString" is doing.
>
>
> + auto item = (GMenuModelPlat
> Use C++ static_cast<> please
>
> +#define MENU_OBJECT_PATH QString(
> QStringLiteral would work. But odd to define more than a character constant
> here,
> #define MENU_OBJECT_PATH "/com/ubuntu/
> would be more typical
>
>
> + GMenuModelBarEx
> bar)
> + auto iter = bar->menus(
> + for (; iter != bar->menus().end(); ++iter) {
> Q_FOREACH nicer, no? You use these style loops everywhere, any reason?
>
> Also, a quick comment explaining the purpose of these classes and each method
> would help other readers. I'm especially obsessed with documenting methods
> that return GThing* pointers, to clearly indicate if or how the returned
> GThings* should be cleaned up by the consumer.
>
>
> + GError *error = NULL;
> I see lots of NULL here, can we not use nullptr, or is G stuff incompatible
> with it? /me obsessed with C++11 goodies
>
> + bus = g_bus_get_sync (G_BUS_
> leak, is never unref-ed.
>
> + m_exportedModel = g_dbus_
> menuPath.
> g_dbus_
> m_exportedModel is an int. Implicit lossy conversion here, definitely safe?
>
>
> + error = NULL;
> Leak, you should be doing g_error_free (err)
>
>
> + GMenuModelPlatf
> qobject_
> I see this a bunch of places, it can be simpler:
> auto gplatformMenu = static_
>
>
> +void GMenuModelExpor
> gplatformMenu, GMenu* menu)
> There's a lot going on here, quick comment explaining the intention would be
> good. I'm just looking at the code, it appears fine. Q_FOREACH not suitable,
> but you can use static_cast instead of qobje...
| Nick Dedekind (nick-dedekind) wrote : | # |
> === added file 'src/ubuntuappm
>
> + GMenuModelExporter* m_exporter;
> + MenuRegistrar* m_registrar;
> If you used QScopedPointer, you would not need to worry about deleting them in
> a destructor. And then can have a trivial destructor
>
> +class Q_DECL_EXPORT GMenuModelPlatf
> + GMenuModelExporter* m_exporter;
> + MenuRegistrar* m_registrar;
> same as above, but you'll need to set them with reset(). Note you're leaking
> these currently.
>
>
>
> === added file 'src/ubuntuappm
> +int logRecusion = 0;
> polluting the global namespace, please stuck in an anonymous NS.
>
> + connect(menu, SIGNAL(
> new style connect statement gives us compile-time checking of this, please
> convert. I see this 2 times
>
>
> for (auto iter = m_menus.begin(); iter != m_menus.end(); ++iter) {
> I think there's the odd loop you could convert to Q_FOREACH. menuForTag &
> menuItemForTag anyway
>
> +QDebug GMenuModelPlatf
> + auto myMenu = qobject_
> static_cast works
>
> +void GMenuModelPlatf
> underscore, yuk! :) Just "ready" please
>
>
> === added file 'src/ubuntuappm
> +bool isMirClient() {
> + return qgetenv(
> +}
> move to anonymous NS please, and qGuiApp-
> thing to check.
>
>
> + : m_registeredPro
> Putting my security hat on for a second, it is not impossible for an
> application to have a pid ~0, and also pid 0 (I believe pids can wrap around).
> Highly unlikely, but an attack vector. Consequences here aren't dire, so I'm
> ok with it.
>
> std::optional is nice to avoid such munging of set/unset with value.
>
C++17 only.
>
> + bus = g_bus_get_sync (G_BUS_
> leaked again here. NULLs!
>
> + if (!bus) {
> + qCWarning(
> error ? error->message : "unknown error");
> error leaked here
>
> +void MenuRegistrar:
> +{
> + if (!UbuntuMenuReg
> + m_registeredPro
> + return;
> + }
> + UbuntuMenuRegis
> cessId, m_path);
> + m_registeredPro
> +}
>
> m_registeredPro
> duplicate line.
Done.
| Nick Dedekind (nick-dedekind) wrote : | # |
Think I got everything.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:309
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:310
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Nick Dedekind (nick-dedekind) wrote : | # |
I'll sort out the namespacing in another MP I; along with changes to the logging categories. For now i've just left them in the current format.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:311
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:312
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Gerry Boland (gerboland) wrote : | # |
> > std::optional is nice to avoid such munging of set/unset with value.
> >
>
> C++17 only.
Damnit yes.
> I'll sort out the namespacing in another MP I; along with changes to
> the logging categories. For now i've just left them in the current format.
Ok.
| Gerry Boland (gerboland) wrote : | # |
Only 1 thing missed:
=== added file 'src/ubuntuappm
+bool isMirClient() {
+ return qgetenv(
+}
qGuiApp-
You've addressed everything else
| Nick Dedekind (nick-dedekind) wrote : | # |
> Only 1 thing missed:
>
> === added file 'src/ubuntuappm
> +bool isMirClient() {
> + return qgetenv(
> +}
> qGuiApp-
>
> You've addressed everything else
Fixed.
| Nick Dedekind (nick-dedekind) wrote : | # |
You will also need lp:~nick-dedekind/qmenumodel/desktop_menus to test.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:313
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:314
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:315
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:316
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Timo Jyrinki (timo-jyrinki) wrote : | # |
The gles version of qtubuntu-
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:317
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:319
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:319
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/

FAILED: Continuous integration, rev:284 /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/74/ /unity8- jenkins. ubuntu. com/job/ build/1944/ console /unity8- jenkins. ubuntu. com/job/ build-0- fetch/1970 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1904 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1904 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 1904 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1895/console /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1895/console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/74/rebuild
https:/