Improve function interface

`SettingsStorage` methods require `QString` so make `SettingValue` follow it.
`Path::operator+` can use `QStringView` to accept wider audience.
This commit is contained in:
Chocobo1 2022-03-23 23:56:47 +08:00
parent 11cfe38d1c
commit c6b772da11
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
33 changed files with 222 additions and 239 deletions

View file

@ -37,17 +37,17 @@
#include "uithememanager.h"
#include "utils.h"
#define SETTINGS_KEY(name) "CookiesDialog/" name
#define SETTINGS_KEY(name) u"CookiesDialog/" name
CookiesDialog::CookiesDialog(QWidget *parent)
: QDialog(parent)
, m_ui(new Ui::CookiesDialog)
, m_cookiesModel(new CookiesModel(Net::DownloadManager::instance()->allCookies(), this))
, m_storeDialogSize(SETTINGS_KEY("Size"))
, m_storeDialogSize(SETTINGS_KEY(u"Size"_qs))
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
, m_storeViewState("GUI/Qt6/" SETTINGS_KEY("ViewState"))
, m_storeViewState("GUI/Qt6/" SETTINGS_KEY(u"ViewState"_qs))
#else
, m_storeViewState(SETTINGS_KEY("CookiesViewState"))
, m_storeViewState(SETTINGS_KEY(u"CookiesViewState"_qs))
#endif
{
m_ui->setupUi(this);