author | andyq <andyq> | 2003-02-10 18:20:16 (UTC) |
---|---|---|
committer | andyq <andyq> | 2003-02-10 18:20:16 (UTC) |
commit | 2bc5aaa5c480c2b8924593f1010c7efd3bd50693 (patch) (unidiff) | |
tree | 1009b6d88a7773a59d4742a1376cafe1a4729b02 /noncore/settings/aqpkg/settingsimpl.cpp | |
parent | ee2434f70b0dbc88072748a52b353ab226669a47 (diff) | |
download | opie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.zip opie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.tar.gz opie-2bc5aaa5c480c2b8924593f1010c7efd3bd50693.tar.bz2 |
Fixed bug where feed names could have spaces in them
Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 25 |
1 files changed, 18 insertions, 7 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 | |||
@@ -314,6 +314,21 @@ void SettingsImpl :: changeServerDetails() | |||
314 | changed = true; | 314 | changed = true; |
315 | 315 | ||
316 | QString newName = servername->text(); | 316 | QString newName = servername->text(); |
317 | |||
318 | // Convert any spaces to underscores | ||
319 | char *tmpStr = new char[newName.length() + 1]; | ||
320 | for ( unsigned int i = 0 ; i < newName.length() ; ++i ) | ||
321 | { | ||
322 | if ( newName[i] == ' ' ) | ||
323 | tmpStr[i] = '_'; | ||
324 | else | ||
325 | tmpStr[i] = newName[i].latin1(); | ||
326 | } | ||
327 | tmpStr[newName.length()] = '\0'; | ||
328 | |||
329 | newName = tmpStr; | ||
330 | delete tmpStr; | ||
331 | |||
317 | if ( !newserver ) | 332 | if ( !newserver ) |
318 | { | 333 | { |
319 | Server *s = dataMgr->getServer( servers->currentText() ); | 334 | Server *s = dataMgr->getServer( servers->currentText() ); |
@@ -328,14 +343,10 @@ void SettingsImpl :: changeServerDetails() | |||
328 | { | 343 | { |
329 | // Update server name | 344 | // Update server name |
330 | s->setServerName( newName ); | 345 | s->setServerName( newName ); |
331 | |||
332 | // See if this server is the active server | ||
333 | // if ( dataMgr->getActiveServer() == serverName ) | ||
334 | // dataMgr->setActiveServer( newName ); | ||
335 | |||
336 | // Update list box | ||
337 | servers->changeItem( newName, currentSelectedServer ); | ||
338 | } | 346 | } |
347 | |||
348 | // Update list box | ||
349 | servers->changeItem( newName, currentSelectedServer ); | ||
339 | } | 350 | } |
340 | else | 351 | else |
341 | { | 352 | { |