[Digikam-devel] [Bug 158868] Non natural album sorting

Peter Penz peter.penz at gmx.at
Wed Dec 3 14:10:01 GMT 2008


http://bugs.kde.org/show_bug.cgi?id=158868


Peter Penz peter penz gmx at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.penz at gmx.at




--- Comment #6 from Peter Penz <peter penz gmx at>  2008-12-03 15:09:59 ---
@Gilles: I wanted to provide a patch for this issue (svn trunk), but I've a
crash in Xine when starting Digikam :-(

Anyhow: Also with the KDE3 code is should be straight forward having a natural
sorting. Just use the static method KStringHandler::naturalCompare() from
kstringhandler in kdelibs.

I did a quick search in Digikam and I think replacing the calls

case(AlbumSettings::ByIName):
{
    return d->info.name().localeAwareCompare(iconItem->d->info.name());
}

with

case(AlbumSettings::ByIName):
{
    return KStringHandler::naturalCompare(d->info.name(),
iconItem->d->info.name());
}

inside albumiconinfo.cpp (method AlbumIconItem::compare()) might be sufficient.

If you have any questions how Dolphin does the sorting, please drop me a mail
:-) Thanks!


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list