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

List:       kde-commits
Subject:    koffice/kexi/widget
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2010-11-24 13:16:17
Message-ID: 20101124131617.F3B55AC8A3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1200256 by staniek:

Main Window
*fix memory leak: delete old root item from project model when setting data

+add missing copyrights


 M  +5 -3      KexiProjectModel.cpp  
 M  +3 -1      KexiProjectModel.h  


--- trunk/koffice/kexi/widget/KexiProjectModel.cpp #1200255:1200256
@@ -1,4 +1,7 @@
-/*
+/* This file is part of the KDE project
+   Copyright (C) 2010 Adam Pigg <adam@piggz.co.uk>
+   Copyright (C) 2010 Jarosław Staniek <staniek@kde.org>
+   
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License version 2 as published by the Free Software Foundation.
@@ -38,6 +41,7 @@
     clear();
     m_itemsPartClass = itemsPartClass;
 
+    delete m_rootItem;
     m_rootItem = new KexiProjectModelItem(prj->data()->databaseName());
     
     KexiPart::PartInfoList* plist = Kexi::partManager().partInfoList();
@@ -108,10 +112,8 @@
 
 KexiProjectModel::~KexiProjectModel()
 {
-    if (m_rootItem) {
         delete m_rootItem;
     }
-}
 
 QVariant KexiProjectModel::data(const QModelIndex& index, int role) const
 {
--- trunk/koffice/kexi/widget/KexiProjectModel.h #1200255:1200256
@@ -1,4 +1,6 @@
-/*
+/* This file is part of the KDE project
+   Copyright (C) 2010 Adam Pigg <adam@piggz.co.uk>
+
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
    License version 2 as published by the Free Software Foundation.
[prev in list] [next in list] [prev in thread] [next in thread] 

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