[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kate/part
From:       Hamish Rodda <rodda () kde ! org>
Date:       2005-11-03 13:45:35
Message-ID: 1131025535.758159.18801.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 477251 by rodda:

Less Qt3

I noticed that the mimetype chooser crashes currently; this seems to be
inside KMimeTypeChooser and unrelated to kate (valgrind + gdb haven't
enlightened me as to the exact cause)


 M  +7 -3      katefiletype.cpp  
 M  +2 -2      katefiletype.h  


--- trunk/KDE/kdelibs/kate/part/katefiletype.cpp #477250:477251
@@ -513,13 +513,17 @@
 void KateViewFileTypeAction::init()
 {
   m_doc = 0;
-  subMenus.setAutoDelete( true );
 
   popupMenu()->insertItem ( i18n("None"), this, SLOT(setType(int)), 0,  0);
 
   connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow()));
 }
 
+KateViewFileTypeAction::~ KateViewFileTypeAction( )
+{
+  qDeleteAll(subMenus);
+}
+
 void KateViewFileTypeAction::updateMenu (KTextEditor::Document *doc)
 {
   m_doc = (KateDocument *)doc;
@@ -558,9 +562,9 @@
 
   if (!doc) return;
 
-  for (uint i=0;i<subMenus.count();i++)
+  for (int i=0;i<subMenus.count();i++)
   {
-    for (uint i2=0;i2<subMenus.at(i)->count();i2++)
+    for (int i2=0;i2<subMenus.at(i)->count();i2++)
       subMenus.at(i)->setItemChecked(subMenus.at(i)->idAt(i2),false);
   }
   popupMenu()->setItemChecked (0, false);
--- trunk/KDE/kdelibs/kate/part/katefiletype.h #477250:477251
@@ -122,7 +122,7 @@
     KateViewFileTypeAction(const QString& text, KActionCollection* parent = 0, const char* name = 0)
        : KActionMenu(text, parent, name) { init(); };
 
-    ~KateViewFileTypeAction(){;};
+    ~KateViewFileTypeAction();
 
     void updateMenu (KTextEditor::Document *doc);
 
@@ -132,7 +132,7 @@
     QPointer<KateDocument> m_doc;
     QStringList subMenusName;
     QStringList names;
-    Q3PtrList<QMenu> subMenus;
+    QList<QMenu*> subMenus;
 
   public  slots:
     void slotAboutToShow();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic