D28580: [Kleopatra] Fix size saving/restore

David Faure noreply at phabricator.kde.org
Sun Apr 5 17:50:11 BST 2020


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

INLINE COMMENTS

> kleopatraapplication.cpp:227
> +    // save settings before app exit
> +    if (d->mainWindow) {
> +        delete d->mainWindow;

This if() is not needed.
`delete nullptr` is valid in C++ (no-op).

> mainwindow.cpp:696
> +    // restore size from config file
> +    KConfigGroup cfgGroup(KSharedConfig::openConfig(), "MainWindow");
> +    KWindowConfig::restoreWindowSize(windowHandle(), cfgGroup);

Is this needed? Unlike the dialogs above in this patch, this class is a KXmlGuiWindow which inherits from KMainWindow which has this code already.

REPOSITORY
  R168 Kleopatra

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

To: andreylegayev, dfaure
Cc: dfaure, mlaurent, kde-pim, andreylegayev, fbampaloukas, dcaliste, dvasin, rodsevich, ach, winterz, vkrause, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200405/f73e554e/attachment.html>


More information about the kde-pim mailing list