- Timestamp:
- Mar 5, 2010, 1:38:54 AM (15 years ago)
- Location:
- trunk/src/3rdparty/clucene/src/CLucene
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/3rdparty/clucene/src/CLucene/index/CompoundFile.cpp
r2 r632 11 11 #include "CLucene/util/Misc.h" 12 12 13 #include "qclucene_global_p.h" 14 13 15 CL_NS_USE(store) 14 16 CL_NS_USE(util) … … 72 74 int64_t offset = stream->readLong(); 73 75 int32_t read = stream->readString(tid, CL_MAX_PATH); 74 QString aid (QString::fromWCharArray(tid, read));76 QString aid = TCharToQString(tid, read); 75 77 76 78 // set length of the previous entry … … 294 296 fe->directoryOffset = os->getFilePointer(); 295 297 os->writeLong(0); // for now 296 tfile[ fe->file.toWCharArray(tfile)] = '\0';298 tfile[QStringToTChar(fe->file, tfile)] = '\0'; 297 299 os->writeString(tfile, _tcslen(tfile)); 298 300 } -
trunk/src/3rdparty/clucene/src/CLucene/index/IndexWriter.cpp
r2 r632 17 17 #include "SegmentInfos.h" 18 18 #include "SegmentMerger.h" 19 20 #include "qclucene_global_p.h" 19 21 20 22 CL_NS_USE(store) … … 473 475 for (int32_t i = input->readInt(); i > 0; i--) { 474 476 int32_t read = input->readString(tname, CL_MAX_PATH); 475 result.push_back( QString::fromWCharArray(tname, read));477 result.push_back(TCharToQString(tname, read)); 476 478 } 477 479 } _CLFINALLY ( … … 516 518 QStringList::const_iterator itr; 517 519 for (itr = files.begin(); itr != files.end(); ++itr) { 518 tfile[ (*itr).toWCharArray(tfile)] = '\0';520 tfile[QStringToTChar(*itr, tfile)] = '\0'; 519 521 output->writeString(tfile, _tcslen(tfile)); 520 522 } -
trunk/src/3rdparty/clucene/src/CLucene/index/SegmentInfos.cpp
r2 r632 12 12 #include "CLucene/store/Directory.h" 13 13 #include "CLucene/util/Misc.h" 14 15 #include "qclucene_global_p.h" 14 16 15 17 CL_NS_USE(store) … … 207 209 208 210 //Write the name of the current segment 209 int32_t count = si->name.toWCharArray(tname);211 int32_t count = QStringToTChar(si->name, tname); 210 212 tname[count] = '\0'; 211 213 output->writeString(tname, _tcslen(tname)); -
trunk/src/3rdparty/clucene/src/CLucene/index/TermInfosReader.cpp
r2 r632 217 217 } 218 218 219 //Reposition current term in the enumeration 220 seekEnum(getIndexOffset(term)); 221 //Return the TermInfo for term 222 return scanEnum(term); 219 //Reposition current term in the enumeration 220 int32_t indexOffset = getIndexOffset(term); 221 if (indexOffset >= 0) { 222 seekEnum(getIndexOffset(term)); 223 //Return the TermInfo for term 224 return scanEnum(term); 225 } 226 227 // term not found 228 return NULL; 223 229 } 224 230 … … 238 244 //Retrieve the indexOffset for term 239 245 int32_t indexOffset = getIndexOffset(term); 246 if (indexOffset < 0) 247 return -1; 248 240 249 seekEnum(indexOffset); 241 250 … … 339 348 //Pre - term holds a reference to a valid term 340 349 // indexTerms != NULL 341 //Post - The new offset has been returned 350 //Post - The new offset has been returned or -1 if all entries are greater 342 351 343 352 //Check if is indexTerms is a valid array -
trunk/src/3rdparty/clucene/src/CLucene/store/FSDirectory.cpp
r561 r632 19 19 #include "CLucene/debug/condition.h" 20 20 21 #include "qclucene_global_p.h" 22 21 23 CL_NS_DEF(store) 22 24 CL_NS_USE(util) … … 560 562 561 563 TCHAR tBuffer[2048] = { 0 }; 562 dirName.toWCharArray(tBuffer);564 QStringToTChar(dirName, tBuffer); 563 565 564 566 char aBuffer[4096] = { 0 };
Note:
See TracChangeset
for help on using the changeset viewer.