Index: cswordmoduleinfo.cpp =================================================================== --- cswordmoduleinfo.cpp (revision 1005) +++ cswordmoduleinfo.cpp (working copy) @@ -306,13 +306,13 @@ //index the key lucene_utf8towcs(wcharBuffer, key->getText(), BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnIndexed(_T("key"), wcharBuffer)); + doc->add(*lucene::document::Field::UnIndexed((const TCHAR*) _T("key"), (const TCHAR*) wcharBuffer)); // index the main text //at this point we have to make sure we disabled the strongs and the other options //so the plain filters won't include the numbers somehow. lucene_utf8towcs(wcharBuffer, (const char*) textBuffer.append(m_module->StripText()), BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnStored(_T("content"), wcharBuffer)); + doc->add(*lucene::document::Field::UnStored((const TCHAR*) _T("content"), (const TCHAR*) wcharBuffer)); textBuffer.resize(0); //clean up // index attributes @@ -323,7 +323,7 @@ attListI != m_module->getEntryAttributes()["Footnote"].end(); attListI++) { lucene_utf8towcs(wcharBuffer, attListI->second["body"], BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnStored(_T("footnote"), wcharBuffer)); + doc->add(*lucene::document::Field::UnStored((const TCHAR*) _T("footnote"), (const TCHAR*) wcharBuffer)); } // for attListI // Headings @@ -331,7 +331,7 @@ attValueI != m_module->getEntryAttributes()["Heading"]["Preverse"].end(); attValueI++) { lucene_utf8towcs(wcharBuffer, attValueI->second, BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnStored(_T("heading"), wcharBuffer)); + doc->add(*lucene::document::Field::UnStored((const TCHAR*) _T("heading"), (const TCHAR*) wcharBuffer)); } // for attValueI // Strongs/Morphs @@ -341,12 +341,12 @@ // for each attribute if (attListI->second["LemmaClass"] == "strong") { lucene_utf8towcs(wcharBuffer, attListI->second["Lemma"], BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnStored(_T("strong"), wcharBuffer)); + doc->add(*lucene::document::Field::UnStored((const TCHAR*) _T("strong"), (const TCHAR*) wcharBuffer)); //qWarning("Adding strong %s", attListI->second["Lemma"].c_str()); } if (attListI->second.find("Morph") != attListI->second.end()) { lucene_utf8towcs(wcharBuffer, attListI->second["Morph"], BT_MAX_LUCENE_FIELD_LENGTH); - doc->add(*lucene::document::Field::UnStored(_T("morph"), wcharBuffer)); + doc->add(*lucene::document::Field::UnStored((const TCHAR*) _T("morph"), (const TCHAR*) wcharBuffer)); } } // for attListI @@ -422,7 +422,7 @@ lucene::analysis::standard::StandardAnalyzer analyzer( stop_words ); lucene::search::IndexSearcher searcher(getModuleStandardIndexLocation().toAscii().constData()); lucene_utf8towcs(wcharBuffer, searchedText.toUtf8().constData(), BT_MAX_LUCENE_FIELD_LENGTH); - boost::scoped_ptr q( lucene::queryParser::QueryParser::parse(wcharBuffer, _T("content"), &analyzer) ); + boost::scoped_ptr q( lucene::queryParser::QueryParser::parse( (const TCHAR*) wcharBuffer, (const TCHAR*) _T("content"), &analyzer) ); boost::scoped_ptr h( searcher.search(q.get(), lucene::search::Sort::INDEXORDER) ); @@ -435,7 +435,7 @@ for (int i = 0; i < h->length(); ++i) { doc = &h->doc(i); - lucene_wcstoutf8(utfBuffer, doc->get(_T("key")), BT_MAX_LUCENE_FIELD_LENGTH); + lucene_wcstoutf8(utfBuffer, (const wchar_t *) doc->get((const TCHAR*) _T("key")), BT_MAX_LUCENE_FIELD_LENGTH); swKey->setText(utfBuffer);