appwizard try2

Andreas Pakulat apaku at gmx.de
Wed Nov 5 20:16:13 UTC 2008


On 05.11.08 19:27:11, Bernd Buschinski wrote:
> I fixed the problem with invalid chars in foldernames with 
> QUrl::toPercentEncoding, % works fine in foldernames on windows and 
> linux(should also work on mac).
> The problem is that it may looks ugly to have a folder like
> "test¬{}" -> "test%C2%AC%7B%7D"
> but keep in mind that "test¬{}" is also a very ugly project name :)

Nice, what about spaces, do they get encoded to %20? Because thats ugly as
well, and of course uneeded. 

> Index: plugins/appwizard/projectselectionpage.ui
> ===================================================================
> --- plugins/appwizard/projectselectionpage.ui	(revision 880481)
> +++ plugins/appwizard/projectselectionpage.ui	(working copy)
> @@ -49,7 +49,7 @@
>         </widget>
>        </item>
>        <item row="2" column="1" >
> -       <widget class="QLabel" name="locationValidLabel" >
> +       <widget class="KSqueezedTextLabel" name="locationValidLabel" >

Good idea.

> +    QFileInfo fi( url.toLocalFile( KUrl::RemoveTrailingSlash ) );
> +    if (!fi.exists())
> +    {
> +        ui->locationValidLabel->setText( i18n("Invalid Location") );
> +        emit invalid();
> +        return;
> +    }

This is not really needed IMHO. If the parent directories do not exist we
can just create them. What would be better is a writability check, i.e.
traverse the hierarchy upwards and on the first existing directory check
wether its writable for us. Just crossed my mind :)

Other than that patch looks fine.

Andreas

-- 
Don't look now, but the man in the moon is laughing at you.




More information about the KDevelop-devel mailing list