preferences: use std::string in struct preferences

This is a messy commit, because the "qPref" system relies
heavily on QString, which means lots of conversions between
the two worlds. Ultimately, I plan to base the preferences
system on std::string and only convert to QString when
pushing through Qt's property system or when writing into
Qt's settings.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-13 22:59:32 +02:00 committed by bstoeger
parent 82fc9de40b
commit ccdd92aeb7
78 changed files with 645 additions and 694 deletions

View file

@ -41,11 +41,11 @@ public:
Q_ENUM(cloud_status);
static bool cloud_auto_sync() { return prefs.cloud_auto_sync; }
static QString cloud_base_url() { return prefs.cloud_base_url; }
static QString cloud_storage_email() { return prefs.cloud_storage_email; }
static QString cloud_storage_email_encoded() { return prefs.cloud_storage_email_encoded; }
static QString cloud_storage_password() { return prefs.cloud_storage_password; }
static QString cloud_storage_pin() { return prefs.cloud_storage_pin; }
static QString cloud_base_url() { return QString::fromStdString(prefs.cloud_base_url); }
static QString cloud_storage_email() { return QString::fromStdString(prefs.cloud_storage_email); }
static QString cloud_storage_email_encoded() { return QString::fromStdString(prefs.cloud_storage_email_encoded); }
static QString cloud_storage_password() { return QString::fromStdString(prefs.cloud_storage_password); }
static QString cloud_storage_pin() { return QString::fromStdString(prefs.cloud_storage_pin); }
static int cloud_timeout() { return prefs.cloud_timeout; }
static int cloud_verification_status() { return prefs.cloud_verification_status; }
static bool save_password_local() { return prefs.save_password_local; }