[Differential] [Accepted] D4126: Add a "clear" button and related code for the OutputView
Kevin Funk
noreply at phabricator.kde.org
Fri Jan 13 23:15:03 UTC 2017
kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.
Rest LGTM, feel free to push directly to master after the fixups.
INLINE COMMENTS
> outputwidget.cpp:178
> + QAction *clearAction = new QAction("Clear");
> + connect(clearAction, &QAction::triggered, [=]{
> + auto view = qobject_cast<QAbstractItemView*>(currentWidget());
I'd factor that out into a `clearOutput` slot, IMO too much code for a lambda body (opinions may vary). I consider like up to 1-3 LOC suitable for a lambda.
> outputwidget.cpp:184
> + KDevelop::OutputModel *outputModel = nullptr;
> + if ( QAbstractProxyModel* proxy = qobject_cast<QAbstractProxyModel*>(view->model())) {
> + outputModel = dynamic_cast<KDevelop::OutputModel*>(proxy->sourceModel());
`auto proxy = ...`
> outputwidget.cpp:185
> + if ( QAbstractProxyModel* proxy = qobject_cast<QAbstractProxyModel*>(view->model())) {
> + outputModel = dynamic_cast<KDevelop::OutputModel*>(proxy->sourceModel());
> + } else {
`qobject_cast`
REPOSITORY
R33 KDevPlatform
BRANCH
clear_ouput_view
REVISION DETAIL
https://phabricator.kde.org/D4126
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: tcanabrava, apol, kfunk
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170113/60cfaede/attachment-0001.html>
More information about the KDevelop-devel
mailing list