Diffusion KIO d7a6ee3d73e7

Ensure that the model is set when resetResizing is called

Authored by fabiank on Apr 6 2018, 8:59 PM.

Description

Ensure that the model is set when resetResizing is called

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.

Reviewers: dfaure, ngraham, apol

Reviewed By: dfaure, ngraham, apol

Subscribers: apol, ngraham, Frameworks

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D11998

Merged Changes

CommitAuthorDetailsCommitted
bff960d67162D11998fabiank
Ensure that the model is set when resetResizing is called 
Apr 6 2018