summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp2
-rw-r--r--noncore/settings/aqpkg/version.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 7ffa1d6..0886e69 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -338,25 +338,25 @@ void SettingsImpl :: changeServerDetails()
338 // Convert any spaces to underscores 338 // Convert any spaces to underscores
339 char *tmpStr = new char[newName.length() + 1]; 339 char *tmpStr = new char[newName.length() + 1];
340 for ( unsigned int i = 0 ; i < newName.length() ; ++i ) 340 for ( unsigned int i = 0 ; i < newName.length() ; ++i )
341 { 341 {
342 if ( newName[i] == ' ' ) 342 if ( newName[i] == ' ' )
343 tmpStr[i] = '_'; 343 tmpStr[i] = '_';
344 else 344 else
345 tmpStr[i] = newName[i].latin1(); 345 tmpStr[i] = newName[i].latin1();
346 } 346 }
347 tmpStr[newName.length()] = '\0'; 347 tmpStr[newName.length()] = '\0';
348 348
349 newName = tmpStr; 349 newName = tmpStr;
350 delete tmpStr; 350 delete [] tmpStr;
351 351
352 if ( !newserver ) 352 if ( !newserver )
353 { 353 {
354 Server *s = dataMgr->getServer( servers->currentText() ); 354 Server *s = dataMgr->getServer( servers->currentText() );
355 if ( s ) 355 if ( s )
356 { 356 {
357 // Update url 357 // Update url
358 s->setServerUrl( serverurl->text() ); 358 s->setServerUrl( serverurl->text() );
359 s->setActive( active->isChecked() ); 359 s->setActive( active->isChecked() );
360 360
361 // Check if server name has changed, if it has then we need to replace the key in the map 361 // Check if server name has changed, if it has then we need to replace the key in the map
362 if ( serverName != newName ) 362 if ( serverName != newName )
diff --git a/noncore/settings/aqpkg/version.cpp b/noncore/settings/aqpkg/version.cpp
index 59e6f3f..ce2de7b 100644
--- a/noncore/settings/aqpkg/version.cpp
+++ b/noncore/settings/aqpkg/version.cpp
@@ -29,25 +29,25 @@
29 29
30class versionrevision 30class versionrevision
31{ 31{
32public: 32public:
33 versionrevision() 33 versionrevision()
34 { 34 {
35 version = 0; 35 version = 0;
36 } 36 }
37 37
38 ~versionrevision() 38 ~versionrevision()
39 { 39 {
40 if ( version ) 40 if ( version )
41 delete version; 41 delete [] version;
42 } 42 }
43 43
44 void setVersion( const char *str ) 44 void setVersion( const char *str )
45 { 45 {
46 version = new char[(strlen(str)+1)]; 46 version = new char[(strlen(str)+1)];
47 strcpy( version, str ); 47 strcpy( version, str );
48 } 48 }
49 49
50 unsigned long epoch; 50 unsigned long epoch;
51 char *version; 51 char *version;
52 const char *revision; 52 const char *revision;
53 const char *familiar_revision; 53 const char *familiar_revision;