Merge remote-tracking branch 'origin/release/22.04'

remotes/origin/work/aacid/moreecm585defines
Albert Astals Cid 4 years ago
commit d72d3a01a5
  1. 8
      generators/chm/lib/ebook_chm.cpp

@ -254,13 +254,7 @@ bool EBook_CHM::load(const QString &archiveName)
}
#if defined(WIN32)
// chm_open on Windows OS uses the following prototype:
// struct chmFile* chm_open(BSTR filename);
//
// however internally it simply passes the filename
// directly to CreateFileW function without any conversion.
// Thus we need to pass it as WCHAR * and not BSTR.
m_chmFile = chm_open((BSTR)filename.toStdWString().c_str());
m_chmFile = chm_open((BSTR)QFile::encodeName(filename).constData());
#else
m_chmFile = chm_open(QFile::encodeName(filename));
#endif

Loading…
Cancel
Save