D11998: Ensure that the model is set when resetResizing is called
Fabian Kosmale
noreply at phabricator.kde.org
Fri Apr 6 21:05:27 UTC 2018
fabiank created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
fabiank requested review of this revision.
REVISION SUMMARY
Previously, KDirOperatorDetailView::setModel called resetResizing before
QTreeView::setModel was called. Thus, when resetResizing called model()
to obtain the model, it was still nullptr, leading to the following
warning: "QObject::connect: invalid null parameter"
As nothing we do in KDirOperatorDetailView::setModel depends on the
model not being set yet, we simply move the call to
KDirOperatorDetailView::setModel to the beginning of the method, to
ensure that model() returns the new model
TEST PLAN
Run any application which uses the KDE file dialog. Start opening a file, then
switch the file dialog to the detailed or detailed tree mode. Without the patch,
the warning should appear. Applying the patch removes the warning.
REPOSITORY
R241 KIO
BRANCH
fixConnectWarning
REVISION DETAIL
https://phabricator.kde.org/D11998
AFFECTED FILES
src/filewidgets/kdiroperatordetailview.cpp
To: fabiank
Cc: #frameworks, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180406/50d2a92e/attachment.html>
More information about the Kde-frameworks-devel
mailing list