Gui: Compile CONTRIBUTORS into Qt resources

This commit is contained in:
Chris Hennes
2022-04-27 10:25:53 -05:00
parent f8f3ba7a04
commit 4f9eb9ebce
3 changed files with 6 additions and 5 deletions

View File

@@ -3,13 +3,12 @@ configure_file(ThirdPartyLibraries.html
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/ThirdPartyLibraries.html COPYONLY)
configure_file(LICENSE.html
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/LICENSE.html COPYONLY)
configure_file(CONTRIBUTORS
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/CONTRIBUTORS COPYONLY)
# The CONTRIBUTORS file is now compiled into the FreeCAD GUI Qt resource file
INSTALL(FILES
ThirdPartyLibraries.html
LICENSE.html
CONTRIBUTORS
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)

View File

@@ -259,4 +259,7 @@
<qresource prefix="/icons/FreeCAD-default/scalable">
<file>Std_ViewScreenShot.svg</file>
</qresource>
<qresource prefix="/doc">
<file alias="CONTRIBUTORS">../../Doc/CONTRIBUTORS</file>
</qresource>
</RCC>

View File

@@ -383,8 +383,7 @@ public:
void AboutDialog::showCredits()
{
QString creditsFileURL = QString::fromLatin1("%1/CONTRIBUTORS")
.arg(QString::fromUtf8(App::Application::getHelpDir().c_str()));
auto creditsFileURL = QLatin1String(":/doc/CONTRIBUTORS");
QFile creditsFile(creditsFileURL);
if (!creditsFile.open(QIODevice::ReadOnly | QIODevice::Text)) {