https://bugs.documentfoundation.org/show_bug.cgi?id=100151
--- Comment #14 from Julien Nabet <[email protected]> ---
(In reply to Caolán McNamara from comment #8)
> I wonder if this is a VclPtr issue
Focusing on VclPtr part of dispose method, could we simplify (optimize?)
mnemonic removal with this:
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 2e1b9d5..f0d1405 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -396,9 +396,10 @@ void Window::dispose()
// clear mnemonic labels
std::vector<VclPtr<FixedText> > aMnemonicLabels(list_mnemonic_labels());
- for (auto aI = aMnemonicLabels.begin(); aI != aMnemonicLabels.end(); ++aI)
+ for (auto aI = aMnemonicLabels.begin(); aI != aMnemonicLabels.end(); )
{
- remove_mnemonic_label(*aI);
+ (*aI)->set_mnemonic_widget(nullptr);
+ aI = aMnemonicLabels.erase(aI);
}
?
Moreover, does aMnemonicLabels contain a copy of mnemonic_labels? If not, I
wonder if the patch could also avoid some iterator mess.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs