author | wimpie <wimpie> | 2005-01-12 00:29:48 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2005-01-12 00:29:48 (UTC) |
commit | a846a0be197d3a6ff7f8c76a3ba322db0da7d058 (patch) (unidiff) | |
tree | 0db1eccb73b0756ff49029dcfa71ff1a3699cab0 /noncore | |
parent | 4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 (diff) | |
download | opie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.zip opie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.tar.gz opie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.tar.bz2 |
Fixed Crash in editing new profiles
-rw-r--r-- | noncore/settings/networksettings2/editconnection.cpp | 17 | ||||
-rw-r--r-- | noncore/settings/networksettings2/nsdata.cpp | 2 |
2 files changed, 14 insertions, 5 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp index 6ab2dd6..bda9d7e 100644 --- a/noncore/settings/networksettings2/editconnection.cpp +++ b/noncore/settings/networksettings2/editconnection.cpp | |||
@@ -121,7 +121,10 @@ NetworkSetup * EditNetworkSetup::getTmpCollection( void ) { | |||
121 | } | 121 | } |
122 | 122 | ||
123 | TmpCollection.clear(); | 123 | TmpCollection.clear(); |
124 | TmpCollection.copyFrom( *SelectedNodes ); | 124 | if( SelectedNodes ) { |
125 | // initialize like original | ||
126 | TmpCollection.copyFrom( *SelectedNodes ); | ||
127 | } | ||
125 | 128 | ||
126 | // update content | 129 | // update content |
127 | QListViewItem * it = Nodes_LV->firstChild(); | 130 | QListViewItem * it = Nodes_LV->firstChild(); |
@@ -456,9 +459,15 @@ void EditNetworkSetup::SLOT_SelectNode( QListViewItem * it ) { | |||
456 | return; | 459 | return; |
457 | } | 460 | } |
458 | 461 | ||
459 | if( ! ((QCheckListItem *)it)->isOn() ) { | 462 | ANetNode::NetNodeList & NNL = NN->alternatives(); |
460 | // clicked on line but NOT on Check or Radio item | 463 | |
461 | return; | 464 | if( NNL.size() != 1 ) { |
465 | if( NNL.size() == 0 || | ||
466 | ! ((MyQCheckListItem *)it)->isOn() | ||
467 | ) { | ||
468 | // not clicked on Check or Radio item | ||
469 | return; | ||
470 | } | ||
462 | } | 471 | } |
463 | 472 | ||
464 | // item has really changed -> update | 473 | // item has really changed -> update |
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp index b4622fc..835c7c3 100644 --- a/noncore/settings/networksettings2/nsdata.cpp +++ b/noncore/settings/networksettings2/nsdata.cpp | |||
@@ -721,7 +721,7 @@ bool NetworkSettingsData::canStart( const QString & Interface ) { | |||
721 | case IsUp : // also called for 'ifdown' | 721 | case IsUp : // also called for 'ifdown' |
722 | // device is ready -> done | 722 | // device is ready -> done |
723 | Log(( "allow %ld for %s\n", NC->number(), Interface.latin1())); | 723 | Log(( "allow %ld for %s\n", NC->number(), Interface.latin1())); |
724 | printf( "A%ld%s\n", NC->number(), Interface.latin1() ); | 724 | printf( "A%d%s\n", NC->number(), Interface.latin1() ); |
725 | return 0; | 725 | return 0; |
726 | } | 726 | } |
727 | } | 727 | } |