Why?
- QT will switch from qmake to cmake sooner or later.
- autotools are good for unix-ish systems, cmake also for
macOS and Xcode as well as Windows and VS-code
- Cross compiling the windows-binaries on linux
is not very helpful to attract windows-centric
developers.
Also drop qmake's xca.pro
Generate man-page and sphinx sources of commandline arguments
during build by executing xca (xcadoc.cpp).
Generating Version-patchlevel and git hash is now also
OS independent.
The generic XcaProgress object is used, which dynamically
creates a Cmdline progress object.
The Mainwindow replaces it by a GUI object, which integrates
into the status bar.
Commit e32fce8581
(main.cpp: mainwin must exist for read_cmdline() in GUI mode)
created the Mainwindow before parsing the commandline,
but the MainWindow constructor opened a default database if set.
With this change, the MinWindow constructor does not open a default
database. Now the default database is explicitly opened after parsing
the command line, if no other database is already open.
Rename init_database() to setup_open_database()
It is re-entrant.
All dialogs get the "Qt::WindowModal" modality to
operate the Help window in parallel
while also blocking the dialog parent windows.
The manageRevocations() moved from model to view
The Details dialogs become more self-sufficient.
There is a statc start method that shows the dialog and
updates name and comment after accept().
This allows recursive starts of certificate details and
independence of mainwin.
It is necessary to set the current toplevel widget as parent
for the next dialog to not block the application.
The OpenDB dialog did not show up and the previous sqlite
database was opened again.
Start the dialog without current Database preset to always show it.
Avoid crashes by checking for model being set.
Thoroughly close previous database before opening a new one.
Drop changeDB() function and replace by init_database.
The global variable "Database" of class xca_db
can be used by any other class to access. No need
to provide it.
The "xca_db" class managed the "database_model" pointer.
Accessing the name of the current database has been unified.
Change pkcs11List from QListWidget to QListView
The pkcs11_lib_list holds the data of the loaded libraries.
For the model a QList "model_data" is used to
hold indexes into QList dirs to allow duplicates,
moves and removes.
On windows it now displays the paths with \ separators.
in the past it was used to connect the NewX509 dialog
with requests keys and certs.
The NewX509 dialog knows mainwin since some time
and thus can connect itself to models and views
mainwin: use model<T>() instead of models->model<T>()
And ImportMulti handles pki_multi sufficiently
and does not need to know about pkcs12 or pkcs7
pkcs12 and pkcs7 don't need: print() getCa() addCaCert() numCa()
it is handled by pki_multi()
Take advantage of the power of dynamic_cast<>() instead of using
typeid()
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
Use the Passwd class instead of QString
Move password input into the database model
to be available for commandline use.
Repeat in case of wrong password
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
Someone experienced an XCA crash on Fedora 29 and reported it.
Unfortunately this is an automatic reporting with
no "human-generated" details.
#5 pki_multi::count (this=0x0) at /usr/src/debug/xca-2.1.2-3.fc31.x86_64/lib/pki_multi.h:32
#6 MainWindow::probeAnything (this=<optimized out>, file=..., ret=0x7ffdd1258a10) at MainWindow.cpp:816
pki = 0x0
#7 0x000000000053dba8 in MainWindow::read_cmdline (this=this@entry=0xac1000, argc=2, argv=argv@entry=0x7ffdd1258bd8) at /usr/include/qt5/QtCore/qrefcount.h:60
With this commit PKCS#11 libraries may be reordered
and enabled or disabled.
The slot selection dialog iterates over all enabled and successfully
loaded libraries in the configured order and collects the slots
of each of them.
In the options dialog the library info is shown in the tool-tip
If I select "Quit xca" from the "xca" menu, the application exits gracefully.
Unify code paths between "Quit xca", CMD-Q, ALT-F4 and [X] button
by calling mainwindow->close() from qApplication->quit() slot.
Add settings class to access the settings table in the database
Cache values and improve database writes.
Options dialog simplified
Replace getSetting / storeSetting
Unpack option flags to rows in the settings