forked from qt-creator/qt-creator
LayoutBuilder: Avoid leak warnings in Application::exec()
Change-Id: I9c05f3015b120220408076d58d29983d2194d9e1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -613,12 +613,12 @@ Application::Application(std::initializer_list<LayoutItem> items)
|
||||
|
||||
int Application::exec(int &argc, char *argv[])
|
||||
{
|
||||
auto app = new QApplication(argc, argv);
|
||||
QApplication app(argc, argv);
|
||||
LayoutBuilder builder;
|
||||
addItemHelper(builder, *this);
|
||||
if (QWidget *widget = builder.stack.last().widget)
|
||||
widget->show();
|
||||
return app->exec();
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
// "Properties"
|
||||
|
||||
Reference in New Issue
Block a user