[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: tags/kdepim/enterprise35.0.20090807.1008353/kdepim/libkdepim
From: Allen Winter <winter () kde ! org>
Date: 2009-08-31 21:01:36
Message-ID: 1251752496.987648.14261.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1017906 by winterz:
revert the sorting algorithm committed with r1013301
M +4 -22 addresseelineedit.cpp
--- tags/kdepim/enterprise35.0.20090807.1008353/kdepim/libkdepim/addresseelineedit.cpp \
#1017905:1017906 @@ -1195,28 +1195,10 @@
}
if ( s_completion->order() == KCompletion::Weighted ) {
-
- // Sort the sections
- QValueList<SourceWithWeight> sourcesAndWeights;
- for ( uint i = 0; i < s_completionSources->size(); i++ ) {
- SourceWithWeight sww;
- sww.sourceName = (*s_completionSources)[i];
- sww.weight = (*s_completionSourceWeights)[sww.sourceName];
- sww.index = i;
- sourcesAndWeights.append( sww );
- }
- qHeapSort( sourcesAndWeights );
-
- // Add the sections and their items to the final sortedItems result list
- for( uint i = 0; i < sourcesAndWeights.size(); i++ ) {
- QStringList sectionItems = sections[sourcesAndWeights[i].index];
- if ( !sectionItems.isEmpty() ) {
- sortedItems.append( sourcesAndWeights[i].sourceName );
- QStringList sectionItems = sections[sourcesAndWeights[i].index];
- for ( QStringList::Iterator sit( sectionItems.begin() ), send( \
sectionItems.end() );
- sit != send; ++sit ) {
- sortedItems.append( *sit );
- }
+ for ( QMap<int, QStringList>::Iterator it( sections.begin() ), end( \
sections.end() ); it != end; ++it ) { + sortedItems.append( \
(*s_completionSources)[it.key()] ); + for ( QStringList::Iterator sit( \
(*it).begin() ), send( (*it).end() ); sit != send; ++sit ) { + \
sortedItems.append( *sit ); }
}
} else {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic