cppcheck complains about the never deleted local pointer variable
that creates the Gwenview::MainWindow.
This patch uses QPointer and QScopedPointer for MainWindow
and the optional QTemporaryDir variables to clean this.
Details
- Reviewers
rkflx - Group Reviewers
Gwenview - Commits
- R260:a08587f77fd0: Use QPointer member variables in Gwenview StartHelper
Check Gwenview's normal behaviour starting with different arguments
(none, single/multiple image/s, single/multiple directory/ies).
Diff Detail
- Repository
- R260 Gwenview
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Lint OK
💯
BTW, related: https://www.mail-archive.com/kde-devel@kde.org/msg10072.html
Check session (re-)store with e.g. xsm.
Nice, did not know that trick yet. Works a bit differently to Plasma's session restore, though, so I'm not sure it's the best test case.
app/main.cpp | ||
---|---|---|
118 | Add qDebug() << mMainWindow; after new and in the destructor, then compare the output both for Quit and Plasma session saving (~/.local/share/sddm/xorg-session.log). Yesterday I also thought it's better to have, but now I suspect Qt is already deleting it for us, being a QObject. It's only with xsm the output sometimes is not null, but it's not crashing in that case either. Thoughts? |
app/main.cpp | ||
---|---|---|
118 | The MainWindow is created with the flag Qt::WA_DeleteOnClose: KXmlGuiWindow. I think we can remove ~StartHelper(). |
Thanks again ;)
(And sorry your other patches will take me more time to get to… Maybe chime in on some of the other tasks meanwhile?)
app/main.cpp | ||
---|---|---|
118 | Okay, do that. |
I guess you used arc diff --edit --verbatim without using arc amend first. On Phab I was set as reviewer, but you forced your old version where I was not (in the sense of the reviewer state, not in the sense of the updated test plan).
Ok, that was the missing part. I wonder why this did not happen ever before. ;)
All good. One step at a time... :)