D26912: Use Qt5 signal syntax, format files, optimizations

Laurent Montel noreply at phabricator.kde.org
Sat Jan 25 10:50:52 GMT 2020


mlaurent requested changes to this revision.
mlaurent added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> addscriptdialog.cpp:39
> +    QVBoxLayout *lay = new QVBoxLayout;
> +    setLayout(lay);
> +    QLabel *lab = new QLabel(i18n("Shell script path:"), this);

you can remove this line and adding (this) to new QVBoxLayout
... lay = new QVBoxLayout(this);

> advanceddialog.cpp:39
>      lay->addWidget(buttons);
> -    setLayout( lay );
> +    setLayout(lay);
>  

you can remove this line as we have = new QVBoxLayout(this);

> autostart.cpp:198
> +
> +        for (const QFileInfo &fi : autostartdir.entryInfoList()) {
> +            const QString filename = fi.fileName();

you must use qAsConst(...)

> const auto var = autostartdir.entryInfoList();
================================================

for (const ... : var) {
}

> autostart.cpp:244
>  
> -            ScriptStartItem *item = new ScriptStartItem( fi.absoluteFilePath(), m_scriptItem,this );
> -            int typeOfStartup = m_paths.indexOf((item->fileName().adjusted(QUrl::RemoveScheme | QUrl::RemoveFilename).toString()) );
> +        for (const QFileInfo &fi : autostartdir.entryInfoList()) {
> +            ScriptStartItem *item = new ScriptStartItem(fi.absoluteFilePath(), m_scriptItem, this);

same here

> autostart.cpp:408
>  {
> -    if ( widget->listCMD->currentItem() == nullptr )
> +    if (widget->listCMD->currentItem() == nullptr) {
>          return;

if (!widget...) {
}

REPOSITORY
  R119 Plasma Desktop

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

To: alex, mlaurent, davidedmundson
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200125/974629a2/attachment-0001.html>


More information about the Plasma-devel mailing list