- fix: Project recompiles for every run if auto increase build number is turned on.

- fix: Auto increase build number for project is not correctly processed.
This commit is contained in:
Roy Qu 2023-10-20 20:10:50 +08:00
parent fd95b49270
commit 380482d829
2 changed files with 4 additions and 2 deletions

View File

@ -18,6 +18,8 @@ Red Panda C++ Version 2.25
- enhancement: Differentiate /* and /** when calculate auto indents. - enhancement: Differentiate /* and /** when calculate auto indents.
- fix: crash when using ibus as the input method. - fix: crash when using ibus as the input method.
- fix: Correctly handle project templates that have wrong unit counts. - fix: Correctly handle project templates that have wrong unit counts.
- fix: Project recompiles for every run if auto increase build number is turned on.
- fix: Auto increase build number for project is not correctly processed.
Red Panda C++ Version 2.24 Red Panda C++ Version 2.24

View File

@ -1918,14 +1918,14 @@ PProjectModelNode Project::getParentFileSystemFolderNode(const QString &filename
void Project::incrementBuildNumber() void Project::incrementBuildNumber()
{ {
mOptions.versionInfo.build++; mOptions.versionInfo.build++;
mOptions.versionInfo.fileVersion = QString("%1.%2.%3.%3") mOptions.versionInfo.fileVersion = QString("%1.%2.%3.%4")
.arg(mOptions.versionInfo.major) .arg(mOptions.versionInfo.major)
.arg(mOptions.versionInfo.minor) .arg(mOptions.versionInfo.minor)
.arg(mOptions.versionInfo.release) .arg(mOptions.versionInfo.release)
.arg(mOptions.versionInfo.build); .arg(mOptions.versionInfo.build);
if (mOptions.versionInfo.syncProduct) if (mOptions.versionInfo.syncProduct)
mOptions.versionInfo.productVersion = mOptions.versionInfo.fileVersion; mOptions.versionInfo.productVersion = mOptions.versionInfo.fileVersion;
setModified(true); saveOptions();
} }
QHash<QString, PProjectEditorLayout> Project::loadLayout() QHash<QString, PProjectEditorLayout> Project::loadLayout()