diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-08-07 18:18:52 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-08-14 13:30:04 +0900 |
commit | d4b1cea7de0c7472c6f3eb1740fc53af6ee9ded5 (patch) | |
tree | 53a6e3e354a832beae83bf37f931a41479394f4c /scripts/kconfig | |
parent | 614bf0a89ae215beafe15d827a9cd983277a9b90 (diff) | |
download | linux-d4b1cea7de0c7472c6f3eb1740fc53af6ee9ded5.tar.bz2 |
kconfig: qconf: do not use 'menu' variable for (QMenuBar *)
I think it is a bit confusing to use 'menu' to hold a QMenuBar pointer.
I want to use 'menu' for a QMenu pointer.
You do not need to use a local variable here. Use menuBar() directly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/qconf.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index cf2e06ebc4a8..79275c44d7be 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1382,7 +1382,6 @@ void ConfigSearchWindow::search(void) ConfigMainWindow::ConfigMainWindow(void) : searchWindow(0) { - QMenuBar* menu; bool ok = true; QVariant x, y; int width, height; @@ -1433,7 +1432,6 @@ ConfigMainWindow::ConfigMainWindow(void) setTabOrder(configList, helpText); configList->setFocus(); - menu = menuBar(); toolBar = new QToolBar("Tools", this); addToolBar(toolBar); @@ -1519,7 +1517,7 @@ ConfigMainWindow::ConfigMainWindow(void) toolBar->addAction(fullViewAction); // create config menu - QMenu* config = menu->addMenu("&File"); + QMenu* config = menuBar()->addMenu("&File"); config->addAction(loadAction); config->addAction(saveAction); config->addAction(saveAsAction); @@ -1527,12 +1525,13 @@ ConfigMainWindow::ConfigMainWindow(void) config->addAction(quitAction); // create edit menu - QMenu* editMenu = menu->addMenu("&Edit"); + QMenu* editMenu = menuBar()->addMenu("&Edit"); editMenu->addAction(searchAction); // create options menu - QMenu* optionMenu = menu->addMenu("&Option"); + QMenu* optionMenu = menuBar()->addMenu("&Option"); optionMenu->addAction(showNameAction); + optionMenu->addAction(showRangeAction); optionMenu->addAction(showDataAction); optionMenu->addSeparator(); @@ -1541,7 +1540,7 @@ ConfigMainWindow::ConfigMainWindow(void) optionMenu->addAction(showDebugAction); // create help menu - QMenu* helpMenu = menu->addMenu("&Help"); + QMenu* helpMenu = menuBar()->addMenu("&Help"); helpMenu->addAction(showIntroAction); helpMenu->addAction(showAboutAction); |