Replace GetDateFormat() method by GetDateLocalFormat() cause of Win32

Forgot to set start and end dates when adding an account
This commit is contained in:
Gregory Soutadé
2018-03-11 15:57:22 +01:00
parent b51c4d2d2d
commit e9ec135b27
7 changed files with 31 additions and 20 deletions

View File

@@ -261,7 +261,7 @@ void GridAccount::LoadOperations(std::vector<Operation>* operations, int month,
ChoiceDelegate* accountEditor = new ChoiceDelegate(this, _accounts, _nbAccounts);
setItemDelegateForColumn(ACCOUNT, accountEditor);
DateDelegate* dateEditor = new DateDelegate(this, month+1, year, _kiss->GetDateFormat());
DateDelegate* dateEditor = new DateDelegate(this, month+1, year, _kiss->GetDateLocalFormat());
setItemDelegateForColumn(OP_DATE, dateEditor);
FormulaDelegate* formulaEditor = new FormulaDelegate(this, &_displayedOperations);
@@ -1011,7 +1011,7 @@ void GridAccount::OnOperationModified(int row, int col)
value = item(row, OP_DATE)->text();
if (value.length())
{
date = QDate::fromString(value, _kiss->GetDateFormat());
date = QDate::fromString(value, _kiss->GetDateLocalFormat());
new_op.day = date.day()-1;
new_op.month = date.month()-1;
new_op.year = date.year();