Fix: openening not accessible database crashes program.

OpenDatabase::createOpenDatabase now uses QException derived exception to report failure.
This makes it possible to catch the exception in a background thread and rethrow it when the Future is read.
Which makes it possible for the database window to properly report the problem.
This commit is contained in:
eelke 2019-01-29 19:41:27 +01:00
parent 3820fb2600
commit ecae0464f9
5 changed files with 36 additions and 24 deletions

View file

@ -51,8 +51,7 @@ private:
OpenDatabase::OpenDatabaseSPtr run(TaskControl& ) override
{
auto res = OpenDatabase::createOpenDatabase(m_config);
return res.get();
return OpenDatabase::createOpenDatabase(m_config);
}
private: