diff options
Diffstat (limited to 'kmymoney2')
34 files changed, 137 insertions, 137 deletions
diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp index 7e30f41..9377def 100644 --- a/kmymoney2/converter/mymoneygncreader.cpp +++ b/kmymoney2/converter/mymoneygncreader.cpp @@ -168,7 +168,7 @@ bool GncObject::isDataElement (const TQString &elName, const TQXmlAttributes& el TQString GncObject::var (int i) const { return (pMain->m_decoder == 0 ? *(m_v.at(i)) - : pMain->m_decoder->toUnicode (*(m_v.at(i)))); + : pMain->m_decoder->toUnicode((m_v.at(i))->utf8())); } void GncObject::adjustHideFactor () { diff --git a/kmymoney2/converter/webpricequote.cpp b/kmymoney2/converter/webpricequote.cpp index 76ea53e..ff2104b 100644 --- a/kmymoney2/converter/webpricequote.cpp +++ b/kmymoney2/converter/webpricequote.cpp @@ -194,7 +194,7 @@ bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id, void WebPriceQuote::removeTempFile(const TQString& tmpFile) { if(tmpFile == m_tmpFile) { - unlink(tmpFile); + unlink(tmpFile.local8Bit()); m_tmpFile = TQString(); } } @@ -835,7 +835,7 @@ void FinanceQuoteProcess::slotProcessExited(TDEProcess*) void FinanceQuoteProcess::launch (const TQString& scriptPath) { clearArguments(); arguments.append(TQCString("perl")); - arguments.append (TQCString(scriptPath)); + arguments.append (scriptPath.local8Bit()); arguments.append (TQCString("-l")); if (!start(TDEProcess::NotifyOnExit, TDEProcess::Stdout)) tqFatal ("Unable to start FQ script"); return; diff --git a/kmymoney2/dialogs/investtransactioneditor.cpp b/kmymoney2/dialogs/investtransactioneditor.cpp index 1a47f49..3d4a605 100644 --- a/kmymoney2/dialogs/investtransactioneditor.cpp +++ b/kmymoney2/dialogs/investtransactioneditor.cpp @@ -353,7 +353,7 @@ int InvestTransactionEditor::editSplits(const TQString& categoryWidgetName, cons MyMoneyTransaction transaction; transaction.setCommodity(m_currency.id()); - if(splits.count() == 0 && category->selectedItem()) { + if(splits.count() == 0 && !category->selectedItem().isEmpty()) { MyMoneySplit s; s.setAccountId(category->selectedItem()); s.setShares(amount->value()); diff --git a/kmymoney2/dialogs/keditloanwizard.cpp b/kmymoney2/dialogs/keditloanwizard.cpp index 1355261..6d126a5 100644 --- a/kmymoney2/dialogs/keditloanwizard.cpp +++ b/kmymoney2/dialogs/keditloanwizard.cpp @@ -137,7 +137,7 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) m_newInterestRateEdit->setPrecision(3); m_interestRateLabel->setText(TQString(" ") + ir.formatMoney("", 3) + TQString("%")); - m_paymentFrequencyUnitEdit->setCurrentItem(i18n(m_schedule.occurenceToString())); + m_paymentFrequencyUnitEdit->setCurrentItem(i18n(m_schedule.occurenceToString().utf8())); updateTermWidgets(m_account.term()); // the base payment (amortization and interest) is determined diff --git a/kmymoney2/dialogs/kimportdlg.cpp b/kmymoney2/dialogs/kimportdlg.cpp index dd376c4..503f987 100644 --- a/kmymoney2/dialogs/kimportdlg.cpp +++ b/kmymoney2/dialogs/kimportdlg.cpp @@ -112,7 +112,7 @@ void KImportDlg::slotBrowse() KFileDialog dialog(TDEGlobalSettings::documentPath(), i18n("%1|Import files\n%2|All files (*.*)").arg(tmpprofile.filterFileType()).arg("*"), - this, i18n("Import File..."), true); + this, i18n("Import File...").utf8(), true); dialog.setMode(KFile::File | KFile::ExistingOnly); if(dialog.exec() == TQDialog::Accepted) { diff --git a/kmymoney2/dialogs/knewaccountdlg.cpp b/kmymoney2/dialogs/knewaccountdlg.cpp index c387135..4fe343c 100644 --- a/kmymoney2/dialogs/knewaccountdlg.cpp +++ b/kmymoney2/dialogs/knewaccountdlg.cpp @@ -358,7 +358,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo accountNameEdit->setFocus(); - if (title) + if (!title.isEmpty()) setCaption(title); // load button icons diff --git a/kmymoney2/dialogs/knewloanwizard.cpp b/kmymoney2/dialogs/knewloanwizard.cpp index 8b11ab5..2036170 100644 --- a/kmymoney2/dialogs/knewloanwizard.cpp +++ b/kmymoney2/dialogs/knewloanwizard.cpp @@ -114,7 +114,7 @@ KNewLoanWizard::KNewLoanWizard(TQWidget *parent, const char *name ) : m_interestFrequencyAmountEdit->setValue(1); m_interestFrequencyUnitEdit->setCurrentItem(static_cast<int>(MyMoneyAccountLoan::changeYearly)); - m_paymentFrequencyUnitEdit->setCurrentItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY))); + m_paymentFrequencyUnitEdit->setCurrentItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY).utf8())); m_firstDueDateEdit->loadDate(TQDate(TQDate::currentDate().year(),TQDate::currentDate().month(),30)); m_paymentAccountEdit->removeButtons(); @@ -619,21 +619,21 @@ void KNewLoanWizard::loadComboBoxes(void) m_interestFrequencyUnitEdit->insertItem(i18n("Months"), static_cast<int>(MyMoneyAccountLoan::changeMonthly)); m_interestFrequencyUnitEdit->insertItem(i18n("Years"), static_cast<int>(MyMoneyAccountLoan::changeYearly)); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_FORTNIGHTLY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY))); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_FORTNIGHTLY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY).utf8())); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY).utf8())); m_durationUnitEdit->insertItem(i18n("Months"), static_cast<int>(MyMoneySchedule::OCCUR_MONTHLY)); m_durationUnitEdit->insertItem(i18n("Years"), static_cast<int>(MyMoneySchedule::OCCUR_YEARLY)); diff --git a/kmymoney2/dialogs/tdeconfirmmanualenterdlg.cpp b/kmymoney2/dialogs/tdeconfirmmanualenterdlg.cpp index 84609a0..fd7f41b 100644 --- a/kmymoney2/dialogs/tdeconfirmmanualenterdlg.cpp +++ b/kmymoney2/dialogs/tdeconfirmmanualenterdlg.cpp @@ -80,9 +80,9 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons try { TQString po, pn; - if(to.splits()[0].payeeId()) + if(!to.splits()[0].payeeId().isEmpty()) po = file->payee(to.splits()[0].payeeId()).name(); - if(tn.splits()[0].payeeId()) + if(!tn.splits()[0].payeeId().isEmpty()) pn = file->payee(tn.splits()[0].payeeId()).name(); if (po != pn) { diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp index 01dbc2c..d90f46c 100644 --- a/kmymoney2/kmymoney2.cpp +++ b/kmymoney2/kmymoney2.cpp @@ -503,7 +503,7 @@ void KMyMoney2App::dumpActions(void) const TDEActionPtrList list = actionCollection()->actions(); TDEActionPtrList::const_iterator it; for(it = list.begin(); it != list.end(); ++it) { - std::cout << (*it)->name() << ": " << (*it)->text() << std::endl; + std::cout << (*it)->name() << ": " << (*it)->text().local8Bit() << std::endl; } } @@ -855,7 +855,7 @@ KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, cons if(path.isEmpty()) path = TDEGlobalSettings::documentPath(); - KFileDialog* dialog = new KFileDialog(path, mask, this, title, true); + KFileDialog* dialog = new KFileDialog(path, mask, this, title.utf8(), true); dialog->setMode(mode); if(dialog->exec() == TQDialog::Accepted) { @@ -873,7 +873,7 @@ void KMyMoney2App::slotFileOpen(void) KFileDialog* dialog = new KFileDialog(TDEGlobalSettings::documentPath(), i18n("%1|KMyMoney files\n%2|All files (*.*)").arg("*.kmy *.xml").arg("*"), - this, i18n("Open File..."), true); + this, i18n("Open File...").utf8(), true); dialog->setMode(KFile::File | KFile::ExistingOnly); if(dialog->exec() == TQDialog::Accepted) { @@ -1621,7 +1621,7 @@ void KMyMoney2App::slotGncImport(void) KFileDialog* dialog = new KFileDialog(TDEGlobalSettings::documentPath(), i18n("%1|Gnucash files\n%2|All files (*.*)").arg("*").arg("*"), - this, i18n("Import Gnucash file..."), true); + this, i18n("Import Gnucash file...").utf8(), true); dialog->setMode(KFile::File | KFile::ExistingOnly); if(dialog->exec() == TQDialog::Accepted) { @@ -1664,7 +1664,7 @@ void KMyMoney2App::slotStatementImport(void) KFileDialog* dialog = new KFileDialog(TDEGlobalSettings::documentPath(), i18n("%1|XML files\n%2|All files (*.*)").arg("*.xml").arg("*.*"), - this, i18n("Import XML Statement..."), true); + this, i18n("Import XML Statement...").utf8(), true); dialog->setMode(KFile::File | KFile::ExistingOnly); if(dialog->exec() == TQDialog::Accepted) diff --git a/kmymoney2/kmymoneytest.cpp b/kmymoney2/kmymoneytest.cpp index e42e142..623a390 100644 --- a/kmymoney2/kmymoneytest.cpp +++ b/kmymoney2/kmymoneytest.cpp @@ -84,7 +84,7 @@ class MyProgressListener : public CppUnit::TextTestProgressListener if(m_name != name) { if(m_name != "") std::cout << std::endl; - std::cout << "Running: " << name << std::endl; + std::cout << "Running: " << name.local8Bit() << std::endl; m_name = name; } } diff --git a/kmymoney2/kmymoneyutils.cpp b/kmymoney2/kmymoneyutils.cpp index 92ac362..e58b8de 100644 --- a/kmymoney2/kmymoneyutils.cpp +++ b/kmymoney2/kmymoneyutils.cpp @@ -120,27 +120,27 @@ MyMoneySecurity::eSECURITYTYPE KMyMoneyUtils::stringToSecurity(const TQString& t const TQString KMyMoneyUtils::securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType) { - return i18n(MyMoneySecurity::securityTypeToString(securityType)); + return i18n(MyMoneySecurity::securityTypeToString(securityType).utf8()); } const TQString KMyMoneyUtils::occurenceToString(const MyMoneySchedule::occurenceE occurence) { - return i18n(MyMoneySchedule::occurenceToString(occurence)); + return i18n(MyMoneySchedule::occurenceToString(occurence).utf8()); } const TQString KMyMoneyUtils::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType) { - return i18n(MyMoneySchedule::paymentMethodToString(paymentType)); + return i18n(MyMoneySchedule::paymentMethodToString(paymentType).utf8()); } const TQString KMyMoneyUtils::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption) { - return i18n(MyMoneySchedule::weekendOptionToString(weekendOption)); + return i18n(MyMoneySchedule::weekendOptionToString(weekendOption).utf8()); } const TQString KMyMoneyUtils::scheduleTypeToString(MyMoneySchedule::typeE type) { - return i18n(MyMoneySchedule::scheduleTypeToString(type)); + return i18n(MyMoneySchedule::scheduleTypeToString(type).utf8()); } KGuiItem KMyMoneyUtils::scheduleNewGuiItem(void) diff --git a/kmymoney2/main.cpp b/kmymoney2/main.cpp index 80ade1b..4d3bcff 100644 --- a/kmymoney2/main.cpp +++ b/kmymoney2/main.cpp @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) TDEAboutData aboutData( "kmymoney2", I18N_NOOP("KMyMoney"), VERSION, description, TDEAboutData::License_GPL, - "(c) 2000-2009 The KMyMoney development team", feature, + "(c) 2000-2009 The KMyMoney development team", feature.utf8(), "http://kmymoney2.sourceforge.net/", "kmymoney2-developer@lists.sourceforge.net"); diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp index aaa4372..c35c257 100644 --- a/kmymoney2/mymoney/mymoneyaccount.cpp +++ b/kmymoney2/mymoney/mymoneyaccount.cpp @@ -305,7 +305,7 @@ const MyMoneyMoney MyMoneyAccountLoan::interestRate(const TQDate& date) const for(it = pairs().begin(); it != pairs().end(); ++it) { if(regExp.search(it.key()) > -1) { - if(qstrcmp(it.key(),key) <= 0) + if(it.key() <= key) val = *it; else break; diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp index 95676cd..8ac6bf9 100644 --- a/kmymoney2/mymoney/mymoneyfile.cpp +++ b/kmymoney2/mymoney/mymoneyfile.cpp @@ -759,7 +759,7 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount_internal(const MyMoneySe throw new MYMONEYEXCEPTION("Opening balance for non currencies not supported"); MyMoneyAccount acc; - TQRegExp match(TQString("^%1").arg(i18n(MyMoneyFile::OpeningBalancesPrefix))); + TQRegExp match(TQString("^%1").arg(i18n(MyMoneyFile::OpeningBalancesPrefix.utf8()))); TQValueList<MyMoneyAccount> accounts; TQValueList<MyMoneyAccount>::Iterator it; @@ -787,7 +787,7 @@ const MyMoneyAccount MyMoneyFile::createOpeningBalanceAccount(const MyMoneySecur checkTransaction(__PRETTY_FUNCTION__); MyMoneyAccount acc; - TQString name(i18n(MyMoneyFile::OpeningBalancesPrefix)); + TQString name(i18n(MyMoneyFile::OpeningBalancesPrefix.utf8())); if(security.id() != baseCurrency().id()) { name += TQString(" (%1)").arg(security.id()); } diff --git a/kmymoney2/mymoney/mymoneymoney.cpp b/kmymoney2/mymoney/mymoneymoney.cpp index ec10a0e..b5d8f6d 100644 --- a/kmymoney2/mymoney/mymoneymoney.cpp +++ b/kmymoney2/mymoney/mymoneymoney.cpp @@ -185,7 +185,7 @@ MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount) } // tqDebug("4: '%s'", res.data()); if(res.length() > 0) - m_num = atoll( res ); + m_num = res.toLongLong(); if(isNegative) m_num = -m_num; diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp index fb6d542..d7a3b07 100644 --- a/kmymoney2/mymoney/mymoneyscheduletest.cpp +++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp @@ -1372,26 +1372,26 @@ void MyMoneyScheduleTest::testStringToOccurence() CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Yearly")) == MyMoneySchedule::OCCUR_YEARLY ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Every other year")) == MyMoneySchedule::OCCUR_EVERYOTHERYEAR ); // test occurence == stringToOccurence(i18n(occurenceToString(occurence))) - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_ONCE == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_DAILY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_WEEKLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERWEEK == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_FORTNIGHTLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_FORTNIGHTLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYHALFMONTH == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYFOURWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_MONTHLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERMONTH == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_QUARTERLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYFOURMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_TWICEYEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_YEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERYEAR == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR))) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_ONCE == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_DAILY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_WEEKLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERWEEK == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_FORTNIGHTLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_FORTNIGHTLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYHALFMONTH == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYFOURWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_MONTHLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERMONTH == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_QUARTERLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYFOURMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_TWICEYEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_YEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY).utf8())) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERYEAR == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR).utf8())) ); } void MyMoneyScheduleTest::testEventsPerYear() { diff --git a/kmymoney2/mymoney/mymoneystatement.cpp b/kmymoney2/mymoney/mymoneystatement.cpp index 89a374b..639bcd8 100644 --- a/kmymoney2/mymoney/mymoneystatement.cpp +++ b/kmymoney2/mymoney/mymoneystatement.cpp @@ -143,7 +143,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e) m_dateEnd = TQDate::fromString(_e.attribute("enddate"),Qt::ISODate); m_closingBalance = MyMoneyMoney(_e.attribute("closingbalance")); m_accountId = _e.attribute("accountid"); - m_skipCategoryMatching = _e.attribute("skipCategoryMatching"); + m_skipCategoryMatching = !(_e.attribute("skipCategoryMatching").isEmpty()); int i = kAccountTypeTxt.findIndex(_e.attribute("type",kAccountTypeTxt[1])); if ( i != -1 ) diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp index 76fc4cb..3382e0f 100644 --- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp +++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp @@ -99,7 +99,7 @@ void MyMoneyTransactionFilter::addAccount(const TQStringList& ids) void MyMoneyTransactionFilter::addAccount(const TQString& id) { if(!m_accounts.isEmpty() && !id.isEmpty()) { - if(m_accounts.find(id) != 0) + if(m_accounts.find(id.utf8()) != 0) return; } if(m_accounts.count() >= m_accounts.size()*2) { @@ -107,7 +107,7 @@ void MyMoneyTransactionFilter::addAccount(const TQString& id) } m_filterSet.singleFilter.accountFilter = 1; if(!id.isEmpty()) - m_accounts.insert(id, ""); + m_accounts.insert(id.utf8(), ""); } void MyMoneyTransactionFilter::addCategory(const TQStringList& ids) @@ -122,7 +122,7 @@ void MyMoneyTransactionFilter::addCategory(const TQStringList& ids) void MyMoneyTransactionFilter::addCategory(const TQString& id) { if(!m_categories.isEmpty() && !id.isEmpty()) { - if(m_categories.find(id) != 0) + if(m_categories.find(id.utf8()) != 0) return; } if(m_categories.count() >= m_categories.size()*2) { @@ -130,7 +130,7 @@ void MyMoneyTransactionFilter::addCategory(const TQString& id) } m_filterSet.singleFilter.categoryFilter = 1; if(!id.isEmpty()) - m_categories.insert(id, ""); + m_categories.insert(id.utf8(), ""); } void MyMoneyTransactionFilter::setDateFilter(const TQDate& from, const TQDate& to) @@ -157,7 +157,7 @@ void MyMoneyTransactionFilter::setAmountFilter(const MyMoneyMoney& from, const M void MyMoneyTransactionFilter::addPayee(const TQString& id) { if(!m_payees.isEmpty() && !id.isEmpty()) { - if(m_payees.find(id) != 0) + if(m_payees.find(id.utf8()) != 0) return; } if(m_payees.count() >= m_payees.size()*2) { @@ -165,7 +165,7 @@ void MyMoneyTransactionFilter::addPayee(const TQString& id) } m_filterSet.singleFilter.payeeFilter = 1; if(!id.isEmpty()) - m_payees.insert(id, ""); + m_payees.insert(id.utf8(), ""); } void MyMoneyTransactionFilter::addType(const int type) @@ -336,7 +336,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check if the split references one of the categories in the list if(m_filterSet.singleFilter.categoryFilter) { if(m_categories.count() > 0) { - if(m_categories.find(sp->accountId())) { + if(m_categories.find(sp->accountId().utf8())) { categoryMatched = true; removeSplit = 0; } @@ -351,7 +351,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check if the split references one of the accounts in the list if(m_filterSet.singleFilter.accountFilter) { if(m_accounts.count() > 0) { - if(m_accounts.find(sp->accountId())) { + if(m_accounts.find(sp->accountId().utf8())) { accountMatched = true; removeSplit = 0; } @@ -365,7 +365,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) } else { if(m_filterSet.singleFilter.accountFilter) { if(m_accounts.count() > 0) { - if(m_accounts.find(sp->accountId())) { + if(m_accounts.find(sp->accountId().utf8())) { accountMatched = true; removeSplit = 0; } @@ -424,7 +424,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the payee list if(!removeSplit && m_filterSet.singleFilter.payeeFilter) { if(m_payees.count() > 0) { - if(sp->payeeId().isEmpty() || !m_payees.find(sp->payeeId())) + if(sp->payeeId().isEmpty() || !m_payees.find(sp->payeeId().utf8())) removeSplit = sp; } else if(!sp->payeeId().isEmpty()) removeSplit = sp; @@ -548,17 +548,17 @@ MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransac bool MyMoneyTransactionFilter::includesCategory( const TQString& cat ) const { - return (! m_filterSet.singleFilter.categoryFilter) || m_categories.find( cat ); + return (! m_filterSet.singleFilter.categoryFilter) || m_categories.find( cat.utf8() ); } bool MyMoneyTransactionFilter::includesAccount( const TQString& acc ) const { - return (! m_filterSet.singleFilter.accountFilter) || m_accounts.find( acc ); + return (! m_filterSet.singleFilter.accountFilter) || m_accounts.find( acc.utf8() ); } bool MyMoneyTransactionFilter::includesPayee( const TQString& pye ) const { - return (! m_filterSet.singleFilter.payeeFilter) || m_payees.find( pye ); + return (! m_filterSet.singleFilter.payeeFilter) || m_payees.find( pye.utf8() ); } bool MyMoneyTransactionFilter::dateFilter( TQDate& from, TQDate& to ) const @@ -848,14 +848,14 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start, void MyMoneyTransactionFilter::removeReference(const TQString& id) { - if(m_accounts.find(id)) { + if(m_accounts.find(id.utf8())) { tqDebug(TQString("Remove account '%1' from report").arg(id)); - m_accounts.remove(id); - } else if(m_categories.find(id)) { + m_accounts.remove(id.utf8()); + } else if(m_categories.find(id.utf8())) { tqDebug(TQString("Remove category '%1' from report").arg(id)); - m_categories.remove(id); - } else if(m_payees.find(id)) { + m_categories.remove(id.utf8()); + } else if(m_payees.find(id.utf8())) { tqDebug(TQString("Remove payee '%1' from report").arg(id)); - m_payees.remove(id); + m_payees.remove(id.utf8()); } } diff --git a/kmymoney2/mymoney/mymoneyutils.cpp b/kmymoney2/mymoney/mymoneyutils.cpp index 49d5cac..93700af 100644 --- a/kmymoney2/mymoney/mymoneyutils.cpp +++ b/kmymoney2/mymoney/mymoneyutils.cpp @@ -337,7 +337,7 @@ unsigned long extractId(const TQString& txt) pos = txt.find(TQRegExp("\\d+"), 0); if(pos != -1) { - rc = atol(txt.mid(pos)); + rc = txt.mid(pos).toLong(); } return rc; } diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp index 08403f2..2c8307c 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp @@ -566,7 +566,7 @@ void MyMoneyDatabaseMgrTest::testReparentAccount() { CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 2); CPPUNIT_ASSERT(ex3.parentAccountId() == ex1.id()); } catch (MyMoneyException *e) { - std::cout << std::endl << e->what() << std::endl; + std::cout << std::endl << e->what().local8Bit() << std::endl; delete e; CPPUNIT_FAIL("Unexpected exception"); } @@ -763,7 +763,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() { CPPUNIT_ASSERT(testBudget.budgetStart() == newBudget.budgetStart()); CPPUNIT_ASSERT(testBudget.name() == newBudget.name()); } catch (TQString& s) { - std::cout << "Error in testCopyBudget(): " << s << std::endl; + std::cout << "Error in testCopyBudget(): " << s.local8Bit() << std::endl; CPPUNIT_ASSERT(false); } } diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp index 869e2e4..f1420dc 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp @@ -1025,7 +1025,7 @@ void MyMoneySeqAccessMgr::loadAccounts(const TQMap<TQString, MyMoneyAccount>& ma int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextAccountID = atol(lastId.mid(pos)); + m_nextAccountID = lastId.mid(pos).toLong(); } } @@ -1048,7 +1048,7 @@ void MyMoneySeqAccessMgr::loadTransactions(const TQMap<TQString, MyMoneyTransact int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextTransactionID = atol(lastId.mid(pos)); + m_nextTransactionID = lastId.mid(pos).toLong(); } } @@ -1066,7 +1066,7 @@ void MyMoneySeqAccessMgr::loadInstitutions(const TQMap<TQString, MyMoneyInstitut int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextInstitutionID = atol(lastId.mid(pos)); + m_nextInstitutionID = lastId.mid(pos).toLong(); } } @@ -1087,7 +1087,7 @@ void MyMoneySeqAccessMgr::loadPayees(const TQMap<TQString, MyMoneyPayee>& map) int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextPayeeID = atol(lastId.mid(pos)); + m_nextPayeeID = lastId.mid(pos).toLong(); } } @@ -1105,7 +1105,7 @@ void MyMoneySeqAccessMgr::loadSecurities(const TQMap<TQString, MyMoneySecurity>& int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextSecurityID = atol(lastId.mid(pos)); + m_nextSecurityID = lastId.mid(pos).toLong(); } } @@ -1329,7 +1329,7 @@ void MyMoneySeqAccessMgr::loadSchedules(const TQMap<TQString, MyMoneySchedule>& int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextScheduleID = atol(lastId.mid(pos)); + m_nextScheduleID = lastId.mid(pos).toLong(); } } @@ -1531,7 +1531,7 @@ void MyMoneySeqAccessMgr::loadReports(const TQMap<TQString, MyMoneyReport>& map) int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextReportID = atol(lastId.mid(pos)); + m_nextReportID = lastId.mid(pos).toLong(); } } @@ -1605,7 +1605,7 @@ void MyMoneySeqAccessMgr::loadBudgets(const TQMap<TQString, MyMoneyBudget>& map) int pos = lastId.find(TQRegExp("\\d+"), 0); if(pos != -1) { - m_nextBudgetID = atol(lastId.mid(pos)); + m_nextBudgetID = lastId.mid(pos).toLong(); } } diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp index c2f48cf..99f517e 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp @@ -486,7 +486,7 @@ void MyMoneySeqAccessMgrTest::testReparentAccount() { CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 2); CPPUNIT_ASSERT(ex3.parentAccountId() == ex1.id()); } catch (MyMoneyException *e) { - std::cout << std::endl << e->what() << std::endl; + std::cout << std::endl << e->what().local8Bit() << std::endl; delete e; CPPUNIT_FAIL("Unexpected exception"); } diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp index 1b8e694..e5914bb 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp @@ -64,10 +64,10 @@ MyMoneySqlQuery::MyMoneySqlQuery (MyMoneyStorageSql* db) } bool MyMoneySqlQuery::exec () { - TRACE(TQString("start sql - %1").arg(lastQuery())); + TRACE(TQString("start sql - %1").arg(lastQuery()).local8Bit()); bool rc = TQSqlQuery::exec(); TQString msg("end sql\n%1\n***Query returned %2, row count %3"); - TRACE (msg.arg(TQSqlQuery::executedQuery()).arg(rc).arg(numRowsAffected())); + TRACE(msg.arg(TQSqlQuery::executedQuery()).arg(rc).arg(numRowsAffected()).local8Bit()); //DBG (TQString("%1\n***Query returned %2, row count %3").arg(TQSqlQuery::executedQuery()).arg(rc).arg(size())); return (rc); } diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp index c1c0324..2e783f5 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp @@ -260,7 +260,7 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void) ofx_set_account_cb(ctx, ofxAccountCallback, this); ofx_set_status_cb(ctx, ofxStatusCallback, this); // Add resulting accounts to the account list - libofx_proc_file(ctx, filename.path(), AUTODETECT); + libofx_proc_file(ctx, filename.path().local8Bit(), AUTODETECT); libofx_free_context(ctx); ++m_it_info; diff --git a/kmymoney2/plugins/ofximport/ofxpartner.cpp b/kmymoney2/plugins/ofximport/ofxpartner.cpp index 5ae2f1b..42ea560 100644 --- a/kmymoney2/plugins/ofximport/ofxpartner.cpp +++ b/kmymoney2/plugins/ofximport/ofxpartner.cpp @@ -360,7 +360,7 @@ void OfxHttpsRequest::slotOfxFinished(TDEIO::Job* /* e */) int error = m_job->error(); if ( error ) { m_job->showErrorDialog(); - unlink(m_dst.path()); + unlink(m_dst.path().local8Bit()); } else if ( m_job->isErrorPage() ) { TQString details; @@ -374,7 +374,7 @@ void OfxHttpsRequest::slotOfxFinished(TDEIO::Job* /* e */) f.close(); } KMessageBox::detailedSorry( 0, i18n("The HTTP request failed."), details, i18n("Failed") ); - unlink(m_dst.path()); + unlink(m_dst.path().local8Bit()); } tqApp->exit_loop(); @@ -414,7 +414,7 @@ OfxHttpRequest::OfxHttpRequest(const TQString& type, const KURL &url, const TQBy if(m_error != TQHttp::NoError) { KMessageBox::error(0, errorMsg, i18n("OFX setup error")); - unlink(dst.path()); + unlink(dst.path().local8Bit()); } } diff --git a/kmymoney2/reports/objectinfotable.cpp b/kmymoney2/reports/objectinfotable.cpp index 75ed019..1e80538 100644 --- a/kmymoney2/reports/objectinfotable.cpp +++ b/kmymoney2/reports/objectinfotable.cpp @@ -172,7 +172,7 @@ void ObjectInfoTable::constructScheduleTable ( void ) scheduleRow["name"] = schedule.name(); scheduleRow["nextduedate"] = schedule.nextDueDate().toString ( Qt::ISODate ); scheduleRow["type"] = KMyMoneyUtils::scheduleTypeToString ( schedule.type() ); - scheduleRow["occurence"] = i18n( schedule.occurenceToString() ); + scheduleRow["occurence"] = i18n(schedule.occurenceToString().utf8()); scheduleRow["paymenttype"] = KMyMoneyUtils::paymentMethodToString ( schedule.paymentType() ); //scheduleRow["category"] = account.name(); diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp index 6035d20..3deb988 100644 --- a/kmymoney2/reports/pivottable.cpp +++ b/kmymoney2/reports/pivottable.cpp @@ -1636,7 +1636,7 @@ TQString PivotTable::renderHTML( void ) const for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { result += TQString("<td%2>%1</td>") - .arg(i18n( m_columnTypeHeaderList[i] )) + .arg(i18n(m_columnTypeHeaderList[i].utf8())) .arg(i == 0 ? lb : TQString() ); } column++; @@ -1644,7 +1644,7 @@ TQString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { result += TQString("<td%2>%1</td>") - .arg(i18n( m_columnTypeHeaderList[i] )) + .arg(i18n(m_columnTypeHeaderList[i].utf8())) .arg(i == 0 ? leftborder : TQString() ); } } diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp index 86157f4..8b98b2a 100644 --- a/kmymoney2/views/khomeview.cpp +++ b/kmymoney2/views/khomeview.cpp @@ -636,7 +636,7 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) try { MyMoneyAccount acc = sched.account(); - if(acc.id()) { + if(!acc.id().isEmpty()) { MyMoneyTransaction t = sched.transaction(); // only show the entry, if it is still active // FIXME clean old code @@ -1177,7 +1177,7 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) } else if(view == "action") { TDEMainWindow* mw = dynamic_cast<TDEMainWindow*>(tqApp->mainWidget()); TQ_CHECK_PTR(mw); - TQTimer::singleShot(0, mw->actionCollection()->action( id ), TQT_SLOT(activate())); + TQTimer::singleShot(0, mw->actionCollection()->action(id.utf8()), TQT_SLOT(activate())); } else if(view == VIEW_HOME) { TQValueList<MyMoneyAccount> list; @@ -1653,7 +1653,7 @@ void KHomeView::showCashFlowSummary() } MyMoneyAccount acc = (*sched_it).account(); - if(acc.id()) { + if(!acc.id().isEmpty()) { MyMoneyTransaction transaction = (*sched_it).transaction(); // only show the entry, if it is still active diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index 696e09f..6932a1b 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -1150,7 +1150,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); } } - chown(filename, static_cast<uid_t>(-1), gid); + chown(filename.local8Bit(), static_cast<uid_t>(-1), gid); } else { KTempFile tmpfile; saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList); diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp index fbadc58..386e56f 100644 --- a/kmymoney2/views/kreportsview.cpp +++ b/kmymoney2/views/kreportsview.cpp @@ -549,10 +549,10 @@ void KReportsView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args * else if ( command == "delete" ) slotDelete(); else - tqDebug("Unknown command '%s' in KReportsView::slotOpenURL()", static_cast<const char*>(command)); + tqDebug(TQString("Unknown command '%1' in KReportsView::slotOpenURL()").arg(command)); } else { - tqDebug("Unknown view '%s' in KReportsView::slotOpenURL()", view.latin1()); + tqDebug(TQString("Unknown view '%1' in KReportsView::slotOpenURL()").arg(view)); } } diff --git a/kmymoney2/views/kscheduledlistitem.cpp b/kmymoney2/views/kscheduledlistitem.cpp index c96fab7..3e30f8e 100644 --- a/kmymoney2/views/kscheduledlistitem.cpp +++ b/kmymoney2/views/kscheduledlistitem.cpp @@ -143,7 +143,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney else setText(4, TDEGlobal::locale()->formatDate(schedule.adjustedNextDueDate(), true)); - setText(5, i18n(schedule.occurenceToString())); + setText(5, i18n(schedule.occurenceToString().utf8())); setText(6, KMyMoneyUtils::paymentMethodToString(schedule.paymentType())); } catch (MyMoneyException *e) diff --git a/kmymoney2/widgets/kmymoneybriefschedule.cpp b/kmymoney2/widgets/kmymoneybriefschedule.cpp index 53085f0..0c89162 100644 --- a/kmymoney2/widgets/kmymoneybriefschedule.cpp +++ b/kmymoney2/widgets/kmymoneybriefschedule.cpp @@ -114,12 +114,12 @@ void KMyMoneyBriefSchedule::loadSchedule() .arg(TDEGlobal::locale()->formatDate(m_date, true)) .arg(amount.formatMoney(sched.account().fraction())) .arg(TQString::number(transactions)) - .arg(i18n(sched.occurenceToString())); + .arg(i18n(sched.occurenceToString().utf8())); } else { text = i18n("Payment on %1 for %2 occuring %4.") .arg(TDEGlobal::locale()->formatDate(m_date, true)) .arg(amount.formatMoney(sched.account().fraction())) - .arg(i18n(sched.occurenceToString())); + .arg(i18n(sched.occurenceToString().utf8())); } if (m_date < TQDate::currentDate()) diff --git a/kmymoney2/widgets/kmymoneycombo.cpp b/kmymoney2/widgets/kmymoneycombo.cpp index a9c698b..9695a60 100644 --- a/kmymoney2/widgets/kmymoneycombo.cpp +++ b/kmymoney2/widgets/kmymoneycombo.cpp @@ -741,33 +741,33 @@ MyMoneySchedule::occurenceE KMyMoneyOccurenceCombo::currentItem(void) const KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(TQWidget* parent, const char* name) : KMyMoneyOccurenceCombo(parent, name) { - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE); - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY); - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_WEEKLY)), MyMoneySchedule::OCCUR_WEEKLY); - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH)), MyMoneySchedule::OCCUR_EVERYHALFMONTH); - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_MONTHLY)), MyMoneySchedule::OCCUR_MONTHLY); - insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_YEARLY)), MyMoneySchedule::OCCUR_YEARLY); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_ONCE).utf8()), MyMoneySchedule::OCCUR_ONCE); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_DAILY).utf8()), MyMoneySchedule::OCCUR_DAILY); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_WEEKLY).utf8()), MyMoneySchedule::OCCUR_WEEKLY); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH).utf8()), MyMoneySchedule::OCCUR_EVERYHALFMONTH); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_MONTHLY).utf8()), MyMoneySchedule::OCCUR_MONTHLY); + insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_YEARLY).utf8()), MyMoneySchedule::OCCUR_YEARLY); } KMyMoneyFrequencyCombo::KMyMoneyFrequencyCombo(TQWidget* parent, const char* name) : KMyMoneyOccurenceCombo(parent, name) { - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY)), MyMoneySchedule::OCCUR_WEEKLY); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK)), MyMoneySchedule::OCCUR_EVERYOTHERWEEK); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH)), MyMoneySchedule::OCCUR_EVERYHALFMONTH); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS)), MyMoneySchedule::OCCUR_EVERYTHREEWEEKS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS)), MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS)), MyMoneySchedule::OCCUR_EVERYFOURWEEKS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY)), MyMoneySchedule::OCCUR_MONTHLY); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS)), MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH)), MyMoneySchedule::OCCUR_EVERYOTHERMONTH); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS)), MyMoneySchedule::OCCUR_EVERYTHREEMONTHS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS)), MyMoneySchedule::OCCUR_EVERYFOURMONTHS); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY)), MyMoneySchedule::OCCUR_TWICEYEARLY); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY)), MyMoneySchedule::OCCUR_YEARLY); - insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR)), MyMoneySchedule::OCCUR_EVERYOTHERYEAR); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE).utf8()), MyMoneySchedule::OCCUR_ONCE); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY).utf8()), MyMoneySchedule::OCCUR_DAILY); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_WEEKLY).utf8()), MyMoneySchedule::OCCUR_WEEKLY); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERWEEK).utf8()), MyMoneySchedule::OCCUR_EVERYOTHERWEEK); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYHALFMONTH).utf8()), MyMoneySchedule::OCCUR_EVERYHALFMONTH); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS).utf8()), MyMoneySchedule::OCCUR_EVERYTHREEWEEKS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS).utf8()), MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURWEEKS).utf8()), MyMoneySchedule::OCCUR_EVERYFOURWEEKS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY).utf8()), MyMoneySchedule::OCCUR_MONTHLY); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS).utf8()), MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH).utf8()), MyMoneySchedule::OCCUR_EVERYOTHERMONTH); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS).utf8()), MyMoneySchedule::OCCUR_EVERYTHREEMONTHS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS).utf8()), MyMoneySchedule::OCCUR_EVERYFOURMONTHS); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY).utf8()), MyMoneySchedule::OCCUR_TWICEYEARLY); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY).utf8()), MyMoneySchedule::OCCUR_YEARLY); + insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR).utf8()), MyMoneySchedule::OCCUR_EVERYOTHERYEAR); } int KMyMoneyFrequencyCombo::daysBetweenEvents(void) const 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 |