D26992: [SystemTray] Use unified data model everywhere

2020-07-02 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> kmaterka wrote in systemtray.h:100
> Oh, OK, now I remember, sorry for misinforming you...
> 
> I haven't had any problems with this, it "Just Worked" :) Maybe it should 
> return just plain QObject*, I'm not experienced in this area, what do you 
> think?

I guess if this works and no-one reported errors, it should be fine.

Also not fully experienced, but hit some issues elsewhere and now trying to 
understand the magic. Though right now confused by what I read in the docs, 
what I see in existing code and what my tweak & see experiments deliver (with 
different result each time, meh).

So ignore for now. I have this on my list, and if I ever understood things 
fully and then would see some issue here, I will come back to this and ping you 
:)

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26992

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D26992: [SystemTray] Use unified data model everywhere

2020-07-02 Thread Konrad Materka
kmaterka marked an inline comment as done.
kmaterka added inline comments.

INLINE COMMENTS

> kossebau wrote in systemtray.h:100
> Thanks for your reply. Okay, so seems you did not hit anything related.
> 
> Thing is, you added
> ``
> Q_INVOKABLE Plasma::Service *serviceForSource(const QString );
> 
>   here, whereas the JavaScript code before was calling serviceForSource() on 
> a Plasma::DataSource class, which does not return the type "Plasma::Service 
> *", but "QObject *", cmp. its method definition
> 
> Q_INVOKABLE QObject *serviceForSource(const QString );
> 
>   and the JavaScript engine for a plain QObject simply exposes any 
> Q_INVOKABLEs and slot methods, that's why no extra registration would be 
> needed (AFAIK).
>   
>   So still a mystery to me why this here seems to work, too bad :)

Oh, OK, now I remember, sorry for misinforming you...

I haven't had any problems with this, it "Just Worked" :) Maybe it should 
return just plain QObject*, I'm not experienced in this area, what do you think?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26992

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D26992: [SystemTray] Use unified data model everywhere

2020-07-02 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> kmaterka wrote in systemtray.h:100
> I don't know, this code was there before my changes, I've just done some 
> refactoring here.

Thanks for your reply. Okay, so seems you did not hit anything related.

Thing is, you added
``
Q_INVOKABLE Plasma::Service *serviceForSource(const QString );

  here, whereas the JavaScript code before was calling serviceForSource() on a 
Plasma::DataSource class, which does not return the type "Plasma::Service *", 
but "QObject *", cmp. its method definition

Q_INVOKABLE QObject *serviceForSource(const QString );

  and the JavaScript engine for a plain QObject simply exposes any Q_INVOKABLEs 
and slot methods, that's why no extra registration would be needed (AFAIK).
  
  So still a mystery to me why this here seems to work, too bad :)

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26992

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D26992: [SystemTray] Use unified data model everywhere

2020-07-02 Thread Konrad Materka
kmaterka marked an inline comment as done.
kmaterka added inline comments.

INLINE COMMENTS

> kossebau wrote in systemtray.h:100
> Hi. Seeing this code, I have a question: from what I understood so far, for 
> this method to be useable from the JavaScript inside QML, the type 
> "Plasma::Service *" needs to be registered with at least
> 
>   qRegisterMetaType("Plasma::Service*");
> 
> or
> 
>   qRegisterMetaType();
> 
> Yet I have not found any code in Plasma related projects which calls this.
> 
> The module org.kde.plasma.core only has code to register the unnamespaced 
> type name ""Service*" (indirectly via 
> `qmlRegisterInterface("Service");` which internally calls 
> the equivalent of `qRegisterMetaType("Service*");`.
> 
> And the namespace in the registered type name string seems important, things 
> broke elsewhere if the type signature used in the Q_INVOKABLE was different 
> WRT namespace compared to the registered type name string.
> 
> Do you remember anything related or would have some insights?

I don't know, this code was there before my changes, I've just done some 
refactoring here.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26992

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart


D24223: [RFC] Add global themes that mimic other platforms' workflows

2020-07-02 Thread Jason Playne
Boxie added a comment.


  In D24223#675715 , @ngraham wrote:
  
  > Do folks have any ideas for alternative layouts that don't explicitly mimic 
other platforms?
  
  
  How about a "Laptop" Layout.
  
  - Typically on a laptop you have a lot of horizontal space, not much vertical 
- Having the default menu on the left is a good idea for that (at least for 
languages that read left to right)
  - A top "global menu" might get in the way here, as not all programs have a 
menu (web browsers hide it be default or have an alternative system, spotify, 
discord etc all go without)
  - Using an Icon style task switcher to make good use of the horizontal space 
and keep battery life
  - As laptops might be touch friendlier, having larger icons on the desktop 
and task manager and maybe the Application Dashboard too

REPOSITORY
  R114 Plasma Addons

REVISION DETAIL
  https://phabricator.kde.org/D24223

To: ngraham, #vdg, #plasma
Cc: felixernst, Boxie, wstephenson, davidre, LeGast00n, enriqueme, mart, 
fabianr, Zren, mmustac, niccolove, rikmills, cblack, broulik, mvourlakos, 
plasma-devel, Orage, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, ragreen, 
ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, ahiemstra


D26992: [SystemTray] Use unified data model everywhere

2020-07-02 Thread Friedrich W. H. Kossebau
kossebau added inline comments.

INLINE COMMENTS

> systemtray.h:100
>   */
> -Q_INVOKABLE void reorderItemAfter(QQuickItem* after, QQuickItem* before);
> -
> -Q_INVOKABLE bool isSystemTrayApplet(const QString );
> +Q_INVOKABLE Plasma::Service *serviceForSource(const QString );
>  

Hi. Seeing this code, I have a question: from what I understood so far, for 
this method to be useable from the JavaScript inside QML, the type 
"Plasma::Service *" needs to be registered with at least

  qRegisterMetaType("Plasma::Service*");

or

  qRegisterMetaType();

Yet I have not found any code in Plasma related projects which calls this.

The module org.kde.plasma.core only has code to register the unnamespaced type 
name ""Service*" (indirectly via 
`qmlRegisterInterface("Service");` which internally calls the 
equivalent of `qRegisterMetaType("Service*");`.

And the namespace in the registered type name string seems important, things 
broke elsewhere if the type signature used in the Q_INVOKABLE was different WRT 
namespace compared to the registered type name string.

Do you remember anything related or would have some insights?

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D26992

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart