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