comparison src/services/anilist.cc @ 211:7cf53145de11

strings: use templates for ToInt, std::to_string -> Strings::ToUtf8String
author Paper <mrpapersonic@gmail.com>
date Sun, 07 Jan 2024 09:54:17 -0500
parents 9613d72b097e
children d030b30526d5
comparison
equal deleted inserted replaced
200:da91af31ae73 211:7cf53145de11
306 } 306 }
307 307
308 bool AuthorizeUser() { 308 bool AuthorizeUser() {
309 /* Prompt for PIN */ 309 /* Prompt for PIN */
310 QDesktopServices::openUrl( 310 QDesktopServices::openUrl(
311 QUrl(Strings::ToQString("https://anilist.co/api/v2/oauth/authorize?client_id=" + std::to_string(CLIENT_ID) + "&response_type=token"))); 311 QUrl(Strings::ToQString("https://anilist.co/api/v2/oauth/authorize?client_id=" + Strings::ToUtf8String(CLIENT_ID) + "&response_type=token")));
312 312
313 bool ok; 313 bool ok;
314 QString token = QInputDialog::getText( 314 QString token = QInputDialog::getText(
315 0, "Credentials needed!", "Please enter the code given to you after logging in to AniList:", QLineEdit::Normal, 315 0, "Credentials needed!", "Please enter the code given to you after logging in to AniList:", QLineEdit::Normal,
316 "", &ok); 316 "", &ok);