diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:37:08 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:37:08 -0600 |
commit | c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6 (patch) | |
tree | 9a07481bb1245dac332e7db600c556e1db79ecf3 /kmymoney2/views/kmymoneyview.cpp | |
parent | 28723595822268551d3e050c3a83bf6ca5e17dd5 (diff) | |
download | kmymoney-c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6.tar.gz kmymoney-c70e40bd3f54a2c4d9ef57a36f19c996f4e00ed6.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'kmymoney2/views/kmymoneyview.cpp')
-rw-r--r-- | kmymoney2/views/kmymoneyview.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index c28bc26..5101628 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -583,7 +583,7 @@ bool KMyMoneyView::readFile(const KURL& url) } else { if(!KIO::NetAccess::download(url, filename, NULL)) { KMessageBox::detailedError(this, - i18n("Error while loading file '%1'!").tqarg(url.url()), + i18n("Error while loading file '%1'!").arg(url.url()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -595,7 +595,7 @@ bool KMyMoneyView::readFile(const KURL& url) TQFile file(filename); TQFileInfo info(file); if(!info.isFile()) { - TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").tqarg(filename); + TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").arg(filename); KMessageBox::error(this, TQString("<p>")+msg, i18n("Filetype Error")); return false; } @@ -636,7 +636,7 @@ bool KMyMoneyView::readFile(const KURL& url) haveAt = false; isEncrypted = true; } else { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").arg(filename))); qfile = TQT_TQIODEVICE(new TQFile(file.name())); } } else { @@ -714,18 +714,18 @@ bool KMyMoneyView::readFile(const KURL& url) ::timetrace("done reading to memory"); } else { if(m_fileType == KmmBinary) { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").arg(filename))); } else { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").arg(filename))); } rc = false; } } else { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").arg(filename))); rc = false; } } catch (MyMoneyException *e) { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").tqarg(filename, e->what()))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").arg(filename, e->what()))); delete e; rc = false; } @@ -735,13 +735,13 @@ bool KMyMoneyView::readFile(const KURL& url) } qfile->close(); } else { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); rc = false; } delete qfile; } } else { - KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); rc = false; } @@ -805,7 +805,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { retry = false; break; case 1: // permanent error - KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(dbURL.prettyURL()), reader->lastError()); + KMessageBox::detailedError (this, i18n("Can't open database %1\n").arg(dbURL.prettyURL()), reader->lastError()); if (pDBMgr) { removeStorage(); delete pDBMgr; @@ -911,7 +911,7 @@ bool KMyMoneyView::initializeStorage() // Check if we have to modify the file before we allow to work with it IMyMoneyStorage* s = MyMoneyFile::instance()->storage(); while (s->fileFixVersion() < s->currentFixVersion()) { - qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(s->currentFixVersion())).data()); + qDebug("%s", (TQString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data()); switch (s->fileFixVersion()) { case 0: fixFile_0(); @@ -984,7 +984,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(KMyMoneyGlobalSettings::encryptRecover()) { encryptRecover = true; if(!KGPGFile::keyAvailable(TQString(RECOVER_KEY_ID))) { - KMessageBox::sorry(this, TQString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").tqarg(RECOVER_KEY_ID), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").arg(RECOVER_KEY_ID), i18n("GPG-Key not found")); encryptRecover = false; } } @@ -993,7 +993,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.begin(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) { - KMessageBox::sorry(this, TQString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").tqarg(*it_s), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").arg(*it_s), i18n("GPG-Key not found")); encryptedOk = false; } } @@ -1031,7 +1031,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); } } else if(!plaintext) { @@ -1045,7 +1045,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); } statusDevice = base->device(); } @@ -1054,11 +1054,11 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter ft.commit(); pWriter->setProgressCallback(&KMyMoneyView::progressCallback); - dev->reseStatus(); + dev->resetStatus(); pWriter->writeFile(dev, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())); MyMoneyFile::instance()->blockSignals(blocked); if(statusDevice->status() != IO_Ok) { - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); } pWriter->setProgressCallback(0); @@ -1067,7 +1067,7 @@ void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter dev->close(); if(statusDevice->status() != IO_Ok) { delete dev; - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); } delete dev; } else @@ -1115,7 +1115,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) bool rc = true; try { if(! url.isValid()) { - throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").arg(url.url())); } if(url.isLocalFile()) { @@ -1144,10 +1144,10 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) } catch (MyMoneyException* e) { qfile.abort(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); } } else { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); } } chown(filename, static_cast<uid_t>(-1), gid); @@ -1155,7 +1155,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) KTempFile tmpfile; saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList); if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL)) - throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url())); tmpfile.unlink(); } m_fileType = KmmXML; @@ -1210,7 +1210,7 @@ bool KMyMoneyView::saveAsDatabase(const KURL& url) KMessageBox::detailedError (this, i18n("Can't open or create database %1\n" "Retry SaveAsDatabase and click Help" - " for further info").tqarg(url.prettyURL()), writer->lastError()); + " for further info").arg(url.prettyURL()), writer->lastError()); } delete writer; return (rc); @@ -1268,7 +1268,7 @@ void KMyMoneyView::slotSetBaseCurrency(const MyMoneySecurity& baseCurrency) MyMoneyFile::instance()->setBaseCurrency(baseCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency")); delete e; } } @@ -1568,7 +1568,7 @@ void KMyMoneyView::loadAncientCurrencies(void) // Source: http://www.focus.de/finanzen/news/malta-und-zypern_aid_66058.html loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", TQDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); - loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); + loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").arg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); // Source: http://www.focus.de/finanzen/news/waehrungszone-slowakei-ist-neuer-euro-staat_aid_359025.html loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", TQDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); @@ -1884,7 +1884,7 @@ void KMyMoneyView::fixLoanAccount_0(MyMoneyAccount acc) i18n("The account \"%1\" was previously created as loan account but some information " "is missing. The new loan wizard will be started to collect all relevant " "information. Please use a KMyMoney version >= 0.8.7 and < 0.9 to correct the problem." - ).tqarg(acc.name()), + ).arg(acc.name()), i18n("Account problem")); throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore"); |