Skip to content
Commit 217fc7bd authored by Antonio Larrosa Jimenez's avatar Antonio Larrosa Jimenez Committed by Antonio Larrosa Jimenez
Browse files

Check availability of Postgresql backend and clean a bit the code

Rename `areRequirementsAvailable` method to `isAvailable` and implement the
method for DbConfigPostgresql too.
Extract the code from `DbConfig::configuredDatabase` that selects the fallback
to use to a new separate static method, `defaultAvailableDatabaseBackend`
to be more clear about what that code does and simplify `configuredDatabase`.

Now if Postgresql is expected to be used (because akonadi was built like that)
but QPSQL is not available or the initdb/pg_ctl binaries don't exist, then we
fallback to trying to use QSQLITE3.

As with the `DbConfigMysql` change, if QSQLITE3 can't be used either, then
the code will continue trying to use postgresql and fail as expected.
parent 8240e111
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment