[Differential] [Updated, 130 lines] D4665: Fix project tree state not being saved
Janek Bevendorff
noreply at phabricator.kde.org
Mon Feb 20 16:28:06 UTC 2017
bevendorff updated this revision to Diff 11552.
bevendorff added a comment.
- Fix more code style issues, and also make the whole thing work when there is only one (unselected) project
I updated the code according to your requests. I don't like having assignment operators inside if statements, personally, but
you're the boss. ;-)
I also made sure that it works when there is only one project and it isn't selected. In that case I simply select the entry
automatically and proceed as usual (since this happens before or right after a project is added to the tree view, there is
no difference in behavior from a user perspective).
I also added a projectClosed slot to reset the previous selection explicitly, because it appears that using a QPointer alone
here isn't enough. Some resources are freed mid-air while tearing down everything when KDevelop quits. For it to work
automagically, I would need to make a QPointer of ProjectBaseItem and not only of ProjectBaseItem::project(), but since
ProjectBaseItem is no child of QObject, this isn't possible. If you have a better solution, please speak.
REPOSITORY
R33 KDevPlatform
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D4665?vs=11542&id=11552
BRANCH
fix/project-tree-save-state
REVISION DETAIL
https://phabricator.kde.org/D4665
AFFECTED FILES
plugins/projectmanagerview/projecttreeview.cpp
plugins/projectmanagerview/projecttreeview.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: bevendorff, mwolff, apol, kfunk
Cc: flherne, kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170220/bfeae1ea/attachment.html>
More information about the KDevelop-devel
mailing list