[apaku at gmx.de: Re: KDE/kdevplatform/shell]

Andreas Pakulat apaku at gmx.de
Sun Sep 14 00:14:52 UTC 2008


Ooops, actually wanted to send that to the -devel list :)

----- Forwarded message from Andreas Pakulat <apaku at gmx.de> -----

Delivery-date: Sun, 14 Sep 2008 02:10:02 +0200
From: Andreas Pakulat <apaku at gmx.de>
To: kde-commits at kde.org
Subject: Re: KDE/kdevplatform/shell
Reply-To: kde-commits at kde.org

On 13.09.08 22:18:34, Manuel Breugelmans wrote:
> SVN commit 860701 by mbreugel:
> 
> Block re-loading a project while it isn't loaded yet.
> 
>  M  +12 -0     projectcontroller.cpp  
> 
> 
> --- trunk/KDE/kdevplatform/shell/projectcontroller.cpp #860700:860701
> @@ -77,6 +77,7 @@
>      QMap<IProject*, QPointer<KSettings::Dialog> > m_cfgDlgs;
>      QPointer<QAction> m_closeAllProjects;
>      IProjectDialogProvider* dialog;
> +    QList<KUrl> m_currentlyOpening; // project-file urls that are being opened
>  
>      bool reopenProjectsOnStartup;
>      bool parseAllProjectSources;
> @@ -320,7 +321,14 @@
>      }
>  
>      if ( !url.isValid() )
> +    {
>          return false;
> +    }
> +    if ( d->m_currentlyOpening.contains(url))
> +    {
> +        kDebug() << "Already opening " << url << ". Aborting.";
> +        return false;
> +    }

Looking through our existing code I'm wondering wether the return value makes
sense at all? There's no place where we currently check or even could check (as
in it would make sense to check). Instead I think we should present an error
message directly from the controller when we can't open a project - or
obviously a passive popup or error message in the status area.

Andreas 
 
-- 
You will gain money by a fattening action.


----- End forwarded message -----

-- 
Your lucky number is 3552664958674928.  Watch for it everywhere.




More information about the KDevelop-devel mailing list