Remove some warnings

This commit is contained in:
Grégory Soutadé 2018-05-07 14:21:19 +02:00
parent 9133973148
commit eba1057656
5 changed files with 16 additions and 19 deletions

View File

@ -128,7 +128,6 @@ void KissCount::UpdateOperation(Operation& op, bool checkTransfert)
int KissCount::AddOperation(Operation& op, bool checkTransfert)
{
int accountAmount;
int ret = _db->AddOperation(_user, op, checkTransfert);
if (checkTransfert && op.transfert)
@ -139,8 +138,6 @@ int KissCount::AddOperation(Operation& op, bool checkTransfert)
void KissCount::DeleteOperation(Operation& op)
{
int accountAmount;
if (op.transfert)
{
op.transfert = 0;

View File

@ -97,7 +97,7 @@ QString User::GetCategoryName(int catId)
return _("Unknown") ;
}
int User::GetCategoryId(const QString& catName) throw (CategoryNotFound)
int User::GetCategoryId(const QString& catName) /*throw (CategoryNotFound)*/
{
std::vector<Category>::iterator it;
Category cat;
@ -185,7 +185,7 @@ QString User::GetTagName(int tagId)
return _("Unknown") ;
}
int User::GetTagId(const QString& tagName) throw (TagNotFound)
int User::GetTagId(const QString& tagName) /*throw (TagNotFound)*/
{
std::vector<Tag>::iterator it;
Tag tag;
@ -226,7 +226,7 @@ void User::DeleteTag(const Tag& tag)
}
}
Account User::GetAccount(int accountId) throw (AccountNotFound)
Account User::GetAccount(int accountId) /*throw (AccountNotFound)*/
{
std::vector<Account>::iterator it = std::find(_accounts.begin(), _accounts.end(), accountId);
@ -245,7 +245,7 @@ QString User::GetAccountName(int accountId)
return _("Unknown") ;
}
int User::GetAccountId(const QString& accountName) throw (AccountNotFound)
int User::GetAccountId(const QString& accountName) /*throw (AccountNotFound)*/
{
std::vector<Account>::iterator it;
for (it=_accounts.begin(); it !=_accounts.end(); it++)
@ -255,7 +255,7 @@ int User::GetAccountId(const QString& accountName) throw (AccountNotFound)
throw AccountNotFound();
}
int User::GetAccountIdFromAccountNumber(const QString& accountNumber) throw (AccountNotFound)
int User::GetAccountIdFromAccountNumber(const QString& accountNumber) /*throw (AccountNotFound)*/
{
std::vector<Account>::iterator it;
for (it=_accounts.begin(); it !=_accounts.end(); it++)

View File

@ -59,7 +59,7 @@ public:
Category GetCategory(int catId);
QString GetCategoryName(int catId);
int GetCategoryId(const QString& catName) throw (CategoryNotFound);
int GetCategoryId(const QString& catName) /*throw (CategoryNotFound)*/;
const QFont GetCategoryFont(int catId);
void AddCategory(const Category& cat);
void UpdateCategory(const Category& cat);
@ -67,16 +67,16 @@ public:
Tag GetTag(int tagId);
QString GetTagName(int tagId);
int GetTagId(const QString& tagName) throw (TagNotFound);
int GetTagId(const QString& tagName) /*throw (TagNotFound)*/;
void AddTag(const Tag& tag);
void UpdateTag(const Tag& tag);
void DeleteTag(const Tag& tag);
Account GetAccount(int accountId) throw (AccountNotFound);
Account GetAccount(int accountId) /*throw (AccountNotFound)*/;
QString GetAccountName(int accountId);
int GetAccountId(const QString& accountName) throw (AccountNotFound);
int GetAccountIdFromAccountNumber(const QString& accountNumber) throw (AccountNotFound);
int GetAccountId(const QString& accountName) /*throw (AccountNotFound)*/;
int GetAccountIdFromAccountNumber(const QString& accountNumber) /*throw (AccountNotFound)*/;
void AddAccount(Account& ac);
void UpdateAccount(Account& ac);
void DeleteAccount(Account& ac);

View File

@ -149,7 +149,7 @@ void GridAccount::SetWeek(int week, int line) {
}
}
Operation& GridAccount::GetOperation(int id) throw (OperationNotFound)
Operation& GridAccount::GetOperation(int id) /*throw (OperationNotFound)*/
{
std::vector<Operation>::iterator it = std::find(_operations->begin(), _operations->end(), id);
@ -173,7 +173,7 @@ void GridAccount::UpdateOperation(Operation& op)
}
}
int GridAccount::GetDisplayedRow(int id) throw (OperationNotFound)
int GridAccount::GetDisplayedRow(int id) /*throw (OperationNotFound)*/
{
std::vector<Operation>::iterator it = std::find(_displayedOperations.begin(), _displayedOperations.end(), id);
@ -560,7 +560,7 @@ void GridAccount::InsertOperation(User* user, Operation& op, int line, bool fix,
_inModification = false;
}
void GridAccount::DeleteOperation(const Operation& op) throw (OperationNotFound)
void GridAccount::DeleteOperation(const Operation& op) /*throw (OperationNotFound)*/
{
std::vector<Operation>::iterator it = std::find(_operations->begin(), _operations->end(), op.id);
std::vector<int>::iterator it2;

View File

@ -96,16 +96,16 @@ private:
bool IsMetaOpened(int id);
void OpenMeta(const Operation& meta);
int InsertIntoGrid(Operation& op);
void DeleteOperation(const Operation& op) throw (OperationNotFound);
void DeleteOperation(const Operation& op) /*throw (OperationNotFound)*/;
void RemoveRow(const Operation& op, int line, bool deleteOp);
void CheckOperation(Operation& op, int line, bool check, bool force);
void UpdateMeta(Operation& op);
int RemoveMeta(Operation op, int line, bool removeRoot, bool deleteOp);
void CheckMeta(Operation& op, int line, bool check);
Operation& GetOperation(int id) throw(OperationNotFound);
Operation& GetOperation(int id) /*throw(OperationNotFound)*/;
void UpdateOperation(Operation& op);
int GetDisplayedRow(int id) throw (OperationNotFound);
int GetDisplayedRow(int id) /*throw (OperationNotFound)*/;
void InsertCenteredWidget(int line, int column, QWidget* widget, int margins=3);
QWidget* GetCenteredWidget(int line, int column);