diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2022-03-17 18:50:52 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-03-20 18:50:39 +0100 |
commit | 49e34b02b0bb609ce6e9ff1d2d96bdfcb03617d1 (patch) | |
tree | f8299219a274dedc710b0bbf0ff1be832d47f197 /kmymoney2/widgets/register.cpp | |
parent | a553069ad068dcab541282df24dbe12591153af8 (diff) | |
download | kmymoney-49e34b02b0bb609ce6e9ff1d2d96bdfcb03617d1.tar.gz kmymoney-49e34b02b0bb609ce6e9ff1d2d96bdfcb03617d1.zip |
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 5e6c401557744fe5f9765471605cc793939fee1f)
Diffstat (limited to 'kmymoney2/widgets/register.cpp')
-rw-r--r-- | kmymoney2/widgets/register.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp index 5952227..b52dff4 100644 --- a/kmymoney2/widgets/register.cpp +++ b/kmymoney2/widgets/register.cpp @@ -188,7 +188,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) break; case EntryOrderSort: - rc = qstrcmp(i1->sortEntryOrder(), i2->sortEntryOrder()); + rc = TQString::compare(i1->sortEntryOrder(), i2->sortEntryOrder()); break; case TypeSort: @@ -218,7 +218,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) } if(rc == 0) { - rc = qstrcmp(i1->sortEntryOrder(), i2->sortEntryOrder()); + rc = TQString::compare(i1->sortEntryOrder(), i2->sortEntryOrder()); } return rc < 0; @@ -1853,7 +1853,7 @@ void Register::slotEnsureItemVisible(void) TransactionSortField KMyMoneyRegister::textToSortOrder(const TQString& text) { for(int idx = 1; idx < static_cast<int>(MaxSortFields); ++idx) { - if(text == i18n(sortOrderText[idx])) { + if(text == i18n(sortOrderText[idx].utf8())) { return static_cast<TransactionSortField>(idx); } } @@ -1864,7 +1864,7 @@ const TQString KMyMoneyRegister::sortOrderToText(TransactionSortField idx) { if(idx < PostDateSort || idx >= MaxSortFields) idx = UnknownSort; - return i18n(sortOrderText[idx]); + return i18n(sortOrderText[idx].utf8()); } TQString Register::text(int /*row*/, int /*col*/) const |