File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,16 +185,20 @@ else()
185185 endif ()
186186endif ()
187187
188- set (TRANSLATIONS_QRC_CONTENT "<!DOCTYPE RCC>\n <RCC version=\" 1.0\" >\n <qresource prefix=\" /translations\" >\n " )
189- foreach (qm_file ${doxywizard_QM_FILES} )
190- get_filename_component (qm_name ${qm_file} NAME )
191- string (APPEND TRANSLATIONS_QRC_CONTENT " <file>${qm_name} </file>\n " )
192- endforeach ()
193- string (APPEND TRANSLATIONS_QRC_CONTENT " </qresource>\n </RCC>\n " )
188+ if (doxywizard_QM_FILES)
189+ set (TRANSLATIONS_QRC_CONTENT "<!DOCTYPE RCC>\n <RCC version=\" 1.0\" >\n <qresource prefix=\" /translations\" >\n " )
190+ foreach (qm_file ${doxywizard_QM_FILES} )
191+ get_filename_component (qm_name ${qm_file} NAME )
192+ string (APPEND TRANSLATIONS_QRC_CONTENT " <file>${qm_name} </file>\n " )
193+ endforeach ()
194+ string (APPEND TRANSLATIONS_QRC_CONTENT " </qresource>\n </RCC>\n " )
194195
195- file (WRITE ${CMAKE_CURRENT_BINARY_DIR} /translations.qrc "${TRANSLATIONS_QRC_CONTENT} " )
196+ file (WRITE ${CMAKE_CURRENT_BINARY_DIR} /translations.qrc "${TRANSLATIONS_QRC_CONTENT} " )
196197
197- qt_add_resources (doxywizard_TRANSLATION_RESOURCES ${CMAKE_CURRENT_BINARY_DIR} /translations.qrc )
198+ qt_add_resources (doxywizard_TRANSLATION_RESOURCES ${CMAKE_CURRENT_BINARY_DIR} /translations.qrc )
199+ else ()
200+ set (doxywizard_TRANSLATION_RESOURCES)
201+ endif ()
198202
199203add_executable (doxywizard WIN32
200204config_msg.cpp
Original file line number Diff line number Diff line change @@ -301,15 +301,15 @@ QString TranslationManager::qmFilePath(const QString &langCode) const
301301 }
302302
303303 QString resourcePath = QString::fromLatin1 (" :/translations/" ) + info.qmFile ;
304- if (QFileInfo ::exists (resourcePath))
304+ if (QFile ::exists (resourcePath))
305305 {
306306 return resourcePath;
307307 }
308308
309309 QString appDir = QCoreApplication::applicationDirPath ();
310310 QString qmPath = appDir + QDir::separator () + info.qmFile ;
311311
312- if (QFileInfo ::exists (qmPath))
312+ if (QFile ::exists (qmPath))
313313 {
314314 return qmPath;
315315 }
You can’t perform that action at this time.
0 commit comments