D11934: KDevelop : "Reparse Entire Project" action in the project manager context menu

Milian Wolff noreply at phabricator.kde.org
Sun Jan 27 19:16:01 GMT 2019


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

INLINE COMMENTS

> parseprojectjob.h:36
>  public:
> -    explicit ParseProjectJob(KDevelop::IProject* project, bool forceUpdate = false );
> +    explicit ParseProjectJob(KDevelop::IProject* project, bool forceUpdate = false, bool forceAll = false );
>      ~ParseProjectJob() override;

please document the difference between forcing an update and forcing all - I've figured it out but it wasn't directly obvious to me

> parseprojectjob.h:50
>      const QScopedPointer<class ParseProjectJobPrivate> d;
> +    bool forceAll;
>  };

move that to the dptr

> projectcontroller.cpp:247
>  
> -    void openProjectConfig()
> -    {
> -        // if only one project loaded, this is our target
> -        IProject *project = (m_projects.count() == 1) ? m_projects.at(0) : nullptr;
> -
> -        // otherwise base on selection
> -        if (!project) {
> -            ProjectItemContext* ctx = dynamic_cast<ProjectItemContext*>(ICore::self()->selectionController()->currentSelection());
> -            if (ctx && ctx->items().count() == 1) {
> -                project = ctx->items().at(0)->project();
> -            }
> -        }
> -
> -        if (project) {
> -            q->configureProject(project);
> -        }
> -    }
> -
> -    void closeSelectedProjects()
> +    QList<IProject*> selectedProjects()
>      {

QSet

> projectcontroller.cpp:1141
> +            foreach (auto project, d->selectedProjects()) {
> +                // can't use reparseProject() here because we need the forceAll argument
> +                if (auto job = d->m_parseJobs.value(project)) {

you could add the forceAll arg there too, no?

REPOSITORY
  R32 KDevelop

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

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


More information about the KDevelop-devel mailing list