Skip to content

Commit b5fc9f8

Browse files
committed
emoved qsizetype because it is not defined at qt5
1 parent 6c92048 commit b5fc9f8

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

core/appcontext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ QPair<QVector<QString>, int> AppContext::getWalletInstances(bool hasSeed) const
841841

842842
int selectedIdx = -1;
843843
if (!paths.isEmpty()) {
844-
selectedIdx = std::max(static_cast<qsizetype>(0), paths.indexOf(walletInstancePaths.value(currentWalletInstanceIdx, "")));
844+
selectedIdx = std::max(static_cast<size_t>(0), static_cast<size_t>(paths.indexOf(walletInstancePaths.value(currentWalletInstanceIdx, ""))));
845845
}
846846

847847
return QPair<QVector<QString>, int> (paths, selectedIdx);

tries/baseparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ LineResult TrieSectionContext::calcResult() const {
6969
if (accId<0)
7070
return prevParseResults;
7171

72-
return LineResult(prevParseResults, SectionResult(accStr.left( std::max(accStr.size()-1, qsizetype(0)) ) ,accId) );
72+
return LineResult(prevParseResults, SectionResult(accStr.left( std::max( size_t(accStr.size()-1), size_t(0)) ) ,accId) );
7373
}
7474

7575

util/stringutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ QString formatErrorMessages(QStringList messages) {
210210

211211
// Get safely substring from the string. If indexes out of range, return emoty string
212212
QString getSubString(const QString & str, int idx1, int idx2) {
213-
idx2 = std::min(qsizetype(idx2), str.length());
213+
idx2 = std::min(size_t(idx2), size_t(str.length()));
214214

215215
if (idx2<=idx1 || idx1>=str.length())
216216
return "";

wallet/tasks/TaskTransaction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static void parseMessages(const QVector<WEvent> & events, // in
484484
if (strMessage.compare("None", Qt::CaseInsensitive)==0)
485485
strMessage = "";
486486

487-
messages.resize( std::max(messages.length(), qsizetype(participant_id+1)) );
487+
messages.resize( std::max(size_t(messages.length()), size_t(participant_id+1)) );
488488
messages[participant_id] = strMessage;
489489
}
490490
}

windows_desktop/c_newseed_w.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void NewSeed::updateSeedData( const QString & name, const QVector<QString> & see
7676

7777
int maxWrdLen = 0;
7878
for (const auto & s : seed)
79-
maxWrdLen = std::max(qsizetype(maxWrdLen), s.length());
79+
maxWrdLen = std::max(size_t(maxWrdLen), size_t(s.length()));
8080

8181
maxWrdLen += 3;
8282

windows_desktop/e_outputs_w.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void Outputs::updateShownData(bool resetScrollData) {
9494

9595
qDebug() << "updating output table for " << total << " outputs";
9696
// Printing first 200 outputs. For normal usage 200 is enough. The re
97-
for (int i = allData.size()-1; i >= std::max( qsizetype(0), allData.size()-5000); i--) {
97+
for (int i = allData.size()-1; i >= std::max( int(0), int(allData.size()-5000)); i--) {
9898
auto &out = allData[i].output;
9999

100100
// Data filtering was done on outputs request level. No need to filter out anything

windows_desktop/v_viewoutouts_w.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void ViewOutputs::updateShownData(bool resetScrollData) {
7272

7373
qDebug() << "updating output table for " << total << " outputs";
7474
// Printing first 200 outputs. For normal usage 200 is enough. The re
75-
for (int i = allData.size()-1; i >= std::max(qsizetype(0), allData.size()-5000); i--) {
75+
for (int i = allData.size()-1; i >= std::max(int(0), int(allData.size()-5000)); i--) {
7676
auto &out = allData[i].output;
7777

7878
// Data filtering was done on outputs request level. No need to filter out anything

0 commit comments

Comments
 (0)