Give GamePropertiesDialog a parent

This commit is contained in:
Silent 2020-08-29 14:42:28 +02:00
parent 79aaf908a6
commit 800c5303de
No known key found for this signature in database
GPG key ID: AE53149BB0C45AF1
3 changed files with 4 additions and 4 deletions

View file

@ -153,9 +153,9 @@ void GamePropertiesDialog::setupAdditionalUi()
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
void GamePropertiesDialog::showForEntry(QtHostInterface* host_interface, const GameListEntry* ge)
void GamePropertiesDialog::showForEntry(QtHostInterface* host_interface, const GameListEntry* ge, QWidget* parent)
{
GamePropertiesDialog* gpd = new GamePropertiesDialog(host_interface);
GamePropertiesDialog* gpd = new GamePropertiesDialog(host_interface, parent);
gpd->populate(ge);
gpd->show();
gpd->onResize();

View file

@ -17,7 +17,7 @@ public:
GamePropertiesDialog(QtHostInterface* host_interface, QWidget* parent = nullptr);
~GamePropertiesDialog();
static void showForEntry(QtHostInterface* host_interface, const GameListEntry* ge);
static void showForEntry(QtHostInterface* host_interface, const GameListEntry* ge, QWidget* parent);
public Q_SLOTS:
void clear();

View file

@ -406,7 +406,7 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
if (entry)
{
connect(menu.addAction(tr("Properties...")), &QAction::triggered,
[this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry); });
[this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry, this); });
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {
const QFileInfo fi(QString::fromStdString(entry->path));