Skip to content

Commit aa06872

Browse files
refactor: drop Qt::endl conditional compile
since Qt 5.15 needed
1 parent 036a1d6 commit aa06872

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

makespec/BUILDVERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
125
1+
126

src/component/exportutil/exportutil.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
#include <cmath>
2626
#include <iostream>
2727

28-
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
29-
#define ENDL Qt::endl
30-
#else
31-
#define ENDL endl
32-
#endif
33-
3428
ExportUtil::ExportUtil(QObject *parent) : QObject(parent) {}
3529

3630
auto ExportUtil::getContestantHtmlCode(Contest *contest, Contestant *contestant, int num) -> QString {
@@ -734,7 +728,7 @@ void ExportUtil::exportCsv(QWidget *widget, Contest *contest, const QString &fil
734728
<< ",";
735729
}
736730

737-
out << "\"" << tr("Total Score") << "\"" << ENDL;
731+
out << "\"" << tr("Total Score") << "\"" << Qt::endl;
738732

739733
for (auto &i : sortList) {
740734
Contestant *contestant = contest->getContestant(i.second);
@@ -758,9 +752,9 @@ void ExportUtil::exportCsv(QWidget *widget, Contest *contest, const QString &fil
758752
int score = contestant->getTotalScore();
759753

760754
if (score != -1) {
761-
out << "\"" << score << "\"" << ENDL;
755+
out << "\"" << score << "\"" << Qt::endl;
762756
} else {
763-
out << "\"" << tr("Invalid") << "\"" << ENDL;
757+
out << "\"" << tr("Invalid") << "\"" << Qt::endl;
764758
}
765759
}
766760

0 commit comments

Comments
 (0)