diff --git a/src/controller/KissCount.hpp b/src/controller/KissCount.hpp index 9a835eb..03d8c38 100644 --- a/src/controller/KissCount.hpp +++ b/src/controller/KissCount.hpp @@ -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); diff --git a/src/model/Database.hpp b/src/model/Database.hpp index 22749f8..413e532 100644 --- a/src/model/Database.hpp +++ b/src/model/Database.hpp @@ -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); diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index a135d4b..6ec1cce 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -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 > ops; std::map >::iterator it; @@ -1056,7 +1056,7 @@ void AccountPanel::GenerateMonth(int month, int year) QString s; const QString syear = s.sprintf("%d", year); QList items = _tree->findItems(syear, Qt::MatchExactly|Qt::MatchRecursive); - QTreeWidgetItem *root, *itemYear = NULL, *itemMonth; + QTreeWidgetItem *root, *itemYear = 0, *itemMonth; std::map > ops ; std::vector::iterator it ; diff --git a/src/view/PreferencesPanel.cpp b/src/view/PreferencesPanel.cpp index 6b972e8..8d072f3 100644 --- a/src/view/PreferencesPanel.cpp +++ b/src/view/PreferencesPanel.cpp @@ -417,7 +417,7 @@ void PreferencesPanel::AddCategory(int line, Category cat) connect(button, SIGNAL(clicked()), &_fontSignalMapper, SLOT(map())); for(int i=0; iitem(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) { diff --git a/src/view/SearchPanel.cpp b/src/view/SearchPanel.cpp index 557a878..cf64f13 100644 --- a/src/view/SearchPanel.cpp +++ b/src/view/SearchPanel.cpp @@ -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()) {