summaryrefslogtreecommitdiffstats
path: root/kmymoney2/kmymoney2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/kmymoney2.cpp')
-rw-r--r--kmymoney2/kmymoney2.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index b423559..d058367 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -1088,7 +1088,7 @@ bool KMyMoney2App::slotFileSaveAs(void)
for(TQStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) {
TQStringList fields = TQStringList::split(":", *it);
if(fields[0] != RECOVER_KEY_ID) {
- // replace tqparenthesis in name field with brackets
+ // replace parenthesis in name field with brackets
TQString name = fields[1];
name.tqreplace('(', "[");
name.tqreplace(')', "]");
@@ -2235,25 +2235,25 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const
static MyMoneyAccount nullAccount;
MyMoneyFile* file = MyMoneyFile::instance();
- TQValueList<MyMoneyAccount> tqparents;
+ TQValueList<MyMoneyAccount> parents;
try {
// search by id
if(!acc.id().isEmpty()) {
return file->account(acc.id());
}
- // collect the tqparents. in case tqparent does not have an id, we scan the all top-level accounts
+ // collect the parents. in case tqparent does not have an id, we scan the all top-level accounts
if(tqparent.id().isEmpty()) {
- tqparents << file->asset();
- tqparents << file->liability();
- tqparents << file->income();
- tqparents << file->expense();
- tqparents << file->equity();
+ parents << file->asset();
+ parents << file->liability();
+ parents << file->income();
+ parents << file->expense();
+ parents << file->equity();
} else {
- tqparents << tqparent;
+ parents << tqparent;
}
TQValueList<MyMoneyAccount>::const_iterator it_p;
- for(it_p = tqparents.begin(); it_p != tqparents.end(); ++it_p) {
- MyMoneyAccount tqparentAccount = *it_p;
+ for(it_p = parents.begin(); it_p != parents.end(); ++it_p) {
+ MyMoneyAccount parentAccount = *it_p;
// search by name (allow hierarchy)
int pos;
// check for ':' in the name and use it as separator for a hierarchy
@@ -2261,14 +2261,14 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const
while((pos = name.tqfind(MyMoneyFile::AccountSeperator)) != -1) {
TQString part = name.left(pos);
TQString remainder = name.mid(pos+1);
- const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part);
+ const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part);
if(existingAccount.id().isEmpty()) {
return existingAccount;
}
- tqparentAccount = existingAccount;
+ parentAccount = existingAccount;
name = remainder;
}
- const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, name);
+ const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, name);
if(!existingAccount.id().isEmpty()) {
if(acc.accountType() != MyMoneyAccount::UnknownAccountType) {
if(acc.accountType() != existingAccount.accountType())
@@ -2284,7 +2284,7 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const
return nullAccount;
}
-void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqparentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal)
+void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& parentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal)
{
MyMoneyFile* file = MyMoneyFile::instance();
@@ -2300,14 +2300,14 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqp
while((pos = newAccount.name().tqfind(MyMoneyFile::AccountSeperator)) != -1) {
TQString part = newAccount.name().left(pos);
TQString remainder = newAccount.name().mid(pos+1);
- const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part);
+ const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part);
if(existingAccount.id().isEmpty()) {
newAccount.setName(part);
- file->addAccount(newAccount, tqparentAccount);
- tqparentAccount = newAccount;
+ file->addAccount(newAccount, parentAccount);
+ parentAccount = newAccount;
} else {
- tqparentAccount = existingAccount;
+ parentAccount = existingAccount;
}
newAccount.setParentAccountId(TQString()); // make sure, there's no tqparent
newAccount.clearId(); // and no id set for adding
@@ -2336,7 +2336,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqp
return;
}
- file->addAccount(newAccount, tqparentAccount);
+ file->addAccount(newAccount, parentAccount);
// in case of a loan account, we add the initial payment
if((newAccount.accountType() == MyMoneyAccount::Loan
@@ -2371,7 +2371,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqp
// a brokerage account
} else if(newAccount.accountType() == MyMoneyAccount::Investment
&& !brokerageAccount.name().isEmpty()) {
- file->addAccount(brokerageAccount, tqparentAccount);
+ file->addAccount(brokerageAccount, parentAccount);
// set a link from the investment account to the brokerage account
file->modifyAccount(newAccount);
@@ -2450,11 +2450,11 @@ void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount&
KNewAccountDlg dialog(account, false, true, 0, 0, i18n("Create a new Category"));
if(dialog.exec() == TQDialog::Accepted) {
- MyMoneyAccount tqparentAccount, brokerageAccount;
+ MyMoneyAccount parentAccount, brokerageAccount;
account = dialog.account();
- tqparentAccount = dialog.tqparentAccount();
+ parentAccount = dialog.parentAccount();
- createAccount(account, tqparentAccount, brokerageAccount, MyMoneyMoney(0,1));
+ createAccount(account, parentAccount, brokerageAccount, MyMoneyMoney(0,1));
}
}
@@ -2483,7 +2483,7 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account)
MyMoneyFile* file = MyMoneyFile::instance();
try {
// create the account
- MyMoneyAccount tqparent = wizard->tqparentAccount();
+ MyMoneyAccount tqparent = wizard->parentAccount();
file->addAccount(acc, tqparent);
// tell the wizard about the account id which it
@@ -2845,13 +2845,13 @@ void KMyMoney2App::slotAccountDelete(void)
}
// case B - we have some subcategories, maybe the user does not want to
// delete them all, but just the category itself?
- MyMoneyAccount tqparentAccount = file->account(m_selectedAccount.tqparentAccountId());
+ MyMoneyAccount parentAccount = file->account(m_selectedAccount.parentAccountId());
TQStringList accountsToRetqparent;
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>.").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.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,13 +2885,13 @@ void KMyMoney2App::slotAccountDelete(void)
}
if (!accountsToRetqparent.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?").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.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...
}
}
// all good, now first reparent selected sub-categories
try {
- MyMoneyAccount tqparent = file->account(m_selectedAccount.tqparentAccountId());
+ MyMoneyAccount tqparent = file->account(m_selectedAccount.parentAccountId());
for (TQStringList::const_iterator it = accountsToRetqparent.begin(); it != accountsToRetqparent.end(); ++it) {
MyMoneyAccount child = file->account(*it);
file->reparentAccount(child, tqparent);
@@ -2998,7 +2998,7 @@ void KMyMoney2App::slotAccountEdit(void)
MyMoneyFileTransaction ft;
MyMoneyAccount account = dlg.account();
- MyMoneyAccount tqparent = dlg.tqparentAccount();
+ MyMoneyAccount tqparent = dlg.parentAccount();
if(it_plugin != m_onlinePlugins.end()) {
account.setOnlineBankingSettings((*it_plugin)->onlineBankingSettings(account.onlineBankingSettings()));
}
@@ -3009,7 +3009,7 @@ void KMyMoney2App::slotAccountEdit(void)
// we need to modify first, as reparent would override all other changes
file->modifyAccount(account);
- if(account.tqparentAccountId() != tqparent.id()) {
+ if(account.parentAccountId() != tqparent.id()) {
file->reparentAccount(account, tqparent);
}
if(!tid.isEmpty() && dlg.openingBalance().isZero()) {
@@ -3388,7 +3388,7 @@ void KMyMoney2App::slotAccountReopen(void)
while(a.isClosed()) {
a.setClosed(false);
file->modifyAccount(a);
- a = file->account(a.tqparentAccountId());
+ a = file->account(a.parentAccountId());
}
ft.commit();
} catch(MyMoneyException* e) {
@@ -3396,7 +3396,7 @@ void KMyMoney2App::slotAccountReopen(void)
}
}
-void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst)
+void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst)
{
MyMoneyAccount src(_src);
src.setInstitutionId(_dst.id());
@@ -3410,7 +3410,7 @@ void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMon
}
}
-void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst)
+void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst)
{
MyMoneyAccount src(_src);
MyMoneyAccount dst(_dst);
@@ -5584,7 +5584,7 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa
if(!acc.isIncomeExpense()) {
// for stock accounts we show the portfolio account
if(acc.isInvest()) {
- acc = MyMoneyFile::instance()->account(acc.tqparentAccountId());
+ acc = MyMoneyFile::instance()->account(acc.parentAccountId());
}
m_accountGoto = acc.id();
TQString name = acc.name();