From patchwork Sun May 17 23:36:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Heidelberg X-Patchwork-Id: 24357 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4HNaqB5015801 for ; Sun, 17 May 2009 23:37:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755293AbZEQXg7 (ORCPT ); Sun, 17 May 2009 19:36:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755506AbZEQXg6 (ORCPT ); Sun, 17 May 2009 19:36:58 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:46388 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755140AbZEQXgt (ORCPT ); Sun, 17 May 2009 19:36:49 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate02.web.de (Postfix) with ESMTP id 19FA8FF680EE; Mon, 18 May 2009 01:36:50 +0200 (CEST) Received: from [89.59.115.214] (helo=localhost.localdomain) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1M5puT-0006Qi-03; Mon, 18 May 2009 01:36:49 +0200 From: Markus Heidelberg To: Sam Ravnborg , Roman Zippel Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Heidelberg Subject: [PATCH resend 07/10] kconfig qconf: add namespace for use of Key_ enum values Date: Mon, 18 May 2009 01:36:51 +0200 Message-Id: <1242603414-9267-8-git-send-email-markus.heidelberg@web.de> X-Mailer: git-send-email 1.6.3.1.20.ga30f In-Reply-To: <1242603414-9267-1-git-send-email-markus.heidelberg@web.de> References: <1242603414-9267-1-git-send-email-markus.heidelberg@web.de> X-Sender: markus.heidelberg@web.de X-Provags-ID: V01U2FsdGVkX183ocFryK5YWcy6ahQaMPf92rBd6RYXMQHg8X2s RzHFusPxnffrpss+xwF63MgslGQAViA7GdNZI9a8FEi+Ze4lDG DGGcWIwvjggAIQdKEVuQ== Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org They are defined in the 'Qt' namespace. Fixes the following compiler errors after a quick conversion with 'qt3to4', which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2. scripts/kconfig/qconf.cc: In member function 'virtual void ConfigLineEdit::keyPressEvent(QKeyEvent*)': scripts/kconfig/qconf.cc:311: error: 'Key_Escape' was not declared in this scope scripts/kconfig/qconf.cc:313: error: 'Key_Return' was not declared in this scope scripts/kconfig/qconf.cc:314: error: 'Key_Enter' was not declared in this scope scripts/kconfig/qconf.cc: In member function 'virtual void ConfigList::keyPressEvent(QKeyEvent*)': scripts/kconfig/qconf.cc:653: error: 'Key_Escape' was not declared in this scope scripts/kconfig/qconf.cc:666: error: 'Key_Return' was not declared in this scope scripts/kconfig/qconf.cc:667: error: 'Key_Enter' was not declared in this scope scripts/kconfig/qconf.cc:681: error: 'Key_Space' was not declared in this scope scripts/kconfig/qconf.cc:684: error: 'Key_N' was not declared in this scope scripts/kconfig/qconf.cc:687: error: 'Key_M' was not declared in this scope scripts/kconfig/qconf.cc:690: error: 'Key_Y' was not declared in this scope scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()': scripts/kconfig/qconf.cc:1329: error: 'CTRL' was not declared in this scope scripts/kconfig/qconf.cc:1329: error: 'Key_Q' was not declared in this scope scripts/kconfig/qconf.cc:1331: error: 'Key_L' was not declared in this scope scripts/kconfig/qconf.cc:1333: error: 'Key_S' was not declared in this scope scripts/kconfig/qconf.cc:1340: error: 'Key_F' was not declared in this scope Signed-off-by: Markus Heidelberg --- scripts/kconfig/qconf.cc | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 7433dac..afae613 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -297,10 +297,10 @@ void ConfigLineEdit::show(ConfigItem* i) void ConfigLineEdit::keyPressEvent(QKeyEvent* e) { switch (e->key()) { - case Key_Escape: + case Qt::Key_Escape: break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: sym_set_string_value(item->menu->sym, text().latin1()); parent()->updateList(item); break; @@ -639,7 +639,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) struct menu *menu; enum prop_type type; - if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) { + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { emit parentSelected(); ev->accept(); return; @@ -652,8 +652,8 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) item = (ConfigItem*)i; switch (ev->key()) { - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: if (item->goParent) { emit parentSelected(); break; @@ -667,16 +667,16 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) emit menuSelected(menu); break; } - case Key_Space: + case Qt::Key_Space: changeValue(item); break; - case Key_N: + case Qt::Key_N: setValue(item, no); break; - case Key_M: + case Qt::Key_M: setValue(item, mod); break; - case Key_Y: + case Qt::Key_Y: setValue(item, yes); break; default: @@ -1315,18 +1315,18 @@ ConfigMainWindow::ConfigMainWindow(void) backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this); connect(backAction, SIGNAL(activated()), SLOT(goBack())); backAction->setEnabled(FALSE); - QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this); + QAction *quitAction = new QAction("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this); connect(quitAction, SIGNAL(activated()), SLOT(close())); - QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this); + QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this); connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); - saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this); + saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this); connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); conf_set_changed_callback(conf_changed); // Set saveAction's initial state conf_changed(); QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this); connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); - QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this); + QAction *searchAction = new QAction("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this); connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this); connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));