Make path separators in UI more consistent

This commit is contained in:
Silent
2020-09-19 22:39:04 +02:00
parent fa3307e5f1
commit 92d0dabf54
10 changed files with 62 additions and 54 deletions

View File

@ -41,16 +41,19 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(QtHostInterface* host_interface, QW
dialog->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Unchecked"),
tr("Patches the BIOS to skip the console's boot animation. Does not work with all games, "
"but usually safe to enabled."));
dialog->registerWidgetHelp(m_ui.cdromLoadImageToRAM, tr("Preload Image to RAM"), tr("Unchecked"),
tr("Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. In some cases also eliminates stutter when games initiate audio track playback."));
dialog->registerWidgetHelp(
m_ui.cdromLoadImageToRAM, tr("Preload Image to RAM"), tr("Unchecked"),
tr("Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. In some "
"cases also eliminates stutter when games initiate audio track playback."));
}
ConsoleSettingsWidget::~ConsoleSettingsWidget() = default;
void ConsoleSettingsWidget::onBrowseBIOSPathButtonClicked()
{
QString path = QFileDialog::getOpenFileName(this, tr("Select BIOS Image"), QString(), tr(BIOS_IMAGE_FILTER));
QString path = QDir::toNativeSeparators(
QFileDialog::getOpenFileName(this, tr("Select BIOS Image"), QString(), tr(BIOS_IMAGE_FILTER)));
if (path.isEmpty())
return;

View File

@ -456,8 +456,9 @@ void GamePropertiesDialog::connectUi()
saveGameSettings();
});
connect(m_ui.userMemoryCard1SharedPathBrowse, &QPushButton::clicked, [this]() {
QString path = QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER));
QString path = QDir::toNativeSeparators(
QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER)));
if (path.isEmpty())
return;
@ -478,8 +479,9 @@ void GamePropertiesDialog::connectUi()
saveGameSettings();
});
connect(m_ui.userMemoryCard2SharedPathBrowse, &QPushButton::clicked, [this]() {
QString path = QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER));
QString path = QDir::toNativeSeparators(
QFileDialog::getOpenFileName(this, tr("Select path to memory card image"), QString(),
qApp->translate("MemoryCardSettingsWidget", MEMORY_CARD_IMAGE_FILTER)));
if (path.isEmpty())
return;

View File

@ -78,7 +78,7 @@ void MemoryCardEditorDialog::populateComboBox(QComboBox* cb)
for (FILESYSTEM_FIND_DATA& fd : results)
{
std::string real_filename(
StringUtil::StdStringFromFormat("%s%c%s", base_path.c_str(), FS_OSPATH_SEPERATOR_CHARACTER, fd.FileName.c_str()));
StringUtil::StdStringFromFormat("%s" FS_OSPATH_SEPARATOR_STR "%s", base_path.c_str(), fd.FileName.c_str()));
std::string::size_type pos = fd.FileName.rfind('.');
if (pos != std::string::npos)
fd.FileName.erase(pos);