[Kde-imaging] [Bug 131343] New: Sending images from digikam fails if directory name contains parentheses
Angelo Naselli
anaselli at linux.it
Sat Jul 29 18:46:02 CEST 2006
Alle 20:41, martedì 25 luglio 2006, Tom Albers ha scritto:
> Op dinsdag 25 juli 2006 12:43, schreef Angelo Naselli:
> > Hi all,
> > since we're changing libkipi is it possible to have a method
> > to manage files and directories in a "kipi-plugins" way?
> > I mean, html export has implemented a way, cdarchiving another
> > (well i copied something), sendimages...
> > Now at least the last two seem to have some problems (yesterday k3b report
> > and this one).
> >
> > Just an idea, don't know if possible though, wdyt?
>
> Sure, if there is a static QString createUniqueFileName(const &QString), which
> converts the passed QString to something unique, I can use that.
>
> Example:
> "/home/toma/afbeeldingen/VakantieUitjes/200205 - (Blijdorp)/P5260091.JPG"
>
> Result:
> "200205-_Blijdorp_-P5260091_JPG.jpg"
Well I believe Aurélien did something like that for html export,
I copied it for cd archive.
We could move it some where in libkipi, even improving it if necessary,
but here I'm not the best one to decide where:
QString webifyFileName(QString fileName) {
fileName=fileName.lower();
// Remove potentially troublesome chars
fileName=fileName.replace(QRegExp("[^-0-9a-z]+"), "_");
return fileName;
}
Angelo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-imaging/attachments/20060729/50fce265/attachment.pgp
More information about the Kde-imaging
mailing list