Fix Qt6 building (#4393)

This commit is contained in:
pajlada
2023-02-19 20:19:18 +01:00
committed by GitHub
parent d3499e814e
commit c95a65c153
22 changed files with 114 additions and 37 deletions
@@ -3191,7 +3191,8 @@ QString CommandController::execCommand(const QString &textNoEmoji,
}
}
auto maxSpaces = std::min(this->maxSpaces_, words.length() - 1);
// We have checks to ensure words cannot be empty, so this can never wrap around
auto maxSpaces = std::min(this->maxSpaces_, (qsizetype)words.length() - 1);
for (int i = 0; i < maxSpaces; ++i)
{
commandName += ' ' + words[i + 1];
@@ -62,7 +62,7 @@ private:
// User-created commands
QMap<QString, Command> userCommands_;
int maxSpaces_ = 0;
qsizetype maxSpaces_ = 0;
std::shared_ptr<pajlada::Settings::SettingManager> sm_;
// Because the setting manager is not initialized until the initialize
@@ -7,6 +7,7 @@
#define MINIAUDIO_IMPLEMENTATION
#include <miniaudio.h>
#include <QFile>
#include <limits>
#include <memory>