summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/editconnection.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/editconnection.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/editconnection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp
index a9bef65..d948fb9 100644
--- a/noncore/settings/networksettings2/editconnection.cpp
+++ b/noncore/settings/networksettings2/editconnection.cpp
@@ -200,102 +200,103 @@ NetworkSetup * EditNetworkSetup::getTmpCollection( void ) {
// pass a NetworkSetup NetworkSetup to be edited
void EditNetworkSetup::setNetworkSetup( NetworkSetup * NC ) {
ANetNodeInstance * NNI;
ANetNode * NN;
SelectedNodes = NC;
Name_LE->setText( NC->name() );
NNI = NC->first();
// show configure tabl
Tab_TB->setCurrentPage( 1 );
// valid colledction
Tab_TB->setTabEnabled( Setup_FRM, FALSE );
Setup_FRM->setEnabled( FALSE );
// select items in collection
QListViewItem * it = Nodes_LV->firstChild();
bool Found;
TmpIsValid = 0;
while ( it ) {
NN = (*Mapping)[it];
if( NN == 0 ) {
// this item is a controller ->
// has radio items as children ->
// find selected one
it = it->firstChild();
Found = 0;
while( it ) {
if( NNI && it->text(0) == NNI->nodeClass()->name() ) {
// this radio is part of the collection
((QCheckListItem *)it)->setOn( 1 );
updateGUI( it, NNI->nodeClass() );
// check its children
Found = 1;
it = it->firstChild();
NNI = SelectedNodes->next();
// do not bother to check other items
break;
}
it = it->nextSibling();
}
if( ! Found ) {
// this means that this level is NOT present in collection
- // probably INCOMPATIBEL collection OR Missing plugin
+ // probably INCOMPATIBLE collection OR Missing plugin
+ QString pluginName = NNI ? NNI->nodeClass()->name() : "";
QMessageBox::warning(
0,
tr( "Error presentig NetworkSetup" ),
tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ).
- arg(NNI->nodeClass()->name()) );
+ arg(pluginName) );
return;
}
// it now contains selected radio
NN = (*Mapping)[it];
} else {
// automatic selection
if( NNI == 0 || it->text(0) != NNI->nodeClass()->name() ) {
// should exist and be the same
if( NNI ) {
QMessageBox::warning(
0,
tr( "Error presentig NetworkSetup" ),
tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ).
arg(NNI->nodeClass()->name()) );
} else {
QMessageBox::warning(
0,
tr( "Error presentig NetworkSetup" ),
tr( "<p>Missing NetworkSetup\"<i>%1</i>\"</p>" ).
arg(it->text(0)) );
}
return;
}
it = it->firstChild();
}
}
}
// get result of editing (either new OR updated collection
NetworkSetup * EditNetworkSetup::networkSetup( void ) {
if( SelectedNodes == 0 ) {
// new collection
SelectedNodes = new NetworkSetup;
}
// clean out old entries
SelectedNodes->clear();
// transfer
for( QListIterator<ANetNodeInstance> it(TmpCollection);
it.current();
++it ) {
SelectedNodes->append( it.current() );
}
if( TmpCollection.isModified() )