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;
|
Rcl::Db::OpenError error;
|
||||||
if (!rcldb->isopen() && !rcldb->open(Rcl::Db::DbRO, &error)) {
|
if (!rcldb->isopen() && !rcldb->open(Rcl::Db::DbRO, &error)) {
|
||||||
reason = "Could not open database in " +
|
reason = "Could not open database";
|
||||||
theconfig->getDbDir() + " wait for indexing to complete?";
|
|
||||||
if (maindberror) {
|
if (maindberror) {
|
||||||
|
reason += " in " + theconfig->getDbDir() +
|
||||||
|
" wait for indexing to complete?";
|
||||||
*maindberror = (error == Rcl::Db::DbOpenMainDb) ? true : false;
|
*maindberror = (error == Rcl::Db::DbOpenMainDb) ? true : false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -115,6 +115,7 @@ void SpellW::doExpand()
|
|||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
if (!maybeOpenDb(reason)) {
|
if (!maybeOpenDb(reason)) {
|
||||||
|
QMessageBox::critical(0, "Recoll", QString(reason.c_str()));
|
||||||
LOGDEB(("SpellW::doExpand: db error: %s\n", reason.c_str()));
|
LOGDEB(("SpellW::doExpand: db error: %s\n", reason.c_str()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user