Revision f1b5f31a
Von martin vor etwa 16 Jahren hinzugefügt
configure.ac | ||
---|---|---|
AQBANKING_VERSION_MAJOR=4
|
||
AQBANKING_VERSION_MINOR=0
|
||
AQBANKING_VERSION_PATCHLEVEL=0
|
||
AQBANKING_VERSION_BUILD=0
|
||
AQBANKING_VERSION_BUILD=1
|
||
dnl "stable", "rcX", "betaX", "svn"
|
||
AQBANKING_VERSION_TAG="stable"
|
||
AQBANKING_VERSION_TAG="git"
|
||
|
||
|
||
|
src/frontends/qbanking/lib/dialogs/qbcfgtabpageaccounts.cpp | ||
---|---|---|
a=AB_Banking_CreateAccount(getBanking()->getCInterface(),
|
||
s.c_str());
|
||
assert(a);
|
||
if (QBEditAccount::editAccount(getBanking(), a, this)) {
|
||
if (QBEditAccount::editAccount(getBanking(), a, true, this)) {
|
||
DBG_INFO(0, "Accepted, adding account");
|
||
AB_Banking_AddAccount(getBanking()->getCInterface(), a);
|
||
updateView();
|
||
... | ... | |
}
|
||
a=al.front();
|
||
|
||
if (QBEditAccount::editAccount(getBanking(), a, this)) {
|
||
if (QBEditAccount::editAccount(getBanking(), a, false, this)) {
|
||
DBG_INFO(0, "Accepted");
|
||
}
|
||
else {
|
src/frontends/qbanking/lib/dialogs/qbeditaccount.cpp | ||
---|---|---|
|
||
|
||
|
||
bool QBEditAccount::fromGui() {
|
||
bool QBEditAccount::fromGui(bool doLock) {
|
||
int rv;
|
||
|
||
rv=getBanking()->beginExclUseAccount(_account, 0);
|
||
if (rv<0) {
|
||
DBG_ERROR(0, "Could not lock account");
|
||
QMessageBox::critical(this,
|
||
tr("Error"),
|
||
tr("Could not lock account data. "
|
||
"Maybe this account is still used by another application?"),
|
||
QMessageBox::Ok,QMessageBox::NoButton);
|
||
return false;
|
||
if (doLock) {
|
||
rv=getBanking()->beginExclUseAccount(_account, 0);
|
||
if (rv<0) {
|
||
DBG_ERROR(0, "Could not lock account");
|
||
QMessageBox::critical(this,
|
||
tr("Error"),
|
||
tr("Could not lock account data. "
|
||
"Maybe this account is still used by another application?"),
|
||
QMessageBox::Ok,QMessageBox::NoButton);
|
||
return false;
|
||
}
|
||
}
|
||
|
||
if (!QBCfgTab::fromGui()) {
|
||
getBanking()->endExclUseAccount(_account, 1, 0); /* abandon changes */
|
||
if (doLock)
|
||
getBanking()->endExclUseAccount(_account, 1, 0); /* abandon changes */
|
||
return false;
|
||
}
|
||
|
||
rv=getBanking()->endExclUseAccount(_account, 0, 0);
|
||
if (rv<0) {
|
||
DBG_ERROR(0, "Could not unlock account");
|
||
QMessageBox::critical(this,
|
||
tr("Internal Error"),
|
||
tr("Could not unlock account data."),
|
||
QMessageBox::Ok,QMessageBox::NoButton);
|
||
return false;
|
||
if (doLock) {
|
||
rv=getBanking()->endExclUseAccount(_account, 0, 0);
|
||
if (rv<0) {
|
||
DBG_ERROR(0, "Could not unlock account");
|
||
QMessageBox::critical(this,
|
||
tr("Internal Error"),
|
||
tr("Could not unlock account data."),
|
||
QMessageBox::Ok,QMessageBox::NoButton);
|
||
return false;
|
||
}
|
||
}
|
||
|
||
return true;
|
||
... | ... | |
|
||
|
||
|
||
bool QBEditAccount::editAccount(QBanking *kb, AB_ACCOUNT *a, QWidget* parent){
|
||
bool QBEditAccount::editAccount(QBanking *kb, AB_ACCOUNT *a,
|
||
bool doLock,
|
||
QWidget* parent){
|
||
QBEditAccount ea(kb, a, parent);
|
||
|
||
if (!ea.toGui())
|
||
return false;
|
||
if (ea.exec()!=QDialog::Accepted)
|
||
return false;
|
||
if (!ea.fromGui())
|
||
if (!ea.fromGui(doLock))
|
||
return false;
|
||
return true;
|
||
}
|
src/frontends/qbanking/lib/dialogs/qbeditaccount.h | ||
---|---|---|
WFlags fl=0);
|
||
~QBEditAccount();
|
||
|
||
bool fromGui();
|
||
bool fromGui(bool doLock);
|
||
|
||
static bool editAccount(QBanking *kb, AB_ACCOUNT *a, QWidget* parent=0);
|
||
static bool editAccount(QBanking *kb, AB_ACCOUNT *a,
|
||
bool doLock,
|
||
QWidget* parent=0);
|
||
|
||
};
|
||
|
Auch abrufbar als: Unified diff
Worked on the problem with creating new accounts ("subGroup missing").
git-svn-id: https://devel.aqbanking.de/svn/aqbanking/trunk@1703 5c42a225-8b10-0410-9873-89b7810ad06e