Skip to content

Commit

Permalink
Merge branch 'develop' and move to version 3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
flinco committed Sep 9, 2022
2 parents 01c15ae + fc0db4d commit 9bdc3c7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

cmake_minimum_required(VERSION 3.20)
project(LBChronoRace
VERSION 3.0.5
VERSION 3.0.6
DESCRIPTION "Timings for Races"
HOMEPAGE_URL "http://github.com/flinco/LBChronoRace"
LANGUAGES CXX)
Expand Down
5 changes: 5 additions & 0 deletions crloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ void CRLoader::loadRaceData(QDataStream &in)
>> teamsListModel
>> categoriesModel
>> timingsModel;

startListModel.refreshCounters(0);
teamsListModel.refreshCounters(0);
categoriesModel.refreshCounters(0);
timingsModel.refreshCounters(0);
}

QPair<int, int> CRLoader::importStartList(QString const &path)
Expand Down
4 changes: 2 additions & 2 deletions lbchronorace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void LBChronoRace::importCategoriesList()
appendInfoMessage(tr("Categories File: %1").arg(categoriesFileName));
try {
count = CRLoader::importCategories(categoriesFileName);
appendInfoMessage((count == 1) ? tr("Loaded: %n category", "", count) : tr("Loaded: %n category", "", count));
appendInfoMessage(tr("Loaded: %n category(s)", "", count));
lastSelectedPath = QFileInfo(categoriesFileName).absoluteDir();
} catch (ChronoRaceException &e) {
appendErrorMessage(tr("Error: %1").arg(e.getMessage()));
Expand Down Expand Up @@ -390,7 +390,7 @@ void LBChronoRace::loadRace()
table = CRLoader::getCategoriesModel();
tableCount = table->rowCount();
setCounterCategories(tableCount);
appendInfoMessage((tableCount == 1) ? tr("Loaded: %n category", "", tableCount) : tr("Loaded: %n category", "", tableCount));
appendInfoMessage(tr("Loaded: %n category(s)", "", tableCount));
table = CRLoader::getTimingsModel();
tableCount = table->rowCount();
setCounterTimings(tableCount);
Expand Down
6 changes: 2 additions & 4 deletions rankingsbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include "rankingsbuilder.h"
#include "rankingprinter.h"

#include "lbcrexception.h"

uint RankingsBuilder::loadData()
{
QStringList messages;
Expand Down Expand Up @@ -146,7 +144,7 @@ QList<ClassEntry const *> &RankingsBuilder::fillRanking(QList<ClassEntry const *

ranking.clear();
ranking.reserve(tmpRanking.size());
for (auto const classEntry : tmpRanking) {
for (ClassEntry const *classEntry : tmpRanking) {
ranking.append(classEntry);
}

Expand Down Expand Up @@ -213,7 +211,7 @@ QList<TeamClassEntry const *> &RankingsBuilder::fillRanking(QList<TeamClassEntry
// copy and return the team rankings
ranking.clear();
ranking.reserve(sortedTeamRanking.size());
for (auto const teamClassEntry : sortedTeamRanking) {
for (TeamClassEntry const *teamClassEntry : sortedTeamRanking) {
ranking.append(teamClassEntry);
}

Expand Down
2 changes: 2 additions & 0 deletions startlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ void StartListModel::refreshCounters(int r)

Q_UNUSED(r)

legCount = 0;
maxBib = 0;
competitorNameMaxWidth = 0;
for (auto const &comp : startList) {
bib = comp.getBib();
Expand Down
2 changes: 1 addition & 1 deletion translations/LBChronoRace_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
<message numerus="yes">
<location filename="../lbchronorace.cpp" line="178"/>
<location filename="../lbchronorace.cpp" line="396"/>
<source>Loaded: %n category</source>
<source>Loaded: %n category(s)</source>
<translation>
<numerusform>Loaded: %n category</numerusform>
<numerusform>Loaded: %n categories</numerusform>
Expand Down
2 changes: 1 addition & 1 deletion translations/LBChronoRace_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
<message numerus="yes">
<location filename="../lbchronorace.cpp" line="178"/>
<location filename="../lbchronorace.cpp" line="396"/>
<source>Loaded: %n category</source>
<source>Loaded: %n category(s)</source>
<translation>
<numerusform>Caricata: %n categoria</numerusform>
<numerusform>Caricate: %n categorie</numerusform>
Expand Down

0 comments on commit 9bdc3c7

Please sign in to comment.