[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/kexidb
From: Jarosław Staniek <staniek () kde ! org>
Date: 2010-11-24 22:55:00
Message-ID: 20101124225500.712EBAC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1200401 by staniek:
KexiDB
*fix memory leak: delete dummy primary key when setting new
M +4 -2 tableschema.cpp
--- trunk/koffice/kexi/kexidb/tableschema.cpp #1200400:1200401
@@ -160,8 +160,10 @@
{
if (m_pkey && m_pkey != pkey) {
if (m_pkey->fieldCount() == 0) {//this is empty key, probably default - remove it
- m_indices.removeAt(m_indices.indexOf(m_pkey));
- } else {
+ m_indices.removeOne(m_pkey);
+ delete m_pkey;
+ }
+ else {
m_pkey->setPrimaryKey(false); //there can be only one pkey..
//thats ok, the old pkey is still on indices list, if not empty
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic