Implement Delete operation in AccountPanel contextual menu

Fix a bug in a SQL request
Use nbCategories in AccountPanel to prevent buffer overflow
This commit is contained in:
2011-10-31 10:24:05 +01:00
parent 739ac0cbc2
commit 6c0c04cad5
5 changed files with 65 additions and 56 deletions

View File

@@ -21,16 +21,13 @@
#include "DateDelegate.hpp"
#include <iostream>
QWidget * DateDelegate::createEditor (QWidget * parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const
{
QComboBox* combo = new QComboBox(parent);
QDate date(_year, _month, _day);
QString s;
for(int i=0; i<date.daysInMonth(); i++)
combo->addItem(s.sprintf("%d", i+1));
combo->addItem(QString::number(i+1));
return combo;
}