summaryrefslogtreecommitdiff
path: root/core/settings/button/buttonutils.cpp
authorsandman <sandman>2002-12-23 03:24:31 (UTC)
committer sandman <sandman>2002-12-23 03:24:31 (UTC)
commite91351d2c22ab041b85f49e243e1f510edf7984e (patch) (side-by-side diff)
treec068e1a8ad21db9995f2a3c5a2d97bb983fa04a9 /core/settings/button/buttonutils.cpp
parent8bd190d162b538e4226e830f442450f5a95f4434 (diff)
downloadopie-e91351d2c22ab041b85f49e243e1f510edf7984e.zip
opie-e91351d2c22ab041b85f49e243e1f510edf7984e.tar.gz
opie-e91351d2c22ab041b85f49e243e1f510edf7984e.tar.bz2
small bugfixes and speedup
Diffstat (limited to 'core/settings/button/buttonutils.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/button/buttonutils.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/settings/button/buttonutils.cpp b/core/settings/button/buttonutils.cpp
index bb70047..91d2af3 100644
--- a/core/settings/button/buttonutils.cpp
+++ b/core/settings/button/buttonutils.cpp
@@ -102,18 +102,26 @@ void ButtonUtils::insertActions ( QListViewItem *here )
void ButtonUtils::insertAppLnks ( QListViewItem *here )
{
QStringList types = m_apps-> types ( );
+ QListViewItem *typeitem [types. count ( )];
+ int i = 0;
for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
QListViewItem *item = new QListViewItem ( here, m_apps-> typeName ( *it ));
item-> setPixmap ( 0, m_apps-> typePixmap ( *it ));
+ typeitem [i++] = item;
+ }
+
for ( QListIterator <AppLnk> appit ( m_apps-> children ( )); *appit; ++appit ) {
AppLnk *l = *appit;
+ int i = 0;
+ for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
if ( l-> type ( ) == *it ) {
- QListViewItem *sub = new QListViewItem ( item, l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" );
+ QListViewItem *sub = new QListViewItem ( typeitem [i], l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" );
sub-> setPixmap ( 0, l-> pixmap ( ));
}
+ i++;
}
}
}