mirror of https://github.com/PCSX2/pcsx2.git
Qt: Fix QFileDialog usage in NewInputRecordingDlg
This commit is contained in:
parent
af07ee9abb
commit
3878e94253
|
@ -79,22 +79,14 @@ void NewInputRecordingDlg::onRecordingTypeSaveStateChecked(bool checked)
|
||||||
|
|
||||||
void NewInputRecordingDlg::onBrowseForPathClicked()
|
void NewInputRecordingDlg::onBrowseForPathClicked()
|
||||||
{
|
{
|
||||||
QFileDialog dialog(this);
|
QString filter = tr("Input Recording Files (*.p2m2)");
|
||||||
dialog.setFileMode(QFileDialog::AnyFile);
|
QString filename = QFileDialog::getSaveFileName(this, tr("Select a File"), QString(), filter, &filter);
|
||||||
dialog.setWindowTitle("Select a File");
|
if (filename.isEmpty())
|
||||||
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
|
return;
|
||||||
dialog.setDefaultSuffix("p2m2");
|
|
||||||
QStringList fileNames;
|
m_filePath = std::move(filename);
|
||||||
if (dialog.exec())
|
m_ui.m_filePathInput->setText(m_filePath);
|
||||||
{
|
updateFormStatus();
|
||||||
fileNames = dialog.selectedFiles();
|
|
||||||
}
|
|
||||||
if (fileNames.length() > 0)
|
|
||||||
{
|
|
||||||
m_filePath = fileNames.first();
|
|
||||||
m_ui.m_filePathInput->setText(m_filePath);
|
|
||||||
updateFormStatus();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewInputRecordingDlg::onAuthorNameChanged(const QString& text)
|
void NewInputRecordingDlg::onAuthorNameChanged(const QString& text)
|
||||||
|
|
Loading…
Reference in New Issue