summaryrefslogtreecommitdiff
path: root/src/backend/drivers/cswordmoduleinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/drivers/cswordmoduleinfo.cpp')
-rw-r--r--src/backend/drivers/cswordmoduleinfo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/drivers/cswordmoduleinfo.cpp b/src/backend/drivers/cswordmoduleinfo.cpp
index a7ceca9..08721c9 100644
--- a/src/backend/drivers/cswordmoduleinfo.cpp
+++ b/src/backend/drivers/cswordmoduleinfo.cpp
@@ -218,7 +218,7 @@ bool CSwordModuleInfo::hasIndex() const {
}
//then check if the index is there
- return lucene::index::IndexReader::indexExists(getModuleStandardIndexLocation().toAscii().constData());
+ return lucene::index::IndexReader::indexExists(getModuleStandardIndexLocation().toLatin1().constData());
}
bool CSwordModuleInfo::buildIndex() {
@@ -249,13 +249,13 @@ bool CSwordModuleInfo::buildIndex() {
dir.mkpath( getModuleBaseIndexLocation() );
dir.mkpath( getModuleStandardIndexLocation() );
- if (lucene::index::IndexReader::indexExists(index.toAscii().constData())) {
- if (lucene::index::IndexReader::isLocked(index.toAscii().constData()) ) {
- lucene::index::IndexReader::unlock(index.toAscii().constData());
+ if (lucene::index::IndexReader::indexExists(index.toLatin1().constData())) {
+ if (lucene::index::IndexReader::isLocked(index.toLatin1().constData()) ) {
+ lucene::index::IndexReader::unlock(index.toLatin1().constData());
}
}
- QSharedPointer<lucene::index::IndexWriter> writer( new lucene::index::IndexWriter(index.toAscii().constData(), &an, true) ); //always create a new index
+ QSharedPointer<lucene::index::IndexWriter> writer( new lucene::index::IndexWriter(index.toLatin1().constData(), &an, true) ); //always create a new index
writer->setMaxFieldLength(BT_MAX_LUCENE_FIELD_LENGTH);
writer->setUseCompoundFile(true); //merge segments into a single file
@@ -458,7 +458,7 @@ int CSwordModuleInfo::searchIndexed(const QString &searchedText,
// do not use any stop words
const TCHAR* stop_words[] = { NULL };
lucene::analysis::standard::StandardAnalyzer analyzer( stop_words );
- lucene::search::IndexSearcher searcher(getModuleStandardIndexLocation().toAscii().constData());
+ lucene::search::IndexSearcher searcher(getModuleStandardIndexLocation().toLatin1().constData());
lucene_utf8towcs(wcharBuffer, searchedText.toUtf8().constData(), BT_MAX_LUCENE_FIELD_LENGTH);
QSharedPointer<lucene::search::Query> q( lucene::queryParser::QueryParser::parse((const TCHAR*)wcharBuffer, (const TCHAR*)_T("content"), &analyzer) );