mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 04:10:07 +00:00
Address a bunch of review comments
This commit is contained in:
parent
1de63f9b16
commit
b0aed19823
@ -25,7 +25,11 @@ CompatDB::CompatDB(QWidget* parent)
|
||||
|
||||
CompatDB::~CompatDB() = default;
|
||||
|
||||
enum class CompatDBPage { Intro = 0, Selection = 1, Final = 2 };
|
||||
enum class CompatDBPage {
|
||||
Intro = 0,
|
||||
Selection = 1,
|
||||
Final = 2,
|
||||
};
|
||||
|
||||
void CompatDB::Submit() {
|
||||
QButtonGroup* compatibility = new QButtonGroup(this);
|
||||
|
@ -21,7 +21,6 @@ public:
|
||||
private:
|
||||
std::unique_ptr<Ui::CompatDB> ui;
|
||||
|
||||
private slots:
|
||||
void Submit();
|
||||
void EnableNext();
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ ConfigureWeb::ConfigureWeb(QWidget* parent)
|
||||
this->setConfiguration();
|
||||
}
|
||||
|
||||
ConfigureWeb::~ConfigureWeb() {}
|
||||
ConfigureWeb::~ConfigureWeb() = default;
|
||||
|
||||
void ConfigureWeb::setConfiguration() {
|
||||
ui->web_credentials_disclaimer->setWordWrap(true);
|
||||
|
@ -11,7 +11,7 @@ namespace DiscordRPC {
|
||||
class DiscordImpl : public DiscordInterface {
|
||||
public:
|
||||
DiscordImpl();
|
||||
~DiscordImpl();
|
||||
~DiscordImpl() override;
|
||||
|
||||
void Pause() override;
|
||||
void Update() override;
|
||||
|
@ -92,7 +92,7 @@ void GMainWindow::ShowTelemetryCallout() {
|
||||
}
|
||||
|
||||
UISettings::values.callout_flags |= static_cast<uint32_t>(CalloutFlag::Telemetry);
|
||||
static const QString telemetry_message =
|
||||
const QString telemetry_message =
|
||||
tr("<a href='https://citra-emu.org/entry/telemetry-and-why-thats-a-good-thing/'>Anonymous "
|
||||
"data is collected</a> to help improve Citra. "
|
||||
"<br/><br/>Would you like to share your usage data with us?");
|
||||
|
@ -82,7 +82,7 @@ u64 RegenerateTelemetryId() {
|
||||
return new_telemetry_id;
|
||||
}
|
||||
|
||||
bool VerifyLogin(std::string username, std::string token) {
|
||||
bool VerifyLogin(const std::string& username, const std::string& token) {
|
||||
#ifdef ENABLE_WEB_SERVICE
|
||||
return WebService::VerifyLogin(Settings::values.web_api_url, username, token);
|
||||
#else
|
||||
|
@ -56,6 +56,6 @@ u64 RegenerateTelemetryId();
|
||||
* @param func A function that gets exectued when the verification is finished
|
||||
* @returns Future with bool indicating whether the verification succeeded
|
||||
*/
|
||||
bool VerifyLogin(std::string username, std::string token);
|
||||
bool VerifyLogin(const std::string& username, const std::string& token);
|
||||
|
||||
} // namespace Core
|
||||
|
@ -10,6 +10,11 @@
|
||||
|
||||
namespace WebService {
|
||||
|
||||
TelemetryJson::TelemetryJson(const std::string& host, const std::string& username,
|
||||
const std::string& token)
|
||||
: host(std::move(host)), username(std::move(username)), token(std::move(token)) {}
|
||||
TelemetryJson::~TelemetryJson() = default;
|
||||
|
||||
template <class T>
|
||||
void TelemetryJson::Serialize(Telemetry::FieldType type, const std::string& name, T value) {
|
||||
sections[static_cast<u8>(type)][name] = value;
|
||||
|
@ -18,9 +18,8 @@ namespace WebService {
|
||||
*/
|
||||
class TelemetryJson : public Telemetry::VisitorInterface {
|
||||
public:
|
||||
TelemetryJson(const std::string& host, const std::string& username, const std::string& token)
|
||||
: host(host), username(username), token(token) {}
|
||||
~TelemetryJson() = default;
|
||||
TelemetryJson(const std::string& host, const std::string& username, const std::string& token);
|
||||
~TelemetryJson();
|
||||
|
||||
void Visit(const Telemetry::Field<bool>& field) override;
|
||||
void Visit(const Telemetry::Field<double>& field) override;
|
||||
|
@ -13,12 +13,12 @@
|
||||
|
||||
namespace WebService {
|
||||
|
||||
static constexpr char API_VERSION[]{"1"};
|
||||
constexpr char API_VERSION[]{"1"};
|
||||
|
||||
constexpr int HTTP_PORT = 80;
|
||||
constexpr int HTTPS_PORT = 443;
|
||||
constexpr u32 HTTP_PORT = 80;
|
||||
constexpr u32 HTTPS_PORT = 443;
|
||||
|
||||
constexpr int TIMEOUT_SECONDS = 30;
|
||||
constexpr u32 TIMEOUT_SECONDS = 30;
|
||||
|
||||
Client::JWTCache Client::jwt_cache{};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user