summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/editconnection.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/editconnection.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/editconnection.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp
index 0c3ead6..717d9e9 100644
--- a/noncore/settings/networksettings2/editconnection.cpp
+++ b/noncore/settings/networksettings2/editconnection.cpp
@@ -134,49 +134,48 @@ NodeCollection * EditConnection::getTmpCollection( void ) {
134 */ 134 */
135 ANetNodeInstance * NNI = 135 ANetNodeInstance * NNI =
136 (SelectedNodes) ? SelectedNodes->first() : 0 ; 136 (SelectedNodes) ? SelectedNodes->first() : 0 ;
137 137
138 TmpCollection.setModified( 0 ); 138 TmpCollection.setModified( 0 );
139 139
140 // the listview always starts with the toplevel 140 // the listview always starts with the toplevel
141 // hierarchy. This is always a controller item 141 // hierarchy. This is always a controller item
142 while ( it ) { 142 while ( it ) {
143 NN = (*Mapping)[it]; 143 NN = (*Mapping)[it];
144 if( NN == 0 ) { 144 if( NN == 0 ) {
145 // this item is a controller -> 145 // this item is a controller ->
146 // has radio items as children -> 146 // has radio items as children ->
147 // find selected one 147 // find selected one
148 it = it->firstChild(); 148 it = it->firstChild();
149 while( it ) { 149 while( it ) {
150 if( ((QCheckListItem *)it)->isOn() ) { 150 if( ((QCheckListItem *)it)->isOn() ) {
151 // this radio is selected -> go deeper 151 // this radio is selected -> go deeper
152 break; 152 break;
153 } 153 }
154 it = it->nextSibling(); 154 it = it->nextSibling();
155 } 155 }
156 156
157 if( ! it ) { 157 if( ! it ) {
158 owarn << "Radio not selected" << oendl;
159 TmpIsValid = 0; 158 TmpIsValid = 0;
160 return 0; 159 return 0;
161 } 160 }
162 161
163 // it now contains selected radio 162 // it now contains selected radio
164 NN = (*Mapping)[it]; 163 NN = (*Mapping)[it];
165 } 164 }
166 165
167 // NN here contains the netnode of the 166 // NN here contains the netnode of the
168 // current item -> this node needs to 167 // current item -> this node needs to
169 // be stored in the collection 168 // be stored in the collection
170 if( NNI == 0 || 169 if( NNI == 0 ||
171 it->text(0) != NNI->nodeClass()->name() ) { 170 it->text(0) != NNI->nodeClass()->name() ) {
172 // new item not in previous collection 171 // new item not in previous collection
173 ANetNodeInstance * NNI = NN->createInstance(); 172 ANetNodeInstance * NNI = NN->createInstance();
174 NNI->initialize(); 173 NNI->initialize();
175 // this node type not in collection 174 // this node type not in collection
176 TmpCollection.append( NNI ); 175 TmpCollection.append( NNI );
177 // master collection changed because new item in it 176 // master collection changed because new item in it
178 TmpCollection.setModified( 1 ); 177 TmpCollection.setModified( 1 );
179 // no more valid items in old list 178 // no more valid items in old list
180 NNI = 0; 179 NNI = 0;
181 } else { 180 } else {
182 // already in list -> copy pointer 181 // already in list -> copy pointer