Review Request 128181: Remove a lot of duplication between both AppletInterface constructors

David Edmundson david at davidedmundson.co.uk
Tue Jun 14 14:29:26 UTC 2016



> On June 14, 2016, 10:59 a.m., Anthony Fieroni wrote:
> > src/scriptengines/qml/plasmoid/appletinterface.cpp, line 67
> > <https://git.reviewboard.kde.org/r/128181/diff/1/?file=468665#file468665line67>
> >
> >     So, this connect and below must be removed? Same connections in newly setupConnections

erm yeah..that was the entire point of the patch!

I've got something messed up.

Thanks


- David


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


On June 14, 2016, 9:03 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128181/
> -----------------------------------------------------------
> 
> (Updated June 14, 2016, 9:03 a.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> Also the two were slightly out of sync leading to some connections not
> being in each constructor.
> 
> 
> Diffs
> -----
> 
>   src/scriptengines/qml/plasmoid/appletinterface.h 6a64594cd53cecfbc99ad7562706e1a78d60c138 
>   src/scriptengines/qml/plasmoid/appletinterface.cpp df2d642445bdcc81d7fed463cb38c337380ea25b 
> 
> Diff: https://git.reviewboard.kde.org/r/128181/diff/
> 
> 
> Testing
> -------
> 
> previous code.
> 
> 
> FIRST CTOR ONLY  (normal mode)
>     connect(applet(), &Plasma::Applet::contextualActionsAboutToShow,
>             this, &AppletInterface::contextualActionsAboutToShow);
> 
>     connect(applet(), &Plasma::Applet::activated,
>             this, &AppletInterface::activated);
> 
> 
>     connect(this, &AppletInterface::expandedChanged, [=](bool expanded) {
>         //if both compactRepresentationItem and fullRepresentationItem exist,
>         //the applet is in a popup
>         if (expanded) {
>             if (compactRepresentationItem() && fullRepresentationItem() &&
>                 fullRepresentationItem()->window() && compactRepresentationItem()->window() &&
>                 fullRepresentationItem()->window() != compactRepresentationItem()->window() &&
>                 fullRepresentationItem()->parentItem()) {
>                 fullRepresentationItem()->parentItem()->installEventFilter(this);
>             } else if (fullRepresentationItem() && fullRepresentationItem()->parentItem()) {
>                 fullRepresentationItem()->parentItem()->removeEventFilter(this);
>             }
>         }
>     });
> }
> 
> SECOND CTOR ONLY (special comic applet path)
> 
>     connect(applet(), &Plasma::Applet::configurationRequiredChanged,
>             this, [this](bool needsConfig, const QString &reason) {
>                 emit configurationRequiredChanged();
>                 emit configurationRequiredReasonChanged();
>             });
> 
>     }
> 
> DUPLICATED:
>     qmlRegisterType<QAction>();
> 
>     connect(this, &AppletInterface::configNeedsSaving,
>             applet(), &Plasma::Applet::configNeedsSaving);
>     connect(applet(), &Plasma::Applet::immutabilityChanged,
>             this, &AppletInterface::immutabilityChanged);
> 
>     connect(applet(), &Plasma::Applet::userConfiguringChanged,
>             this, &AppletInterface::userConfiguringChanged);
> 
>     connect(applet(), &Plasma::Applet::statusChanged,
>             this, &AppletInterface::statusChanged);
> 
>     connect(applet(), &Plasma::Applet::destroyedChanged,
>             this, &AppletInterface::destroyedChanged);
> 
> 
>     connect(applet(), &Plasma::Applet::titleChanged,
>             this, &AppletInterface::titleChanged);
> 
>     connect(applet(), &Plasma::Applet::iconChanged,
>             this, &AppletInterface::iconChanged);
> 
>     connect(applet(), &Plasma::Applet::busyChanged,
>             this, &AppletInterface::busyChanged);
> 
>     connect(appletScript(), &DeclarativeAppletScript::formFactorChanged,
>             this, &AppletInterface::formFactorChanged);
>     connect(appletScript(), &DeclarativeAppletScript::locationChanged,
>             this, &AppletInterface::locationChanged);
>     connect(appletScript(), &DeclarativeAppletScript::contextChanged,
>             this, &AppletInterface::contextChanged);
> 
>     if (applet()->containment()) {
>         connect(applet()->containment(), &Plasma::Containment::screenChanged,
>         this, &ContainmentInterface::screenChanged);
>     }
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160614/5c0730ca/attachment.html>


More information about the Kde-frameworks-devel mailing list