Mercurial > minori
comparison src/gui/dialog/settings/services.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 | 3d2decf093bb |
| children | 2417121d894e |
comparison
equal
deleted
inserted
replaced
| 64:fe719c109dbc | 65:26721c28bf22 |
|---|---|
| 1 #include "core/anime.h" | 1 #include "core/anime.h" |
| 2 #include "core/session.h" | 2 #include "core/session.h" |
| 3 #include "core/strings.h" | |
| 3 #include "gui/dialog/settings.h" | 4 #include "gui/dialog/settings.h" |
| 4 #include "services/anilist.h" | 5 #include "services/anilist.h" |
| 5 #include <QComboBox> | 6 #include <QComboBox> |
| 6 #include <QGroupBox> | 7 #include <QGroupBox> |
| 7 #include <QPushButton> | 8 #include <QPushButton> |
| 82 result->setLayout(full_layout); | 83 result->setLayout(full_layout); |
| 83 return result; | 84 return result; |
| 84 } | 85 } |
| 85 | 86 |
| 86 void SettingsPageServices::SaveInfo() { | 87 void SettingsPageServices::SaveInfo() { |
| 87 session.config.anilist.username = username.toStdString(); | 88 session.config.anilist.username = Strings::ToUtf8String(username); |
| 88 session.config.service = service; | 89 session.config.service = service; |
| 89 } | 90 } |
| 90 | 91 |
| 91 SettingsPageServices::SettingsPageServices(QWidget* parent) : SettingsPage(parent, tr("Services")) { | 92 SettingsPageServices::SettingsPageServices(QWidget* parent) : SettingsPage(parent, tr("Services")) { |
| 92 username = QString::fromUtf8(session.config.anilist.username.c_str()); | 93 username = QString::fromUtf8(session.config.anilist.username.c_str()); |
