[Differential] [Commented On] D4232: Bring back memory view
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Wed Jan 25 16:06:03 UTC 2017
kossebau added inline comments.
> volden wrote in memviewdlg.cpp:68
> Good question. I started getting these in the log:
> kdevelop(13251)/default unknown: QLayout: Attempting to add QLayout "" to KDevMI::GDB::MemoryRangeSelector "", which already has a layout
> Which I gather are a result of
> QGridLayout* gl = new QGridLayout(this);
> QHBoxLayout* hb = new QHBoxLayout(this);
> and the subsequent calls to addLayout() and the call to setLayout(l) . I will leave remove the this pointer from the two layouts and leave the rest as is.
Removing the `this` parameter is correct though for Qt5, when it comes to non-top-level layout instances. This seems a change vs. Qt4 where the `this` was only used for memory management, while now it is also used for defining the widget on which to use the layout as top-level layout. Which in the case of these two layouts would be not what is wanted, as also hinted by the warnings in the log.
Cmp. e.g. http://doc.qt.io/qt-5/qlayout.html#QLayout
So +1 from here for removing the `this` parameter :)
To: volden, mwolff, #kdevelop
Cc: mwolff, kossebau, kdevelop-devel, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel