tools/assistant/lib/qhelpgenerator.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   526         }
   526         }
   527 
   527 
   528         QByteArray data = fi.readAll();
   528         QByteArray data = fi.readAll();
   529         if (fileName.endsWith(QLatin1String(".html"))
   529         if (fileName.endsWith(QLatin1String(".html"))
   530             || fileName.endsWith(QLatin1String(".htm"))) {
   530             || fileName.endsWith(QLatin1String(".htm"))) {
   531                 charSet = QHelpGlobal::charsetFromData(data);
   531                 charSet = QHelpGlobal::codecFromData(data);
   532                 QTextStream stream(&data);
   532                 QTextStream stream(&data);
   533                 stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData()));
   533                 stream.setCodec(QTextCodec::codecForName(charSet.toLatin1().constData()));
   534                 title = QHelpGlobal::documentTitle(stream.readAll());
   534                 title = QHelpGlobal::documentTitle(stream.readAll());
   535         } else {
   535         } else {
   536             title = fileName.mid(fileName.lastIndexOf(QLatin1Char('/')) + 1);
   536             title = fileName.mid(fileName.lastIndexOf(QLatin1Char('/')) + 1);