[Differential] [Requested Changes To] D4122: Toolbar state was not being saved / restored

Kevin Funk noreply at phabricator.kde.org
Mon Jan 16 13:21:32 UTC 2017


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

INLINE COMMENTS

> idealcontroller.cpp:121
> +      KConfigGroup cg(KSharedConfig::openConfig(), "UiSettings/Docks/ToolbarEnabled");
> +      toolBar->setVisible(cg.readEntry(qPrintable(toolBar->windowTitle()),
> +                                       QVariant::fromValue(true)).toBool());

There's no need for the indirection through `QVariant`, is there?

You can just use `readEntry(..., true)` here.

> idealcontroller.cpp:126
> +        cg.writeEntry(qPrintable(toolBar->windowTitle()),
> +                      QVariant::fromValue(toolBar->toggleViewAction()->isChecked()));
> +      });

Dito, just use `writeEntry(..., foo->isChecked())`?

REPOSITORY
  R33 KDevPlatform

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: tcanabrava, apol, antonanikin, kfunk
Cc: antonanikin, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170116/1eb3316e/attachment.html>


More information about the KDevelop-devel mailing list