summaryrefslogtreecommitdiff
authorandyq <andyq>2003-02-10 18:20:16 (UTC)
committer andyq <andyq>2003-02-10 18:20:16 (UTC)
commit2bc5aaa5c480c2b8924593f1010c7efd3bd50693 (patch) (side-by-side diff)
tree1009b6d88a7773a59d4742a1376cafe1a4729b02
parentee2434f70b0dbc88072748a52b353ab226669a47 (diff)
downloadopie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.zip
opie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.tar.gz
opie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.tar.bz2
Fixed bug where feed names could have spaces in them
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 7541f0b..9f611da 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -316,2 +316,17 @@ void SettingsImpl :: changeServerDetails()
QString newName = servername->text();
+
+ // Convert any spaces to underscores
+ char *tmpStr = new char[newName.length() + 1];
+ for ( unsigned int i = 0 ; i < newName.length() ; ++i )
+ {
+ if ( newName[i] == ' ' )
+ tmpStr[i] = '_';
+ else
+ tmpStr[i] = newName[i].latin1();
+ }
+ tmpStr[newName.length()] = '\0';
+
+ newName = tmpStr;
+ delete tmpStr;
+
if ( !newserver )
@@ -330,6 +345,3 @@ void SettingsImpl :: changeServerDetails()
s->setServerName( newName );
-
- // See if this server is the active server
-// if ( dataMgr->getActiveServer() == serverName )
-// dataMgr->setActiveServer( newName );
+ }
@@ -338,3 +350,2 @@ void SettingsImpl :: changeServerDetails()
}
- }
else