-rw-r--r-- | core/launcher/startmenu.cpp | 2 | ||||
-rw-r--r-- | core/launcher/systray.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 7373ea8..d9382d2 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -339,48 +339,48 @@ void StartMenu::loadApplets() delete trans; } else { exclude += *it; delete lib; } } cfg.writeEntry( "ExcludeApplets", exclude, ',' ); qsort(xapplets,napplets,sizeof(applets[0]),compareAppletPositions); if ( sepId ) launchMenu-> removeItem ( sepId ); sepId = ( launchMenu-> count ( )) ? launchMenu-> insertSeparator ( ) : 0; while (napplets--) { MenuApplet *applet = xapplets[napplets]; applet-> popup = applet-> iface-> popup ( this ); if ( applet-> popup ) applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ), applet-> popup ); else applet-> id = launchMenu-> insertItem ( applet-> iface-> icon ( ), applet-> iface-> text ( ) ); applets.insert ( applet-> id, new MenuApplet(*applet)); } - delete xapplets; + delete [] xapplets; if ( sepId && ( launchMenu-> idAt ( launchMenu-> count ( ) - 1 ) == sepId )) { // no applets launchMenu-> removeItem ( sepId ); sepId = 0; } if ( !launchMenu-> count ( )) // if we don't do this QPopupMenu will insert a dummy Separator, which won't go away later sepId = launchMenu-> insertSeparator ( ); if ( !safety_tid ) safety_tid = startTimer(2000); // TT has 5000, but this is a PITA for a developer ;) (sandman) } void StartMenu::timerEvent(QTimerEvent* e) { if ( e->timerId() == safety_tid ) { Config cfg( "StartMenu" ); cfg.setGroup( "Applets" ); cfg.writeEntry( "SafeMode", FALSE ); killTimer(safety_tid); safety_tid = 0; } } diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp index 4859e48..be55791 100644 --- a/core/launcher/systray.cpp +++ b/core/launcher/systray.cpp @@ -107,47 +107,47 @@ void SysTray::addApplets() TaskbarApplet *applet = new TaskbarApplet; applets[napplets++] = applet; applet->library = lib; applet->iface = iface; QTranslator *trans = new QTranslator(qApp); QString type = (*it).left( (*it).find(".") ); QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm"; if ( trans->load( tfn )) qApp->installTranslator( trans ); else delete trans; } else { exclude += *it; delete lib; } } cfg.writeEntry( "ExcludeApplets", exclude, ',' ); qsort(applets,napplets,sizeof(applets[0]),compareAppletPositions); while (napplets--) { TaskbarApplet *applet = applets[napplets]; applet->applet = applet->iface->applet( this ); appletList.append(*applet); } - delete applets; + delete [] applets; #else TaskbarApplet applet; applet.iface = new ClockAppletImpl(); applet.applet = applet.iface->applet( this ); appletList.append( a ); #endif show(); if ( !safety_tid ) safety_tid = startTimer(2000); // TT has 5000, but this is a PITA for a developer ;) (sandman) } void SysTray::timerEvent(QTimerEvent* e) { if ( e->timerId() == safety_tid ) { Config cfg( "Taskbar" ); cfg.setGroup( "Applets" ); cfg.writeEntry( "SafeMode", FALSE ); killTimer(safety_tid); safety_tid = 0; } } |