D28580: [Kleopatra] Fix size saving/restore

Andrey Legayev noreply at phabricator.kde.org
Fri Apr 10 09:04:40 BST 2020


andreylegayev marked an inline comment as done.
andreylegayev added a comment.


  @dfaure could you review my comments?

INLINE COMMENTS

> mlaurent wrote in kleopatraapplication.cpp:111
> not the same patch as it.
> Create another one please

Done: https://phabricator.kde.org/D28591

> dfaure wrote in kleopatraapplication.cpp:227
> This if() is not needed.
> `delete nullptr` is valid in C++ (no-op).

Fixing it.. thanks!

> dfaure wrote in mainwindow.cpp:696
> Is this needed? Unlike the dialogs above in this patch, this class is a KXmlGuiWindow which inherits from KMainWindow which has this code already.

I agree - MainWindow inherits it from KMainWindow, but it works only with KDE session management.
Methods `readProperties()` and `saveProperties()` are called when you save session (this is how I debugged it) and when you run app with parameter `-session`

There is also builtin timer which saves window settings automatically once you resize window, but there is no code which loads saved settings.
If you run most recent Kleopatra on your machine you'll get window size 1024x500 regardless previously saved size.

In this class I could call KMainWindow methods directly, but I wanted to have universal code snippet for all windows to save geometry on multi-dpi/-screen without annoying Qt bug. I re-used it in dialogs as you saw.

Annoying Qt bug - win10:
I literally cannot make SignEncrypt window appear to me. 
The only way is to delete `geometry` from kleopatrarc and restart Kleopatra.
It so annoyed me that I configured dev environment and started all this debug :-)

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/20200410/b292dc1b/attachment-0001.html>


More information about the kde-pim mailing list