Skip to content
  • Antonio Larrosa Jimenez's avatar
    Check availability of Postgresql backend and clean a bit the code · 217fc7bd
    Antonio Larrosa Jimenez authored and Antonio Larrosa Jimenez's avatar Antonio Larrosa Jimenez committed
    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.
    217fc7bd