From 2881b6b6b2dd55abbdb21958f28867351ee7fcc8 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 29 Aug 2010 16:58:22 +0000 Subject: [PATCH] Clean up this code a bit --- src/library/librarymodel.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/library/librarymodel.cpp b/src/library/librarymodel.cpp index bc1c5eb02..e74cbf045 100644 --- a/src/library/librarymodel.cpp +++ b/src/library/librarymodel.cpp @@ -161,16 +161,14 @@ QString LibraryModel::DividerKey(GroupBy type, LibraryItem* item) const { case GroupBy_Genre: case GroupBy_AlbumArtist: case GroupBy_FileType: { - if (item->sort_text[0].isDigit()) - return "0"; - if (item->sort_text[0] == ' ') - return QString(); - QChar c = item->sort_text[0]; + if (c.isDigit()) + return "0"; + if (c == ' ') + return QString(); if (c.decompositionTag() != QChar::NoDecomposition) - c = c.decomposition()[0]; - - return c.toLower(); + return QChar(c.decomposition()[0]); + return c; } case GroupBy_Year: