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
Please register or sign in to comment