summaryrefslogtreecommitdiff
authorwimpie <wimpie>2005-01-12 00:29:48 (UTC)
committer wimpie <wimpie>2005-01-12 00:29:48 (UTC)
commita846a0be197d3a6ff7f8c76a3ba322db0da7d058 (patch) (side-by-side diff)
tree0db1eccb73b0756ff49029dcfa71ff1a3699cab0
parent4b1d4fc9f4170ec22d196dd352cae5d9c1ecb232 (diff)
downloadopie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.zip
opie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.tar.gz
opie-a846a0be197d3a6ff7f8c76a3ba322db0da7d058.tar.bz2
Fixed Crash in editing new profiles
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/editconnection.cpp17
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp2
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
@@ -120,9 +120,12 @@ NetworkSetup * EditNetworkSetup::getTmpCollection( void ) {
}
}
TmpCollection.clear();
- TmpCollection.copyFrom( *SelectedNodes );
+ if( SelectedNodes ) {
+ // initialize like original
+ TmpCollection.copyFrom( *SelectedNodes );
+ }
// update content
QListViewItem * it = Nodes_LV->firstChild();
ANetNode * NN;
@@ -455,11 +458,17 @@ void EditNetworkSetup::SLOT_SelectNode( QListViewItem * it ) {
if( ! it->isSelectable() ) {
return;
}
- if( ! ((QCheckListItem *)it)->isOn() ) {
- // clicked on line but NOT on Check or Radio item
- return;
+ ANetNode::NetNodeList & NNL = NN->alternatives();
+
+ if( NNL.size() != 1 ) {
+ if( NNL.size() == 0 ||
+ ! ((MyQCheckListItem *)it)->isOn()
+ ) {
+ // not clicked on Check or Radio item
+ return;
+ }
}
// item has really changed -> update
TmpIsValid = 0;
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
@@ -720,9 +720,9 @@ bool NetworkSettingsData::canStart( const QString & Interface ) {
case Available :
case IsUp : // also called for 'ifdown'
// device is ready -> done
Log(( "allow %ld for %s\n", NC->number(), Interface.latin1()));
- printf( "A%ld%s\n", NC->number(), Interface.latin1() );
+ printf( "A%d%s\n", NC->number(), Interface.latin1() );
return 0;
}
}