comparison src/services/anilist.cpp @ 65:26721c28bf22

*: avoid usage of (to|from)StdString in Qt5 (and probably Qt6 as well) these functions are only available (or even usable) if Qt and Minori were built with the *same standard headers*, which may not be the case in some circumstances. hence, we'll use our own conversion functions, which we probably should use anyway.
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 23:26:35 -0400
parents fe719c109dbc
children 6481c5aed3e1
comparison
equal deleted inserted replaced
64:fe719c109dbc 65:26721c28bf22
320 bool ok; 320 bool ok;
321 QString token = QInputDialog::getText( 321 QString token = QInputDialog::getText(
322 0, "Credentials needed!", "Please enter the code given to you after logging in to AniList:", QLineEdit::Normal, 322 0, "Credentials needed!", "Please enter the code given to you after logging in to AniList:", QLineEdit::Normal,
323 "", &ok); 323 "", &ok);
324 if (ok && !token.isEmpty()) 324 if (ok && !token.isEmpty())
325 account.SetAuthToken(token.toStdString()); 325 account.SetAuthToken(Strings::ToUtf8String(token));
326 else // fail 326 else // fail
327 return false; 327 return false;
328 const std::string query = "query {\n" 328 const std::string query = "query {\n"
329 " Viewer {\n" 329 " Viewer {\n"
330 " id\n" 330 " id\n"