Nix-QString::Splitbehaviour complaint (#195)

This commit is contained in:
Salanto 2021-08-24 07:05:38 +02:00 committed by GitHub
parent 624fe41e12
commit 01fcb51155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,7 +252,11 @@ void AOClient::pktOocChat(AreaData* area, int argc, QStringList argv, AOPacket p
return;
AOPacket final_packet("CT", {ooc_name, message, "0"});
if(message.at(0) == '/') {
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QStringList cmd_argv = message.split(" ", QString::SplitBehavior::SkipEmptyParts);
#else
QStringList cmd_argv = message.split(" ", Qt::SkipEmptyParts);
#endif
QString command = cmd_argv[0].trimmed().toLower();
command = command.right(command.length() - 1);
cmd_argv.removeFirst();