|
a/src/qtgui/main.cpp |
|
b/src/qtgui/main.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: main.cpp,v 1.66 2008-02-19 08:02:20 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: main.cpp,v 1.67 2008-06-13 18:22:46 dockes Exp $ (C) 2005 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
98 |
if (!rcldb) {
|
98 |
if (!rcldb) {
|
99 |
reason = "Internal error: db not created";
|
99 |
reason = "Internal error: db not created";
|
100 |
return false;
|
100 |
return false;
|
101 |
}
|
101 |
}
|
102 |
|
102 |
|
103 |
int qopts = Rcl::Db::QO_NONE;
|
|
|
104 |
if (prefs.queryStemLang.length() > 0)
|
|
|
105 |
qopts |= Rcl::Db::QO_STEM;
|
|
|
106 |
if (force)
|
103 |
if (force)
|
107 |
rcldb->close();
|
104 |
rcldb->close();
|
108 |
rcldb->rmQueryDb("");
|
105 |
rcldb->rmQueryDb("");
|
109 |
for (list<string>::const_iterator it = prefs.activeExtraDbs.begin();
|
106 |
for (list<string>::const_iterator it = prefs.activeExtraDbs.begin();
|
110 |
it != prefs.activeExtraDbs.end(); it++) {
|
107 |
it != prefs.activeExtraDbs.end(); it++) {
|
111 |
LOGDEB(("main: adding [%s]\n", it->c_str()));
|
108 |
LOGDEB(("main: adding [%s]\n", it->c_str()));
|
112 |
rcldb->addQueryDb(*it);
|
109 |
rcldb->addQueryDb(*it);
|
113 |
}
|
110 |
}
|
114 |
if (!rcldb->isopen() && !rcldb->open(dbdir, rclconfig->getStopfile(),
|
111 |
if (!rcldb->isopen() && !rcldb->open(dbdir, rclconfig->getStopfile(),
|
115 |
Rcl::Db::DbRO, qopts)) {
|
112 |
Rcl::Db::DbRO)) {
|
116 |
reason = "Could not open database in " +
|
113 |
reason = "Could not open database in " +
|
117 |
dbdir + " wait for indexing to complete?";
|
114 |
dbdir + " wait for indexing to complete?";
|
118 |
return false;
|
115 |
return false;
|
119 |
}
|
116 |
}
|
120 |
rcldb->setAbstractParams(-1, prefs.syntAbsLen, prefs.syntAbsCtx);
|
117 |
rcldb->setAbstractParams(-1, prefs.syntAbsLen, prefs.syntAbsCtx);
|