mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Wizard: Only allow to select Morrowind.esm master files, display an error if Morrowind.bsa is missing
This commit is contained in:
parent
d47bd54bb5
commit
e7afbc74d8
@ -95,9 +95,9 @@ void Wizard::ExistingInstallationPage::on_browseButton_clicked()
|
|||||||
{
|
{
|
||||||
QString selectedFile = QFileDialog::getOpenFileName(
|
QString selectedFile = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
tr("Select master file"),
|
tr("Select Morrowind.esm (located in Data Files)"),
|
||||||
QDir::currentPath(),
|
QDir::currentPath(),
|
||||||
QString(tr("Morrowind master file (*.esm)")),
|
QString(tr("Morrowind master file (Morrowind.esm)")),
|
||||||
nullptr,
|
nullptr,
|
||||||
QFileDialog::DontResolveSymlinks);
|
QFileDialog::DontResolveSymlinks);
|
||||||
|
|
||||||
@ -110,7 +110,18 @@ void Wizard::ExistingInstallationPage::on_browseButton_clicked()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!mWizard->findFiles(QLatin1String("Morrowind"), info.absolutePath()))
|
if (!mWizard->findFiles(QLatin1String("Morrowind"), info.absolutePath()))
|
||||||
return; // No valid Morrowind installation found
|
{
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(tr("Error detecting Morrowind files"));
|
||||||
|
msgBox.setIcon(QMessageBox::Warning);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(QObject::tr(
|
||||||
|
"<b>Morrowind.bsa</b> is missing!<br>\
|
||||||
|
Make sure your Morrowind installation is complete."
|
||||||
|
));
|
||||||
|
msgBox.exec();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QString path(QDir::toNativeSeparators(info.absolutePath()));
|
QString path(QDir::toNativeSeparators(info.absolutePath()));
|
||||||
QList<QListWidgetItem*> items = installationsList->findItems(path, Qt::MatchExactly);
|
QList<QListWidgetItem*> items = installationsList->findItems(path, Qt::MatchExactly);
|
||||||
|
Loading…
Reference in New Issue
Block a user