D28282: KCM/GlobalShortut: convert FOREACH and old signal syntax

Ahmad Samir noreply at phabricator.kde.org
Thu Mar 26 07:56:48 GMT 2020


ahmadsamir added inline comments.

INLINE COMMENTS

> export_scheme_dialog.cpp:46
>      int item=0;
> -    Q_FOREACH(QString component, mComponents)
> +    for(QString component : qAsConst(mComponents))
>      {

const QString &

> export_scheme_dialog.cpp:74
> +    const auto buttons = mButtons.buttons();
> +    for(QAbstractButton const *button : buttons)
>      {

const QAbstractButton *button

> kglobalshortcutseditor.cpp:708
>  {
> -    Q_FOREACH (ComponentData *cd, d->components) {
> +    for (ComponentData *cd : qAsConst(d->components)) {
>          if (cd->editor()->isModified()) {

I would make the ComponentData::editor() method const, then 'const ComponentData *cd'.

REPOSITORY
  R119 Plasma Desktop

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

To: meven, ervin, bport, crossi, hchain, #plasma
Cc: ahmadsamir, davidedmundson, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, 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/20200326/7ec5b94d/attachment-0001.html>


More information about the Plasma-devel mailing list