GUI: add error dialog from spell_w when db cant be opened
This commit is contained in:
parent
73a3106a6d
commit
442385376d
@ -122,9 +122,10 @@ bool maybeOpenDb(string &reason, bool force, bool *maindberror)
|
||||
}
|
||||
Rcl::Db::OpenError error;
|
||||
if (!rcldb->isopen() && !rcldb->open(Rcl::Db::DbRO, &error)) {
|
||||
reason = "Could not open database in " +
|
||||
theconfig->getDbDir() + " wait for indexing to complete?";
|
||||
reason = "Could not open database";
|
||||
if (maindberror) {
|
||||
reason += " in " + theconfig->getDbDir() +
|
||||
" wait for indexing to complete?";
|
||||
*maindberror = (error == Rcl::Db::DbOpenMainDb) ? true : false;
|
||||
}
|
||||
return false;
|
||||
|
||||
@ -115,6 +115,7 @@ void SpellW::doExpand()
|
||||
|
||||
string reason;
|
||||
if (!maybeOpenDb(reason)) {
|
||||
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
||||
LOGDEB(("SpellW::doExpand: db error: %s\n", reason.c_str()));
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user