Remove more QString usages
This commit is contained in:
@@ -22,7 +22,7 @@ namespace twitch {
|
|||||||
|
|
||||||
static const char *pingPayload = "{\"type\":\"PING\"}";
|
static const char *pingPayload = "{\"type\":\"PING\"}";
|
||||||
|
|
||||||
static std::map<std::string, std::string> sentMessages;
|
static std::map<QString, std::string> sentMessages;
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ bool PubSubClient::listen(rapidjson::Document &message)
|
|||||||
rj::set(message, "nonce", uuid);
|
rj::set(message, "nonce", uuid);
|
||||||
|
|
||||||
std::string payload = rj::stringify(message);
|
std::string payload = rj::stringify(message);
|
||||||
sentMessages[uuid.toStdString()] = payload;
|
sentMessages[uuid] = payload;
|
||||||
|
|
||||||
this->send(payload.c_str());
|
this->send(payload.c_str());
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ void PubSubClient::unlistenPrefix(const std::string &prefix)
|
|||||||
rj::set(message, "nonce", CreateUUID());
|
rj::set(message, "nonce", CreateUUID());
|
||||||
|
|
||||||
std::string payload = rj::stringify(message);
|
std::string payload = rj::stringify(message);
|
||||||
sentMessages[uuid.toStdString()] = payload;
|
sentMessages[uuid] = payload;
|
||||||
|
|
||||||
this->send(payload.c_str());
|
this->send(payload.c_str());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -509,8 +509,8 @@ void TwitchMessageBuilder::appendTwitchEmote(const Communi::IrcMessage *ircMessa
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
long int start = std::stol(coords.at(0).toStdString(), nullptr, 10);
|
int start = coords.at(0).toInt();
|
||||||
long int end = std::stol(coords.at(1).toStdString(), nullptr, 10);
|
int end = coords.at(1).toInt();
|
||||||
|
|
||||||
if (start >= end || start < 0 || end > this->originalMessage.length()) {
|
if (start >= end || start < 0 || end > this->originalMessage.length()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user