Skip to content

Commit

Permalink
Port xconfig to Qt5 - Use QMenu
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
  • Loading branch information
Boris Barbulovski authored and Michal Marek committed Oct 14, 2015
1 parent 924bbb5 commit 76bede8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <q3header.h>
#include <QFileDialog>
#include <q3dragobject.h>
#include <q3popupmenu.h>
#include <QMenu>

#include <qapplication.h>
#include <qdesktopwidget.h>
Expand Down Expand Up @@ -817,7 +817,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
if (!headerPopup) {
QAction *action;

headerPopup = new Q3PopupMenu(this);
headerPopup = new QMenu(this);
action = new QAction(_("Show Name"), this);
action->setToggleAction(TRUE);
connect(action, SIGNAL(toggled(bool)),
Expand Down Expand Up @@ -1387,32 +1387,32 @@ ConfigMainWindow::ConfigMainWindow(void)
fullViewAction->addTo(toolBar);

// create config menu
Q3PopupMenu* config = new Q3PopupMenu(this);
QMenu* config = new QMenu(this);
menu->insertItem(_("&File"), config);
loadAction->addTo(config);
saveAction->addTo(config);
saveAsAction->addTo(config);
config->insertSeparator();
config->addSeparator();
quitAction->addTo(config);

// create edit menu
Q3PopupMenu* editMenu = new Q3PopupMenu(this);
QMenu* editMenu = new QMenu(this);
menu->insertItem(_("&Edit"), editMenu);
searchAction->addTo(editMenu);

// create options menu
Q3PopupMenu* optionMenu = new Q3PopupMenu(this);
QMenu* optionMenu = new QMenu(this);
menu->insertItem(_("&Option"), optionMenu);
showNameAction->addTo(optionMenu);
showRangeAction->addTo(optionMenu);
showDataAction->addTo(optionMenu);
optionMenu->insertSeparator();
optionMenu->addSeparator();
optGroup->addTo(optionMenu);
optionMenu->insertSeparator();
optionMenu->addSeparator();

// create help menu
Q3PopupMenu* helpMenu = new Q3PopupMenu(this);
menu->insertSeparator();
QMenu* helpMenu = new QMenu(this);
menu->addSeparator();
menu->insertItem(_("&Help"), helpMenu);
showIntroAction->addTo(helpMenu);
showAboutAction->addTo(helpMenu);
Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/qconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public slots:
struct menu *rootEntry;
QColorGroup disabledColorGroup;
QColorGroup inactivedColorGroup;
Q3PopupMenu* headerPopup;
QMenu* headerPopup;

private:
int colMap[colNr];
Expand Down

0 comments on commit 76bede8

Please sign in to comment.