mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Qt: Simplify AboutDialog creation
Just create the AboutDialog on the stack -- the actual object lives on the heap anyway, since Qt uses the pimpl idiom. Removes the need for an explicit new and a special delete on close attribute.
This commit is contained in:
@ -14,7 +14,6 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent)
|
|||||||
{
|
{
|
||||||
setWindowTitle(tr("About Dolphin"));
|
setWindowTitle(tr("About Dolphin"));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
|
|
||||||
QString text = QStringLiteral("");
|
QString text = QStringLiteral("");
|
||||||
QString small = QStringLiteral("<p style='margin-top:0px; margin-bottom:0px; font-size:9pt;'>");
|
QString small = QStringLiteral("<p style='margin-top:0px; margin-bottom:0px; font-size:9pt;'>");
|
||||||
|
@ -553,8 +553,8 @@ void MainWindow::ShowAudioWindow()
|
|||||||
|
|
||||||
void MainWindow::ShowAboutDialog()
|
void MainWindow::ShowAboutDialog()
|
||||||
{
|
{
|
||||||
AboutDialog* about = new AboutDialog(this);
|
AboutDialog about{this};
|
||||||
about->show();
|
about.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::ShowHotkeyDialog()
|
void MainWindow::ShowHotkeyDialog()
|
||||||
|
Reference in New Issue
Block a user