D16484: [WIP] Add scratchpad plugin

Sven Brauch noreply at phabricator.kde.org
Mon Oct 29 15:11:00 GMT 2018


brauch added a comment.


  I'd have to use this for a while to see whether it works well in practice, but in general it seems like a cool idea.
  
  One thing comes to mind: you kind of require that there is a compiler, while 3 of the 4 languages KDevelop officially supports (PHP, Python and JS) do not use one. I think it would be nice if this plugin would also easily work for e.g. Python snippets.

INLINE COMMENTS

> scratchpadview.cpp:154
> +    action = new QAction(QIcon::fromTheme(QStringLiteral("media-playback-start")), i18n("Run Scratch"), this);
> +    connect(action, &QAction::triggered, [this](bool /*checked*/) { runSelectedScratch(); });
> +    addAction(action);

You can omit the arguments of slots if you do not need them.

> scratchpadview.cpp:159
> +    m_filter->setPlaceholderText(i18n("Filter..."));
> +    auto* filterAction = new QWidgetAction(this);
> +    filterAction->setDefaultWidget(m_filter);

"auto" is sufficient, you do not need "auto*"

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D16484

To: amhndu
Cc: brauch, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181029/01915d2a/attachment.html>


More information about the KDevelop-devel mailing list