common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
This commit is contained in:
parent
f3ea8a3653
commit
a87209e09d
40 changed files with 639 additions and 547 deletions
|
@ -61,9 +61,9 @@ ConfigureUi::ConfigureUi(QWidget* parent) : QWidget(parent), ui(new Ui::Configur
|
|||
// Set screenshot path to user specification.
|
||||
connect(ui->screenshot_path_button, &QToolButton::pressed, this, [this] {
|
||||
const QString& filename =
|
||||
QFileDialog::getExistingDirectory(
|
||||
this, tr("Select Screenshots Path..."),
|
||||
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir))) +
|
||||
QFileDialog::getExistingDirectory(this, tr("Select Screenshots Path..."),
|
||||
QString::fromStdString(Common::FS::GetUserPath(
|
||||
Common::FS::UserPath::ScreenshotsDir))) +
|
||||
QDir::separator();
|
||||
if (!filename.isEmpty()) {
|
||||
ui->screenshot_path_edit->setText(filename);
|
||||
|
@ -82,8 +82,8 @@ void ConfigureUi::ApplyConfiguration() {
|
|||
UISettings::values.row_2_text_id = ui->row_2_text_combobox->currentData().toUInt();
|
||||
|
||||
UISettings::values.enable_screenshot_save_as = ui->enable_screenshot_save_as->isChecked();
|
||||
FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir,
|
||||
ui->screenshot_path_edit->text().toStdString());
|
||||
Common::FS::GetUserPath(Common::FS::UserPath::ScreenshotsDir,
|
||||
ui->screenshot_path_edit->text().toStdString());
|
||||
Settings::Apply();
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ void ConfigureUi::SetConfiguration() {
|
|||
|
||||
ui->enable_screenshot_save_as->setChecked(UISettings::values.enable_screenshot_save_as);
|
||||
ui->screenshot_path_edit->setText(
|
||||
QString::fromStdString(FileUtil::GetUserPath(FileUtil::UserPath::ScreenshotsDir)));
|
||||
QString::fromStdString(Common::FS::GetUserPath(Common::FS::UserPath::ScreenshotsDir)));
|
||||
}
|
||||
|
||||
void ConfigureUi::changeEvent(QEvent* event) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue