From: Jeremy Paul Whiting Date: Fri, 21 Sep 2007 22:07:19 +0000 (+0000) Subject: dont sort fils with more than 1 identifier(language) X-Git-Tag: v3.94.0~26 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=1a55a369490d2be0fead09fd3fefcb70da0c3e21;p=libqmvoc.git dont sort fils with more than 1 identifier(language) svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=715350 --- diff --git a/keduvocdocument/sharedkvtmlfiles.cpp b/keduvocdocument/sharedkvtmlfiles.cpp index 702cab4..8ff8774 100644 --- a/keduvocdocument/sharedkvtmlfiles.cpp +++ b/keduvocdocument/sharedkvtmlfiles.cpp @@ -166,16 +166,18 @@ void SharedKvtmlFiles::sortDownloadedFiles() // open the file doc.open( fileUrl ); - QString locale = doc.identifier( 0 ).name(); + if (doc.identifierCount() == 1) { + QString locale = doc.identifier( 0 ).name(); - // make sure the locale sub-folder exists - KUrl pathUrl( fileUrl ); - pathUrl.setFileName( QString() ); - pathUrl.addPath( locale ); - KIO::mkdir( pathUrl ); + // make sure the locale sub-folder exists + KUrl pathUrl( fileUrl ); + pathUrl.setFileName( QString() ); + pathUrl.addPath( locale ); + KIO::mkdir( pathUrl ); - // move the file into the locale sub-folder - KIO::move( fileUrl, pathUrl ); + // move the file into the locale sub-folder + KIO::move( fileUrl, pathUrl ); + } // take off the one we just did unsortedFiles.removeFirst();