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) (unidiff)
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) (ignore whitespace changes)
-rw-r--r--core/settings/button/buttonutils.cpp22
1 files changed, 15 insertions, 7 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
@@ -101,19 +101,27 @@ void ButtonUtils::insertActions ( QListViewItem *here )
101 101
102void ButtonUtils::insertAppLnks ( QListViewItem *here ) 102void ButtonUtils::insertAppLnks ( QListViewItem *here )
103{ 103{
104 QStringList types = m_apps-> types ( ); 104 QStringList types = m_apps-> types ( );
105 QListViewItem *typeitem [types. count ( )];
105 106
107 int i = 0;
106 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) { 108 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
107 QListViewItem *item = new QListViewItem ( here, m_apps-> typeName ( *it )); 109 QListViewItem *item = new QListViewItem ( here, m_apps-> typeName ( *it ));
108 item-> setPixmap ( 0, m_apps-> typePixmap ( *it )); 110 item-> setPixmap ( 0, m_apps-> typePixmap ( *it ));
109 111
110 for ( QListIterator <AppLnk> appit ( m_apps-> children ( )); *appit; ++appit ) { 112 typeitem [i++] = item;
111 AppLnk *l = *appit; 113 }
112 114
115 for ( QListIterator <AppLnk> appit ( m_apps-> children ( )); *appit; ++appit ) {
116 AppLnk *l = *appit;
117
118 int i = 0;
119 for ( QStringList::Iterator it = types. begin ( ); it != types. end ( ); ++it ) {
113 if ( l-> type ( ) == *it ) { 120 if ( l-> type ( ) == *it ) {
114 QListViewItem *sub = new QListViewItem ( item, l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" ); 121 QListViewItem *sub = new QListViewItem ( typeitem [i], l-> name ( ), QString ( "QPE/Application/" ) + l-> exec ( ), "raise()" );
115 sub-> setPixmap ( 0, l-> pixmap ( )); 122 sub-> setPixmap ( 0, l-> pixmap ( ));
116 } 123 }
117 } 124 i++;
125 }
118 } 126 }
119} 127}