summaryrefslogtreecommitdiffstats
path: root/kmymoney2/views/kmymoneyview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/views/kmymoneyview.cpp')
-rw-r--r--kmymoney2/views/kmymoneyview.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp
index e557aab..eba2a82 100644
--- a/kmymoney2/views/kmymoneyview.cpp
+++ b/kmymoney2/views/kmymoneyview.cpp
@@ -27,14 +27,14 @@
#include <tqlabel.h>
#include <tqfile.h>
-#include <textstream.h>
+#include <tqtextstream.h>
#include <tqprogressdialog.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqstatusbar.h>
#include <tqcursor.h>
#include <tqregexp.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqobjectlist.h>
// ----------------------------------------------------------------------------
@@ -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'!").arg(url.url()),
+ i18n("Error while loading file '%1'!").tqarg(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.").arg(filename);
+ TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").tqarg(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>").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").tqarg(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.").arg(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.").tqarg(filename)));
} else {
- KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").tqarg(filename)));
}
rc = false;
}
} else {
- KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").tqarg(filename)));
rc = false;
}
} catch (MyMoneyException *e) {
- KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").arg(filename, e->what())));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").tqarg(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!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename)));
rc = false;
}
delete qfile;
}
} else {
- KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename)));
+ KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(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").arg(dbURL.prettyURL()), reader->lastError());
+ KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(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").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data());
+ qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(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.").arg(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.").tqarg(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.").arg(*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.").tqarg(*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.").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(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.").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(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->resetqStatus();
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'").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(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'").arg(qfile->name()));
+ throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(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'").arg(url.url()));
+ throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(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'").arg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename));
}
} else {
- throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename));
+ throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(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'").arg(url.url()));
+ throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(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").arg(url.prettyURL()), writer->lastError());
+ " for further info").tqarg(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").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency"));
+ KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(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").arg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR");
+ loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(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."
- ).arg(acc.name()),
+ ).tqarg(acc.name()),
i18n("Account problem"));
throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore");
@@ -2189,7 +2189,7 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const TQString& title, const TQString& i
// ----------------------------------------------------------------------------
// QT Includes
-#include <layout.h>
+#include <tqlayout.h>
#include <tqvbox.h>
// ----------------------------------------------------------------------------
@@ -2240,7 +2240,7 @@ void KMyMoneyViewBase::addWidget(TQWidget* w)
d->m_viewLayout->addWidget(w);
}
-TQVBoxLayout* KMyMoneyViewBase::layout(void) const
+TQVBoxLayout* KMyMoneyViewBase::tqlayout(void) const
{
return d->m_viewLayout;
}