Remove more QString usages

This commit is contained in:
Rasmus Karlsson 2018-06-07 13:24:07 +02:00
parent d2e750129c
commit 85e19d0bd6
3 changed files with 5 additions and 6 deletions

View file

@ -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());
} }

View file

@ -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;

View file

@ -7,7 +7,6 @@
#include <chrono> #include <chrono>
#include <mutex> #include <mutex>
#include <set> #include <set>
#include <string>
namespace chatterino { namespace chatterino {