Fix QT6 example

parent 75c6cf50
#include <string> #include <string>
#include <string_view>
#include <utility> #include <utility>
#include "caf/all.hpp" #include "caf/all.hpp"
...@@ -74,7 +75,7 @@ void ChatWidget::sendChatMessage() { ...@@ -74,7 +75,7 @@ void ChatWidget::sendChatMessage() {
} else if (line.startsWith('/')) { } else if (line.startsWith('/')) {
vector<string> words; vector<string> words;
auto utf8 = QStringView{line}.mid(1).toUtf8(); auto utf8 = QStringView{line}.mid(1).toUtf8();
auto sv = caf::string_view{utf8.constData(), auto sv = std::string_view{utf8.constData(),
static_cast<size_t>(utf8.size())}; static_cast<size_t>(utf8.size())};
split(words, sv, is_any_of(" ")); split(words, sv, is_any_of(" "));
if (words.size() == 3 && words[0] == "join") { if (words.size() == 3 && words[0] == "join") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment