mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Minor fixes: Date from database and affected items
Correctly initialize undefined date from database Clear list of affected items after commit.
This commit is contained in:
parent
223d686f94
commit
c14e54c830
@ -47,17 +47,16 @@ int a1time::from_asn1(const ASN1_TIME *a)
|
||||
return -1;
|
||||
t = QString::fromLatin1((char*)gt->data, gt->length);
|
||||
ASN1_GENERALIZEDTIME_free(gt);
|
||||
if (t == UNDEFINED_DATE) {
|
||||
setUndefined();
|
||||
return 0;
|
||||
}
|
||||
return fromPlain(t);
|
||||
}
|
||||
|
||||
int a1time::fromPlain(QString plain)
|
||||
{
|
||||
*this = QDateTime::fromString(plain, GEN_FORMAT);
|
||||
setTimeSpec(Qt::UTC);
|
||||
if (plain == UNDEFINED_DATE)
|
||||
setUndefined();
|
||||
else
|
||||
*this = fromString(plain, GEN_FORMAT);
|
||||
return isValid() ? 0 : -1;
|
||||
}
|
||||
|
||||
|
||||
@ -79,6 +79,7 @@ bool DbTransaction::finish(const char *oper, const char *file, int line)
|
||||
q.exec();
|
||||
}
|
||||
mutex--;
|
||||
items.clear();
|
||||
return db.commit();
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user