summaryrefslogtreecommitdiffstats
path: root/kmymoney2/kmymoney2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/kmymoney2.cpp')
-rw-r--r--kmymoney2/kmymoney2.cpp264
1 files changed, 132 insertions, 132 deletions
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index e6ea813..4e03477 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -34,9 +34,9 @@
#include <tqdir.h>
#include <tqprinter.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqsignalmapper.h>
-#include <clipboard.h> // temp for problem 1105503
+#include <tqclipboard.h> // temp for problem 1105503
#include <tqdatetime.h> // only for performance tests
#include <tqtimer.h>
#include <tqsqlpropertymap.h>
@@ -199,7 +199,7 @@ KMyMoney2App::KMyMoney2App(TQWidget * /*parent*/ , const char* name) :
TQFrame* frame = new TQFrame(this);
frame->setFrameStyle(TQFrame::NoFrame);
// values for margin (11) and spacing(6) taken from KDialog implementation
- TQBoxLayout* layout = new TQBoxLayout(frame, TQBoxLayout::TopToBottom, 2, 6);
+ TQBoxLayout* tqlayout = new TQBoxLayout(frame, TQBoxLayout::TopToBottom, 2, 6);
::timetrace("init statusbar");
initStatusBar();
@@ -210,7 +210,7 @@ KMyMoney2App::KMyMoney2App(TQWidget * /*parent*/ , const char* name) :
::timetrace("create view");
myMoneyView = new KMyMoneyView(frame, "KMyMoneyView");
- layout->addWidget(myMoneyView, 10);
+ tqlayout->addWidget(myMoneyView, 10);
connect(myMoneyView, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotResetSelections()));
///////////////////////////////////////////////////////////////////
@@ -558,7 +558,7 @@ void KMyMoney2App::initStatusBar(void)
progressBar->setLineWidth(0);
progressBar->setBackgroundMode(TQWidget::PaletteBackground);
statusBar()->addWidget(progressBar);
- progressBar->setFixedHeight(progressBar->sizeHint().height() - 8);
+ progressBar->setFixedHeight(progressBar->tqsizeHint().height() - 8);
// hide the progress bar for now
slotStatusProgressBar(-1, -1);
@@ -722,7 +722,7 @@ void KMyMoney2App::slotPerformanceTest(void)
measurement[0] = measurement[1] = 0;
if(MyMoneyFile::instance()->asset().accountCount()) {
MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]);
- filter.setDateFilter(TQDate(), TQDate::currentDate());
+ filter.setDateFilter(TQDate(), TQDate::tqcurrentDate());
TQValueList<MyMoneyTransaction> list;
timer.start();
@@ -741,7 +741,7 @@ void KMyMoney2App::slotPerformanceTest(void)
measurement[0] = measurement[1] = 0;
if(MyMoneyFile::instance()->asset().accountCount()) {
MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]);
- filter.setDateFilter(TQDate(), TQDate::currentDate());
+ filter.setDateFilter(TQDate(), TQDate::tqcurrentDate());
TQValueList<MyMoneyTransaction> list;
timer.start();
@@ -874,7 +874,7 @@ void KMyMoney2App::slotFileOpen(void)
KMSTATUS(i18n("Open a file."));
KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(),
- i18n("%1|KMyMoney files\n%2|All files (*.*)").arg("*.kmy *.xml").arg("*"),
+ i18n("%1|KMyMoney files\n%2|All files (*.*)").tqarg("*.kmy *.xml").tqarg("*"),
this, i18n("Open File..."), true);
dialog->setMode(KFile::File | KFile::ExistingOnly);
@@ -988,10 +988,10 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url)
}
} else {
slotFileClose();
- KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found"));
+ KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found"));
}
} else {
- KMessageBox::sorry(this, TQString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open"));
+ KMessageBox::sorry(this, TQString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open"));
}
}
@@ -1039,7 +1039,7 @@ void KMyMoney2App::slotManageGpgKeys(void)
dlg.setKeys(m_additionalGpgKeys);
if(dlg.exec() == TQDialog::Accepted) {
m_additionalGpgKeys = dlg.keys();
- m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count()));
+ m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count()));
}
}
@@ -1051,7 +1051,7 @@ void KMyMoney2App::slotKeySelected(int idx)
}
m_additionalKeyLabel->setEnabled(idx != 0);
m_additionalKeyButton->setEnabled(idx != 0);
- m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(cnt));
+ m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(cnt));
}
bool KMyMoney2App::slotFileSaveAs(void)
@@ -1075,7 +1075,7 @@ bool KMyMoney2App::slotFileSaveAs(void)
m_saveEncrypted = new KComboBox(keyBox);
TQHBox* labelBox = new TQHBox(vbox);
- m_additionalKeyLabel = new TQLabel(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count()), labelBox);
+ m_additionalKeyLabel = new TQLabel(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count()), labelBox);
m_additionalKeyButton = new KPushButton(i18n("Manage additional keys"), labelBox);
connect(m_additionalKeyButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotManageGpgKeys()));
connect(m_saveEncrypted, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotKeySelected(int)));
@@ -1092,7 +1092,7 @@ bool KMyMoney2App::slotFileSaveAs(void)
TQString name = fields[1];
name.replace('(', "[");
name.replace(')', "]");
- name = TQString("%1 (0x%2)").arg(name).arg(fields[0]);
+ name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]);
m_saveEncrypted->insertItem(name);
if(name.contains(KMyMoneyGlobalSettings::gpgRecipient())) {
m_saveEncrypted->setCurrentItem(name);
@@ -1106,10 +1106,10 @@ bool KMyMoney2App::slotFileSaveAs(void)
// enhanced to show the m_saveEncrypted combo box
bool specialDir = prevDir.at(0) == ':';
KFileDialog dlg( specialDir ? prevDir : TQString(),
- TQString("%1|%2\n").arg("*.kmy").arg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) +
- TQString("%1|%2\n").arg("*.xml").arg(i18n("XML (Filefilter)", "XML files")) +
- TQString("%1|%2\n").arg("*.anon.xml").arg(i18n("Anonymous (Filefilter)", "Anonymous files")) +
- TQString("%1|%2\n").arg("*").arg(i18n("All files")),
+ TQString("%1|%2\n").tqarg("*.kmy").tqarg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) +
+ TQString("%1|%2\n").tqarg("*.xml").tqarg(i18n("XML (Filefilter)", "XML files")) +
+ TQString("%1|%2\n").tqarg("*.anon.xml").tqarg(i18n("Anonymous (Filefilter)", "Anonymous files")) +
+ TQString("%1|%2\n").tqarg("*").tqarg(i18n("All files")),
this, "filedialog", true, vbox);
connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAsFilterChanged(const TQString&)));
@@ -1428,7 +1428,7 @@ void KMyMoney2App::slotFileViewPersonal(void)
file->setUser(user);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::information(this, i18n("Unable to store user information: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to store user information: %1").tqarg(e->what()));
delete e;
}
}
@@ -1466,7 +1466,7 @@ void KMyMoney2App::slotLoadAccountTemplates(void)
}
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -1622,7 +1622,7 @@ void KMyMoney2App::slotGncImport(void)
KMSTATUS(i18n("Importing a Gnucash file."));
KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(),
- i18n("%1|Gnucash files\n%2|All files (*.*)").arg("*").arg("*"),
+ i18n("%1|Gnucash files\n%2|All files (*.*)").tqarg("*").tqarg("*"),
this, i18n("Import Gnucash file..."), true);
dialog->setMode(KFile::File | KFile::ExistingOnly);
@@ -1665,7 +1665,7 @@ void KMyMoney2App::slotStatementImport(void)
KMSTATUS(i18n("Importing an XML Statement."));
KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(),
- i18n("%1|XML files\n%2|All files (*.*)").arg("*.xml").arg("*.*"),
+ i18n("%1|XML files\n%2|All files (*.*)").tqarg("*.xml").tqarg("*.*"),
this, i18n("Import XML Statement..."), true);
dialog->setMode(KFile::File | KFile::ExistingOnly);
@@ -1702,7 +1702,7 @@ void KMyMoney2App::slotStatementImport(void)
if ( !result )
{
- TQMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").arg( dialog->selectedURL().path()).arg(error), TQMessageBox::Ok, 0 );
+ TQMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").tqarg( dialog->selectedURL().path()).tqarg(error), TQMessageBox::Ok, 0 );
}*/
}
@@ -1722,7 +1722,7 @@ bool KMyMoney2App::slotStatementImport(const TQString& url)
if ( MyMoneyStatement::readXMLFile( s, url ) )
result = slotStatementImport(s);
else
- KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").arg(url), i18n("Invalid Statement"));
+ KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").tqarg(url), i18n("Invalid Statement"));
return result;
}
@@ -1732,7 +1732,7 @@ bool KMyMoney2App::slotStatementImport(const MyMoneyStatement& s)
bool result = false;
// keep a copy of the statement
- MyMoneyStatement::writeXMLFile(s, TQString("/home/thb/kmm-statement-%1.txt").arg(d->statementXMLindex++));
+ MyMoneyStatement::writeXMLFile(s, TQString("/home/thb/kmm-statement-%1.txt").tqarg(d->statementXMLindex++));
// we use an object on the heap here, so that we can check the presence
// of it during slotUpdateActions() by looking at the pointer.
@@ -1792,7 +1792,7 @@ bool KMyMoney2App::okToWriteFile(const KURL& url)
bool reallySaveFile = true;
if(KIO::NetAccess::exists(url, true, this)) {
- if(KMessageBox::warningYesNo(this, TQString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").arg(url.prettyURL(0, KURL::StripFileProtocol))+TQString("</qt>"), i18n("File already exists")) != KMessageBox::Yes)
+ if(KMessageBox::warningYesNo(this, TQString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").tqarg(url.prettyURL(0, KURL::StripFileProtocol))+TQString("</qt>"), i18n("File already exists")) != KMessageBox::Yes)
reallySaveFile = false;
}
return reallySaveFile;
@@ -1917,7 +1917,7 @@ void KMyMoney2App::slotFileBackup(void)
if(!m_fileName.isLocalFile()) {
KMessageBox::sorry(this,
i18n("The current implementation of the backup functionality only supports local files as source files! Your current source file is '%1'.")
- .arg(m_fileName.url()),
+ .tqarg(m_fileName.url()),
i18n("Local files only"));
return;
@@ -1934,7 +1934,7 @@ void KMyMoney2App::slotFileBackup(void)
m_mountpoint = backupDlg->txtMountPoint->text();
if (m_backupMount) {
- progressCallback(0, 300, i18n("Mounting %1").arg(m_mountpoint));
+ progressCallback(0, 300, i18n("Mounting %1").tqarg(m_mountpoint));
proc << "mount";
proc << m_mountpoint;
proc.start();
@@ -1963,9 +1963,9 @@ void KMyMoney2App::slotProcessExited(void)
proc.clearArguments();
TQString today;
today.sprintf("-%04d-%02d-%02d.kmy",
- TQDate::currentDate().year(),
- TQDate::currentDate().month(),
- TQDate::currentDate().day());
+ TQDate::tqcurrentDate().year(),
+ TQDate::tqcurrentDate().month(),
+ TQDate::tqcurrentDate().day());
TQString backupfile = m_mountpoint + "/" + m_fileName.fileName(false);
KMyMoneyUtils::appendCorrectFileExt(backupfile, today);
@@ -1978,7 +1978,7 @@ void KMyMoney2App::slotProcessExited(void)
m_backupResult = 1;
if (m_backupMount) {
- progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint));
+ progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint));
proc.clearArguments();
proc << "umount";
proc << m_mountpoint;
@@ -1993,7 +1993,7 @@ void KMyMoney2App::slotProcessExited(void)
}
if(m_backupResult == 0) {
- progressCallback(50, 0, i18n("Writing %1").arg(backupfile));
+ progressCallback(50, 0, i18n("Writing %1").tqarg(backupfile));
proc << "cp" << "-f" << m_fileName.path(0) << backupfile;
m_backupState = BACKUP_COPYING;
proc.start();
@@ -2003,7 +2003,7 @@ void KMyMoney2App::slotProcessExited(void)
KMessageBox::information(this, i18n("Error mounting device"), i18n("Backup"));
m_backupResult = 1;
if (m_backupMount) {
- progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint));
+ progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint));
proc.clearArguments();
proc << "umount";
proc << m_mountpoint;
@@ -2022,7 +2022,7 @@ void KMyMoney2App::slotProcessExited(void)
if(proc.normalExit() && proc.exitStatus() == 0) {
if (m_backupMount) {
- progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint));
+ progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint));
proc.clearArguments();
proc << "umount";
proc << m_mountpoint;
@@ -2041,7 +2041,7 @@ void KMyMoney2App::slotProcessExited(void)
KMessageBox::information(this, i18n("Error copying file to device"), i18n("Backup"));
if (m_backupMount) {
- progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint));
+ progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint));
proc.clearArguments();
proc << "umount";
proc << m_mountpoint;
@@ -2153,7 +2153,7 @@ void KMyMoney2App::createInstitution(MyMoneyInstitution& institution)
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::information(this, i18n("Cannot add institution: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Cannot add institution: %1").tqarg(e->what()));
delete e;
}
}
@@ -2195,14 +2195,14 @@ void KMyMoney2App::slotInstitutionEdit(const MyMoneyObject& obj)
slotSelectInstitution(file->institution(dlg.institution().id()));
} catch(MyMoneyException *e) {
- KMessageBox::information(this, i18n("Unable to store institution: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to store institution: %1").tqarg(e->what()));
delete e;
}
}
} catch(MyMoneyException *e) {
if(!obj.id().isEmpty())
- KMessageBox::information(this, i18n("Unable to edit institution: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to edit institution: %1").tqarg(e->what()));
delete e;
}
}
@@ -2213,7 +2213,7 @@ void KMyMoney2App::slotInstitutionDelete(void)
try {
MyMoneyInstitution institution = file->institution(m_selectedInstitution.id());
- if ((KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").arg(institution.name()))) == KMessageBox::No)
+ if ((KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").tqarg(institution.name()))) == KMessageBox::No)
return;
MyMoneyFileTransaction ft;
@@ -2221,11 +2221,11 @@ void KMyMoney2App::slotInstitutionDelete(void)
file->removeInstitution(institution);
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what()));
delete e;
}
} catch (MyMoneyException *e) {
- KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what()));
delete e;
}
}
@@ -2278,7 +2278,7 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const
}
}
} catch (MyMoneyException *e) {
- KMessageBox::error(0, i18n("Unable to find account: %1").arg(e->what()));
+ KMessageBox::error(0, i18n("Unable to find account: %1").tqarg(e->what()));
delete e;
}
return nullAccount;
@@ -2325,8 +2325,8 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par
"Please click Yes to change the opening balance to %1,\n"
"Please click No to leave the amount as %2,\n"
"Please click Cancel to abort the account creation.")
- .arg((-openingBal).formatMoney(newAccount, sec))
- .arg(openingBal.formatMoney(newAccount, sec));
+ .tqarg((-openingBal).formatMoney(newAccount, sec))
+ .tqarg(openingBal.formatMoney(newAccount, sec));
int ans = KMessageBox::questionYesNoCancel(this, message);
if (ans == KMessageBox::Yes) {
@@ -2384,7 +2384,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par
}
catch (MyMoneyException *e)
{
- KMessageBox::information(this, i18n("Unable to add account: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to add account: %1").tqarg(e->what()));
delete e;
}
}
@@ -2402,7 +2402,7 @@ void KMyMoney2App::slotCategoryNew(const TQString& name, TQString& id)
void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& parent)
{
if(KMessageBox::questionYesNo(this,
- TQString("<qt>%1</qt>").arg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The parent account will default to <b>%2</b> but can be changed in the following dialog</i>.").arg(account.name()).arg(parent.name())), i18n("Create category"),
+ TQString("<qt>%1</qt>").tqarg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The parent account will default to <b>%2</b> but can be changed in the following dialog</i>.").tqarg(account.name()).tqarg(parent.name())), i18n("Create category"),
KStdGuiItem::yes(), KStdGuiItem::no(), "CreateNewCategories") == KMessageBox::Yes) {
createCategory(account, parent);
} else {
@@ -2410,8 +2410,8 @@ void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount
// I have seen in some usability tests. So we just delete it right away.
KConfig *kconfig = KGlobal::config();
if(kconfig) {
- kconfig->setGroup(TQString::fromLatin1("Notification Messages"));
- kconfig->deleteEntry(TQString::fromLatin1("CreateNewCategories"));
+ kconfig->setGroup(TQString::tqfromLatin1("Notification Messages"));
+ kconfig->deleteEntry(TQString::tqfromLatin1("CreateNewCategories"));
}
}
}
@@ -2461,7 +2461,7 @@ void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount&
void KMyMoney2App::slotAccountNew(void)
{
MyMoneyAccount acc;
- acc.setOpeningDate(TQDate::currentDate());
+ acc.setOpeningDate(TQDate::tqcurrentDate());
slotAccountNew(acc);
}
@@ -2523,7 +2523,7 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account)
ft.commit();
account = acc;
} catch (MyMoneyException *e) {
- KMessageBox::error(this, i18n("Unable to create account: %1").arg(e->what()));
+ KMessageBox::error(this, i18n("Unable to create account: %1").tqarg(e->what()));
}
}
}
@@ -2535,7 +2535,7 @@ void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccou
TQString dontShowAgain = "CreateNewInvestments";
if(KMessageBox::questionYesNo(this,
TQString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. "
- "Do you want to create it?").arg(account.name()).arg(parent.name())+TQString("</qt>"), i18n("Create security"),
+ "Do you want to create it?").tqarg(account.name()).tqarg(parent.name())+TQString("</qt>"), i18n("Create security"),
KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain) == KMessageBox::Yes) {
KNewInvestmentWizard dlg;
dlg.setName(account.name());
@@ -2569,14 +2569,14 @@ void KMyMoney2App::slotInvestmentEdit(void)
void KMyMoney2App::slotInvestmentDelete(void)
{
- if(KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").arg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").tqarg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) {
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneyFileTransaction ft;
try {
file->removeAccount(m_selectedInvestment);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::information(this, i18n("Unable to delete investment: %1").arg(e->what()));
+ KMessageBox::information(this, i18n("Unable to delete investment: %1").tqarg(e->what()));
delete e;
}
} else {
@@ -2584,8 +2584,8 @@ void KMyMoney2App::slotInvestmentDelete(void)
// I have seen in some usability tests. So we just delete it right away.
KConfig *kconfig = KGlobal::config();
if(kconfig) {
- kconfig->setGroup(TQString::fromLatin1("Notification Messages"));
- kconfig->deleteEntry(TQString::fromLatin1("DeleteInvestment"));
+ kconfig->setGroup(TQString::tqfromLatin1("Notification Messages"));
+ kconfig->deleteEntry(TQString::tqfromLatin1("DeleteInvestment"));
}
}
}
@@ -2809,7 +2809,7 @@ void KMyMoney2App::slotAccountDelete(void)
slotStatusProgressBar(blist.count(), 0);
}
} catch(MyMoneyException *e) {
- KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").arg(m_selectedAccount.name()).arg(newCategory.name()).arg(e->what()));
+ KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").tqarg(m_selectedAccount.name()).tqarg(newCategory.name()).tqarg(e->what()));
delete e;
exit = true;
}
@@ -2830,14 +2830,14 @@ void KMyMoney2App::slotAccountDelete(void)
// case A - only a single, unused category without subcats selected
if (m_selectedAccount.accountList().isEmpty()) {
- if (!needAskUser || (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").arg(m_selectedAccount.name())+TQString("</qt>")) == KMessageBox::Yes)) {
+ if (!needAskUser || (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").tqarg(m_selectedAccount.name())+TQString("</qt>")) == KMessageBox::Yes)) {
try {
file->removeAccount(m_selectedAccount);
m_selectedAccount.clearId();
slotUpdateActions();
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())+TQString("</qt>"));
+ KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>"));
delete e;
}
}
@@ -2851,7 +2851,7 @@ void KMyMoney2App::slotAccountDelete(void)
int result = KMessageBox::questionYesNoCancel(this, TQString("<qt>")+
i18n("Do you want to delete category <b>%1</b> with all its sub-categories or only "
"the category itself? If you only delete the category itself, all its sub-categories "
- "will be made sub-categories of <b>%2</b>.").arg(m_selectedAccount.name()).arg(parentAccount.name())+TQString("</qt>"),
+ "will be made sub-categories of <b>%2</b>.").tqarg(m_selectedAccount.name()).tqarg(parentAccount.name())+TQString("</qt>"),
TQString(),
KGuiItem(i18n("Delete all")),
KGuiItem(i18n("Just the category")));
@@ -2885,7 +2885,7 @@ void KMyMoney2App::slotAccountDelete(void)
}
if (!accountsToReparent.isEmpty() && need_confirmation) {
if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot "
- "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").arg(m_selectedAccount.name()).arg(parentAccount.name())) != KMessageBox::Yes) {
+ "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").tqarg(m_selectedAccount.name()).tqarg(parentAccount.name())) != KMessageBox::Yes) {
return; // user gets wet feet...
}
}
@@ -2904,7 +2904,7 @@ void KMyMoney2App::slotAccountDelete(void)
// the old account list, which is no longer valid
m_selectedAccount = file->account(m_selectedAccount.id());
} catch(MyMoneyException* e) {
- KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").arg(m_selectedAccount.name()).arg(e->what())+TQString("</qt>"));
+ KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>"));
delete e;
return;
}
@@ -2916,7 +2916,7 @@ void KMyMoney2App::slotAccountDelete(void)
return; // can't delete accounts which still have subaccounts
if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to "
- "delete account <b>%1</b>?").arg(m_selectedAccount.name())) != KMessageBox::Yes) {
+ "delete account <b>%1</b>?").tqarg(m_selectedAccount.name())) != KMessageBox::Yes) {
return; // ok, you don't want to? why did you click then, hmm?
}
} // switch;
@@ -2927,7 +2927,7 @@ void KMyMoney2App::slotAccountDelete(void)
slotUpdateActions();
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what()));
+ KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what()));
delete e;
}
}
@@ -2943,12 +2943,12 @@ void KMyMoney2App::slotAccountEdit(void)
bool category = false;
switch(MyMoneyAccount::accountGroup(m_selectedAccount.accountType())) {
default:
- caption = i18n("Edit account '%1'").arg(m_selectedAccount.name());
+ caption = i18n("Edit account '%1'").tqarg(m_selectedAccount.name());
break;
case MyMoneyAccount::Expense:
case MyMoneyAccount::Income:
- caption = i18n("Edit category '%1'").arg(m_selectedAccount.name());
+ caption = i18n("Edit category '%1'").tqarg(m_selectedAccount.name());
category = true;
break;
}
@@ -3034,7 +3034,7 @@ void KMyMoney2App::slotAccountEdit(void)
slotSelectAccount(file->account(account.id()));
} catch(MyMoneyException* e) {
- KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what()));
+ KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what()));
delete e;
}
}
@@ -3328,7 +3328,7 @@ bool KMyMoney2App::canCloseAccount(const MyMoneyAccount& acc) const
if(!acc.balance().isZero())
return false;
- // all children must be already closed
+ // all tqchildren must be already closed
TQStringList::const_iterator it_a;
for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) {
MyMoneyAccount a = MyMoneyFile::instance()->account(*it_a);
@@ -3405,7 +3405,7 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney
MyMoneyFile::instance()->modifyAccount(src);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").arg(src.name()).arg(_dst.name()).arg(e->what()));
+ KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(_dst.name()).tqarg(e->what()));
delete e;
}
}
@@ -3419,7 +3419,7 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney
MyMoneyFile::instance()->reparentAccount(src, dst);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").arg(src.name()).arg(dst.name()).arg(e->what()));
+ KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(dst.name()).tqarg(e->what()));
delete e;
}
}
@@ -3434,7 +3434,7 @@ void KMyMoney2App::slotAccountTransactionReport(void)
MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory,
MyMoneyTransactionFilter::yearToDate,
MyMoneyReport::eDetailAll,
- i18n("%1 YTD Account Transactions").arg(m_selectedAccount.name()),
+ i18n("%1 YTD Account Transactions").tqarg(m_selectedAccount.name()),
i18n("Generated Report")
);
report.setGroup(i18n("Transactions"));
@@ -3475,7 +3475,7 @@ void KMyMoney2App::slotScheduleNew(const MyMoneyTransaction& _t, MyMoneySchedule
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").arg(e->what()), i18n("Add scheduled transaction"));
+ KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").tqarg(e->what()), i18n("Add scheduled transaction"));
delete e;
}
}
@@ -3515,7 +3515,7 @@ void KMyMoney2App::slotScheduleEdit(void)
// than previous payment. Date would be
// updated automatically so we probably
// want to clear it. Let's ask the user.
- if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").arg(KGlobal::locale()->formatDate(next, true)).arg(KGlobal::locale()->formatDate(last, true))+TQString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").tqarg(KGlobal::locale()->formatDate(next, true)).tqarg(KGlobal::locale()->formatDate(last, true))+TQString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) {
sched.setLastPayment( TQDate() );
}
}
@@ -3525,7 +3525,7 @@ void KMyMoney2App::slotScheduleEdit(void)
deleteTransactionEditor();
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3545,7 +3545,7 @@ void KMyMoney2App::slotScheduleEdit(void)
MyMoneyFile::instance()->modifyAccount(loan_wiz->account());
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3557,7 +3557,7 @@ void KMyMoney2App::slotScheduleEdit(void)
}
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3569,7 +3569,7 @@ void KMyMoney2App::slotScheduleDelete(void)
MyMoneyFileTransaction ft;
try {
MyMoneySchedule sched = MyMoneyFile::instance()->schedule(m_selectedSchedule.id());
- TQString msg = TQString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").arg(m_selectedSchedule.name());
+ TQString msg = TQString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").tqarg(m_selectedSchedule.name());
if(sched.type() == MyMoneySchedule::TYPE_LOANPAYMENT) {
msg += TQString(" ");
msg += i18n("In case of loan payments it is currently not possible to recreate the scheduled transaction.");
@@ -3581,7 +3581,7 @@ void KMyMoney2App::slotScheduleDelete(void)
ft.commit();
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3595,7 +3595,7 @@ void KMyMoney2App::slotScheduleDuplicate(void)
MyMoneySchedule sch = m_selectedSchedule;
sch.clearId();
sch.setLastPayment(TQDate());
- sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").arg(sch.name()));
+ sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").tqarg(sch.name()));
MyMoneyFileTransaction ft;
try {
@@ -3607,7 +3607,7 @@ void KMyMoney2App::slotScheduleDuplicate(void)
myMoneyView->slotScheduleSelected(sch.id());
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -3621,7 +3621,7 @@ void KMyMoney2App::slotScheduleSkip(void)
if(!schedule.isFinished()) {
if(schedule.occurence() != MyMoneySchedule::OCCUR_ONCE) {
TQDate next = schedule.nextDueDate();
- if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").arg(schedule.name(), KGlobal::locale()->formatDate(next, true))+TQString("</qt>"))) == KMessageBox::Yes) {
+ if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").tqarg(schedule.name(), KGlobal::locale()->formatDate(next, true))+TQString("</qt>"))) == KMessageBox::Yes) {
MyMoneyFileTransaction ft;
schedule.setLastPayment(next);
schedule.setNextDueDate(schedule.nextPayment(next));
@@ -3631,7 +3631,7 @@ void KMyMoney2App::slotScheduleSkip(void)
}
}
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, TQString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").arg(m_selectedSchedule.name())+TQString("</qt>"), e->what());
+ KMessageBox::detailedSorry(this, TQString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").tqarg(m_selectedSchedule.name())+TQString("</qt>"), e->what());
delete e;
}
}
@@ -3644,7 +3644,7 @@ void KMyMoney2App::slotScheduleEnter(void)
MyMoneySchedule schedule = MyMoneyFile::instance()->schedule(m_selectedSchedule.id());
enterSchedule(schedule);
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3751,14 +3751,14 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched
ft.commit();
}
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
deleteTransactionEditor();
}
}
} catch (MyMoneyException *e) {
- KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what());
+ KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what());
delete e;
}
}
@@ -3771,15 +3771,15 @@ void KMyMoney2App::slotPayeeNew(const TQString& newnameBase, TQString& id)
if(newnameBase != i18n("New Payee")) {
// Ask the user if that is what he intended to do?
- TQString msg = TQString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").arg(newnameBase) + TQString("</qt>");
- const TQString dontAskAgain = TQString::fromLatin1("NewPayee");
+ TQString msg = TQString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").tqarg(newnameBase) + TQString("</qt>");
+ const TQString dontAskAgain = TQString::tqfromLatin1("NewPayee");
if(KMessageBox::questionYesNo(this, msg, i18n("New payee/receiver"), KStdGuiItem::yes(), KStdGuiItem::no(), dontAskAgain) == KMessageBox::No) {
doit = false;
// we should not keep the 'no' setting because that can confuse people like
// I have seen in some usability tests. So we just delete it right away.
KConfig *kconfig = KGlobal::config();
if(kconfig) {
- kconfig->setGroup(TQString::fromLatin1("Notification Messages"));
+ kconfig->setGroup(TQString::tqfromLatin1("Notification Messages"));
kconfig->deleteEntry(dontAskAgain);
}
}
@@ -3794,7 +3794,7 @@ void KMyMoney2App::slotPayeeNew(const TQString& newnameBase, TQString& id)
for(;;) {
try {
MyMoneyFile::instance()->payeeByName(newname);
- newname = TQString("%1 [%2]").arg(newnameBase).arg(++count);
+ newname = TQString("%1 [%2]").tqarg(newnameBase).tqarg(++count);
} catch(MyMoneyException* e) {
delete e;
break;
@@ -3808,7 +3808,7 @@ void KMyMoney2App::slotPayeeNew(const TQString& newnameBase, TQString& id)
ft.commit();
} catch (MyMoneyException *e) {
KMessageBox::detailedSorry(this, i18n("Unable to add payee"),
- TQString("%1 thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ TQString("%1 thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -3860,7 +3860,7 @@ void KMyMoney2App::slotPayeeDelete(void)
// get confirmation from user
TQString prompt;
if (m_selectedPayees.size() == 1)
- prompt = TQString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").arg(m_selectedPayees.front().name());
+ prompt = TQString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").tqarg(m_selectedPayees.front().name());
else
prompt = i18n("Do you really want to remove all selected payees?");
@@ -3960,7 +3960,7 @@ void KMyMoney2App::slotPayeeDelete(void)
} // for - Schedules
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to reassign payee of transaction/split"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
} // if !translist.isEmpty()
@@ -4017,7 +4017,7 @@ void KMyMoney2App::slotPayeeDelete(void)
} catch(MyMoneyException *e) {
KMessageBox::detailedSorry(0, i18n("Unable to remove payee(s)"),
- (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line()));
+ (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line()));
delete e;
}
}
@@ -4033,7 +4033,7 @@ void KMyMoney2App::slotCurrencyNew(void)
MyMoneyFile::instance()->addCurrency(currency);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::sorry(this, i18n("Cannot create new currency. %1").arg(e->what()), i18n("New currency"));
+ KMessageBox::sorry(this, i18n("Cannot create new currency. %1").tqarg(e->what()), i18n("New currency"));
delete e;
}
emit currencyCreated(id);
@@ -4055,12 +4055,12 @@ void KMyMoney2App::slotCurrencyRename(TQListViewItem* item, int, const TQString&
m_selectedCurrency = currency;
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency"));
+ KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency"));
delete e;
}
}
} catch(MyMoneyException *e) {
- KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency"));
+ KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency"));
delete e;
}
}
@@ -4073,7 +4073,7 @@ void KMyMoney2App::slotCurrencyDelete(void)
MyMoneyFile::instance()->removeCurrency(m_selectedCurrency);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Delete currency"));
+ KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Delete currency"));
delete e;
}
}
@@ -4088,7 +4088,7 @@ void KMyMoney2App::slotCurrencySetBase(void)
MyMoneyFile::instance()->setBaseCurrency(m_selectedCurrency);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Set base currency"));
+ KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Set base currency"));
delete e;
}
}
@@ -4097,9 +4097,9 @@ void KMyMoney2App::slotCurrencySetBase(void)
void KMyMoney2App::slotBudgetNew(void)
{
- TQDate date = TQDate::currentDate(Qt::LocalTime);
+ TQDate date = TQDate::tqcurrentDate(Qt::LocalTime);
date.setYMD(date.year(), 1, 1);
- TQString newname = i18n("Budget %1").arg(TQString::number(date.year()));
+ TQString newname = i18n("Budget %1").tqarg(TQString::number(date.year()));
MyMoneyBudget budget;
@@ -4109,7 +4109,7 @@ void KMyMoney2App::slotBudgetNew(void)
// Exception thrown when the name is not found
while (1) {
MyMoneyFile::instance()->budgetByName(newname);
- newname = i18n("Budget %1 (%2)").arg(TQString::number(date.year()), TQString::number(i++));
+ newname = i18n("Budget %1 (%2)").tqarg(TQString::number(date.year()), TQString::number(i++));
}
} catch(MyMoneyException *e) {
// all ok, the name is unique
@@ -4124,7 +4124,7 @@ void KMyMoney2App::slotBudgetNew(void)
MyMoneyFile::instance()->addBudget(budget);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4139,7 +4139,7 @@ void KMyMoney2App::slotBudgetDelete(void)
// get confirmation from user
TQString prompt;
if (m_selectedBudgets.size() == 1)
- prompt = TQString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").arg(m_selectedBudgets.front().name());
+ prompt = TQString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").tqarg(m_selectedBudgets.front().name());
else
prompt = i18n("Do you really want to remove all selected budgets?");
@@ -4156,7 +4156,7 @@ void KMyMoney2App::slotBudgetDelete(void)
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4168,12 +4168,12 @@ void KMyMoney2App::slotBudgetCopy(void)
try {
MyMoneyBudget budget = m_selectedBudgets[0];
budget.clearId();
- budget.setName(i18n("Copy of %1").arg(budget.name()));
+ budget.setName(i18n("Copy of %1").tqarg(budget.name()));
MyMoneyFile::instance()->addBudget(budget);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4186,8 +4186,8 @@ void KMyMoney2App::slotBudgetChangeYear(void)
int current = 0;
bool haveCurrent = false;
MyMoneyBudget budget = *(m_selectedBudgets.begin());
- for(int i = (TQDate::currentDate().year()-3); i < (TQDate::currentDate().year()+5); ++i) {
- years << TQString("%1").arg(i);
+ for(int i = (TQDate::tqcurrentDate().year()-3); i < (TQDate::tqcurrentDate().year()+5); ++i) {
+ years << TQString("%1").tqarg(i);
if(i == budget.budgetStart().year()) {
haveCurrent = true;
}
@@ -4210,7 +4210,7 @@ void KMyMoney2App::slotBudgetChangeYear(void)
MyMoneyFile::instance()->modifyBudget(budget);
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4248,7 +4248,7 @@ void KMyMoney2App::slotBudgetForecast(void)
ft.commit();
}
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4308,7 +4308,7 @@ void KMyMoney2App::slotNewFeature(void)
ft.commit();
}
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4337,7 +4337,7 @@ void KMyMoney2App::slotTransactionsDelete(void)
if(m_selectedTransactions.count() == 1) {
msg = i18n("Do you really want to delete the selected transaction?");
} else {
- msg = i18n("Do you really want to delete all %1 selected transactions?").arg(m_selectedTransactions.count());
+ msg = i18n("Do you really want to delete all %1 selected transactions?").tqarg(m_selectedTransactions.count());
}
if(KMessageBox::questionYesNo(this, msg, i18n("Delete transaction")) == KMessageBox::Yes) {
KMSTATUS(i18n("Deleting transactions"));
@@ -4373,7 +4373,7 @@ void KMyMoney2App::slotTransactionDuplicate(void)
t.setEntryDate(TQDate());
t.clearId();
// and set the post date to today
- t.setPostDate(TQDate::currentDate());
+ t.setPostDate(TQDate::tqcurrentDate());
MyMoneyFile::instance()->addTransaction(t);
lt = t;
@@ -4386,7 +4386,7 @@ void KMyMoney2App::slotTransactionDuplicate(void)
myMoneyView->slotLedgerSelected(m_selectedAccount.id(), lt.id());
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
// switch off the progress bar
@@ -4412,7 +4412,7 @@ void KMyMoney2App::doDeleteTransactions(void)
}
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
slotStatusProgressBar(-1, -1);
@@ -4496,7 +4496,7 @@ void KMyMoney2App::slotTransactionsEditSplits(void)
m_transactionEditor->enterTransactions(id);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4666,7 +4666,7 @@ void KMyMoney2App::markTransaction(MyMoneySplit::reconcileFlagE flag)
slotStatusProgressBar(-1, -1);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -4711,7 +4711,7 @@ void KMyMoney2App::slotTransactionsAccept(void)
slotStatusProgressBar(-1, -1);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line()));
+ KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line()));
delete e;
}
}
@@ -5113,7 +5113,7 @@ void KMyMoney2App::updateCaption(bool skipActions)
}
#if KMM_DEBUG
- caption += TQString(" (%1 x %2)").arg(width()).arg(height());
+ caption += TQString(" (%1 x %2)").tqarg(width()).tqarg(height());
#endif
caption = kapp->makeStdCaption(caption, false, modified);
@@ -5567,7 +5567,7 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa
m_payeeGoto = payee.id();
TQString name = payee.name();
name.replace(TQRegExp("&(?!&)"), "&&");
- action("transaction_goto_payee")->setText(i18n("Goto '%1'").arg(name));
+ action("transaction_goto_payee")->setText(i18n("Goto '%1'").tqarg(name));
}
} catch(MyMoneyException *e) {
delete e;
@@ -5589,7 +5589,7 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa
m_accountGoto = acc.id();
TQString name = acc.name();
name.replace(TQRegExp("&(?!&)"), "&&");
- action("transaction_goto_account")->setText(i18n("Goto '%1'").arg(name));
+ action("transaction_goto_account")->setText(i18n("Goto '%1'").tqarg(name));
break;
}
}
@@ -5706,7 +5706,7 @@ void KMyMoney2App::slotFileConsitencyCheck(void)
msg = MyMoneyFile::instance()->consistencyCheck();
ft.commit();
} catch(MyMoneyException *e) {
- msg = i18n("Consistency check failed: %1").arg(e->what());
+ msg = i18n("Consistency check failed: %1").tqarg(e->what());
delete e;
}
@@ -5721,7 +5721,7 @@ void KMyMoney2App::slotCheckSchedules(void)
KMSTATUS(i18n("Checking for overdue scheduled transactions..."));
MyMoneyFile *file = MyMoneyFile::instance();
- TQDate checkDate = TQDate::currentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview());
+ TQDate checkDate = TQDate::tqcurrentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview());
TQValueList<MyMoneySchedule> scheduleList = file->scheduleList();
TQValueList<MyMoneySchedule>::Iterator it;
@@ -5875,7 +5875,7 @@ void KMyMoney2App::webConnect(const TQString& url, const TQCString& asn_id)
TQValueList<MyMoneyStatement> statements;
if (!(*it_plugin)->import(url) )
{
- KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").arg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error"));
+ KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").tqarg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error"));
}
break;
@@ -5987,7 +5987,7 @@ void KMyMoney2App::slotAutoSave(void)
void KMyMoney2App::slotDateChanged(void)
{
- TQDateTime dt = TQDateTime::currentDateTime();
+ TQDateTime dt = TQDateTime::tqcurrentDateTime();
TQDateTime nextDay( TQDate(dt.date().addDays(1)), TQTime(0, 0, 0) );
TQTimer::singleShot(dt.secsTo(nextDay)*1000, TQT_TQOBJECT(this), TQT_SLOT(slotDateChanged()));
@@ -6029,7 +6029,7 @@ void KMyMoney2App::setAccountOnlineParameters(const MyMoneyAccount& _acc, const
ft.commit();
} catch(MyMoneyException *e) {
- KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").arg(_acc.name()), e->what() );
+ KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").tqarg(_acc.name()), e->what() );
delete e;
}
}
@@ -6044,7 +6044,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void)
if(m_selectedAccount.onlineBankingSettings().value("provider").isEmpty())
return;
- if(KMessageBox::warningYesNo(this, TQString("<qt>%1</qt>").arg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").arg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) {
+ if(KMessageBox::warningYesNo(this, TQString("<qt>%1</qt>").tqarg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").tqarg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) {
MyMoneyFileTransaction ft;
try {
m_selectedAccount.setOnlineBankingSettings(MyMoneyKeyValueContainer());
@@ -6055,7 +6055,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void)
MyMoneyFile::instance()->modifyAccount(m_selectedAccount);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").arg(e->what()));
+ KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").tqarg(e->what()));
delete e;
}
}
@@ -6121,7 +6121,7 @@ void KMyMoney2App::slotAccountMapOnline(void)
MyMoneyFile::instance()->modifyAccount(acc);
ft.commit();
} catch(MyMoneyException* e) {
- KMessageBox::error(this, i18n("Unable to map account to online account: %1").arg(e->what()));
+ KMessageBox::error(this, i18n("Unable to map account to online account: %1").tqarg(e->what()));
delete e;
}
}
@@ -6184,12 +6184,12 @@ void KMyMoney2App::slotAccountUpdateOnline(void)
}
}
-KMStatus::KMStatus (const TQString &text)
+KMtqStatus::KMtqStatus (const TQString &text)
{
m_prevText = kmymoney2->slotStatusMsg(text);
}
-KMStatus::~KMStatus()
+KMtqStatus::~KMtqStatus()
{
kmymoney2->slotStatusMsg(m_prevText);
}
@@ -6199,7 +6199,7 @@ void KMyMoney2App::Private::unlinkStatementXML(void)
TQDir d("/home/thb", "kmm-statement*");
for(int i=0; i < d.count(); ++i) {
qDebug("Remove %s", d[i].data());
- d.remove(TQString("/home/thb/%1").arg(d[i]));
+ d.remove(TQString("/home/thb/%1").tqarg(d[i]));
}
statementXMLindex = 0;
}