Replace NULL by 0

This commit is contained in:
Grégory Soutadé 2012-04-30 21:22:52 +02:00
parent 7c932e4f75
commit aafc26c768
5 changed files with 9 additions and 9 deletions

View File

@ -75,7 +75,7 @@ public:
int MetaAmount(int id);
int MetaPositiveAmount(int id);
int GetAccountAmount(int id, int month, int year, bool* had_values=NULL);
int GetAccountAmount(int id, int month, int year, bool* had_values=0);
void SetAccountAmount(int accountId, int month, int year, int value);
int CalcAccountAmount(int id, int month, int year, bool* had_values);

View File

@ -109,7 +109,7 @@ public:
int MetaAmount(int id);
int MetaPositiveAmount(int id);
int GetAccountAmount(int id, int month, int year, bool* had_value=NULL);
int GetAccountAmount(int id, int month, int year, bool* had_value=0);
void SetAccountAmount(int accountId, int month, int year, int amount);
int CalcAccountAmount(int id, int month, int year, bool* had_values);

View File

@ -326,7 +326,7 @@ void AccountPanel::ChangeUser()
User* user = _kiss->GetUser();
int curYear = -1, year;
QDate curDate = QDate::currentDate();
QTreeWidgetItem* curNode=NULL, *node;
QTreeWidgetItem* curNode=0, *node;
std::map<int, std::vector<int> > ops;
std::map<int, std::vector<int> >::iterator it;
@ -1056,7 +1056,7 @@ void AccountPanel::GenerateMonth(int month, int year)
QString s;
const QString syear = s.sprintf("%d", year);
QList<QTreeWidgetItem *> items = _tree->findItems(syear, Qt::MatchExactly|Qt::MatchRecursive);
QTreeWidgetItem *root, *itemYear = NULL, *itemMonth;
QTreeWidgetItem *root, *itemYear = 0, *itemMonth;
std::map<int, std::vector<int> > ops ;
std::vector<int>::iterator it ;

View File

@ -417,7 +417,7 @@ void PreferencesPanel::AddCategory(int line, Category cat)
connect(button, SIGNAL(clicked()), &_fontSignalMapper, SLOT(map()));
for(int i=0; i<NUMBER_COLS_CATEGORY; i++)
if (_categoriesGrid->item(line, i) == NULL)
if (_categoriesGrid->item(line, i) == 0)
_categoriesGrid->setItem(line, i, new QTableWidgetItem(""));
SET_ROW_COLOR(line, cat.backcolor, cat.forecolor);
@ -619,7 +619,7 @@ void PreferencesPanel::OnAccountDeleteClicked(int id)
if (user->_accounts[i].id != id)
accounts << user->_accounts[i].name;
res = QInputDialog::getItem(NULL, "KissCount", _("Wich account will replace this one ?"), accounts, 0, false, &ok);
res = QInputDialog::getItem(0, "KissCount", _("Wich account will replace this one ?"), accounts, 0, false, &ok);
if (!ok)
{
@ -712,7 +712,7 @@ void PreferencesPanel::OnCategoryDeleteClicked(int id)
if (user->_categories[i].id != id)
categories << _(user->_categories[i].name.toStdString().c_str());
res = QInputDialog::getItem(NULL, "KissCount", _("Wich category will replace this one ?"), categories, 0, false, &ok);
res = QInputDialog::getItem(0, "KissCount", _("Wich category will replace this one ?"), categories, 0, false, &ok);
if (!ok)
{

View File

@ -141,7 +141,7 @@ void SearchPanel::OnButtonChangeAccount()
for(i=0; i < user->GetAccountsNumber(); i++)
accounts << user->_accounts[i].name;
res = QInputDialog::getItem(NULL, "KissCount", _("Choose a new account"), accounts, 0, false);
res = QInputDialog::getItem(0, "KissCount", _("Choose a new account"), accounts, 0, false);
if (!res.size()) return ;
a = (res.length()) ? accounts.indexOf(res) : 0;
@ -181,7 +181,7 @@ void SearchPanel::OnButtonChangeCategory()
for(i=0; i < user->GetCategoriesNumber(); i++)
categories << _(user->_categories[i].name.toStdString().c_str());
res = QInputDialog::getItem(NULL, "KissCount", _("Choose a new category"), categories, 0, false);
res = QInputDialog::getItem(0, "KissCount", _("Choose a new category"), categories, 0, false);
if (res.length())
{