extragear/sdk/kdevplatform/shell
Andreas Pakulat
apaku at gmx.de
Mon Dec 7 08:54:45 UTC 2009
On 07.12.09 01:44:59, David Nolden wrote:
> SVN commit 1059604 by zwabel:
>
> Show the set of contained projects with each session in the menu, so you know what session you might want to start
I don't think I like this. This makes the menu entry overly long very
easily. Even with just 4 projects its too long already IMHO.
> +QString Session::description() const
> +{
> + QString ret = name();
> +
> + KUrl::List openProjects = d->config->group( "General Options" ).readEntry( "Open Projects", QStringList() );
> +
> + if(!openProjects.isEmpty()) {
> + if(!ret.isEmpty())
> + ret += ": ";
> +
> + QStringList projectNames;
> +
> + foreach(KUrl url, openProjects)
> + {
> + QString projectName = url.fileName();
> + if(projectName.endsWith(".kdev4"))
> + projectName = projectName.left(projectName.size()-6);
> + projectNames << projectName;
> + }
> +
> + ret += projectNames.join(", ");
> + }
> +
> + return ret;
> +}
This is wrong, the project name is not the .kdev4 filename minus the
suffix. There's a separate project name entry in the config.
Andreas
--
You will feel hungry again in another hour.
More information about the KDevelop-devel
mailing list