kconfig: qconf: overload addToolBar() to create and insert toolbar
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 7 Aug 2020 09:18:55 +0000 (18:18 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 14 Aug 2020 04:30:04 +0000 (13:30 +0900)
Use the overloaded function, addToolBar(const QString &title)
to create a QToolBar object, setting its window title, and inserts
it into the toolbar area.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/kconfig/qconf.cc

index f2f5875979fe3d3ec7c33099ab78de4dcfd55d62..b44058913b972a16de3ae5e7660af17c7bae43d9 100644 (file)
@@ -1432,9 +1432,6 @@ ConfigMainWindow::ConfigMainWindow(void)
        setTabOrder(configList, helpText);
        configList->setFocus();
 
-       QToolBar *toolBar = new QToolBar("Tools", this);
-       addToolBar(toolBar);
-
        backAction = new QAction(QPixmap(xpm_back), "Back", this);
        connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack()));
 
@@ -1507,6 +1504,7 @@ ConfigMainWindow::ConfigMainWindow(void)
          connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout()));
 
        // init tool bar
+       QToolBar *toolBar = addToolBar("Tools");
        toolBar->addAction(backAction);
        toolBar->addSeparator();
        toolBar->addAction(loadAction);