chore: update copyright to 2026, add version info to about dialog

This commit is contained in:
2026-01-04 00:06:44 +08:00
parent 0a4c1fbe88
commit a60f430334
2 changed files with 6 additions and 2 deletions

View File

@@ -115,6 +115,10 @@ if (USE_QTEXTCODEC)
target_link_libraries(${EXE_NAME} PRIVATE Qt6::Core5Compat) target_link_libraries(${EXE_NAME} PRIVATE Qt6::Core5Compat)
endif() endif()
target_compile_definitions(${EXE_NAME} PRIVATE
PMUSIC_VERSION_STRING="${CMAKE_PROJECT_VERSION}"
)
# Install settings # Install settings
if (WIN32) if (WIN32)
set_target_properties(${EXE_NAME} PROPERTIES set_target_properties(${EXE_NAME} PROPERTIES

View File

@@ -785,7 +785,7 @@ void MainWindow::on_actionHelp_triggered()
infoBox.setWindowTitle(tr("About")); infoBox.setWindowTitle(tr("About"));
infoBox.setStandardButtons(QMessageBox::Ok); infoBox.setStandardButtons(QMessageBox::Ok);
infoBox.setText( infoBox.setText(
tr("Pineapple Music") % QString("%1 %2").arg(tr("Pineapple Music")).arg(PMUSIC_VERSION_STRING) %
"\n\n" % "\n\n" %
tr("Based on the following free software libraries:") % tr("Based on the following free software libraries:") %
"\n\n" % "\n\n" %
@@ -806,7 +806,7 @@ void MainWindow::on_actionHelp_triggered()
"\n" "\n"
"[Source Code](https://github.com/BLumia/pineapple-music)\n" "[Source Code](https://github.com/BLumia/pineapple-music)\n"
"\n" "\n"
"Copyright © 2025 [BLumia](https://github.com/BLumia/)" "Copyright © 2026 [BLumia](https://github.com/BLumia/)"
); );
infoBox.setTextFormat(Qt::MarkdownText); infoBox.setTextFormat(Qt::MarkdownText);
infoBox.exec(); infoBox.exec();