summaryrefslogtreecommitdiff
path: root/noncore/settings
authorerik <erik>2007-01-10 17:31:08 (UTC)
committer erik <erik>2007-01-10 17:31:08 (UTC)
commit6825f30b665952864dbe35fe8329a0e4c264d4b8 (patch) (unidiff)
tree7c8d178f835d4a7d294b6ef65e0040c40579e84e /noncore/settings
parentd8e580a239ab84fbe063b2f3779d417598d5ca0a (diff)
downloadopie-6825f30b665952864dbe35fe8329a0e4c264d4b8.zip
opie-6825f30b665952864dbe35fe8329a0e4c264d4b8.tar.gz
opie-6825f30b665952864dbe35fe8329a0e4c264d4b8.tar.bz2
All of the files included have instances where an array is new'ed but
the corresponding delete does not have the corresponding [] argument.
Diffstat (limited to 'noncore/settings') (more/less context) (show 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
@@ -326,49 +326,49 @@ void SettingsImpl :: removeServer()
326 { 326 {
327 dataMgr->getServerList().removeRef( s ); 327 dataMgr->getServerList().removeRef( s );
328 servers->removeItem( currentSelectedServer ); 328 servers->removeItem( currentSelectedServer );
329 } 329 }
330} 330}
331 331
332void SettingsImpl :: changeServerDetails() 332void SettingsImpl :: changeServerDetails()
333{ 333{
334 changed = true; 334 changed = true;
335 335
336 QString newName = servername->text(); 336 QString newName = servername->text();
337 337
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 )
363 { 363 {
364 // Update server name 364 // Update server name
365 s->setServerName( newName ); 365 s->setServerName( newName );
366 } 366 }
367 367
368 // Update list box 368 // Update list box
369 servers->changeItem( newName, currentSelectedServer ); 369 servers->changeItem( newName, currentSelectedServer );
370 } 370 }
371 } 371 }
372 else 372 else
373 { 373 {
374 Server s( newName, serverurl->text() ); 374 Server s( newName, serverurl->text() );
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
@@ -17,49 +17,49 @@
17 * You should have received a copy of the GNU General Public 17 * You should have received a copy of the GNU General Public
18 * License along with dpkg; if not, write to the Free Software 18 * License along with dpkg; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 20 */
21#include <stdio.h> 21#include <stdio.h>
22#include <stdlib.h> 22#include <stdlib.h>
23#include <ctype.h> 23#include <ctype.h>
24#include <string.h> 24#include <string.h>
25 25
26#include <qobject.h> 26#include <qobject.h>
27 27
28//# define _(Text) Text 28//# define _(Text) Text
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;
54}; 54};
55 55
56static int verrevcmp(const char *val, const char *ref) 56static int verrevcmp(const char *val, const char *ref)
57{ 57{
58 int vc, rc; 58 int vc, rc;
59 long vl, rl; 59 long vl, rl;
60 const char *vp, *rp; 60 const char *vp, *rp;
61 61
62 if (!val) val= ""; 62 if (!val) val= "";
63 if (!ref) ref= ""; 63 if (!ref) ref= "";
64 for (;;) { 64 for (;;) {
65 vp= val; while (*vp && !isdigit(*vp)) vp++; 65 vp= val; while (*vp && !isdigit(*vp)) vp++;