summaryrefslogtreecommitdiff
path: root/core/settings/button/buttonutils.cpp
Unidiff
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}