Skip to content

Conversation

@tmartsum
Copy link

@tmartsum tmartsum commented Dec 7, 2023

Delete areas later so that that they can be accessed by (inherited) dock widgets in dtor. Add some QPointer to prevent crashes.

Hence allow users to do more while dock widgets etc are being destroyed.

@tmartsum tmartsum force-pushed the improvement/make_more_stable_destruction branch from 40f6d5e to b3e65a8 Compare December 7, 2023 08:44
@githubuser0xFFFF githubuser0xFFFF self-assigned this Dec 7, 2023
@githubuser0xFFFF
Copy link
Owner

githubuser0xFFFF commented Dec 7, 2023

@tmartsum Thank you for this pull request. I just reviewed it and it looks good for me. Just a wish regarding coding style:

Instead of:

if (!DockArea) continue;

or

if (!DockArea) {
   continue;
}

I would prefer the following style: always brackets and the opening bracket on a new line

if (!DockArea)
{
   continue;
}

Just in case you would like to provide more pull requests 😏. It would be great, if you could polish this pull request to match this style.

Delete areas later so that that they can be accessed by
(inherited) dock widgets in dtor. Add some QPointer to
prevent crashes.

Hence allow users to do more while dock widgets etc
are being destroyed.
@tmartsum tmartsum force-pushed the improvement/make_more_stable_destruction branch from b3e65a8 to 7a110b8 Compare December 7, 2023 11:36
@tmartsum
Copy link
Author

tmartsum commented Dec 7, 2023

Hi Uwe
I have updated the MR 😄 and I wrote your mail (at the time I pushed the original review).
Interesting that you use KeyShot 😄 - and I am glad you like it 😉. I like to comment your thoughts in a mail - I did write you one when creating this MR.

I did try to fit style (e.g by using tabs though most code-bases in both Luxion and Qt are using spaces), but I may not have cought all aspects and habbits can be difficult to change 😉 - just poke me in the future MRs if I do any mistakes include styling. I can however see, that others are contributing with spaces, but I suspect you prefer tabs in the project?

Best Regards
Thorbjørn

Copy link
Owner

@githubuser0xFFFF githubuser0xFFFF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have a look at my review comments - thank you.

const QList<CFloatingDockContainer*> CDockManager::floatingWidgets() const
{
return d->FloatingWidgets;
QList<CFloatingDockContainer*> res;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to return a const QList<QPointer<CFloatingDockDontainer>> here because the function floatingWidgets() is used in CDockManager::eventFilter on linux. So this change may have a negative performance impact because it is called very often.

@githubuser0xFFFF
Copy link
Owner

Thank you. I merged your pull request.

@githubuser0xFFFF githubuser0xFFFF merged commit f848df7 into githubuser0xFFFF:master Dec 8, 2023
mike-malburg pushed a commit to TechSmith/Qt-Advanced-Docking-System that referenced this pull request Nov 6, 2025
Delete areas later so that that they can be accessed by
(inherited) dock widgets in dtor. Add some QPointer to
prevent crashes.

Hence allow users to do more while dock widgets etc
are being destroyed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants