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

List:       kde-commits
Subject:    koffice/kexi/tableview
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2004-06-19 11:38:05
Message-ID: 20040619113805.DFFC19905 () office ! kde ! org
[Download RAW message or body]

CVS commit by staniek: 

KexiTableView
- added checks if column is >=0 (this avoid crashes)


  M +2 -2      kexitableview.cpp   1.149


--- koffice/kexi/tableview/kexitableview.cpp  #1.148:1.149
@@ -3295,10 +3295,10 @@ void KexiTableView::triggerUpdate()
 int KexiTableView::columnType(int col) const
 {
-        return m_data ? m_data->column(col)->field->type() : KexiDB::Field::InvalidType;
+        return (m_data && col>=0) ? m_data->column(col)->field->type() : KexiDB::Field::InvalidType;
 }
 
 bool KexiTableView::columnEditable(int col) const
 {
-        return m_data ? !m_data->column(col)->readOnly() : false;
+        return (m_data && col>=0) ? !m_data->column(col)->readOnly() : false;
 }
 


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

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