Several plasmoid instances

2015-07-18 Thread Evgeniy Alekseev
Hi, there!

I'm a developer of several Plasma 5 widgets. After components upgrading (if I 
understand correctly the issue has been caused by the upgrading of plasma-
frameworks to 5.12.0) my users have found that several instances of the same 
widget are no longer allowed. (To be more precise they are allowed but show 
the same data.)

I've researched the issue and found that the problem is in data transfer 
between plugin (C++) and ui (QML) plasmoid parts. I believe the issue has been 
caused by the fact that:

1. All plasmoids load the one plugin instance.
or
2. Each plasmoid loads the own plugin instance but all of them use the one.

Is there a correct way to run each plasmoid with own plugin instance and to do 
the bijection between plugin and ui in runtime?
-- 
Sincerely yours, 
Evgeniy Alekseev

e-mail: darkarca...@mail.ru
ICQ: 407-398-235
Jabber: arca...@jabber.ru

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request 124380: Make System Tray use a ProxyModel rather than three independent ones

2015-07-18 Thread Kai Uwe Broulik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124380/
---

Review request for Plasma.


Bugs: 347554
https://bugs.kde.org/show_bug.cgi?id=347554


Repository: plasma-workspace


Description
---

This makes System Tray use the all tasks model with a proxy model that filters 
shown or hidden tasks. This way we don't need to keep three different models in 
sync which has shown to often break, especially when item status change. Makes 
the code significantly easier to understand.

One thing I noticed is that there doesn't seem to be a way for a plasmoid to 
specify a category, so when I uncheck Miscellaneous, all items but KMix 
(which is in the hardware category) disappear. Since we're moving away from 
most SNI apps to plasmoids, it would make sense to allow an applet so specify a 
category (either through Plasmoid attached object or in the desktop file (or we 
do a mapping from the PluginInfo-Categories to sys tray categories))


Diffs
-

  applets/systemtray/package/contents/ui/CompactRepresentation.qml 3cf774c 
  applets/systemtray/package/contents/ui/ExpandedRepresentation.qml 04de968 
  applets/systemtray/package/contents/ui/main.qml 34b9e4d 
  applets/systemtray/plugin/CMakeLists.txt 9e85a7a 
  applets/systemtray/plugin/host.h adb2c64 
  applets/systemtray/plugin/host.cpp 6d68a43 
  applets/systemtray/plugin/systemtrayplugin.cpp 2c97056 
  applets/systemtray/plugin/tasksproxymodel.h PRE-CREATION 
  applets/systemtray/plugin/tasksproxymodel.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/124380/diff/


Testing
---

- Checking and unchecking show all items works
- Forcing various items shown/hidden works
- An item changing its state (eg. new notification, goes from passive to 
active) works
- Both lists (compact and expanded) look fine
- Arrow properly appears/disappears depending on how many inactive items there 
are

Touchpad kcm no longer messes up my systray. Looks like the same bug 
mediacontroller exposed, where the applet was briefly active during 
initialization and then went passive, getting the models ouf of sync.


Thanks,

Kai Uwe Broulik

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Jenkins-kde-ci: plasma-desktop master kf5-qt5 ยป Linux,gcc - Build # 78 - Failure!

2015-07-18 Thread no-reply

GENERAL INFO

BUILD FAILURE
Build URL: 
https://build.kde.org/job/plasma-desktop%20master%20kf5-qt5/PLATFORM=Linux,compiler=gcc/78/
Project: PLATFORM=Linux,compiler=gcc
Date of build: Sat, 18 Jul 2015 14:01:50 +
Build duration: 11 min

CHANGE SET
Revision 57803d9120b3baa6f65f155cc3b95f409365c4ce by Bhushan Shah: 
(Remove/Disable useless debug message)
  change: edit 
desktoppackage/contents/configuration/ConfigurationContainmentAppearance.qml
  change: edit desktoppackage/contents/configuration/ConfigCategoryDelegate.qml
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Several plasmoid instances

2015-07-18 Thread David Edmundson
On Sat, Jul 18, 2015 at 11:49 AM, Evgeniy Alekseev darkarca...@mail.ru
wrote:

 Hi, there!

 I'm a developer of several Plasma 5 widgets. After components upgrading
 (if I
 understand correctly the issue has been caused by the upgrading of plasma-
 frameworks to 5.12.0) my users have found that several instances of the
 same
 widget are no longer allowed. (To be more precise they are allowed but show
 the same data.)

 There /should/ be no difference until the app developer opts in, with a
line in the .desktop file

X-KDE-PluginInfo-Version=3.0

Can you link to your applet?

I've researched the issue and found that the problem is in data transfer
 between plugin (C++) and ui (QML) plasmoid parts. I believe the issue has
 been
 caused by the fact that:

 1. All plasmoids load the one plugin instance.
 or
 2. Each plasmoid loads the own plugin instance but all of them use the one.

 Is there a correct way to run each plasmoid with own plugin instance and
 to do
 the bijection between plugin and ui in runtime?


The only time you'd have a problem is if you used singletons; the solution
in that case is obviously to not use singletons.

--
 Sincerely yours,
 Evgeniy Alekseev

 e-mail: darkarca...@mail.ru
 ICQ: 407-398-235
 Jabber: arca...@jabber.ru
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: baloo monitor visibility

2015-07-18 Thread Kai Uwe Broulik
Am Samstag, 18. Juli 2015, 13:04:38 schrieb Vishesh Handa:
 I was hoping to get it into KInfoCenter, and maybe have a way to
 launch that from the KCM.

+1 for Kinfocenter


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Several plasmoid instances

2015-07-18 Thread Evgeniy Alekseev
Hi, David,

Thank you for your reply.

On Saturday 18 July 2015 12:19:17 David Edmundson wrote:
 There /should/ be no difference until the app developer opts in, with a
 line in the .desktop file
 
 X-KDE-PluginInfo-Version=3.0
 
 Can you link to your applet?

Here is a link [1]. But seems no need to check the source code since the 
source of such behaviour has been found :)

 The only time you'd have a problem is if you used singletons; the solution
 in that case is obviously to not use singletons.

