Bug 356181 - systemtray applet ConfigEntries failed to save Configuration
Summary: systemtray applet ConfigEntries failed to save Configuration
Status: RESOLVED FIXED
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: components (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 03:00 UTC by Leslie Zhai
Modified: 2015-12-03 10:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
0004-systray-rootitem.patch (2.31 KB, patch)
2015-12-02 09:37 UTC, Leslie Zhai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leslie Zhai 2015-12-02 03:00:45 UTC
qtbase systray example http://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/desktop/systray

The example will create QSystemTrayIcon, and systemtray plasmoid will automatically hide it into unexpanded Status && Notification area. and right click on the systemtray plasmoid, open the systemtray configuration, then set (qtbase) systray (example) as VISIBLE, but it still be hided not shown on the panel directly https://pbs.twimg.com/media/CVMAmBBUsAAOjmG.png

KF5: v5.16.0
Qt5: v5.5.1

Reproducible: Always
Comment 1 Leslie Zhai 2015-12-02 06:28:27 UTC
my  ~/.xsession-errors

Don't have a parent applet, Can't initialize the Plasmoid protocol!!!
QObject::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data)
QObject::disconnect:  (sender name:   'org.kde.StatusNotifierItem-17475-1/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-sogou-qimpanel')
QObject::disconnect: No such slot QObject::modelChanged(QString,QAbstractItemModel*)
QObject::disconnect:  (sender name:   'org.kde.StatusNotifierItem-17475-1/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-sogou-qimpanel')
QObject::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data)
QObject::disconnect:  (sender name:   ':1.39/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-62914618')
QObject::disconnect: No such slot QObject::modelChanged(QString,QAbstractItemModel*)
QObject::disconnect:  (sender name:   ':1.39/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-62914618')
QObject::disconnect: No such slot QObject::dataUpdated(QString,Plasma::DataEngine::Data)
QObject::disconnect:  (sender name:   'org.kde.StatusNotifierItem-17485-1/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-KMix')
QObject::disconnect: No such slot QObject::modelChanged(QString,QAbstractItemModel*)
QObject::disconnect:  (sender name:   'org.kde.StatusNotifierItem-17485-1/StatusNotifierItem')
QObject::disconnect:  (receiver name: 'SystemTray-KMix')

plasma-workspace/applets/systemtray/plugin/protocols/plasmoid/plasmoidprotocol.cpp

void PlasmoidProtocol::init()                                                      
{                                                                                  
    //this should never happen                                                     
    if (m_containment) {                                                           
        return;                                                                    
    }                                                                              
                                                                                   
    Host* h = qobject_cast<Host*>(parent());                                       
    QQuickItem* rootItem = h->rootItem();                                          
    if (rootItem) {                                                                
        m_systrayApplet = rootItem->property("_plasma_applet").value<Plasma::Applet*>();
    }                                                                              
                                                                                   
    if (!m_systrayApplet) {                                                        
        qWarning() << "Don't have a parent applet, Can't initialize the Plasmoid protocol!!!";
        return;                                                                    
    }

m_systrayApplet is NULL ptr!
Comment 2 Leslie Zhai 2015-12-02 09:37:49 UTC
Created attachment 95859 [details]
0004-systray-rootitem.patch

applets/systemtray/plugin/protocols/plasmoid/plasmoidprotocol.cpp failed to get rootItem from applets/systemtray/plugin/host.cpp

so I dirty add setRootItem for PlasmoidProtocol ... I will try to fix it correctly ASAP ;-)
Comment 3 Leslie Zhai 2015-12-03 04:07:32 UTC
my ~/.config/plasma-org.kde.plasma.desktop-appletsrc

[Containments][1][Applets][6][Configuration][General]
extraItems=org.kde.plasma.devicenotifier,org.kde.plasma.printmanager,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.mediacontroller,org.kde.plasma.networkmanagement,org.kde.plasma.clipboard,org.kde.plasma.bluetooth,org.kde.plasma.isoftupdate
hiddenItems=org.kde.plasma.printmanager
knownItems=org.kde.plasma.devicenotifier,org.kde.plasma.isoftupdate,org.kde.plasma.printmanager,org.kde.plasma.battery,org.kde.plasma.notifications,org.kde.plasma.mediacontroller,org.kde.plasma.networkmanagement,org.kde.plasma.clipboard,org.kde.plasma.bluetooth
shownItems=org.kde.plasma.clipboard

when set systray as shown Item, but systray is not in the showItems!
Comment 4 Leslie Zhai 2015-12-03 04:14:58 UTC
fixed ;-) https://git.reviewboard.kde.org/r/126229/
Comment 5 Marco Martin 2015-12-03 10:59:28 UTC
since the patch is specific for 5.4 that probably won't have new releases, you can send the patch to
kde-packagers@kde.org
for distributions that can consider to pick up the patch in their 5.4 packages