Skip to content

Commit 8470cda

Browse files
committed
GUI: Fix warning from About-dialog layout.
1 parent 337721f commit 8470cda

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gui/aboutdialog.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
2828
{
2929
setWindowTitle(tr("About cppcheck"));
3030
// Left icon area and right text area
31-
QHBoxLayout *iconLayout = new QHBoxLayout(this);
31+
QHBoxLayout *iconLayout = new QHBoxLayout();
3232
// Keep icon at the top of the dialog
33-
QVBoxLayout *iconVLayout = new QVBoxLayout(this);
33+
QVBoxLayout *iconVLayout = new QVBoxLayout();
3434
// Texts
35-
QVBoxLayout *mainLayout = new QVBoxLayout(this);
35+
QVBoxLayout *mainLayout = new QVBoxLayout();
3636
// Keep close button in right
37-
QHBoxLayout *btnLayout = new QHBoxLayout(this);
37+
QHBoxLayout *btnLayout = new QHBoxLayout();
3838

3939
QIcon *icon = new QIcon(":icon.png");
4040
QLabel *iconLabel = new QLabel();
@@ -63,6 +63,7 @@ AboutDialog::AboutDialog(const QString &version, QWidget *parent)
6363

6464
btnLayout->addStretch();
6565
btnLayout->addWidget(quit);
66+
setLayout(iconLayout);
6667

6768
connect(quit, SIGNAL(clicked()), this, SLOT(close()));
6869
}

0 commit comments

Comments
 (0)