Thank you, seems it is the problem (I'm casting the plugin as a singleton). I 
will rewrite plugin part to do not use singletons. But I have another 
question: why it works before update?

1. https://github.com/arcan1s/awesome-widgets
-- 
Sincerely yours, 
Evgeniy Alekseev

e-mail: darkarca...@mail.ru
ICQ: 407-398-235
Jabber: arca...@jabber.ru

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request 124382: RFC: Allow plasmoid to specify X-Plasma-NotificationAreaCategory

2015-07-18 Thread Kai Uwe Broulik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124382/
---

Review request for Plasma.


Repository: plasma-workspace


Description
---

This will allow a plasmoid to specify a category similar to SNIs, so we we can 
have KTP in the Communications category, Battery and Device Notifier under 
Hardware, Clipboard as SystemServices, etc.


Diffs
-

  applets/systemtray/plugin/protocols/plasmoid/plasmoidtask.cpp 92b95d7 

Diff: https://git.reviewboard.kde.org/r/124382/diff/


Testing
---

Needs property def in plasma-framework but other than that the applets are not 
sorted differently (communication - hardware - system services - applications - 
misc) and hiding individual categories makes some of them disappear.


Thanks,

Kai Uwe Broulik

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 124380: Make System Tray use a ProxyModel rather than three independent ones

2015-07-18 Thread Mark Gaiser

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124380/#review82617
---



applets/systemtray/plugin/tasksproxymodel.cpp (lines 29 - 30)
https://git.reviewboard.kde.org/r/124380/#comment56970

Ahh, a signal - signal mapping.
That is - as far as i know - not possible in the new signal/slot syntax 
which is probably why you used a lambda.

You could use the old signal/slot syntax which does allow signal - signal 
mapping:
QObject::connect(obj, SINGAL(), otherObj, SIGNAL());



applets/systemtray/plugin/tasksproxymodel.cpp (lines 51 - 55)
https://git.reviewboard.kde.org/r/124380/#comment56969

Does this have to be a lambda for every signal? Can't you use a function 
pointer to invalidateFilter?

It might not be possible because the invalidateFilter function is a 
protected member... not sure though, you'd have to try that.



applets/systemtray/plugin/tasksproxymodel.cpp (lines 79 - 109)
https://git.reviewboard.kde.org/r/124380/#comment56968

I think you can simplfy this function greatly.

The default return is false.
Then you have 5! other places that return false as well. With the default 
being false, you don't have to check other false conditions. All you have to 
check for is the cases that will be true, which would be:

if (m_host-showAllItems()  m_category == Category::ShownTasksCategory) {
return true;
}

and then obviously check for the cases that could be true or false (aka, 
your last if / else if statement.


+1 for using a proxy instead of 3 different models.

- Mark Gaiser


On jul 18, 2015, 3:56 p.m., Kai Uwe Broulik wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/124380/
 ---
 
 (Updated jul 18, 2015, 3:56 p.m.)
 
 
 Review request for Plasma.
 
 
 Bugs: 347554
 https://bugs.kde.org/show_bug.cgi?id=347554
 
 
 Repository: plasma-workspace
 
 
 Description
 ---
 
 This makes System Tray use the all tasks model with a proxy model that 
 filters shown or hidden tasks. This way we don't need to keep three different 
 models in sync which has shown to often break, especially when item status 
 change. Makes the code significantly easier to understand.
 
 One thing I noticed is that there doesn't seem to be a way for a plasmoid to 
 specify a category, so when I uncheck Miscellaneous, all items but KMix 
 (which is in the hardware category) disappear. Since we're moving away from 
 most SNI apps to plasmoids, it would make sense to allow an applet so specify 
 a category (either through Plasmoid attached object or in the desktop file 
 (or we do a mapping from the PluginInfo-Categories to sys tray categories))
 
 Edit: Tried the PluginInfo-Categories mapping but it doesn't really fit. Eg. 
 Battery is System information but should show up in the Hardware category 
 or systray, likewise for Device NOtifier, and many other systray applets.
 
 
 Diffs
 -
 
   applets/systemtray/package/contents/ui/CompactRepresentation.qml 3cf774c 
   applets/systemtray/package/contents/ui/ExpandedRepresentation.qml 04de968 
   applets/systemtray/package/contents/ui/main.qml 34b9e4d 
   applets/systemtray/plugin/CMakeLists.txt 9e85a7a 
   applets/systemtray/plugin/host.h adb2c64 
   applets/systemtray/plugin/host.cpp 6d68a43 
   applets/systemtray/plugin/systemtrayplugin.cpp 2c97056 
   applets/systemtray/plugin/tasksproxymodel.h PRE-CREATION 
   applets/systemtray/plugin/tasksproxymodel.cpp PRE-CREATION 
 
 Diff: https://git.reviewboard.kde.org/r/124380/diff/
 
 
 Testing
 ---
 
 - Checking and unchecking show all items works
 - Forcing various items shown/hidden works
 - An item changing its state (eg. new notification, goes from passive to 
 active) works
 - Both lists (compact and expanded) look fine
 - Arrow properly appears/disappears depending on how many inactive items 
 there are
 
 Touchpad kcm no longer messes up my systray. Looks like the same bug 
 mediacontroller exposed, where the applet was briefly active during 
 initialization and then went passive, getting the models ouf of sync.
 
 
 Thanks,
 
 Kai Uwe Broulik
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 124380: Make System Tray use a ProxyModel rather than three independent ones

2015-07-18 Thread Kai Uwe Broulik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124380/
---

(Updated Juli 18, 2015, 3:56 nachm.)


Review request for Plasma.


Bugs: 347554
https://bugs.kde.org/show_bug.cgi?id=347554


Repository: plasma-workspace


Description (updated)
---

This makes System Tray use the all tasks model with a proxy model that filters 
shown or hidden tasks. This way we don't need to keep three different models in 
sync which has shown to often break, especially when item status change. Makes 
the code significantly easier to understand.

One thing I noticed is that there doesn't seem to be a way for a plasmoid to 
specify a category, so when I uncheck Miscellaneous, all items but KMix 
(which is in the hardware category) disappear. Since we're moving away from 
most SNI apps to plasmoids, it would make sense to allow an applet so specify a 
category (either through Plasmoid attached object or in the desktop file (or we 
do a mapping from the PluginInfo-Categories to sys tray categories))

Edit: Tried the PluginInfo-Categories mapping but it doesn't really fit. Eg. 
Battery is System information but should show up in the Hardware category or 
systray, likewise for Device NOtifier, and many other systray applets.


Diffs
-

  applets/systemtray/package/contents/ui/CompactRepresentation.qml 3cf774c 
  applets/systemtray/package/contents/ui/ExpandedRepresentation.qml 04de968 
  applets/systemtray/package/contents/ui/main.qml 34b9e4d 
  applets/systemtray/plugin/CMakeLists.txt 9e85a7a 
  applets/systemtray/plugin/host.h adb2c64 
  applets/systemtray/plugin/host.cpp 6d68a43 
  applets/systemtray/plugin/systemtrayplugin.cpp 2c97056 
  applets/systemtray/plugin/tasksproxymodel.h PRE-CREATION 
  applets/systemtray/plugin/tasksproxymodel.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/124380/diff/


Testing
---

- Checking and unchecking show all items works
- Forcing various items shown/hidden works
- An item changing its state (eg. new notification, goes from passive to 
active) works
- Both lists (compact and expanded) look fine
- Arrow properly appears/disappears depending on how many inactive items there 
are

Touchpad kcm no longer messes up my systray. Looks like the same bug 
mediacontroller exposed, where the applet was briefly active during 
initialization and then went passive, getting the models ouf of sync.


Thanks,

Kai Uwe Broulik

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 124380: Make System Tray use a ProxyModel rather than three independent ones

2015-07-18 Thread Kai Uwe Broulik

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124380/
---

(Updated Juli 18, 2015, 6:43 nachm.)


Review request for Plasma.


Changes
---

- Connect stuff directly
- Simplify filterAcceptsRow method


Bugs: 347554
https://bugs.kde.org/show_bug.cgi?id=347554


Repository: plasma-workspace


Description
---

This makes System Tray use the all tasks model with a proxy model that filters 
shown or hidden tasks. This way we don't need to keep three different models in 
sync which has shown to often break, especially when item status change. Makes 
the code significantly easier to understand.

One thing I noticed is that there doesn't seem to be a way for a plasmoid to 
specify a category, so when I uncheck Miscellaneous, all items but KMix 
(which is in the hardware category) disappear. Since we're moving away from 
most SNI apps to plasmoids, it would make sense to allow an applet so specify a 
category (either through Plasmoid attached object or in the desktop file (or we 
do a mapping from the PluginInfo-Categories to sys tray categories))

Edit: Tried the PluginInfo-Categories mapping but it doesn't really fit. Eg. 
Battery is System information but should show up in the Hardware category or 
systray, likewise for Device NOtifier, and many other systray applets.


Diffs (updated)
-

  applets/systemtray/package/contents/ui/CompactRepresentation.qml 3cf774c 
  applets/systemtray/package/contents/ui/ExpandedRepresentation.qml 04de968 
  applets/systemtray/package/contents/ui/main.qml 34b9e4d 
  applets/systemtray/plugin/CMakeLists.txt 9e85a7a 
  applets/systemtray/plugin/host.h adb2c64 
  applets/systemtray/plugin/host.cpp 6d68a43 
  applets/systemtray/plugin/systemtrayplugin.cpp 2c97056 
  applets/systemtray/plugin/tasksproxymodel.h PRE-CREATION 
  applets/systemtray/plugin/tasksproxymodel.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/124380/diff/


Testing
---

- Checking and unchecking show all items works
- Forcing various items shown/hidden works
- An item changing its state (eg. new notification, goes from passive to 
active) works
- Both lists (compact and expanded) look fine
- Arrow properly appears/disappears depending on how many inactive items there 
are

Touchpad kcm no longer messes up my systray. Looks like the same bug 
mediacontroller exposed, where the applet was briefly active during 
initialization and then went passive, getting the models ouf of sync.


Thanks,

Kai Uwe Broulik

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: baloo monitor visibility

2015-07-18 Thread Andrew Lake
On Sat, Jul 18, 2015, 4:05 AM Vishesh Handa

 wrote:


 I was hoping to get it into KInfoCenter, and maybe have a way to
launch that from the

KCM



 Works for me.

- Andrew
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 124382: RFC: Allow plasmoid to specify X-Plasma-NotificationAreaCategory

2015-07-18 Thread Mark Gaiser

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124382/#review82620
---


+1

But do describe this somewhere. Devs need to know about this option when 
relevant for them.

- Mark Gaiser


On jul 18, 2015, 5:50 p.m., Kai Uwe Broulik wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://git.reviewboard.kde.org/r/124382/
 ---
 
 (Updated jul 18, 2015, 5:50 p.m.)
 
 
 Review request for Plasma.
 
 
 Repository: plasma-workspace
 
 
 Description
 ---
 
 This will allow a plasmoid to specify a category similar to SNIs, so we we 
 can have KTP in the Communications category, Battery and Device Notifier 
 under Hardware, Clipboard as SystemServices, etc.
 
 
 Diffs
 -
 
   applets/systemtray/plugin/protocols/plasmoid/plasmoidtask.cpp 92b95d7 
 
 Diff: https://git.reviewboard.kde.org/r/124382/diff/
 
 
 Testing
 ---
 
 Needs property def in plasma-framework but other than that the applets are 
 now sorted differently (communication - hardware - system services - 
 applications - misc) and hiding individual categories makes some of them 
 disappear.
 
 
 Thanks,
 
 Kai Uwe Broulik
 


___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel