mirror of https://github.com/snes9xgit/snes9x.git
Qt: Show paths in native format on Win32.
This commit is contained in:
parent
81f189cf57
commit
fd05ca7df5
|
@ -522,7 +522,9 @@ void EmuMainWindow::populateRecentlyUsed()
|
||||||
for (int i = 0; i < app->config->recently_used.size(); i++)
|
for (int i = 0; i < app->config->recently_used.size(); i++)
|
||||||
{
|
{
|
||||||
auto &string = app->config->recently_used[i];
|
auto &string = app->config->recently_used[i];
|
||||||
auto action = recent_menu->addAction(QString("&%1: %2").arg(i).arg(QString::fromStdString(string)));
|
auto action = recent_menu->addAction(QString("&%1: %2")
|
||||||
|
.arg(i)
|
||||||
|
.arg(QDir::toNativeSeparators(QString::fromStdString(string))));
|
||||||
connect(action, &QAction::triggered, [&, string] {
|
connect(action, &QAction::triggered, [&, string] {
|
||||||
openFile(string);
|
openFile(string);
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,7 +45,7 @@ void FoldersPanel::refreshEntry(QComboBox *combo, QLineEdit *lineEdit, QPushButt
|
||||||
combo->setCurrentIndex(*location);
|
combo->setCurrentIndex(*location);
|
||||||
if (custom)
|
if (custom)
|
||||||
{
|
{
|
||||||
lineEdit->setText(QString::fromUtf8(*folder));
|
lineEdit->setText(QDir::toNativeSeparators(QString::fromUtf8(*folder)));
|
||||||
}
|
}
|
||||||
else if (*location == EmuConfig::eConfigDirectory)
|
else if (*location == EmuConfig::eConfigDirectory)
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,7 @@ void FoldersPanel::refreshEntry(QComboBox *combo, QLineEdit *lineEdit, QPushButt
|
||||||
rom_dir = QString::fromStdString(app->getContentFolder());
|
rom_dir = QString::fromStdString(app->getContentFolder());
|
||||||
if (rom_dir.isEmpty())
|
if (rom_dir.isEmpty())
|
||||||
rom_dir = QString::fromStdString(app->config->last_rom_folder);
|
rom_dir = QString::fromStdString(app->config->last_rom_folder);
|
||||||
|
rom_dir = QDir::toNativeSeparators(rom_dir);
|
||||||
|
|
||||||
lineEdit->setText("ROM Folder: " + rom_dir);
|
lineEdit->setText("ROM Folder: " + rom_dir);
|
||||||
}
|
}
|
||||||
|
@ -72,6 +73,7 @@ void FoldersPanel::refreshEntry(QComboBox *combo, QLineEdit *lineEdit, QPushButt
|
||||||
if (!dialog.exec())
|
if (!dialog.exec())
|
||||||
return;
|
return;
|
||||||
*folder = dialog.selectedFiles().at(0).toUtf8();
|
*folder = dialog.selectedFiles().at(0).toUtf8();
|
||||||
|
*folder = QDir::toNativeSeparators(QString::fromUtf8(*folder)).toStdString();
|
||||||
lineEdit->setText(QString::fromStdString(*folder));
|
lineEdit->setText(QString::fromStdString(*folder));
|
||||||
app->updateSettings();
|
app->updateSettings();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue