D4884: Add ProblemModel::setPlaceHolderText() method

Milian Wolff noreply at phabricator.kde.org
Sun Mar 19 12:57:03 UTC 2017


mwolff requested changes to this revision.
mwolff added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> problemmodel.cpp:70
>  
> +    KDevelop::IProblem::Ptr newPlaceholderProblem()
> +    {

rename to `createPlaceholdreProblem`, make const

> problemmodel.cpp:270
>  
> +void ProblemModel::setPlaceholderText(
> +    const QString& text,

join lines, follow the surrounding code style

> problemmodel.cpp:279
> +
> +    if (d->m_isPlaceholderShown) {
> +        clearProblems();

if (d->m_isPlaceholderShown || d->m_problems->count() == 0) {
      // clearing will show/update the new placeholder
      clearProblems();
  }

> problemmodel.cpp:313
>  {
>      beginResetModel();
> +    setProblems({});

the begin/end reset is not needed anymore, done internally by setProblems already

> problemmodel.h:147
> +    void setPlaceholderText(const QString& text,
> +                            const KDevelop::DocumentRange& location = KDevelop::DocumentRange::invalid(),
> +                            const QString& source = QString());

I still don't understand what this location would point to. it's a placeholder, nothing has been found yet, so there cannot be any location?

Can you maybe show a screenshot of this in action?

REPOSITORY
  R33 KDevPlatform

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

To: antonanikin, mwolff, #kdevelop
Cc: mwolff, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170319/afcc45f9/attachment.html>


More information about the KDevelop-devel mailing list