Merge pull request #12730 from JosJuice/skylanders-folder-no-asking

DolphinQt: Don't ask user about creating Skylanders folder
This commit is contained in:
Tilka 2024-04-21 11:18:42 +01:00 committed by GitHub
commit ee027dc736
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 14 deletions

View File

@ -75,21 +75,8 @@ SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
{
skylanders_folder = QDir(QString::fromStdString(Config::Get(Config::MAIN_SKYLANDERS_PATH)));
}
// prompt folder creation if path invalid
if (!skylanders_folder.exists())
{
QMessageBox::StandardButton create_folder_response;
create_folder_response =
QMessageBox::question(this, tr("Create Skylander Folder"),
tr("Skylanders folder not found for this user. Create new folder?"),
QMessageBox::Yes | QMessageBox::No);
if (create_folder_response == QMessageBox::Yes)
{
skylanders_folder = QDir(user_path);
Config::SetBase(Config::MAIN_SKYLANDERS_PATH, user_path.toStdString());
skylanders_folder.mkdir(skylanders_folder.path());
}
}
skylanders_folder.mkdir(skylanders_folder.path());
m_collection_path = QDir::toNativeSeparators(skylanders_folder.path()) + QDir::separator();
m_last_skylander_path = m_collection_path;