Use the provided plural mechanisms of QT.
The "PO" translation also works smoothly and
the translation mechanisms between .po <-> .qt
was tested successfully.
The new english translation file translates
the single phrase:
"Delete the %n revocation list(s): '%1'?"
into
"Delete the revocation list: '%1'?" for one item
and
"Delete the %n revocation lists: '%1'?" otherwise
If a CA certificate is deleted, all issued certificates must be moved to
an other issuer or the top-level list.
The CA cert will be taken from the model together with the issued certs
first. Then the issued certs are re-inserted.
To make this work correctly, the issuer must be erased from the issued certs
to be interpreted as insertion and not as move.
Importing the displayed public key of a certificate during
certificate import resulted in a double free.
The "import" flag of the key-details can now forcefully
disable the import button.
Fixing it was way more complex than simply disabling it.
Also add sanity checks for pointers that are not our childs
when creating the QModelIndex
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.
- Fix indentations of section declarators.
- Replace NULL by nullptr when feasible.
- Sort private section: properties first, then methods.
Caching solution for 186657fbce
was bad. It always returned "visible" when called with unchanged
pattern instead of the last result. Cache the last result
in "iamvisible": 0=no, 1=yes, 2=one-of-my-children and return
the cached value as long as the search pattern is unchanged.
A non-empty parent pointer now indicates that this
item is already inserted in the tree-view.
Duplicated templates are not. Do not copy the parent link
in the constructor.
Do not interact with the GUI when loading datbase items (beginInsertRows,
beginMoveRows, beginRemoveRows, etc.) by not using
insertChild() / remFromCont() anymore.
Fill and organize the root- tree- and sub-items and call
columnsContentChanged() once when done.
Automatically set "parent" of a pki-item when inserting or removing
as child items.
cache the results of visibility check as long as the search text remains.
This function is called many times when displaying the data,
even if the search string does not change.
For interoprability reason.
To enforce it, set "#define OPENSSL_NO_STDIO 1"
All file access is done by reading/writing from/to BioByteArray()
which is filled by QFile:readAll()
Drop CRYPTO_malloc_debug / CRYPTO_mem_leaks
which is unused and disabled since many years.
If we have a QByteArray (ba) and must provide it to
a BIO* expecting OpenSSL function, the following
construct provides it: BioByteArray(ba).ro()
directly providing the QByteArray buffer as BIO
It also supports mixed writes:
BIO_write(bba, buf, size)
bba += QByteArray
Always only use forward slash /
Drop all "QDir::separator()" and "nativeSeparator()"
functions. Only use it where filenames are displayed for the user.
Passwd::cleanse() also resets the password size
db_base::flushLookup() now deletes all items
and pki_base does not anymore.
Drop TRACE
Colorize pki_base::print()
Set and inherit filename of loaded items
Add print() method to pki_pkcs12
and constify its methods
New classes:
- database_model: Manage the database tables (keys, req, cert, crl, templ)
extracted from widgets/MW_database.cpp
- arguments: parse commandline, dynamically create help text
If Loading the item results in an openssl error,
even if the item is not empty, discard it.
Otherwise loading it from the database later on will fail.
Improve "autoIntName()"