linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Port of [qx]config to Qt 5
@ 2015-09-22 18:36 Thiago Macieira
  2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
                   ` (39 more replies)
  0 siblings, 40 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek

This patch set contains the port of qconfig to Qt 5. At the same time,
it removes Qt 2 and 3 support (the last Qt 3 release was in 2007).

Most of the work was done by Boris Barbulovski, so many thanks! I've
reviewed and tested the changes.

The patch set contains one patch per functionality being ported, for
ease of reviewing. The first patch contains the removal of the #ifdef'ed
code for older versions and the last one contains an update to the
buildsystem to find Qt 5.

Note that the Qt 5 build requires a host compiler that understands the
-std=c++11 switch (for GCC, since 4.7).

 scripts/kconfig/qconf.h  | 150 +++++++++++-------------
 scripts/kconfig/Makefile |  73 +++++-------
 scripts/kconfig/qconf.cc | 688 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------
 3 files changed, 478 insertions(+), 433 deletions(-)


^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 01/39] Remove support for QT3 and older.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar Thiago Macieira
                   ` (38 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 18 ------------------
 scripts/kconfig/qconf.cc | 23 -----------------------
 2 files changed, 41 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index bde0c6b..703285d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -3,27 +3,9 @@
  * Released under the terms of the GNU GPL v2.0.
  */
 
-#if QT_VERSION < 0x040000
-#include <qlistview.h>
-#else
 #include <q3listview.h>
-#endif
 #include <qsettings.h>
 
-#if QT_VERSION < 0x040000
-#define Q3ValueList             QValueList
-#define Q3PopupMenu             QPopupMenu
-#define Q3ListView              QListView
-#define Q3ListViewItem          QListViewItem
-#define Q3VBox                  QVBox
-#define Q3TextBrowser           QTextBrowser
-#define Q3MainWindow            QMainWindow
-#define Q3Action                QAction
-#define Q3ToolBar               QToolBar
-#define Q3ListViewItemIterator  QListViewItemIterator
-#define Q3FileDialog            QFileDialog
-#endif
-
 class ConfigView;
 class ConfigList;
 class ConfigItem;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c3bb7fe..0e18a9c 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -5,18 +5,6 @@
 
 #include <qglobal.h>
 
-#if QT_VERSION < 0x040000
-#include <stddef.h>
-#include <qmainwindow.h>
-#include <qvbox.h>
-#include <qvaluelist.h>
-#include <qtextbrowser.h>
-#include <qaction.h>
-#include <qheader.h>
-#include <qfiledialog.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#else
 #include <q3mainwindow.h>
 #include <q3vbox.h>
 #include <q3valuelist.h>
@@ -26,7 +14,6 @@
 #include <q3filedialog.h>
 #include <q3dragobject.h>
 #include <q3popupmenu.h>
-#endif
 
 #include <qapplication.h>
 #include <qdesktopwidget.h>
@@ -1282,11 +1269,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 	QDesktopWidget *d = configApp->desktop();
 	snprintf(title, sizeof(title), "%s%s",
 		rootmenu.prompt->text,
-#if QT_VERSION < 0x040000
-		" (Qt3)"
-#else
 		""
-#endif
 		);
 	setCaption(title);
 
@@ -1368,15 +1351,9 @@ ConfigMainWindow::ConfigMainWindow(void)
 	connect(optGroup, SIGNAL(selected(QAction *)), menuView,
 		SLOT(setOptionMode(QAction *)));
 
-#if QT_VERSION >= 0x040000
 	configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
 	configView->showAllAction = new QAction(_("Show All Options"), optGroup);
 	configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
-#else
-	configView->showNormalAction = new QAction(_("Show Normal Options"), 0, optGroup);
-	configView->showAllAction = new QAction(_("Show All Options"), 0, optGroup);
-	configView->showPromptAction = new QAction(_("Show Prompt Options"), 0, optGroup);
-#endif
 	configView->showNormalAction->setToggleAction(TRUE);
 	configView->showNormalAction->setOn(configList->optMode == normalOpt);
 	configView->showAllAction->setToggleAction(TRUE);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
  2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 03/39] Port xconfig to Qt5 - Use QAction Thiago Macieira
                   ` (37 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 5 +++--
 scripts/kconfig/qconf.cc | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 703285d..db4b417 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -4,6 +4,7 @@
  */
 
 #include <q3listview.h>
+#include <QMainWindow>
 #include <qsettings.h>
 
 class ConfigView;
@@ -281,7 +282,7 @@ protected:
 	struct symbol **result;
 };
 
-class ConfigMainWindow : public Q3MainWindow {
+class ConfigMainWindow : public QMainWindow {
 	Q_OBJECT
 
 	static Q3Action *saveAction;
@@ -313,7 +314,7 @@ protected:
 	ConfigView *configView;
 	ConfigList *configList;
 	ConfigInfoView *helpText;
-	Q3ToolBar *toolBar;
+	QToolBar *toolBar;
 	Q3Action *backAction;
 	QSplitter* split1;
 	QSplitter* split2;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 0e18a9c..199934c 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -5,7 +5,7 @@
 
 #include <qglobal.h>
 
-#include <q3mainwindow.h>
+#include <QMainWindow>
 #include <q3vbox.h>
 #include <q3valuelist.h>
 #include <q3textbrowser.h>
@@ -1303,7 +1303,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configList->setFocus();
 
 	menu = menuBar();
-	toolBar = new Q3ToolBar("Tools", this);
+	toolBar = new QToolBar("Tools", this);
 
 	backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this);
 	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 03/39] Port xconfig to Qt5 - Use QAction
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
  2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
  2015-09-22 18:36 ` [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog Thiago Macieira
                   ` (36 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  4 ++--
 scripts/kconfig/qconf.cc | 48 ++++++++++++++++++++++++++----------------------
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index db4b417..4d5218d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -285,7 +285,7 @@ protected:
 class ConfigMainWindow : public QMainWindow {
 	Q_OBJECT
 
-	static Q3Action *saveAction;
+	static QAction *saveAction;
 	static void conf_changed(void);
 public:
 	ConfigMainWindow(void);
@@ -315,7 +315,7 @@ protected:
 	ConfigList *configList;
 	ConfigInfoView *helpText;
 	QToolBar *toolBar;
-	Q3Action *backAction;
+	QAction *backAction;
 	QSplitter* split1;
 	QSplitter* split2;
 };
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 199934c..601c868 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -9,7 +9,7 @@
 #include <q3vbox.h>
 #include <q3valuelist.h>
 #include <q3textbrowser.h>
-#include <q3action.h>
+#include <QAction>
 #include <q3header.h>
 #include <q3filedialog.h>
 #include <q3dragobject.h>
@@ -44,7 +44,7 @@
 static QApplication *configApp;
 static ConfigSettings *configSettings;
 
-Q3Action *ConfigMainWindow::saveAction;
+QAction *ConfigMainWindow::saveAction;
 
 static inline QString qgettext(const char* str)
 {
@@ -815,10 +815,10 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
 {
 	if (e->y() <= header()->geometry().bottom()) {
 		if (!headerPopup) {
-			Q3Action *action;
+			QAction *action;
 
 			headerPopup = new Q3PopupMenu(this);
-			action = new Q3Action(NULL, _("Show Name"), 0, this);
+			action = new QAction(_("Show Name"), this);
 			  action->setToggleAction(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowName(bool)));
@@ -826,7 +826,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
 				  action, SLOT(setOn(bool)));
 			  action->setOn(showName);
 			  action->addTo(headerPopup);
-			action = new Q3Action(NULL, _("Show Range"), 0, this);
+			action = new QAction(_("Show Range"), this);
 			  action->setToggleAction(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowRange(bool)));
@@ -834,7 +834,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
 				  action, SLOT(setOn(bool)));
 			  action->setOn(showRange);
 			  action->addTo(headerPopup);
-			action = new Q3Action(NULL, _("Show Data"), 0, this);
+			action = new QAction( _("Show Data"), this);
 			  action->setToggleAction(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowData(bool)));
@@ -1157,7 +1157,7 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
 Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
 {
 	Q3PopupMenu* popup = Parent::createPopupMenu(pos);
-	Q3Action* action = new Q3Action(NULL, _("Show Debug Info"), 0, popup);
+	QAction* action = new QAction(_("Show Debug Info"), popup);
 	  action->setToggleAction(TRUE);
 	  connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 	  connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
@@ -1305,40 +1305,44 @@ ConfigMainWindow::ConfigMainWindow(void)
 	menu = menuBar();
 	toolBar = new QToolBar("Tools", this);
 
-	backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this);
+	backAction = new QAction(QPixmap(xpm_back), _("Back"), this);
 	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
 	  backAction->setEnabled(FALSE);
-	Q3Action *quitAction = new Q3Action("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
+	QAction *quitAction = new QAction(_("&Quit"), this);
+	quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
 	  connect(quitAction, SIGNAL(activated()), SLOT(close()));
-	Q3Action *loadAction = new Q3Action("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
+	QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), this);
+	loadAction->setShortcut(Qt::CTRL + Qt::Key_L);
 	  connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
-	saveAction = new Q3Action("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
+	saveAction = new QAction(QPixmap(xpm_save), _("&Save"), this);
+	saveAction->setShortcut(Qt::CTRL + Qt::Key_S);
 	  connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
 	conf_set_changed_callback(conf_changed);
 	// Set saveAction's initial state
 	conf_changed();
-	Q3Action *saveAsAction = new Q3Action("Save As...", _("Save &As..."), 0, this);
+	QAction *saveAsAction = new QAction(_("Save &As..."), this);
 	  connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
-	Q3Action *searchAction = new Q3Action("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
+	QAction *searchAction = new QAction(_("&Find"), this);
+	searchAction->setShortcut(Qt::CTRL + Qt::Key_F);
 	  connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
-	Q3Action *singleViewAction = new Q3Action("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
+	QAction *singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this);
 	  connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
-	Q3Action *splitViewAction = new Q3Action("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
+	QAction *splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this);
 	  connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
-	Q3Action *fullViewAction = new Q3Action("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
+	QAction *fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this);
 	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
 
-	Q3Action *showNameAction = new Q3Action(NULL, _("Show Name"), 0, this);
+	QAction *showNameAction = new QAction(_("Show Name"), this);
 	  showNameAction->setToggleAction(TRUE);
 	  connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
 	  connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
 	  showNameAction->setOn(configView->showName());
-	Q3Action *showRangeAction = new Q3Action(NULL, _("Show Range"), 0, this);
+	QAction *showRangeAction = new QAction(_("Show Range"), this);
 	  showRangeAction->setToggleAction(TRUE);
 	  connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
 	  connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
 	  showRangeAction->setOn(configList->showRange);
-	Q3Action *showDataAction = new Q3Action(NULL, _("Show Data"), 0, this);
+	QAction *showDataAction = new QAction(_("Show Data"), this);
 	  showDataAction->setToggleAction(TRUE);
 	  connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
 	  connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
@@ -1361,15 +1365,15 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configView->showPromptAction->setToggleAction(TRUE);
 	configView->showPromptAction->setOn(configList->optMode == promptOpt);
 
-	Q3Action *showDebugAction = new Q3Action(NULL, _("Show Debug Info"), 0, this);
+	QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
 	  showDebugAction->setToggleAction(TRUE);
 	  connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
 	  connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
 	  showDebugAction->setOn(helpText->showDebug());
 
-	Q3Action *showIntroAction = new Q3Action(NULL, _("Introduction"), 0, this);
+	QAction *showIntroAction = new QAction( _("Introduction"), this);
 	  connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
-	Q3Action *showAboutAction = new Q3Action(NULL, _("About"), 0, this);
+	QAction *showAboutAction = new QAction( _("About"), this);
 	  connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
 
 	// init tool bar
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (2 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 03/39] Port xconfig to Qt5 - Use QAction Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 05/39] Port xconfig to Qt5 - Use QList Thiago Macieira
                   ` (35 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 601c868..9f1a9cf 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -11,7 +11,7 @@
 #include <q3textbrowser.h>
 #include <QAction>
 #include <q3header.h>
-#include <q3filedialog.h>
+#include <QFileDialog>
 #include <q3dragobject.h>
 #include <q3popupmenu.h>
 
@@ -1457,7 +1457,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
 void ConfigMainWindow::loadConfig(void)
 {
-	QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this);
+	QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
 	if (s.isNull())
 		return;
 	if (conf_read(QFile::encodeName(s)))
@@ -1476,7 +1476,7 @@ bool ConfigMainWindow::saveConfig(void)
 
 void ConfigMainWindow::saveConfigAs(void)
 {
-	QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
+	QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
 	if (s.isNull())
 		return;
 	saveConfig();
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 05/39] Port xconfig to Qt5 - Use QList
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (3 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser Thiago Macieira
                   ` (34 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  4 ++--
 scripts/kconfig/qconf.cc | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 4d5218d..0d364c7 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -16,8 +16,8 @@ class ConfigMainWindow;
 class ConfigSettings : public QSettings {
 public:
 	ConfigSettings();
-	Q3ValueList<int> readSizes(const QString& key, bool *ok);
-	bool writeSizes(const QString& key, const Q3ValueList<int>& value);
+	QList<int> readSizes(const QString& key, bool *ok);
+	bool writeSizes(const QString& key, const QList<int>& value);
 };
 
 enum colIdx {
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9f1a9cf..bd62f60 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -7,7 +7,7 @@
 
 #include <QMainWindow>
 #include <q3vbox.h>
-#include <q3valuelist.h>
+#include <QList>
 #include <q3textbrowser.h>
 #include <QAction>
 #include <q3header.h>
@@ -64,9 +64,9 @@ ConfigSettings::ConfigSettings()
 /**
  * Reads a list of integer values from the application settings.
  */
-Q3ValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
+QList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
 {
-	Q3ValueList<int> result;
+	QList<int> result;
 	QStringList entryList = readListEntry(key, ok);
 	QStringList::Iterator it;
 
@@ -79,10 +79,10 @@ Q3ValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
 /**
  * Writes a list of integer values to the application settings.
  */
-bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList<int>& value)
+bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 {
 	QStringList stringList;
-	Q3ValueList<int>::ConstIterator it;
+	QList<int>::ConstIterator it;
 
 	for (it = value.begin(); it != value.end(); ++it)
 		stringList.push_back(QString::number(*it));
@@ -1214,7 +1214,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 			y = configSettings->readNumEntry("/window y", 0, &ok);
 		if (ok)
 			move(x, y);
-		Q3ValueList<int> sizes = configSettings->readSizes("/split", &ok);
+		QList<int> sizes = configSettings->readSizes("/split", &ok);
 		if (ok)
 			split->setSizes(sizes);
 		configSettings->endGroup();
@@ -1446,7 +1446,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 		showSplitView();
 
 	// UI setup done, restore splitter positions
-	Q3ValueList<int> sizes = configSettings->readSizes("/split1", &ok);
+	QList<int> sizes = configSettings->readSizes("/split1", &ok);
 	if (ok)
 		split1->setSizes(sizes);
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (4 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 05/39] Port xconfig to Qt5 - Use QList Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 07/39] Port xconfig to Qt5 - Use QMenu Thiago Macieira
                   ` (33 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  8 ++++----
 scripts/kconfig/qconf.cc | 12 ++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 0d364c7..84b62f5 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -232,9 +232,9 @@ public:
 	static QAction *showPromptAction;
 };
 
-class ConfigInfoView : public Q3TextBrowser {
+class ConfigInfoView : public QTextBrowser {
 	Q_OBJECT
-	typedef class Q3TextBrowser Parent;
+	typedef class QTextBrowser Parent;
 public:
 	ConfigInfoView(QWidget* parent, const char *name = 0);
 	bool showDebug(void) const { return _showDebug; }
@@ -254,8 +254,8 @@ protected:
 	QString debug_info(struct symbol *sym);
 	static QString print_filter(const QString &str);
 	static void expr_print_help(void *data, struct symbol *sym, const char *str);
-	Q3PopupMenu* createPopupMenu(const QPoint& pos);
-	void contentsContextMenuEvent(QContextMenuEvent *e);
+	QMenu *createStandardContextMenu(const QPoint & pos);
+	void contextMenuEvent(QContextMenuEvent *e);
 
 	struct symbol *sym;
 	struct menu *_menu;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index bd62f60..f4231d4 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -8,7 +8,7 @@
 #include <QMainWindow>
 #include <q3vbox.h>
 #include <QList>
-#include <q3textbrowser.h>
+#include <qtextbrowser.h>
 #include <QAction>
 #include <q3header.h>
 #include <QFileDialog>
@@ -1154,22 +1154,22 @@ void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char
 		*text += str2;
 }
 
-Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
+QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 {
-	Q3PopupMenu* popup = Parent::createPopupMenu(pos);
+	QMenu* popup = Parent::createStandardContextMenu(pos);
 	QAction* action = new QAction(_("Show Debug Info"), popup);
 	  action->setToggleAction(TRUE);
 	  connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 	  connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
 	  action->setOn(showDebug());
-	popup->insertSeparator();
+	popup->addSeparator();
 	action->addTo(popup);
 	return popup;
 }
 
-void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e)
+void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
 {
-	Parent::contentsContextMenuEvent(e);
+	Parent::contextMenuEvent(e);
 }
 
 ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 07/39] Port xconfig to Qt5 - Use QMenu
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (5 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h> Thiago Macieira
                   ` (32 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  2 +-
 scripts/kconfig/qconf.cc | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 84b62f5..94e57bd 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -117,7 +117,7 @@ public:
 	struct menu *rootEntry;
 	QColorGroup disabledColorGroup;
 	QColorGroup inactivedColorGroup;
-	Q3PopupMenu* headerPopup;
+	QMenu* headerPopup;
 
 private:
 	int colMap[colNr];
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index f4231d4..334000a 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -13,7 +13,7 @@
 #include <q3header.h>
 #include <QFileDialog>
 #include <q3dragobject.h>
-#include <q3popupmenu.h>
+#include <QMenu>
 
 #include <qapplication.h>
 #include <qdesktopwidget.h>
@@ -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)),
@@ -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);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h>
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (6 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 07/39] Port xconfig to Qt5 - Use QMenu Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget Thiago Macieira
                   ` (31 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 334000a..6437197 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -12,7 +12,6 @@
 #include <QAction>
 #include <q3header.h>
 #include <QFileDialog>
-#include <q3dragobject.h>
 #include <QMenu>
 
 #include <qapplication.h>
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (7 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h> Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 10/39] Port xconfig to Qt5 - Fix layout Thiago Macieira
                   ` (30 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 4 ++--
 scripts/kconfig/qconf.cc | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 94e57bd..8c7d951 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -199,9 +199,9 @@ public:
 	ConfigItem *item;
 };
 
-class ConfigView : public Q3VBox {
+class ConfigView : public QWidget {
 	Q_OBJECT
-	typedef class Q3VBox Parent;
+	typedef class QWidget Parent;
 public:
 	ConfigView(QWidget* parent, const char *name = 0);
 	~ConfigView(void);
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 6437197..df1700e 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -6,7 +6,6 @@
 #include <qglobal.h>
 
 #include <QMainWindow>
-#include <q3vbox.h>
 #include <QList>
 #include <qtextbrowser.h>
 #include <QAction>
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 10/39] Port xconfig to Qt5 - Fix layout
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (8 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin Thiago Macieira
                   ` (29 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index df1700e..3a5ff5d 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -855,9 +855,13 @@ QAction *ConfigView::showPromptAction;
 ConfigView::ConfigView(QWidget* parent, const char *name)
 	: Parent(parent, name)
 {
+	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
+
 	list = new ConfigList(this, name);
+	verticalLayout->addWidget(list);
 	lineEdit = new ConfigLineEdit(this);
 	lineEdit->hide();
+	verticalLayout->addWidget(lineEdit);
 
 	this->nextView = viewList;
 	viewList = this;
@@ -1302,6 +1306,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
 	menu = menuBar();
 	toolBar = new QToolBar("Tools", this);
+	addToolBar(toolBar);
 
 	backAction = new QAction(QPixmap(xpm_back), _("Back"), this);
 	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (9 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 10/39] Port xconfig to Qt5 - Fix layout Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable Thiago Macieira
                   ` (28 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 3a5ff5d..6d32f39 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -856,6 +856,7 @@ ConfigView::ConfigView(QWidget* parent, const char *name)
 	: Parent(parent, name)
 {
 	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
+	verticalLayout->setContentsMargins(0, 0, 0, 0);
 
 	list = new ConfigList(this, name);
 	verticalLayout->addWidget(list);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (10 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable Thiago Macieira
                   ` (27 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 6d32f39..c2f9767 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -817,28 +817,28 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
 
 			headerPopup = new QMenu(this);
 			action = new QAction(_("Show Name"), this);
-			  action->setToggleAction(TRUE);
+			  action->setCheckable(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowName(bool)));
 			  connect(parent(), SIGNAL(showNameChanged(bool)),
 				  action, SLOT(setOn(bool)));
-			  action->setOn(showName);
+			  action->setChecked(showName);
 			  action->addTo(headerPopup);
 			action = new QAction(_("Show Range"), this);
-			  action->setToggleAction(TRUE);
+			  action->setCheckable(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowRange(bool)));
 			  connect(parent(), SIGNAL(showRangeChanged(bool)),
 				  action, SLOT(setOn(bool)));
-			  action->setOn(showRange);
+			  action->setChecked(showRange);
 			  action->addTo(headerPopup);
 			action = new QAction( _("Show Data"), this);
-			  action->setToggleAction(TRUE);
+			  action->setCheckable(TRUE);
 			  connect(action, SIGNAL(toggled(bool)),
 				  parent(), SLOT(setShowData(bool)));
 			  connect(parent(), SIGNAL(showDataChanged(bool)),
 				  action, SLOT(setOn(bool)));
-			  action->setOn(showData);
+			  action->setChecked(showData);
 			  action->addTo(headerPopup);
 		}
 		headerPopup->exec(e->globalPos());
@@ -1161,10 +1161,10 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 {
 	QMenu* popup = Parent::createStandardContextMenu(pos);
 	QAction* action = new QAction(_("Show Debug Info"), popup);
-	  action->setToggleAction(TRUE);
+	  action->setCheckable(TRUE);
 	  connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 	  connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
-	  action->setOn(showDebug());
+	  action->setChecked(showDebug());
 	popup->addSeparator();
 	action->addTo(popup);
 	return popup;
@@ -1337,20 +1337,20 @@ ConfigMainWindow::ConfigMainWindow(void)
 	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
 
 	QAction *showNameAction = new QAction(_("Show Name"), this);
-	  showNameAction->setToggleAction(TRUE);
+	  showNameAction->setCheckable(TRUE);
 	  connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
 	  connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
-	  showNameAction->setOn(configView->showName());
+	  showNameAction->setChecked(configView->showName());
 	QAction *showRangeAction = new QAction(_("Show Range"), this);
-	  showRangeAction->setToggleAction(TRUE);
+	  showRangeAction->setCheckable(TRUE);
 	  connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
 	  connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
-	  showRangeAction->setOn(configList->showRange);
+	  showRangeAction->setChecked(configList->showRange);
 	QAction *showDataAction = new QAction(_("Show Data"), this);
-	  showDataAction->setToggleAction(TRUE);
+	  showDataAction->setCheckable(TRUE);
 	  connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
 	  connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
-	  showDataAction->setOn(configList->showData);
+	  showDataAction->setChecked(configList->showData);
 
 	QActionGroup *optGroup = new QActionGroup(this);
 	optGroup->setExclusive(TRUE);
@@ -1362,18 +1362,18 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
 	configView->showAllAction = new QAction(_("Show All Options"), optGroup);
 	configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
-	configView->showNormalAction->setToggleAction(TRUE);
-	configView->showNormalAction->setOn(configList->optMode == normalOpt);
-	configView->showAllAction->setToggleAction(TRUE);
-	configView->showAllAction->setOn(configList->optMode == allOpt);
-	configView->showPromptAction->setToggleAction(TRUE);
-	configView->showPromptAction->setOn(configList->optMode == promptOpt);
+	configView->showNormalAction->setCheckable(TRUE);
+	configView->showNormalAction->setChecked(configList->optMode == normalOpt);
+	configView->showAllAction->setCheckable(TRUE);
+	configView->showAllAction->setChecked(configList->optMode == allOpt);
+	configView->showPromptAction->setCheckable(TRUE);
+	configView->showPromptAction->setChecked(configList->optMode == promptOpt);
 
 	QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
-	  showDebugAction->setToggleAction(TRUE);
+	  showDebugAction->setCheckable(TRUE);
 	  connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
 	  connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
-	  showDebugAction->setOn(helpText->showDebug());
+	  showDebugAction->setChecked(helpText->showDebug());
 
 	QAction *showIntroAction = new QAction( _("Introduction"), this);
 	  connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (11 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes Thiago Macieira
                   ` (26 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  3 +++
 scripts/kconfig/qconf.cc | 30 +++++++++++++++++++++++++++---
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 8c7d951..2139901 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -316,6 +316,9 @@ protected:
 	ConfigInfoView *helpText;
 	QToolBar *toolBar;
 	QAction *backAction;
+	QAction *singleViewAction;
+	QAction *splitViewAction;
+	QAction *fullViewAction;
 	QSplitter* split1;
 	QSplitter* split2;
 };
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c2f9767..f439f35 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1329,11 +1329,14 @@ ConfigMainWindow::ConfigMainWindow(void)
 	QAction *searchAction = new QAction(_("&Find"), this);
 	searchAction->setShortcut(Qt::CTRL + Qt::Key_F);
 	  connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
-	QAction *singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this);
+	singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this);
+	singleViewAction->setCheckable(TRUE);
 	  connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
-	QAction *splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this);
+	splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this);
+	splitViewAction->setCheckable(TRUE);
 	  connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
-	QAction *fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this);
+	fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this);
+	fullViewAction->setCheckable(TRUE);
 	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
 
 	QAction *showNameAction = new QAction(_("Show Name"), this);
@@ -1579,6 +1582,13 @@ void ConfigMainWindow::goBack(void)
 
 void ConfigMainWindow::showSingleView(void)
 {
+	singleViewAction->setEnabled(false);
+	singleViewAction->setChecked(true);
+	splitViewAction->setEnabled(true);
+	splitViewAction->setChecked(false);
+	fullViewAction->setEnabled(true);
+	fullViewAction->setChecked(false);
+
 	menuView->hide();
 	menuList->setRootMenu(0);
 	configList->mode = singleMode;
@@ -1592,6 +1602,13 @@ void ConfigMainWindow::showSingleView(void)
 
 void ConfigMainWindow::showSplitView(void)
 {
+	singleViewAction->setEnabled(true);
+	singleViewAction->setChecked(false);
+	splitViewAction->setEnabled(false);
+	splitViewAction->setChecked(true);
+	fullViewAction->setEnabled(true);
+	fullViewAction->setChecked(false);
+
 	configList->mode = symbolMode;
 	if (configList->rootEntry == &rootmenu)
 		configList->updateListAll();
@@ -1608,6 +1625,13 @@ void ConfigMainWindow::showSplitView(void)
 
 void ConfigMainWindow::showFullView(void)
 {
+	singleViewAction->setEnabled(true);
+	singleViewAction->setChecked(false);
+	splitViewAction->setEnabled(true);
+	splitViewAction->setChecked(false);
+	fullViewAction->setEnabled(false);
+	fullViewAction->setChecked(true);
+
 	menuView->hide();
 	menuList->setRootMenu(0);
 	configList->mode = fullMode;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (12 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5 Thiago Macieira
                   ` (25 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 177 +---------
 scripts/kconfig/qconf.cc | 904 +----------------------------------------------
 2 files changed, 15 insertions(+), 1066 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 2139901..d025f29 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -8,8 +8,6 @@
 #include <qsettings.h>
 
 class ConfigView;
-class ConfigList;
-class ConfigItem;
 class ConfigLineEdit;
 class ConfigMainWindow;
 
@@ -30,159 +28,6 @@ enum optionMode {
 	normalOpt = 0, allOpt, promptOpt
 };
 
-class ConfigList : public Q3ListView {
-	Q_OBJECT
-	typedef class Q3ListView Parent;
-public:
-	ConfigList(ConfigView* p, const char *name = 0);
-	void reinit(void);
-	ConfigView* parent(void) const
-	{
-		return (ConfigView*)Parent::parent();
-	}
-	ConfigItem* findConfigItem(struct menu *);
-
-protected:
-	void keyPressEvent(QKeyEvent *e);
-	void contentsMousePressEvent(QMouseEvent *e);
-	void contentsMouseReleaseEvent(QMouseEvent *e);
-	void contentsMouseMoveEvent(QMouseEvent *e);
-	void contentsMouseDoubleClickEvent(QMouseEvent *e);
-	void focusInEvent(QFocusEvent *e);
-	void contextMenuEvent(QContextMenuEvent *e);
-
-public slots:
-	void setRootMenu(struct menu *menu);
-
-	void updateList(ConfigItem *item);
-	void setValue(ConfigItem* item, tristate val);
-	void changeValue(ConfigItem* item);
-	void updateSelection(void);
-	void saveSettings(void);
-signals:
-	void menuChanged(struct menu *menu);
-	void menuSelected(struct menu *menu);
-	void parentSelected(void);
-	void gotFocus(struct menu *);
-
-public:
-	void updateListAll(void)
-	{
-		updateAll = true;
-		updateList(NULL);
-		updateAll = false;
-	}
-	ConfigList* listView()
-	{
-		return this;
-	}
-	ConfigItem* firstChild() const
-	{
-		return (ConfigItem *)Parent::firstChild();
-	}
-	int mapIdx(colIdx idx)
-	{
-		return colMap[idx];
-	}
-	void addColumn(colIdx idx, const QString& label)
-	{
-		colMap[idx] = Parent::addColumn(label);
-		colRevMap[colMap[idx]] = idx;
-	}
-	void removeColumn(colIdx idx)
-	{
-		int col = colMap[idx];
-		if (col >= 0) {
-			Parent::removeColumn(col);
-			colRevMap[col] = colMap[idx] = -1;
-		}
-	}
-	void setAllOpen(bool open);
-	void setParentMenu(void);
-
-	bool menuSkip(struct menu *);
-
-	template <class P>
-	void updateMenuList(P*, struct menu*);
-
-	bool updateAll;
-
-	QPixmap symbolYesPix, symbolModPix, symbolNoPix;
-	QPixmap choiceYesPix, choiceNoPix;
-	QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
-
-	bool showName, showRange, showData;
-	enum listMode mode;
-	enum optionMode optMode;
-	struct menu *rootEntry;
-	QColorGroup disabledColorGroup;
-	QColorGroup inactivedColorGroup;
-	QMenu* headerPopup;
-
-private:
-	int colMap[colNr];
-	int colRevMap[colNr];
-};
-
-class ConfigItem : public Q3ListViewItem {
-	typedef class Q3ListViewItem Parent;
-public:
-	ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v)
-	: Parent(parent, after), menu(m), visible(v), goParent(false)
-	{
-		init();
-	}
-	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
-	: Parent(parent, after), menu(m), visible(v), goParent(false)
-	{
-		init();
-	}
-	ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
-	: Parent(parent, after), menu(0), visible(v), goParent(true)
-	{
-		init();
-	}
-	~ConfigItem(void);
-	void init(void);
-	void okRename(int col);
-	void updateMenu(void);
-	void testUpdateMenu(bool v);
-	ConfigList* listView() const
-	{
-		return (ConfigList*)Parent::listView();
-	}
-	ConfigItem* firstChild() const
-	{
-		return (ConfigItem *)Parent::firstChild();
-	}
-	ConfigItem* nextSibling() const
-	{
-		return (ConfigItem *)Parent::nextSibling();
-	}
-	void setText(colIdx idx, const QString& text)
-	{
-		Parent::setText(listView()->mapIdx(idx), text);
-	}
-	QString text(colIdx idx) const
-	{
-		return Parent::text(listView()->mapIdx(idx));
-	}
-	void setPixmap(colIdx idx, const QPixmap& pm)
-	{
-		Parent::setPixmap(listView()->mapIdx(idx), pm);
-	}
-	const QPixmap* pixmap(colIdx idx) const
-	{
-		return Parent::pixmap(listView()->mapIdx(idx));
-	}
-	void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
-
-	ConfigItem* nextItem;
-	struct menu *menu;
-	bool visible;
-	bool goParent;
-};
-
 class ConfigLineEdit : public QLineEdit {
 	Q_OBJECT
 	typedef class QLineEdit Parent;
@@ -192,11 +37,11 @@ public:
 	{
 		return (ConfigView*)Parent::parent();
 	}
-	void show(ConfigItem *i);
+	void show(Q3ListViewItem *i);
 	void keyPressEvent(QKeyEvent *e);
 
 public:
-	ConfigItem *item;
+	Q3ListViewItem *item;
 };
 
 class ConfigView : public QWidget {
@@ -205,12 +50,12 @@ class ConfigView : public QWidget {
 public:
 	ConfigView(QWidget* parent, const char *name = 0);
 	~ConfigView(void);
-	static void updateList(ConfigItem* item);
+	static void updateList(Q3ListViewItem* item);
 	static void updateListAll(void);
 
-	bool showName(void) const { return list->showName; }
-	bool showRange(void) const { return list->showRange; }
-	bool showData(void) const { return list->showData; }
+	bool showName(void) const { return false; } // TODO: Implement me.
+	bool showRange(void) const { return false; } // TODO: Implement me.
+	bool showData(void) const { return false; } // TODO: Implement me.
 public slots:
 	void setShowName(bool);
 	void setShowRange(bool);
@@ -221,7 +66,7 @@ signals:
 	void showRangeChanged(bool);
 	void showDataChanged(bool);
 public:
-	ConfigList* list;
+	Q3ListView* list;
 	ConfigLineEdit* lineEdit;
 
 	static ConfigView* viewList;
@@ -310,15 +155,15 @@ protected:
 
 	ConfigSearchWindow *searchWindow;
 	ConfigView *menuView;
-	ConfigList *menuList;
+	Q3ListView *menuList;
 	ConfigView *configView;
-	ConfigList *configList;
+	Q3ListView *configList;
 	ConfigInfoView *helpText;
 	QToolBar *toolBar;
 	QAction *backAction;
 	QAction *singleViewAction;
 	QAction *splitViewAction;
 	QAction *fullViewAction;
-	QSplitter* split1;
-	QSplitter* split2;
+	QSplitter *split1;
+	QSplitter *split2;
 };
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index f439f35..319559f 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -87,213 +87,15 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 	return writeEntry(key, stringList);
 }
 
-
-/*
- * set the new data
- * TODO check the value
- */
-void ConfigItem::okRename(int col)
-{
-	Parent::okRename(col);
-	sym_set_string_value(menu->sym, text(dataColIdx).latin1());
-	listView()->updateList(this);
-}
-
-/*
- * update the displayed of a menu entry
- */
-void ConfigItem::updateMenu(void)
-{
-	ConfigList* list;
-	struct symbol* sym;
-	struct property *prop;
-	QString prompt;
-	int type;
-	tristate expr;
-
-	list = listView();
-	if (goParent) {
-		setPixmap(promptColIdx, list->menuBackPix);
-		prompt = "..";
-		goto set_prompt;
-	}
-
-	sym = menu->sym;
-	prop = menu->prompt;
-	prompt = _(menu_get_prompt(menu));
-
-	if (prop) switch (prop->type) {
-	case P_MENU:
-		if (list->mode == singleMode || list->mode == symbolMode) {
-			/* a menuconfig entry is displayed differently
-			 * depending whether it's at the view root or a child.
-			 */
-			if (sym && list->rootEntry == menu)
-				break;
-			setPixmap(promptColIdx, list->menuPix);
-		} else {
-			if (sym)
-				break;
-			setPixmap(promptColIdx, 0);
-		}
-		goto set_prompt;
-	case P_COMMENT:
-		setPixmap(promptColIdx, 0);
-		goto set_prompt;
-	default:
-		;
-	}
-	if (!sym)
-		goto set_prompt;
-
-	setText(nameColIdx, QString::fromLocal8Bit(sym->name));
-
-	type = sym_get_type(sym);
-	switch (type) {
-	case S_BOOLEAN:
-	case S_TRISTATE:
-		char ch;
-
-		if (!sym_is_changable(sym) && list->optMode == normalOpt) {
-			setPixmap(promptColIdx, 0);
-			setText(noColIdx, QString::null);
-			setText(modColIdx, QString::null);
-			setText(yesColIdx, QString::null);
-			break;
-		}
-		expr = sym_get_tristate_value(sym);
-		switch (expr) {
-		case yes:
-			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
-				setPixmap(promptColIdx, list->choiceYesPix);
-			else
-				setPixmap(promptColIdx, list->symbolYesPix);
-			setText(yesColIdx, "Y");
-			ch = 'Y';
-			break;
-		case mod:
-			setPixmap(promptColIdx, list->symbolModPix);
-			setText(modColIdx, "M");
-			ch = 'M';
-			break;
-		default:
-			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
-				setPixmap(promptColIdx, list->choiceNoPix);
-			else
-				setPixmap(promptColIdx, list->symbolNoPix);
-			setText(noColIdx, "N");
-			ch = 'N';
-			break;
-		}
-		if (expr != no)
-			setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0);
-		if (expr != mod)
-			setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0);
-		if (expr != yes)
-			setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0);
-
-		setText(dataColIdx, QChar(ch));
-		break;
-	case S_INT:
-	case S_HEX:
-	case S_STRING:
-		const char* data;
-
-		data = sym_get_string_value(sym);
-
-		int i = list->mapIdx(dataColIdx);
-		if (i >= 0)
-			setRenameEnabled(i, TRUE);
-		setText(dataColIdx, data);
-		if (type == S_STRING)
-			prompt = QString("%1: %2").arg(prompt).arg(data);
-		else
-			prompt = QString("(%2) %1").arg(prompt).arg(data);
-		break;
-	}
-	if (!sym_has_value(sym) && visible)
-		prompt += _(" (NEW)");
-set_prompt:
-	setText(promptColIdx, prompt);
-}
-
-void ConfigItem::testUpdateMenu(bool v)
-{
-	ConfigItem* i;
-
-	visible = v;
-	if (!menu)
-		return;
-
-	sym_calc_value(menu->sym);
-	if (menu->flags & MENU_CHANGED) {
-		/* the menu entry changed, so update all list items */
-		menu->flags &= ~MENU_CHANGED;
-		for (i = (ConfigItem*)menu->data; i; i = i->nextItem)
-			i->updateMenu();
-	} else if (listView()->updateAll)
-		updateMenu();
-}
-
-void ConfigItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
-{
-	ConfigList* list = listView();
-
-	if (visible) {
-		if (isSelected() && !list->hasFocus() && list->mode == menuMode)
-			Parent::paintCell(p, list->inactivedColorGroup, column, width, align);
-		else
-			Parent::paintCell(p, cg, column, width, align);
-	} else
-		Parent::paintCell(p, list->disabledColorGroup, column, width, align);
-}
-
-/*
- * construct a menu entry
- */
-void ConfigItem::init(void)
-{
-	if (menu) {
-		ConfigList* list = listView();
-		nextItem = (ConfigItem*)menu->data;
-		menu->data = this;
-
-		if (list->mode != fullMode)
-			setOpen(TRUE);
-		sym_calc_value(menu->sym);
-	}
-	updateMenu();
-}
-
-/*
- * destruct a menu entry
- */
-ConfigItem::~ConfigItem(void)
-{
-	if (menu) {
-		ConfigItem** ip = (ConfigItem**)&menu->data;
-		for (; *ip; ip = &(*ip)->nextItem) {
-			if (*ip == this) {
-				*ip = nextItem;
-				break;
-			}
-		}
-	}
-}
-
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	: Parent(parent)
 {
 	connect(this, SIGNAL(lostFocus()), SLOT(hide()));
 }
 
-void ConfigLineEdit::show(ConfigItem* i)
+void ConfigLineEdit::show(Q3ListViewItem *i)
 {
 	item = i;
-	if (sym_get_string_value(item->menu->sym))
-		setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym)));
-	else
-		setText(QString::null);
 	Parent::show();
 	setFocus();
 }
@@ -305,7 +107,6 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 		break;
 	case Qt::Key_Return:
 	case Qt::Key_Enter:
-		sym_set_string_value(item->menu->sym, text().latin1());
 		parent()->updateList(item);
 		break;
 	default:
@@ -317,536 +118,6 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 	hide();
 }
 
-ConfigList::ConfigList(ConfigView* p, const char *name)
-	: Parent(p, name),
-	  updateAll(false),
-	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
-	  choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
-	  menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
-	  showName(false), showRange(false), showData(false), optMode(normalOpt),
-	  rootEntry(0), headerPopup(0)
-{
-	int i;
-
-	setSorting(-1);
-	setRootIsDecorated(TRUE);
-	disabledColorGroup = palette().active();
-	disabledColorGroup.setColor(QColorGroup::Text, palette().disabled().text());
-	inactivedColorGroup = palette().active();
-	inactivedColorGroup.setColor(QColorGroup::Highlight, palette().disabled().highlight());
-
-	connect(this, SIGNAL(selectionChanged(void)),
-		SLOT(updateSelection(void)));
-
-	if (name) {
-		configSettings->beginGroup(name);
-		showName = configSettings->readBoolEntry("/showName", false);
-		showRange = configSettings->readBoolEntry("/showRange", false);
-		showData = configSettings->readBoolEntry("/showData", false);
-		optMode = (enum optionMode)configSettings->readNumEntry("/optionMode", false);
-		configSettings->endGroup();
-		connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
-	}
-
-	for (i = 0; i < colNr; i++)
-		colMap[i] = colRevMap[i] = -1;
-	addColumn(promptColIdx, _("Option"));
-
-	reinit();
-}
-
-bool ConfigList::menuSkip(struct menu *menu)
-{
-	if (optMode == normalOpt && menu_is_visible(menu))
-		return false;
-	if (optMode == promptOpt && menu_has_prompt(menu))
-		return false;
-	if (optMode == allOpt)
-		return false;
-	return true;
-}
-
-void ConfigList::reinit(void)
-{
-	removeColumn(dataColIdx);
-	removeColumn(yesColIdx);
-	removeColumn(modColIdx);
-	removeColumn(noColIdx);
-	removeColumn(nameColIdx);
-
-	if (showName)
-		addColumn(nameColIdx, _("Name"));
-	if (showRange) {
-		addColumn(noColIdx, "N");
-		addColumn(modColIdx, "M");
-		addColumn(yesColIdx, "Y");
-	}
-	if (showData)
-		addColumn(dataColIdx, _("Value"));
-
-	updateListAll();
-}
-
-void ConfigList::saveSettings(void)
-{
-	if (name()) {
-		configSettings->beginGroup(name());
-		configSettings->writeEntry("/showName", showName);
-		configSettings->writeEntry("/showRange", showRange);
-		configSettings->writeEntry("/showData", showData);
-		configSettings->writeEntry("/optionMode", (int)optMode);
-		configSettings->endGroup();
-	}
-}
-
-ConfigItem* ConfigList::findConfigItem(struct menu *menu)
-{
-	ConfigItem* item = (ConfigItem*)menu->data;
-
-	for (; item; item = item->nextItem) {
-		if (this == item->listView())
-			break;
-	}
-
-	return item;
-}
-
-void ConfigList::updateSelection(void)
-{
-	struct menu *menu;
-	enum prop_type type;
-
-	ConfigItem* item = (ConfigItem*)selectedItem();
-	if (!item)
-		return;
-
-	menu = item->menu;
-	emit menuChanged(menu);
-	if (!menu)
-		return;
-	type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
-	if (mode == menuMode && type == P_MENU)
-		emit menuSelected(menu);
-}
-
-void ConfigList::updateList(ConfigItem* item)
-{
-	ConfigItem* last = 0;
-
-	if (!rootEntry) {
-		if (mode != listMode)
-			goto update;
-		Q3ListViewItemIterator it(this);
-		ConfigItem* item;
-
-		for (; it.current(); ++it) {
-			item = (ConfigItem*)it.current();
-			if (!item->menu)
-				continue;
-			item->testUpdateMenu(menu_is_visible(item->menu));
-		}
-		return;
-	}
-
-	if (rootEntry != &rootmenu && (mode == singleMode ||
-	    (mode == symbolMode && rootEntry->parent != &rootmenu))) {
-		item = firstChild();
-		if (!item)
-			item = new ConfigItem(this, 0, true);
-		last = item;
-	}
-	if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
-	    rootEntry->sym && rootEntry->prompt) {
-		item = last ? last->nextSibling() : firstChild();
-		if (!item)
-			item = new ConfigItem(this, last, rootEntry, true);
-		else
-			item->testUpdateMenu(true);
-
-		updateMenuList(item, rootEntry);
-		triggerUpdate();
-		return;
-	}
-update:
-	updateMenuList(this, rootEntry);
-	triggerUpdate();
-}
-
-void ConfigList::setValue(ConfigItem* item, tristate val)
-{
-	struct symbol* sym;
-	int type;
-	tristate oldval;
-
-	sym = item->menu ? item->menu->sym : 0;
-	if (!sym)
-		return;
-
-	type = sym_get_type(sym);
-	switch (type) {
-	case S_BOOLEAN:
-	case S_TRISTATE:
-		oldval = sym_get_tristate_value(sym);
-
-		if (!sym_set_tristate_value(sym, val))
-			return;
-		if (oldval == no && item->menu->list)
-			item->setOpen(TRUE);
-		parent()->updateList(item);
-		break;
-	}
-}
-
-void ConfigList::changeValue(ConfigItem* item)
-{
-	struct symbol* sym;
-	struct menu* menu;
-	int type, oldexpr, newexpr;
-
-	menu = item->menu;
-	if (!menu)
-		return;
-	sym = menu->sym;
-	if (!sym) {
-		if (item->menu->list)
-			item->setOpen(!item->isOpen());
-		return;
-	}
-
-	type = sym_get_type(sym);
-	switch (type) {
-	case S_BOOLEAN:
-	case S_TRISTATE:
-		oldexpr = sym_get_tristate_value(sym);
-		newexpr = sym_toggle_tristate_value(sym);
-		if (item->menu->list) {
-			if (oldexpr == newexpr)
-				item->setOpen(!item->isOpen());
-			else if (oldexpr == no)
-				item->setOpen(TRUE);
-		}
-		if (oldexpr != newexpr)
-			parent()->updateList(item);
-		break;
-	case S_INT:
-	case S_HEX:
-	case S_STRING:
-		if (colMap[dataColIdx] >= 0)
-			item->startRename(colMap[dataColIdx]);
-		else
-			parent()->lineEdit->show(item);
-		break;
-	}
-}
-
-void ConfigList::setRootMenu(struct menu *menu)
-{
-	enum prop_type type;
-
-	if (rootEntry == menu)
-		return;
-	type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
-	if (type != P_MENU)
-		return;
-	updateMenuList(this, 0);
-	rootEntry = menu;
-	updateListAll();
-	setSelected(currentItem(), hasFocus());
-	ensureItemVisible(currentItem());
-}
-
-void ConfigList::setParentMenu(void)
-{
-	ConfigItem* item;
-	struct menu *oldroot;
-
-	oldroot = rootEntry;
-	if (rootEntry == &rootmenu)
-		return;
-	setRootMenu(menu_get_parent_menu(rootEntry->parent));
-
-	Q3ListViewItemIterator it(this);
-	for (; (item = (ConfigItem*)it.current()); it++) {
-		if (item->menu == oldroot) {
-			setCurrentItem(item);
-			ensureItemVisible(item);
-			break;
-		}
-	}
-}
-
-/*
- * update all the children of a menu entry
- *   removes/adds the entries from the parent widget as necessary
- *
- * parent: either the menu list widget or a menu entry widget
- * menu: entry to be updated
- */
-template <class P>
-void ConfigList::updateMenuList(P* parent, struct menu* menu)
-{
-	struct menu* child;
-	ConfigItem* item;
-	ConfigItem* last;
-	bool visible;
-	enum prop_type type;
-
-	if (!menu) {
-		while ((item = parent->firstChild()))
-			delete item;
-		return;
-	}
-
-	last = parent->firstChild();
-	if (last && !last->goParent)
-		last = 0;
-	for (child = menu->list; child; child = child->next) {
-		item = last ? last->nextSibling() : parent->firstChild();
-		type = child->prompt ? child->prompt->type : P_UNKNOWN;
-
-		switch (mode) {
-		case menuMode:
-			if (!(child->flags & MENU_ROOT))
-				goto hide;
-			break;
-		case symbolMode:
-			if (child->flags & MENU_ROOT)
-				goto hide;
-			break;
-		default:
-			break;
-		}
-
-		visible = menu_is_visible(child);
-		if (!menuSkip(child)) {
-			if (!child->sym && !child->list && !child->prompt)
-				continue;
-			if (!item || item->menu != child)
-				item = new ConfigItem(parent, last, child, visible);
-			else
-				item->testUpdateMenu(visible);
-
-			if (mode == fullMode || mode == menuMode || type != P_MENU)
-				updateMenuList(item, child);
-			else
-				updateMenuList(item, 0);
-			last = item;
-			continue;
-		}
-	hide:
-		if (item && item->menu == child) {
-			last = parent->firstChild();
-			if (last == item)
-				last = 0;
-			else while (last->nextSibling() != item)
-				last = last->nextSibling();
-			delete item;
-		}
-	}
-}
-
-void ConfigList::keyPressEvent(QKeyEvent* ev)
-{
-	Q3ListViewItem* i = currentItem();
-	ConfigItem* item;
-	struct menu *menu;
-	enum prop_type type;
-
-	if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
-		emit parentSelected();
-		ev->accept();
-		return;
-	}
-
-	if (!i) {
-		Parent::keyPressEvent(ev);
-		return;
-	}
-	item = (ConfigItem*)i;
-
-	switch (ev->key()) {
-	case Qt::Key_Return:
-	case Qt::Key_Enter:
-		if (item->goParent) {
-			emit parentSelected();
-			break;
-		}
-		menu = item->menu;
-		if (!menu)
-			break;
-		type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
-		if (type == P_MENU && rootEntry != menu &&
-		    mode != fullMode && mode != menuMode) {
-			emit menuSelected(menu);
-			break;
-		}
-	case Qt::Key_Space:
-		changeValue(item);
-		break;
-	case Qt::Key_N:
-		setValue(item, no);
-		break;
-	case Qt::Key_M:
-		setValue(item, mod);
-		break;
-	case Qt::Key_Y:
-		setValue(item, yes);
-		break;
-	default:
-		Parent::keyPressEvent(ev);
-		return;
-	}
-	ev->accept();
-}
-
-void ConfigList::contentsMousePressEvent(QMouseEvent* e)
-{
-	//QPoint p(contentsToViewport(e->pos()));
-	//printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y());
-	Parent::contentsMousePressEvent(e);
-}
-
-void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
-{
-	QPoint p(contentsToViewport(e->pos()));
-	ConfigItem* item = (ConfigItem*)itemAt(p);
-	struct menu *menu;
-	enum prop_type ptype;
-	const QPixmap* pm;
-	int idx, x;
-
-	if (!item)
-		goto skip;
-
-	menu = item->menu;
-	x = header()->offset() + p.x();
-	idx = colRevMap[header()->sectionAt(x)];
-	switch (idx) {
-	case promptColIdx:
-		pm = item->pixmap(promptColIdx);
-		if (pm) {
-			int off = header()->sectionPos(0) + itemMargin() +
-				treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0));
-			if (x >= off && x < off + pm->width()) {
-				if (item->goParent) {
-					emit parentSelected();
-					break;
-				} else if (!menu)
-					break;
-				ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
-				if (ptype == P_MENU && rootEntry != menu &&
-				    mode != fullMode && mode != menuMode)
-					emit menuSelected(menu);
-				else
-					changeValue(item);
-			}
-		}
-		break;
-	case noColIdx:
-		setValue(item, no);
-		break;
-	case modColIdx:
-		setValue(item, mod);
-		break;
-	case yesColIdx:
-		setValue(item, yes);
-		break;
-	case dataColIdx:
-		changeValue(item);
-		break;
-	}
-
-skip:
-	//printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y());
-	Parent::contentsMouseReleaseEvent(e);
-}
-
-void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
-{
-	//QPoint p(contentsToViewport(e->pos()));
-	//printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y());
-	Parent::contentsMouseMoveEvent(e);
-}
-
-void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
-{
-	QPoint p(contentsToViewport(e->pos()));
-	ConfigItem* item = (ConfigItem*)itemAt(p);
-	struct menu *menu;
-	enum prop_type ptype;
-
-	if (!item)
-		goto skip;
-	if (item->goParent) {
-		emit parentSelected();
-		goto skip;
-	}
-	menu = item->menu;
-	if (!menu)
-		goto skip;
-	ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
-	if (ptype == P_MENU && (mode == singleMode || mode == symbolMode))
-		emit menuSelected(menu);
-	else if (menu->sym)
-		changeValue(item);
-
-skip:
-	//printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y());
-	Parent::contentsMouseDoubleClickEvent(e);
-}
-
-void ConfigList::focusInEvent(QFocusEvent *e)
-{
-	struct menu *menu = NULL;
-
-	Parent::focusInEvent(e);
-
-	ConfigItem* item = (ConfigItem *)currentItem();
-	if (item) {
-		setSelected(item, TRUE);
-		menu = item->menu;
-	}
-	emit gotFocus(menu);
-}
-
-void ConfigList::contextMenuEvent(QContextMenuEvent *e)
-{
-	if (e->y() <= header()->geometry().bottom()) {
-		if (!headerPopup) {
-			QAction *action;
-
-			headerPopup = new QMenu(this);
-			action = new QAction(_("Show Name"), this);
-			  action->setCheckable(TRUE);
-			  connect(action, SIGNAL(toggled(bool)),
-				  parent(), SLOT(setShowName(bool)));
-			  connect(parent(), SIGNAL(showNameChanged(bool)),
-				  action, SLOT(setOn(bool)));
-			  action->setChecked(showName);
-			  action->addTo(headerPopup);
-			action = new QAction(_("Show Range"), this);
-			  action->setCheckable(TRUE);
-			  connect(action, SIGNAL(toggled(bool)),
-				  parent(), SLOT(setShowRange(bool)));
-			  connect(parent(), SIGNAL(showRangeChanged(bool)),
-				  action, SLOT(setOn(bool)));
-			  action->setChecked(showRange);
-			  action->addTo(headerPopup);
-			action = new QAction( _("Show Data"), this);
-			  action->setCheckable(TRUE);
-			  connect(action, SIGNAL(toggled(bool)),
-				  parent(), SLOT(setShowData(bool)));
-			  connect(parent(), SIGNAL(showDataChanged(bool)),
-				  action, SLOT(setOn(bool)));
-			  action->setChecked(showData);
-			  action->addTo(headerPopup);
-		}
-		headerPopup->exec(e->globalPos());
-		e->accept();
-	} else
-		e->ignore();
-}
-
 ConfigView*ConfigView::viewList;
 QAction *ConfigView::showNormalAction;
 QAction *ConfigView::showAllAction;
@@ -858,7 +129,7 @@ ConfigView::ConfigView(QWidget* parent, const char *name)
 	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
 	verticalLayout->setContentsMargins(0, 0, 0, 0);
 
-	list = new ConfigList(this, name);
+	list = new Q3ListView(this, name);
 	verticalLayout->addWidget(list);
 	lineEdit = new ConfigLineEdit(this);
 	lineEdit->hide();
@@ -882,65 +153,26 @@ ConfigView::~ConfigView(void)
 
 void ConfigView::setOptionMode(QAction *act)
 {
-	if (act == showNormalAction)
-		list->optMode = normalOpt;
-	else if (act == showAllAction)
-		list->optMode = allOpt;
-	else
-		list->optMode = promptOpt;
-
-	list->updateListAll();
 }
 
 void ConfigView::setShowName(bool b)
 {
-	if (list->showName != b) {
-		list->showName = b;
-		list->reinit();
-		emit showNameChanged(b);
-	}
 }
 
 void ConfigView::setShowRange(bool b)
 {
-	if (list->showRange != b) {
-		list->showRange = b;
-		list->reinit();
-		emit showRangeChanged(b);
-	}
 }
 
 void ConfigView::setShowData(bool b)
 {
-	if (list->showData != b) {
-		list->showData = b;
-		list->reinit();
-		emit showDataChanged(b);
-	}
-}
-
-void ConfigList::setAllOpen(bool open)
-{
-	Q3ListViewItemIterator it(this);
-
-	for (; it.current(); it++)
-		it.current()->setOpen(open);
 }
 
-void ConfigView::updateList(ConfigItem* item)
+void ConfigView::updateList(Q3ListViewItem* item)
 {
-	ConfigView* v;
-
-	for (v = viewList; v; v = v->nextView)
-		v->list->updateList(item);
 }
 
 void ConfigView::updateListAll(void)
 {
-	ConfigView* v;
-
-	for (v = viewList; v; v = v->nextView)
-		v->list->updateListAll();
 }
 
 ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
@@ -1195,7 +427,6 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	split = new QSplitter(this);
 	split->setOrientation(Qt::Vertical);
 	list = new ConfigView(split, name);
-	list->list->mode = listMode;
 	info = new ConfigInfoView(split, name);
 	connect(list->list, SIGNAL(menuChanged(struct menu *)),
 		info, SLOT(setInfo(struct menu *)));
@@ -1240,22 +471,6 @@ void ConfigSearchWindow::saveSettings(void)
 
 void ConfigSearchWindow::search(void)
 {
-	struct symbol **p;
-	struct property *prop;
-	ConfigItem *lastItem = NULL;
-
-	free(result);
-	list->list->clear();
-	info->clear();
-
-	result = sym_re_search(editField->text().latin1());
-	if (!result)
-		return;
-	for (p = result; *p; p++) {
-		for_all_prompts((*p), prop)
-			lastItem = new ConfigItem(list->list, lastItem, prop->menu,
-						  menu_is_visible(prop->menu));
-	}
 }
 
 /*
@@ -1348,12 +563,10 @@ ConfigMainWindow::ConfigMainWindow(void)
 	  showRangeAction->setCheckable(TRUE);
 	  connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
 	  connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
-	  showRangeAction->setChecked(configList->showRange);
 	QAction *showDataAction = new QAction(_("Show Data"), this);
 	  showDataAction->setCheckable(TRUE);
 	  connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
 	  connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
-	  showDataAction->setChecked(configList->showData);
 
 	QActionGroup *optGroup = new QActionGroup(this);
 	optGroup->setExclusive(TRUE);
@@ -1366,11 +579,8 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configView->showAllAction = new QAction(_("Show All Options"), optGroup);
 	configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
 	configView->showNormalAction->setCheckable(TRUE);
-	configView->showNormalAction->setChecked(configList->optMode == normalOpt);
 	configView->showAllAction->setCheckable(TRUE);
-	configView->showAllAction->setChecked(configList->optMode == allOpt);
 	configView->showPromptAction->setCheckable(TRUE);
-	configView->showPromptAction->setChecked(configList->optMode == promptOpt);
 
 	QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
 	  showDebugAction->setCheckable(TRUE);
@@ -1498,86 +708,19 @@ void ConfigMainWindow::searchConfig(void)
 
 void ConfigMainWindow::changeMenu(struct menu *menu)
 {
-	configList->setRootMenu(menu);
-	if (configList->rootEntry->parent == &rootmenu)
-		backAction->setEnabled(FALSE);
-	else
-		backAction->setEnabled(TRUE);
+
 }
 
 void ConfigMainWindow::setMenuLink(struct menu *menu)
 {
-	struct menu *parent;
-	ConfigList* list = NULL;
-	ConfigItem* item;
-
-	if (configList->menuSkip(menu))
-		return;
-
-	switch (configList->mode) {
-	case singleMode:
-		list = configList;
-		parent = menu_get_parent_menu(menu);
-		if (!parent)
-			return;
-		list->setRootMenu(parent);
-		break;
-	case symbolMode:
-		if (menu->flags & MENU_ROOT) {
-			configList->setRootMenu(menu);
-			configList->clearSelection();
-			list = menuList;
-		} else {
-			list = configList;
-			parent = menu_get_parent_menu(menu->parent);
-			if (!parent)
-				return;
-			item = menuList->findConfigItem(parent);
-			if (item) {
-				menuList->setSelected(item, TRUE);
-				menuList->ensureItemVisible(item);
-			}
-			list->setRootMenu(parent);
-		}
-		break;
-	case fullMode:
-		list = configList;
-		break;
-	default:
-		break;
-	}
-
-	if (list) {
-		item = list->findConfigItem(menu);
-		if (item) {
-			list->setSelected(item, TRUE);
-			list->ensureItemVisible(item);
-			list->setFocus();
-		}
-	}
 }
 
 void ConfigMainWindow::listFocusChanged(void)
 {
-	if (menuList->mode == menuMode)
-		configList->clearSelection();
 }
 
 void ConfigMainWindow::goBack(void)
 {
-	ConfigItem* item;
-
-	configList->setParentMenu();
-	if (configList->rootEntry == &rootmenu)
-		backAction->setEnabled(FALSE);
-	item = (ConfigItem*)menuList->selectedItem();
-	while (item) {
-		if (item->menu == configList->rootEntry) {
-			menuList->setSelected(item, TRUE);
-			break;
-		}
-		item = (ConfigItem*)item->parent();
-	}
 }
 
 void ConfigMainWindow::showSingleView(void)
@@ -1590,13 +733,6 @@ void ConfigMainWindow::showSingleView(void)
 	fullViewAction->setChecked(false);
 
 	menuView->hide();
-	menuList->setRootMenu(0);
-	configList->mode = singleMode;
-	if (configList->rootEntry == &rootmenu)
-		configList->updateListAll();
-	else
-		configList->setRootMenu(&rootmenu);
-	configList->setAllOpen(TRUE);
 	configList->setFocus();
 }
 
@@ -1609,16 +745,6 @@ void ConfigMainWindow::showSplitView(void)
 	fullViewAction->setEnabled(true);
 	fullViewAction->setChecked(false);
 
-	configList->mode = symbolMode;
-	if (configList->rootEntry == &rootmenu)
-		configList->updateListAll();
-	else
-		configList->setRootMenu(&rootmenu);
-	configList->setAllOpen(TRUE);
-	configApp->processEvents();
-	menuList->mode = menuMode;
-	menuList->setRootMenu(&rootmenu);
-	menuList->setAllOpen(TRUE);
 	menuView->show();
 	menuList->setFocus();
 }
@@ -1633,13 +759,6 @@ void ConfigMainWindow::showFullView(void)
 	fullViewAction->setChecked(true);
 
 	menuView->hide();
-	menuList->setRootMenu(0);
-	configList->mode = fullMode;
-	if (configList->rootEntry == &rootmenu)
-		configList->updateListAll();
-	else
-		configList->setRootMenu(&rootmenu);
-	configList->setAllOpen(FALSE);
 	configList->setFocus();
 }
 
@@ -1707,22 +826,7 @@ void ConfigMainWindow::saveSettings(void)
 	configSettings->writeEntry("/window height", size().height());
 
 	QString entry;
-	switch(configList->mode) {
-	case singleMode :
-		entry = "single";
-		break;
-
-	case symbolMode :
-		entry = "split";
-		break;
-
-	case fullMode :
-		entry = "full";
-		break;
 
-	default:
-		break;
-	}
 	configSettings->writeEntry("/listMode", entry);
 
 	configSettings->writeSizes("/split1", split1->sizes());
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (13 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 16/39] Port xconfig to Qt5 - update signals Thiago Macieira
                   ` (24 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  23 ++++--
 scripts/kconfig/qconf.cc | 185 +++++++++++++++++++++++------------------------
 2 files changed, 108 insertions(+), 100 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index d025f29..1cd0219 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -3,9 +3,18 @@
  * Released under the terms of the GNU GPL v2.0.
  */
 
-#include <q3listview.h>
+#include <QTextBrowser>
+#include <QTreeWidget>
 #include <QMainWindow>
+#include <QHeaderView>
 #include <qsettings.h>
+#include <QPushButton>
+#include <QSettings>
+#include <QLineEdit>
+#include <QSplitter>
+#include <QCheckBox>
+#include <QDialog>
+#include "expr.h"
 
 class ConfigView;
 class ConfigLineEdit;
@@ -37,11 +46,11 @@ public:
 	{
 		return (ConfigView*)Parent::parent();
 	}
-	void show(Q3ListViewItem *i);
+	void show(QTreeWidgetItem *i);
 	void keyPressEvent(QKeyEvent *e);
 
 public:
-	Q3ListViewItem *item;
+	QTreeWidgetItem *item;
 };
 
 class ConfigView : public QWidget {
@@ -50,7 +59,7 @@ class ConfigView : public QWidget {
 public:
 	ConfigView(QWidget* parent, const char *name = 0);
 	~ConfigView(void);
-	static void updateList(Q3ListViewItem* item);
+	static void updateList(QTreeWidgetItem* item);
 	static void updateListAll(void);
 
 	bool showName(void) const { return false; } // TODO: Implement me.
@@ -66,7 +75,7 @@ signals:
 	void showRangeChanged(bool);
 	void showDataChanged(bool);
 public:
-	Q3ListView* list;
+	QTreeWidget* list;
 	ConfigLineEdit* lineEdit;
 
 	static ConfigView* viewList;
@@ -155,9 +164,9 @@ protected:
 
 	ConfigSearchWindow *searchWindow;
 	ConfigView *menuView;
-	Q3ListView *menuList;
+	QTreeWidget *menuList;
 	ConfigView *configView;
-	Q3ListView *configList;
+	QTreeWidget *configList;
 	ConfigInfoView *helpText;
 	QToolBar *toolBar;
 	QAction *backAction;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 319559f..d134a89 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -9,7 +9,6 @@
 #include <QList>
 #include <qtextbrowser.h>
 #include <QAction>
-#include <q3header.h>
 #include <QFileDialog>
 #include <QMenu>
 
@@ -51,7 +50,7 @@ static inline QString qgettext(const char* str)
 
 static inline QString qgettext(const QString& str)
 {
-	return QString::fromLocal8Bit(gettext(str.latin1()));
+	return QString::fromLocal8Bit(gettext(str.toLatin1()));
 }
 
 ConfigSettings::ConfigSettings()
@@ -65,7 +64,7 @@ ConfigSettings::ConfigSettings()
 QList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
 {
 	QList<int> result;
-	QStringList entryList = readListEntry(key, ok);
+	QStringList entryList = value(key).toStringList();
 	QStringList::Iterator it;
 
 	for (it = entryList.begin(); it != entryList.end(); ++it)
@@ -84,7 +83,8 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 
 	for (it = value.begin(); it != value.end(); ++it)
 		stringList.push_back(QString::number(*it));
-	return writeEntry(key, stringList);
+	setValue(key, stringList);
+	return true;
 }
 
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
@@ -93,7 +93,7 @@ ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	connect(this, SIGNAL(lostFocus()), SLOT(hide()));
 }
 
-void ConfigLineEdit::show(Q3ListViewItem *i)
+void ConfigLineEdit::show(QTreeWidgetItem *i)
 {
 	item = i;
 	Parent::show();
@@ -124,12 +124,12 @@ QAction *ConfigView::showAllAction;
 QAction *ConfigView::showPromptAction;
 
 ConfigView::ConfigView(QWidget* parent, const char *name)
-	: Parent(parent, name)
+	: Parent(parent)
 {
 	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
 	verticalLayout->setContentsMargins(0, 0, 0, 0);
 
-	list = new Q3ListView(this, name);
+	list = new QTreeWidget(this);
 	verticalLayout->addWidget(list);
 	lineEdit = new ConfigLineEdit(this);
 	lineEdit->hide();
@@ -167,7 +167,7 @@ void ConfigView::setShowData(bool b)
 {
 }
 
-void ConfigView::updateList(Q3ListViewItem* item)
+void ConfigView::updateList(QTreeWidgetItem* item)
 {
 }
 
@@ -176,11 +176,11 @@ void ConfigView::updateListAll(void)
 }
 
 ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
-	: Parent(parent, name), sym(0), _menu(0)
+	: Parent(parent), sym(0), _menu(0)
 {
 	if (name) {
 		configSettings->beginGroup(name);
-		_showDebug = configSettings->readBoolEntry("/showDebug", false);
+		_showDebug = configSettings->value("/showDebug", false).toBool();
 		configSettings->endGroup();
 		connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
 	}
@@ -188,11 +188,11 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 
 void ConfigInfoView::saveSettings(void)
 {
-	if (name()) {
+	/*if (name()) {
 		configSettings->beginGroup(name());
-		configSettings->writeEntry("/showDebug", showDebug());
+		configSettings->setValue("/showDebug", showDebug());
 		configSettings->endGroup();
-	}
+	}*/
 }
 
 void ConfigInfoView::setShowDebug(bool b)
@@ -349,8 +349,8 @@ QString ConfigInfoView::print_filter(const QString &str)
 {
 	QRegExp re("[<>&\"\\n]");
 	QString res = str;
-	for (int i = 0; (i = res.find(re, i)) >= 0;) {
-		switch (res[i].latin1()) {
+	for (int i = 0; (i = res.indexOf(re, i)) >= 0;) {
+		switch (res[i].toLatin1()) {
 		case '<':
 			res.replace(i, 1, "&lt;");
 			i += 4;
@@ -393,12 +393,12 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
 {
 	QMenu* popup = Parent::createStandardContextMenu(pos);
 	QAction* action = new QAction(_("Show Debug Info"), popup);
-	  action->setCheckable(TRUE);
+	  action->setCheckable(true);
 	  connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 	  connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
 	  action->setChecked(showDebug());
 	popup->addSeparator();
-	action->addTo(popup);
+	popup->addAction(action);
 	return popup;
 }
 
@@ -408,18 +408,22 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
 }
 
 ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
-	: Parent(parent, name), result(NULL)
+	: Parent(parent), result(NULL)
 {
-	setCaption("Search Config");
+	setWindowTitle("Search Config");
 
-	QVBoxLayout* layout1 = new QVBoxLayout(this, 11, 6);
-	QHBoxLayout* layout2 = new QHBoxLayout(0, 0, 6);
+	QVBoxLayout* layout1 = new QVBoxLayout(this);
+	layout1->setContentsMargins(11, 11, 11, 11);
+	layout1->setSpacing(6);
+	QHBoxLayout* layout2 = new QHBoxLayout(0);
+	layout2->setContentsMargins(0, 0, 0, 0);
+	layout2->setSpacing(6);
 	layout2->addWidget(new QLabel(_("Find:"), this));
 	editField = new QLineEdit(this);
 	connect(editField, SIGNAL(returnPressed()), SLOT(search()));
 	layout2->addWidget(editField);
 	searchButton = new QPushButton(_("Search"), this);
-	searchButton->setAutoDefault(FALSE);
+	searchButton->setAutoDefault(false);
 	connect(searchButton, SIGNAL(clicked()), SLOT(search()));
 	layout2->addWidget(searchButton);
 	layout1->addLayout(layout2);
@@ -436,18 +440,18 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	layout1->addWidget(split);
 
 	if (name) {
-		int x, y, width, height;
+		QVariant x, y;
+		int width, height;
 		bool ok;
 
 		configSettings->beginGroup(name);
-		width = configSettings->readNumEntry("/window width", parent->width() / 2);
-		height = configSettings->readNumEntry("/window height", parent->height() / 2);
+		width = configSettings->value("/window width", parent->width() / 2).toInt();
+		height = configSettings->value("/window height", parent->height() / 2).toInt();
 		resize(width, height);
-		x = configSettings->readNumEntry("/window x", 0, &ok);
-		if (ok)
-			y = configSettings->readNumEntry("/window y", 0, &ok);
-		if (ok)
-			move(x, y);
+		x = configSettings->value("/window x");
+		y = configSettings->value("/window y");
+		if ((x.isValid())&&(y.isValid()))
+			move(x.toInt(), y.toInt());
 		QList<int> sizes = configSettings->readSizes("/split", &ok);
 		if (ok)
 			split->setSizes(sizes);
@@ -458,15 +462,15 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 
 void ConfigSearchWindow::saveSettings(void)
 {
-	if (name()) {
+	/*if (name()) {
 		configSettings->beginGroup(name());
-		configSettings->writeEntry("/window x", pos().x());
-		configSettings->writeEntry("/window y", pos().y());
-		configSettings->writeEntry("/window width", size().width());
-		configSettings->writeEntry("/window height", size().height());
+		configSettings->setValue("/window x", pos().x());
+		configSettings->setValue("/window y", pos().y());
+		configSettings->setValue("/window width", size().width());
+		configSettings->setValue("/window height", size().height());
 		configSettings->writeSizes("/split", split->sizes());
 		configSettings->endGroup();
-	}
+	}*/
 }
 
 void ConfigSearchWindow::search(void)
@@ -481,7 +485,8 @@ ConfigMainWindow::ConfigMainWindow(void)
 {
 	QMenuBar* menu;
 	bool ok;
-	int x, y, width, height;
+	QVariant x, y;
+	int width, height;
 	char title[256];
 
 	QDesktopWidget *d = configApp->desktop();
@@ -489,16 +494,15 @@ ConfigMainWindow::ConfigMainWindow(void)
 		rootmenu.prompt->text,
 		""
 		);
-	setCaption(title);
+	setWindowTitle(title);
 
-	width = configSettings->readNumEntry("/window width", d->width() - 64);
-	height = configSettings->readNumEntry("/window height", d->height() - 64);
+	width = configSettings->value("/window width", d->width() - 64).toInt();
+	height = configSettings->value("/window height", d->height() - 64).toInt();
 	resize(width, height);
-	x = configSettings->readNumEntry("/window x", 0, &ok);
-	if (ok)
-		y = configSettings->readNumEntry("/window y", 0, &ok);
-	if (ok)
-		move(x, y);
+	x = configSettings->value("/window x");
+	y = configSettings->value("/window y");
+	if ((x.isValid())&&(y.isValid()))
+		move(x.toInt(), y.toInt());
 
 	split1 = new QSplitter(this);
 	split1->setOrientation(Qt::Horizontal);
@@ -515,7 +519,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configList = configView->list;
 
 	helpText = new ConfigInfoView(split2, "help");
-	helpText->setTextFormat(Qt::RichText);
+	//helpText->setTextFormat(Qt::RichText);
 
 	setTabOrder(configList, helpText);
 	configList->setFocus();
@@ -526,7 +530,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
 	backAction = new QAction(QPixmap(xpm_back), _("Back"), this);
 	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
-	  backAction->setEnabled(FALSE);
+	  backAction->setEnabled(false);
 	QAction *quitAction = new QAction(_("&Quit"), this);
 	quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
 	  connect(quitAction, SIGNAL(activated()), SLOT(close()));
@@ -545,31 +549,31 @@ ConfigMainWindow::ConfigMainWindow(void)
 	searchAction->setShortcut(Qt::CTRL + Qt::Key_F);
 	  connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
 	singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this);
-	singleViewAction->setCheckable(TRUE);
+	singleViewAction->setCheckable(true);
 	  connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
 	splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this);
-	splitViewAction->setCheckable(TRUE);
+	splitViewAction->setCheckable(true);
 	  connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
 	fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this);
-	fullViewAction->setCheckable(TRUE);
+	fullViewAction->setCheckable(true);
 	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
 
 	QAction *showNameAction = new QAction(_("Show Name"), this);
-	  showNameAction->setCheckable(TRUE);
+	  showNameAction->setCheckable(true);
 	  connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
 	  connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
 	  showNameAction->setChecked(configView->showName());
 	QAction *showRangeAction = new QAction(_("Show Range"), this);
-	  showRangeAction->setCheckable(TRUE);
+	  showRangeAction->setCheckable(true);
 	  connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
 	  connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
 	QAction *showDataAction = new QAction(_("Show Data"), this);
-	  showDataAction->setCheckable(TRUE);
+	  showDataAction->setCheckable(true);
 	  connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
 	  connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
 
 	QActionGroup *optGroup = new QActionGroup(this);
-	optGroup->setExclusive(TRUE);
+	optGroup->setExclusive(true);
 	connect(optGroup, SIGNAL(selected(QAction *)), configView,
 		SLOT(setOptionMode(QAction *)));
 	connect(optGroup, SIGNAL(selected(QAction *)), menuView,
@@ -578,12 +582,12 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
 	configView->showAllAction = new QAction(_("Show All Options"), optGroup);
 	configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
-	configView->showNormalAction->setCheckable(TRUE);
-	configView->showAllAction->setCheckable(TRUE);
-	configView->showPromptAction->setCheckable(TRUE);
+	configView->showNormalAction->setCheckable(true);
+	configView->showAllAction->setCheckable(true);
+	configView->showPromptAction->setCheckable(true);
 
 	QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
-	  showDebugAction->setCheckable(TRUE);
+	  showDebugAction->setCheckable(true);
 	  connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
 	  connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
 	  showDebugAction->setChecked(helpText->showDebug());
@@ -594,45 +598,41 @@ ConfigMainWindow::ConfigMainWindow(void)
 	  connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
 
 	// init tool bar
-	backAction->addTo(toolBar);
+	toolBar->addAction(backAction);
 	toolBar->addSeparator();
-	loadAction->addTo(toolBar);
-	saveAction->addTo(toolBar);
+	toolBar->addAction(loadAction);
+	toolBar->addAction(saveAction);
 	toolBar->addSeparator();
-	singleViewAction->addTo(toolBar);
-	splitViewAction->addTo(toolBar);
-	fullViewAction->addTo(toolBar);
+	toolBar->addAction(singleViewAction);
+	toolBar->addAction(splitViewAction);
+	toolBar->addAction(fullViewAction);
 
 	// create config menu
-	QMenu* config = new QMenu(this);
-	menu->insertItem(_("&File"), config);
-	loadAction->addTo(config);
-	saveAction->addTo(config);
-	saveAsAction->addTo(config);
+	QMenu* config = menu->addMenu(_("&File"));
+	config->addAction(loadAction);
+	config->addAction(saveAction);
+	config->addAction(saveAsAction);
 	config->addSeparator();
-	quitAction->addTo(config);
+	config->addAction(quitAction);
 
 	// create edit menu
-	QMenu* editMenu = new QMenu(this);
-	menu->insertItem(_("&Edit"), editMenu);
-	searchAction->addTo(editMenu);
+	QMenu* editMenu = menu->addMenu(_("&Edit"));
+	editMenu->addAction(searchAction);
 
 	// create options menu
-	QMenu* optionMenu = new QMenu(this);
-	menu->insertItem(_("&Option"), optionMenu);
-	showNameAction->addTo(optionMenu);
-	showRangeAction->addTo(optionMenu);
-	showDataAction->addTo(optionMenu);
+	QMenu* optionMenu = menu->addMenu(_("&Option"));
+	optionMenu->addAction(showNameAction);
+	optionMenu->addAction(showRangeAction);
+	optionMenu->addAction(showDataAction);
 	optionMenu->addSeparator();
-	optGroup->addTo(optionMenu);
+	optionMenu->addActions(optGroup->actions());
 	optionMenu->addSeparator();
 
 	// create help menu
-	QMenu* helpMenu = new QMenu(this);
 	menu->addSeparator();
-	menu->insertItem(_("&Help"), helpMenu);
-	showIntroAction->addTo(helpMenu);
-	showAboutAction->addTo(helpMenu);
+	QMenu* helpMenu = menu->addMenu(_("&Help"));
+	helpMenu->addAction(showIntroAction);
+	helpMenu->addAction(showAboutAction);
 
 	connect(configList, SIGNAL(menuChanged(struct menu *)),
 		helpText, SLOT(setInfo(struct menu *)));
@@ -654,7 +654,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 	connect(helpText, SIGNAL(menuSelected(struct menu *)),
 		SLOT(setMenuLink(struct menu *)));
 
-	QString listMode = configSettings->readEntry("/listMode", "symbol");
+	QString listMode = configSettings->value("/listMode", "symbol").toString();
 	if (listMode == "single")
 		showSingleView();
 	else if (listMode == "full")
@@ -674,7 +674,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 
 void ConfigMainWindow::loadConfig(void)
 {
-	QString s = QFileDialog::getOpenFileName(conf_get_configname(), NULL, this);
+	QString s = QFileDialog::getOpenFileName(this, "", conf_get_configname());
 	if (s.isNull())
 		return;
 	if (conf_read(QFile::encodeName(s)))
@@ -693,7 +693,7 @@ bool ConfigMainWindow::saveConfig(void)
 
 void ConfigMainWindow::saveConfigAs(void)
 {
-	QString s = QFileDialog::getSaveFileName(conf_get_configname(), NULL, this);
+	QString s = QFileDialog::getSaveFileName(this, "", conf_get_configname());
 	if (s.isNull())
 		return;
 	saveConfig();
@@ -820,14 +820,14 @@ void ConfigMainWindow::showAbout(void)
 
 void ConfigMainWindow::saveSettings(void)
 {
-	configSettings->writeEntry("/window x", pos().x());
-	configSettings->writeEntry("/window y", pos().y());
-	configSettings->writeEntry("/window width", size().width());
-	configSettings->writeEntry("/window height", size().height());
+	configSettings->setValue("/window x", pos().x());
+	configSettings->setValue("/window y", pos().y());
+	configSettings->setValue("/window width", size().width());
+	configSettings->setValue("/window height", size().height());
 
 	QString entry;
 
-	configSettings->writeEntry("/listMode", entry);
+	configSettings->setValue("/listMode", entry);
 
 	configSettings->writeSizes("/split1", split1->sizes());
 	configSettings->writeSizes("/split2", split2->sizes());
@@ -859,7 +859,7 @@ static const char *progname;
 
 static void usage(void)
 {
-	printf(_("%s [-s] <config>\n"), progname);
+	printf(_("%s [-s] <config>\n").toLatin1().constData(), progname);
 	exit(0);
 }
 
@@ -898,7 +898,6 @@ int main(int ac, char** av)
 	v = new ConfigMainWindow();
 
 	//zconfdump(stdout);
-	configApp->setMainWidget(v);
 	configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
 	configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings()));
 	v->show();
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 16/39] Port xconfig to Qt5 - update signals
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (14 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5 Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem Thiago Macieira
                   ` (23 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 51 ++++++++++++++----------------------------------
 1 file changed, 15 insertions(+), 36 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index d134a89..c6b7320 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -90,7 +90,7 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	: Parent(parent)
 {
-	connect(this, SIGNAL(lostFocus()), SLOT(hide()));
+	connect(this, SIGNAL(editingFinished()), SLOT(hide()));
 }
 
 void ConfigLineEdit::show(QTreeWidgetItem *i)
@@ -484,7 +484,7 @@ ConfigMainWindow::ConfigMainWindow(void)
 	: searchWindow(0)
 {
 	QMenuBar* menu;
-	bool ok;
+	bool ok = true;
 	QVariant x, y;
 	int width, height;
 	char title[256];
@@ -529,54 +529,51 @@ ConfigMainWindow::ConfigMainWindow(void)
 	addToolBar(toolBar);
 
 	backAction = new QAction(QPixmap(xpm_back), _("Back"), this);
-	  connect(backAction, SIGNAL(activated()), SLOT(goBack()));
+	  connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack()));
 	  backAction->setEnabled(false);
 	QAction *quitAction = new QAction(_("&Quit"), this);
 	quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
-	  connect(quitAction, SIGNAL(activated()), SLOT(close()));
+	  connect(quitAction, SIGNAL(triggered(bool)), SLOT(close()));
 	QAction *loadAction = new QAction(QPixmap(xpm_load), _("&Load"), this);
 	loadAction->setShortcut(Qt::CTRL + Qt::Key_L);
-	  connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
+	  connect(loadAction, SIGNAL(triggered(bool)), SLOT(loadConfig()));
 	saveAction = new QAction(QPixmap(xpm_save), _("&Save"), this);
 	saveAction->setShortcut(Qt::CTRL + Qt::Key_S);
-	  connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
+	  connect(saveAction, SIGNAL(triggered(bool)), SLOT(saveConfig()));
 	conf_set_changed_callback(conf_changed);
 	// Set saveAction's initial state
 	conf_changed();
 	QAction *saveAsAction = new QAction(_("Save &As..."), this);
-	  connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
+	  connect(saveAsAction, SIGNAL(triggered(bool)), SLOT(saveConfigAs()));
 	QAction *searchAction = new QAction(_("&Find"), this);
 	searchAction->setShortcut(Qt::CTRL + Qt::Key_F);
-	  connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
+	  connect(searchAction, SIGNAL(triggered(bool)), SLOT(searchConfig()));
 	singleViewAction = new QAction(QPixmap(xpm_single_view), _("Single View"), this);
 	singleViewAction->setCheckable(true);
-	  connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
+	  connect(singleViewAction, SIGNAL(triggered(bool)), SLOT(showSingleView()));
 	splitViewAction = new QAction(QPixmap(xpm_split_view), _("Split View"), this);
 	splitViewAction->setCheckable(true);
-	  connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
+	  connect(splitViewAction, SIGNAL(triggered(bool)), SLOT(showSplitView()));
 	fullViewAction = new QAction(QPixmap(xpm_tree_view), _("Full View"), this);
 	fullViewAction->setCheckable(true);
-	  connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
+	  connect(fullViewAction, SIGNAL(triggered(bool)), SLOT(showFullView()));
 
 	QAction *showNameAction = new QAction(_("Show Name"), this);
 	  showNameAction->setCheckable(true);
 	  connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
-	  connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
 	  showNameAction->setChecked(configView->showName());
 	QAction *showRangeAction = new QAction(_("Show Range"), this);
 	  showRangeAction->setCheckable(true);
 	  connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
-	  connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
 	QAction *showDataAction = new QAction(_("Show Data"), this);
 	  showDataAction->setCheckable(true);
 	  connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
-	  connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
 
 	QActionGroup *optGroup = new QActionGroup(this);
 	optGroup->setExclusive(true);
-	connect(optGroup, SIGNAL(selected(QAction *)), configView,
+	connect(optGroup, SIGNAL(triggered(QAction*)), configView,
 		SLOT(setOptionMode(QAction *)));
-	connect(optGroup, SIGNAL(selected(QAction *)), menuView,
+	connect(optGroup, SIGNAL(triggered(QAction *)), menuView,
 		SLOT(setOptionMode(QAction *)));
 
 	configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
@@ -589,13 +586,12 @@ ConfigMainWindow::ConfigMainWindow(void)
 	QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
 	  showDebugAction->setCheckable(true);
 	  connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
-	  connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
 	  showDebugAction->setChecked(helpText->showDebug());
 
 	QAction *showIntroAction = new QAction( _("Introduction"), this);
-	  connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
+	  connect(showIntroAction, SIGNAL(triggered(bool)), SLOT(showIntro()));
 	QAction *showAboutAction = new QAction( _("About"), this);
-	  connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
+	  connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout()));
 
 	// init tool bar
 	toolBar->addAction(backAction);
@@ -634,23 +630,6 @@ ConfigMainWindow::ConfigMainWindow(void)
 	helpMenu->addAction(showIntroAction);
 	helpMenu->addAction(showAboutAction);
 
-	connect(configList, SIGNAL(menuChanged(struct menu *)),
-		helpText, SLOT(setInfo(struct menu *)));
-	connect(configList, SIGNAL(menuSelected(struct menu *)),
-		SLOT(changeMenu(struct menu *)));
-	connect(configList, SIGNAL(parentSelected()),
-		SLOT(goBack()));
-	connect(menuList, SIGNAL(menuChanged(struct menu *)),
-		helpText, SLOT(setInfo(struct menu *)));
-	connect(menuList, SIGNAL(menuSelected(struct menu *)),
-		SLOT(changeMenu(struct menu *)));
-
-	connect(configList, SIGNAL(gotFocus(struct menu *)),
-		helpText, SLOT(setInfo(struct menu *)));
-	connect(menuList, SIGNAL(gotFocus(struct menu *)),
-		helpText, SLOT(setInfo(struct menu *)));
-	connect(menuList, SIGNAL(gotFocus(struct menu *)),
-		SLOT(listFocusChanged(void)));
 	connect(helpText, SIGNAL(menuSelected(struct menu *)),
 		SLOT(setMenuLink(struct menu *)));
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (15 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 16/39] Port xconfig to Qt5 - update signals Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation Thiago Macieira
                   ` (22 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 48 ++++++++++++++++++++++++++++++++++++++++++------
 scripts/kconfig/qconf.cc | 24 +++++++++++++++++++++---
 2 files changed, 63 insertions(+), 9 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 1cd0219..54b3b92 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -17,6 +17,8 @@
 #include "expr.h"
 
 class ConfigView;
+class ConfigList;
+class ConfigItem;
 class ConfigLineEdit;
 class ConfigMainWindow;
 
@@ -37,6 +39,40 @@ enum optionMode {
 	normalOpt = 0, allOpt, promptOpt
 };
 
+class ConfigList : public QTreeWidget {
+	Q_OBJECT
+	typedef class QTreeWidget Parent;
+public:
+	ConfigList(ConfigView* p, const char *name = 0);
+};
+
+class ConfigItem : public QTreeWidgetItem {
+	typedef class QTreeWidgetItem Parent;
+public:
+	ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, struct menu *m, bool v)
+	: Parent(parent, after), menu(m), visible(v), goParent(false)
+	{
+		init();
+	}
+	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
+	: Parent(parent, after), menu(m), visible(v), goParent(false)
+	{
+		init();
+	}
+	ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, bool v)
+	: Parent(parent, after), menu(0), visible(v), goParent(true)
+	{
+		init();
+	}
+	~ConfigItem(void);
+	void init(void);
+
+	ConfigItem* nextItem;
+	struct menu *menu;
+	bool visible;
+	bool goParent;
+};
+
 class ConfigLineEdit : public QLineEdit {
 	Q_OBJECT
 	typedef class QLineEdit Parent;
@@ -46,11 +82,11 @@ public:
 	{
 		return (ConfigView*)Parent::parent();
 	}
-	void show(QTreeWidgetItem *i);
+	void show(ConfigItem *i);
 	void keyPressEvent(QKeyEvent *e);
 
 public:
-	QTreeWidgetItem *item;
+	ConfigItem *item;
 };
 
 class ConfigView : public QWidget {
@@ -59,7 +95,7 @@ class ConfigView : public QWidget {
 public:
 	ConfigView(QWidget* parent, const char *name = 0);
 	~ConfigView(void);
-	static void updateList(QTreeWidgetItem* item);
+	static void updateList(ConfigItem* item);
 	static void updateListAll(void);
 
 	bool showName(void) const { return false; } // TODO: Implement me.
@@ -75,7 +111,7 @@ signals:
 	void showRangeChanged(bool);
 	void showDataChanged(bool);
 public:
-	QTreeWidget* list;
+	ConfigList* list;
 	ConfigLineEdit* lineEdit;
 
 	static ConfigView* viewList;
@@ -164,9 +200,9 @@ protected:
 
 	ConfigSearchWindow *searchWindow;
 	ConfigView *menuView;
-	QTreeWidget *menuList;
+	ConfigList *menuList;
 	ConfigView *configView;
-	QTreeWidget *configList;
+	ConfigList *configList;
 	ConfigInfoView *helpText;
 	QToolBar *toolBar;
 	QAction *backAction;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c6b7320..a86409d 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -87,13 +87,27 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 	return true;
 }
 
+/*
+ * construct a menu entry
+ */
+void ConfigItem::init(void)
+{
+}
+
+/*
+ * destruct a menu entry
+ */
+ConfigItem::~ConfigItem(void)
+{
+}
+
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	: Parent(parent)
 {
 	connect(this, SIGNAL(editingFinished()), SLOT(hide()));
 }
 
-void ConfigLineEdit::show(QTreeWidgetItem *i)
+void ConfigLineEdit::show(ConfigItem* i)
 {
 	item = i;
 	Parent::show();
@@ -118,6 +132,10 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 	hide();
 }
 
+ConfigList::ConfigList(ConfigView* p, const char *name)
+	: Parent(p)
+{
+}
 ConfigView*ConfigView::viewList;
 QAction *ConfigView::showNormalAction;
 QAction *ConfigView::showAllAction;
@@ -129,7 +147,7 @@ ConfigView::ConfigView(QWidget* parent, const char *name)
 	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
 	verticalLayout->setContentsMargins(0, 0, 0, 0);
 
-	list = new QTreeWidget(this);
+	list = new ConfigList(this);
 	verticalLayout->addWidget(list);
 	lineEdit = new ConfigLineEdit(this);
 	lineEdit->hide();
@@ -167,7 +185,7 @@ void ConfigView::setShowData(bool b)
 {
 }
 
-void ConfigView::updateList(QTreeWidgetItem* item)
+void ConfigView::updateList(ConfigItem* item)
 {
 }
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (16 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2) Thiago Macieira
                   ` (21 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  | 113 +++++++++++++++++++++++++++++++++++++++++--
 scripts/kconfig/qconf.cc | 121 +++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 216 insertions(+), 18 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 54b3b92..7c55b1d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -44,6 +44,81 @@ class ConfigList : public QTreeWidget {
 	typedef class QTreeWidget Parent;
 public:
 	ConfigList(ConfigView* p, const char *name = 0);
+	void reinit(void);
+	ConfigView* parent(void) const
+	{
+		return (ConfigView*)Parent::parent();
+	}
+	ConfigItem* findConfigItem(struct menu *);
+
+protected:
+	void keyPressEvent(QKeyEvent *e);
+	void contentsMousePressEvent(QMouseEvent *e);
+	void contentsMouseReleaseEvent(QMouseEvent *e);
+	void contentsMouseMoveEvent(QMouseEvent *e);
+	void contentsMouseDoubleClickEvent(QMouseEvent *e);
+	void focusInEvent(QFocusEvent *e);
+	void contextMenuEvent(QContextMenuEvent *e);
+
+public slots:
+	void setRootMenu(struct menu *menu);
+
+	void updateList(ConfigItem *item);
+	void setValue(ConfigItem* item, tristate val);
+	void changeValue(ConfigItem* item);
+	void updateSelection(void);
+	void saveSettings(void);
+signals:
+	void menuChanged(struct menu *menu);
+	void menuSelected(struct menu *menu);
+	void parentSelected(void);
+	void gotFocus(struct menu *);
+
+public:
+	void updateListAll(void)
+	{
+		updateAll = true;
+		updateList(NULL);
+		updateAll = false;
+	}
+	ConfigList* listView()
+	{
+		return this;
+	}
+	ConfigItem* firstChild() const
+	{
+		// TODO: Implement me.
+		return NULL;
+	}
+	void addColumn(colIdx idx, const QString& label)
+	{
+		// TODO: Implement me.
+	}
+	void removeColumn(colIdx idx)
+	{
+		// TODO: Implement me.
+	}
+	void setAllOpen(bool open);
+	void setParentMenu(void);
+
+	bool menuSkip(struct menu *);
+
+	template <class P>
+	void updateMenuList(P*, struct menu*);
+
+	bool updateAll;
+
+	QPixmap symbolYesPix, symbolModPix, symbolNoPix;
+	QPixmap choiceYesPix, choiceNoPix;
+	QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
+
+	bool showName, showRange, showData;
+	enum listMode mode;
+	enum optionMode optMode;
+	struct menu *rootEntry;
+	QPalette disabledColorGroup;
+	QPalette inactivedColorGroup;
+	QMenu* headerPopup;
 };
 
 class ConfigItem : public QTreeWidgetItem {
@@ -66,6 +141,38 @@ public:
 	}
 	~ConfigItem(void);
 	void init(void);
+	void okRename(int col);
+	void updateMenu(void);
+	void testUpdateMenu(bool v);
+	ConfigList* listView() const
+	{
+		return (ConfigList*)Parent::treeWidget();
+	}
+	ConfigItem* firstChild() const
+	{
+		return (ConfigItem *)Parent::child(0);
+	}
+	ConfigItem* nextSibling() const
+	{
+		return NULL; // TODO: Implement me
+	}
+	void setText(colIdx idx, const QString& text)
+	{
+		Parent::setText(idx, text);
+	}
+	QString text(colIdx idx) const
+	{
+		return Parent::text(idx);
+	}
+	void setPixmap(colIdx idx, const QPixmap& pm)
+	{
+		// TODO: Implement me
+	}
+	const QPixmap* pixmap(colIdx idx) const
+	{
+		return NULL; // TODO: Implement me
+	}
+	// Implement paintCell
 
 	ConfigItem* nextItem;
 	struct menu *menu;
@@ -98,9 +205,9 @@ public:
 	static void updateList(ConfigItem* item);
 	static void updateListAll(void);
 
-	bool showName(void) const { return false; } // TODO: Implement me.
-	bool showRange(void) const { return false; } // TODO: Implement me.
-	bool showData(void) const { return false; } // TODO: Implement me.
+	bool showName(void) const { return list->showName; }
+	bool showRange(void) const { return list->showRange; }
+	bool showData(void) const { return list->showData; }
 public slots:
 	void setShowName(bool);
 	void setShowRange(bool);
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index a86409d..0987a75 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -84,9 +84,31 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
 	for (it = value.begin(); it != value.end(); ++it)
 		stringList.push_back(QString::number(*it));
 	setValue(key, stringList);
+
 	return true;
 }
 
+
+/*
+ * set the new data
+ * TODO check the value
+ */
+void ConfigItem::okRename(int col)
+{
+}
+
+/*
+ * update the displayed of a menu entry
+ */
+void ConfigItem::updateMenu(void)
+{
+}
+
+void ConfigItem::testUpdateMenu(bool v)
+{
+}
+
+
 /*
  * construct a menu entry
  */
@@ -133,9 +155,92 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 }
 
 ConfigList::ConfigList(ConfigView* p, const char *name)
-	: Parent(p)
+	: Parent(p),
+	  updateAll(false),
+	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
+	  choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
+	  menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
+	  showName(false), showRange(false), showData(false), optMode(normalOpt),
+	  rootEntry(0), headerPopup(0)
+{
+}
+
+void ConfigList::reinit(void)
+{
+}
+
+void ConfigList::saveSettings(void)
+{
+}
+
+ConfigItem* ConfigList::findConfigItem(struct menu *menu)
+{
+}
+
+void ConfigList::updateSelection(void)
+{
+}
+
+void ConfigList::updateList(ConfigItem* item)
+{
+}
+
+void ConfigList::setValue(ConfigItem* item, tristate val)
+{
+}
+
+void ConfigList::changeValue(ConfigItem* item)
+{
+}
+
+void ConfigList::setRootMenu(struct menu *menu)
+{
+}
+
+void ConfigList::setParentMenu(void)
+{
+}
+
+/*
+ * update all the children of a menu entry
+ *   removes/adds the entries from the parent widget as necessary
+ *
+ * parent: either the menu list widget or a menu entry widget
+ * menu: entry to be updated
+ */
+template <class P>
+void ConfigList::updateMenuList(P* parent, struct menu* menu)
+{
+}
+
+void ConfigList::keyPressEvent(QKeyEvent* ev)
+{
+}
+
+void ConfigList::contentsMousePressEvent(QMouseEvent* e)
 {
 }
+
+void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
+{
+}
+
+void ConfigList::focusInEvent(QFocusEvent *e)
+{
+}
+
+void ConfigList::contextMenuEvent(QContextMenuEvent *e)
+{
+}
+
 ConfigView*ConfigView::viewList;
 QAction *ConfigView::showNormalAction;
 QAction *ConfigView::showAllAction;
@@ -206,11 +311,6 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 
 void ConfigInfoView::saveSettings(void)
 {
-	/*if (name()) {
-		configSettings->beginGroup(name());
-		configSettings->setValue("/showDebug", showDebug());
-		configSettings->endGroup();
-	}*/
 }
 
 void ConfigInfoView::setShowDebug(bool b)
@@ -480,15 +580,6 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 
 void ConfigSearchWindow::saveSettings(void)
 {
-	/*if (name()) {
-		configSettings->beginGroup(name());
-		configSettings->setValue("/window x", pos().x());
-		configSettings->setValue("/window y", pos().y());
-		configSettings->setValue("/window width", size().width());
-		configSettings->setValue("/window height", size().height());
-		configSettings->writeSizes("/split", split->sizes());
-		configSettings->endGroup();
-	}*/
 }
 
 void ConfigSearchWindow::search(void)
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2).
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (17 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile Thiago Macieira
                   ` (20 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  45 +--
 scripts/kconfig/qconf.cc | 788 ++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 807 insertions(+), 26 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 7c55b1d..819e029 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -53,10 +53,10 @@ public:
 
 protected:
 	void keyPressEvent(QKeyEvent *e);
-	void contentsMousePressEvent(QMouseEvent *e);
-	void contentsMouseReleaseEvent(QMouseEvent *e);
-	void contentsMouseMoveEvent(QMouseEvent *e);
-	void contentsMouseDoubleClickEvent(QMouseEvent *e);
+	void mousePressEvent(QMouseEvent *e);
+	void mouseReleaseEvent(QMouseEvent *e);
+	void mouseMoveEvent(QMouseEvent *e);
+	void mouseDoubleClickEvent(QMouseEvent *e);
 	void focusInEvent(QFocusEvent *e);
 	void contextMenuEvent(QContextMenuEvent *e);
 
@@ -87,16 +87,15 @@ public:
 	}
 	ConfigItem* firstChild() const
 	{
-		// TODO: Implement me.
-		return NULL;
+		return (ConfigItem *)children().first();
 	}
-	void addColumn(colIdx idx, const QString& label)
+	void addColumn(colIdx idx)
 	{
-		// TODO: Implement me.
+		showColumn(idx);
 	}
 	void removeColumn(colIdx idx)
 	{
-		// TODO: Implement me.
+		hideColumn(idx);
 	}
 	void setAllOpen(bool open);
 	void setParentMenu(void);
@@ -124,7 +123,7 @@ public:
 class ConfigItem : public QTreeWidgetItem {
 	typedef class QTreeWidgetItem Parent;
 public:
-	ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, struct menu *m, bool v)
+	ConfigItem(QTreeWidget *parent, ConfigItem *after, struct menu *m, bool v)
 	: Parent(parent, after), menu(m), visible(v), goParent(false)
 	{
 		init();
@@ -134,7 +133,7 @@ public:
 	{
 		init();
 	}
-	ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, bool v)
+	ConfigItem(QTreeWidget *parent, ConfigItem *after, bool v)
 	: Parent(parent, after), menu(0), visible(v), goParent(true)
 	{
 		init();
@@ -152,9 +151,19 @@ public:
 	{
 		return (ConfigItem *)Parent::child(0);
 	}
-	ConfigItem* nextSibling() const
+	ConfigItem* nextSibling()
 	{
-		return NULL; // TODO: Implement me
+		ConfigItem *ret = NULL;
+		ConfigItem *_parent = (ConfigItem *)parent();
+
+		if(_parent) {
+		  ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1);
+		} else {
+		  QTreeWidget *_treeWidget = treeWidget();
+		  ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1);
+		}
+
+		return ret;
 	}
 	void setText(colIdx idx, const QString& text)
 	{
@@ -164,15 +173,15 @@ public:
 	{
 		return Parent::text(idx);
 	}
-	void setPixmap(colIdx idx, const QPixmap& pm)
+	void setPixmap(colIdx idx, const QIcon &icon)
 	{
-		// TODO: Implement me
+		Parent::setIcon(idx, icon);
 	}
-	const QPixmap* pixmap(colIdx idx) const
+	const QIcon pixmap(colIdx idx) const
 	{
-		return NULL; // TODO: Implement me
+		return icon(idx);
 	}
-	// Implement paintCell
+	// TODO: Implement paintCell
 
 	ConfigItem* nextItem;
 	struct menu *menu;
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 0987a75..e0518ca 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -102,10 +102,135 @@ void ConfigItem::okRename(int col)
  */
 void ConfigItem::updateMenu(void)
 {
+	ConfigList* list;
+	struct symbol* sym;
+	struct property *prop;
+	QString prompt;
+	int type;
+	tristate expr;
+
+	list = listView();
+	if (goParent) {
+		setPixmap(promptColIdx, list->menuBackPix);
+		prompt = "..";
+		goto set_prompt;
+	}
+
+	sym = menu->sym;
+	prop = menu->prompt;
+	prompt = _(menu_get_prompt(menu));
+
+	if (prop) switch (prop->type) {
+	case P_MENU:
+		if (list->mode == singleMode || list->mode == symbolMode) {
+			/* a menuconfig entry is displayed differently
+			 * depending whether it's at the view root or a child.
+			 */
+			if (sym && list->rootEntry == menu)
+				break;
+			setPixmap(promptColIdx, list->menuPix);
+		} else {
+			if (sym)
+				break;
+			setPixmap(promptColIdx, QIcon());
+		}
+		goto set_prompt;
+	case P_COMMENT:
+		setPixmap(promptColIdx, QIcon());
+		goto set_prompt;
+	default:
+		;
+	}
+	if (!sym)
+		goto set_prompt;
+
+	setText(nameColIdx, QString::fromLocal8Bit(sym->name));
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		char ch;
+
+		if (!sym_is_changable(sym) && list->optMode == normalOpt) {
+			setPixmap(promptColIdx, QIcon());
+			setText(noColIdx, QString::null);
+			setText(modColIdx, QString::null);
+			setText(yesColIdx, QString::null);
+			break;
+		}
+		expr = sym_get_tristate_value(sym);
+		switch (expr) {
+		case yes:
+			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+				setPixmap(promptColIdx, list->choiceYesPix);
+			else
+				setPixmap(promptColIdx, list->symbolYesPix);
+			setText(yesColIdx, "Y");
+			ch = 'Y';
+			break;
+		case mod:
+			setPixmap(promptColIdx, list->symbolModPix);
+			setText(modColIdx, "M");
+			ch = 'M';
+			break;
+		default:
+			if (sym_is_choice_value(sym) && type == S_BOOLEAN)
+				setPixmap(promptColIdx, list->choiceNoPix);
+			else
+				setPixmap(promptColIdx, list->symbolNoPix);
+			setText(noColIdx, "N");
+			ch = 'N';
+			break;
+		}
+		if (expr != no)
+			setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0);
+		if (expr != mod)
+			setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0);
+		if (expr != yes)
+			setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0);
+
+		setText(dataColIdx, QChar(ch));
+		break;
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		const char* data;
+
+		data = sym_get_string_value(sym);
+
+		//int i = list->mapIdx(dataColIdx);
+		//if (i >= 0)
+		//	setRenameEnabled(i, true);
+		setText(dataColIdx, data);
+		if (type == S_STRING)
+			prompt = QString("%1: %2").arg(prompt).arg(data);
+		else
+			prompt = QString("(%2) %1").arg(prompt).arg(data);
+		break;
+	}
+	if (!sym_has_value(sym) && visible)
+		prompt += _(" (NEW)");
+set_prompt:
+	setText(promptColIdx, prompt);
 }
 
 void ConfigItem::testUpdateMenu(bool v)
 {
+	ConfigItem* i;
+
+	visible = v;
+	if (!menu)
+		return;
+
+	sym_calc_value(menu->sym);
+	if (menu->flags & MENU_CHANGED) {
+		/* the menu entry changed, so update all list items */
+		menu->flags &= ~MENU_CHANGED;
+		for (i = (ConfigItem*)menu->data; i; i = i->nextItem)
+			i->updateMenu();
+	} else if (listView()->updateAll)
+		updateMenu();
 }
 
 
@@ -114,6 +239,16 @@ void ConfigItem::testUpdateMenu(bool v)
  */
 void ConfigItem::init(void)
 {
+	if (menu) {
+		ConfigList* list = listView();
+		nextItem = (ConfigItem*)menu->data;
+		menu->data = this;
+
+		if (list->mode != fullMode)
+			setExpanded(true);
+		sym_calc_value(menu->sym);
+	}
+	updateMenu();
 }
 
 /*
@@ -121,17 +256,30 @@ void ConfigItem::init(void)
  */
 ConfigItem::~ConfigItem(void)
 {
+	if (menu) {
+		ConfigItem** ip = (ConfigItem**)&menu->data;
+		for (; *ip; ip = &(*ip)->nextItem) {
+			if (*ip == this) {
+				*ip = nextItem;
+				break;
+			}
+		}
+	}
 }
 
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	: Parent(parent)
 {
-	connect(this, SIGNAL(editingFinished()), SLOT(hide()));
+	connect(this, SIGNAL(lostFocus()), SLOT(hide()));
 }
 
 void ConfigLineEdit::show(ConfigItem* i)
 {
 	item = i;
+	if (sym_get_string_value(item->menu->sym))
+		setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym)));
+	else
+		setText(QString::null);
 	Parent::show();
 	setFocus();
 }
@@ -143,6 +291,7 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
 		break;
 	case Qt::Key_Return:
 	case Qt::Key_Enter:
+		sym_set_string_value(item->menu->sym, text().toLatin1());
 		parent()->updateList(item);
 		break;
 	default:
@@ -163,42 +312,251 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	  showName(false), showRange(false), showData(false), optMode(normalOpt),
 	  rootEntry(0), headerPopup(0)
 {
+	int i;
+
+	setObjectName(name);
+	setSortingEnabled(-1);
+	setRootIsDecorated(true);
+
+	connect(this, SIGNAL(selectionChanged(void)),
+		SLOT(updateSelection(void)));
+
+	if (name) {
+		configSettings->beginGroup(name);
+		showName = configSettings->value("/showName", false).toBool();
+		showRange = configSettings->value("/showRange", false).toBool();
+		showData = configSettings->value("/showData", false).toBool();
+		optMode = (enum optionMode)configSettings->value("/optionMode", 0).toInt();
+		configSettings->endGroup();
+		connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
+	}
+
+	addColumn(promptColIdx);
+
+	reinit();
+}
+
+bool ConfigList::menuSkip(struct menu *menu)
+{
+	if (optMode == normalOpt && menu_is_visible(menu))
+		return false;
+	if (optMode == promptOpt && menu_has_prompt(menu))
+		return false;
+	if (optMode == allOpt)
+		return false;
+	return true;
 }
 
 void ConfigList::reinit(void)
 {
+	removeColumn(dataColIdx);
+	removeColumn(yesColIdx);
+	removeColumn(modColIdx);
+	removeColumn(noColIdx);
+	removeColumn(nameColIdx);
+
+	if (showName)
+		addColumn(nameColIdx);
+	if (showRange) {
+		addColumn(noColIdx);
+		addColumn(modColIdx);
+		addColumn(yesColIdx);
+	}
+	if (showData)
+		addColumn(dataColIdx);
+
+	updateListAll();
 }
 
 void ConfigList::saveSettings(void)
 {
+	if (!objectName().isEmpty()) {
+		configSettings->beginGroup(objectName());
+		configSettings->setValue("/showName", showName);
+		configSettings->setValue("/showRange", showRange);
+		configSettings->setValue("/showData", showData);
+		configSettings->setValue("/optionMode", (int)optMode);
+		configSettings->endGroup();
+	}
 }
 
 ConfigItem* ConfigList::findConfigItem(struct menu *menu)
 {
+	ConfigItem* item = (ConfigItem*)menu->data;
+
+	for (; item; item = item->nextItem) {
+		if (this == item->listView())
+			break;
+	}
+
+	return item;
 }
 
 void ConfigList::updateSelection(void)
 {
+	struct menu *menu;
+	enum prop_type type;
+
+	ConfigItem* item = (ConfigItem*)selectedItems().first();
+	if (!item)
+		return;
+
+	menu = item->menu;
+	emit menuChanged(menu);
+	if (!menu)
+		return;
+	type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if (mode == menuMode && type == P_MENU)
+		emit menuSelected(menu);
 }
 
 void ConfigList::updateList(ConfigItem* item)
 {
+	ConfigItem* last = 0;
+
+	if (!rootEntry) {
+		if (mode != listMode)
+			goto update;
+		QTreeWidgetItemIterator it(this);
+		ConfigItem* item;
+
+		while (*it) {
+			item = (ConfigItem*)(*it);
+			if (!item->menu)
+				continue;
+			item->testUpdateMenu(menu_is_visible(item->menu));
+
+			++it;
+		}
+		return;
+	}
+
+	if (rootEntry != &rootmenu && (mode == singleMode ||
+	    (mode == symbolMode && rootEntry->parent != &rootmenu))) {
+		item = firstChild();
+		if (!item)
+			item = new ConfigItem(this, 0, true);
+		last = item;
+	}
+	if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
+	    rootEntry->sym && rootEntry->prompt) {
+		item = last ? last->nextSibling() : firstChild();
+		if (!item)
+			item = new ConfigItem(this, last, rootEntry, true);
+		else
+			item->testUpdateMenu(true);
+
+		updateMenuList(item, rootEntry);
+		update();
+		return;
+	}
+update:
+	updateMenuList(this, rootEntry);
+	update();
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)
 {
+	struct symbol* sym;
+	int type;
+	tristate oldval;
+
+	sym = item->menu ? item->menu->sym : 0;
+	if (!sym)
+		return;
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		oldval = sym_get_tristate_value(sym);
+
+		if (!sym_set_tristate_value(sym, val))
+			return;
+		if (oldval == no && item->menu->list)
+			item->setExpanded(true);
+		parent()->updateList(item);
+		break;
+	}
 }
 
 void ConfigList::changeValue(ConfigItem* item)
 {
+	struct symbol* sym;
+	struct menu* menu;
+	int type, oldexpr, newexpr;
+
+	menu = item->menu;
+	if (!menu)
+		return;
+	sym = menu->sym;
+	if (!sym) {
+		if (item->menu->list)
+			item->setExpanded(!item->isExpanded());
+		return;
+	}
+
+	type = sym_get_type(sym);
+	switch (type) {
+	case S_BOOLEAN:
+	case S_TRISTATE:
+		oldexpr = sym_get_tristate_value(sym);
+		newexpr = sym_toggle_tristate_value(sym);
+		if (item->menu->list) {
+			if (oldexpr == newexpr)
+				item->setExpanded(!item->isExpanded());
+			else if (oldexpr == no)
+				item->setExpanded(true);
+		}
+		if (oldexpr != newexpr)
+			parent()->updateList(item);
+		break;
+	case S_INT:
+	case S_HEX:
+	case S_STRING:
+		break;
+	}
 }
 
 void ConfigList::setRootMenu(struct menu *menu)
 {
+	enum prop_type type;
+
+	if (rootEntry == menu)
+		return;
+	type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if (type != P_MENU)
+		return;
+	updateMenuList(this, 0);
+	rootEntry = menu;
+	updateListAll();
+	if (currentItem()) {
+		currentItem()->setSelected(hasFocus());
+		scrollToItem(currentItem());
+	}
 }
 
 void ConfigList::setParentMenu(void)
 {
+	ConfigItem* item;
+	struct menu *oldroot;
+
+	oldroot = rootEntry;
+	if (rootEntry == &rootmenu)
+		return;
+	setRootMenu(menu_get_parent_menu(rootEntry->parent));
+
+	QTreeWidgetItemIterator it(this);
+	while (*it) {
+		item = (ConfigItem *)(*it);
+		if (item->menu == oldroot) {
+			setCurrentItem(item);
+			scrollToItem(item);
+			break;
+		}
+
+		++it;
+	}
 }
 
 /*
@@ -211,34 +569,250 @@ void ConfigList::setParentMenu(void)
 template <class P>
 void ConfigList::updateMenuList(P* parent, struct menu* menu)
 {
+	struct menu* child;
+	ConfigItem* item;
+	ConfigItem* last;
+	bool visible;
+	enum prop_type type;
+
+	if (!menu) {
+		while ((item = parent->firstChild()))
+			item->parent()->removeChild(item);
+			delete item;
+		return;
+	}
+
+	last = parent->firstChild();
+	if (last && !last->goParent)
+		last = 0;
+	for (child = menu->list; child; child = child->next) {
+		item = last ? last->nextSibling() : parent->firstChild();
+		type = child->prompt ? child->prompt->type : P_UNKNOWN;
+
+		switch (mode) {
+		case menuMode:
+			if (!(child->flags & MENU_ROOT))
+				goto hide;
+			break;
+		case symbolMode:
+			if (child->flags & MENU_ROOT)
+				goto hide;
+			break;
+		default:
+			break;
+		}
+
+		visible = menu_is_visible(child);
+		if (!menuSkip(child)) {
+			if (!child->sym && !child->list && !child->prompt)
+				continue;
+			if (!item || item->menu != child)
+				item = new ConfigItem(parent, last, child, visible);
+			else
+				item->testUpdateMenu(visible);
+
+			if (mode == fullMode || mode == menuMode || type != P_MENU)
+				updateMenuList(item, child);
+			else
+				updateMenuList(item, 0);
+			last = item;
+			continue;
+		}
+	hide:
+		if (item && item->menu == child) {
+			last = parent->firstChild();
+			if (last == item)
+				last = 0;
+			else while (last->nextSibling() != item)
+				last = last->nextSibling();
+			delete item;
+		}
+	}
 }
 
 void ConfigList::keyPressEvent(QKeyEvent* ev)
 {
+	QTreeWidgetItem* i = currentItem();
+	ConfigItem* item;
+	struct menu *menu;
+	enum prop_type type;
+
+	if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
+		emit parentSelected();
+		ev->accept();
+		return;
+	}
+
+	if (!i) {
+		Parent::keyPressEvent(ev);
+		return;
+	}
+	item = (ConfigItem*)i;
+
+	switch (ev->key()) {
+	case Qt::Key_Return:
+	case Qt::Key_Enter:
+		if (item->goParent) {
+			emit parentSelected();
+			break;
+		}
+		menu = item->menu;
+		if (!menu)
+			break;
+		type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+		if (type == P_MENU && rootEntry != menu &&
+		    mode != fullMode && mode != menuMode) {
+			emit menuSelected(menu);
+			break;
+		}
+	case Qt::Key_Space:
+		changeValue(item);
+		break;
+	case Qt::Key_N:
+		setValue(item, no);
+		break;
+	case Qt::Key_M:
+		setValue(item, mod);
+		break;
+	case Qt::Key_Y:
+		setValue(item, yes);
+		break;
+	default:
+		Parent::keyPressEvent(ev);
+		return;
+	}
+	ev->accept();
 }
 
-void ConfigList::contentsMousePressEvent(QMouseEvent* e)
+void ConfigList::mousePressEvent(QMouseEvent* e)
 {
+	//QPoint p(contentsToViewport(e->pos()));
+	//printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y());
+	Parent::mousePressEvent(e);
 }
 
-void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
+void ConfigList::mouseReleaseEvent(QMouseEvent* e)
 {
+	QPoint p = e->pos();
+	ConfigItem* item = (ConfigItem*)itemAt(p);
+	struct menu *menu;
+	enum prop_type ptype;
+	QIcon icon;
+	int idx, x;
+
+	if (!item)
+		goto skip;
+
+	menu = item->menu;
+	x = header()->offset() + p.x();
+	idx = header()->sectionPosition(x);
+	switch (idx) {
+	case promptColIdx:
+		icon = item->pixmap(promptColIdx);
+		break;
+	case noColIdx:
+		setValue(item, no);
+		break;
+	case modColIdx:
+		setValue(item, mod);
+		break;
+	case yesColIdx:
+		setValue(item, yes);
+		break;
+	case dataColIdx:
+		changeValue(item);
+		break;
+	}
+
+skip:
+	//printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y());
+	Parent::mouseReleaseEvent(e);
 }
 
-void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
+void ConfigList::mouseMoveEvent(QMouseEvent* e)
 {
+	//QPoint p(contentsToViewport(e->pos()));
+	//printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y());
+	Parent::mouseMoveEvent(e);
 }
 
-void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
+void ConfigList::mouseDoubleClickEvent(QMouseEvent* e)
 {
+	QPoint p = e->pos(); // TODO: Check if this works(was contentsToViewport).
+	ConfigItem* item = (ConfigItem*)itemAt(p);
+	struct menu *menu;
+	enum prop_type ptype;
+
+	if (!item)
+		goto skip;
+	if (item->goParent) {
+		emit parentSelected();
+		goto skip;
+	}
+	menu = item->menu;
+	if (!menu)
+		goto skip;
+	ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+	if (ptype == P_MENU && (mode == singleMode || mode == symbolMode))
+		emit menuSelected(menu);
+	else if (menu->sym)
+		changeValue(item);
+
+skip:
+	//printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y());
+	Parent::mouseDoubleClickEvent(e);
 }
 
 void ConfigList::focusInEvent(QFocusEvent *e)
 {
+	struct menu *menu = NULL;
+
+	Parent::focusInEvent(e);
+
+	ConfigItem* item = (ConfigItem *)currentItem();
+	if (item) {
+		item->setSelected(true);
+		menu = item->menu;
+	}
+	emit gotFocus(menu);
 }
 
 void ConfigList::contextMenuEvent(QContextMenuEvent *e)
 {
+	if (e->y() <= header()->geometry().bottom()) {
+		if (!headerPopup) {
+			QAction *action;
+
+			headerPopup = new QMenu(this);
+			action = new QAction(_("Show Name"), this);
+			  action->setCheckable(true);
+			  connect(action, SIGNAL(toggled(bool)),
+				  parent(), SLOT(setShowName(bool)));
+			  connect(parent(), SIGNAL(showNameChanged(bool)),
+				  action, SLOT(setOn(bool)));
+			  action->setChecked(showName);
+			  headerPopup->addAction(action);
+			action = new QAction(_("Show Range"), this);
+			  action->setCheckable(true);
+			  connect(action, SIGNAL(toggled(bool)),
+				  parent(), SLOT(setShowRange(bool)));
+			  connect(parent(), SIGNAL(showRangeChanged(bool)),
+				  action, SLOT(setOn(bool)));
+			  action->setChecked(showRange);
+			  headerPopup->addAction(action);
+			action = new QAction(_("Show Data"), this);
+			  action->setCheckable(true);
+			  connect(action, SIGNAL(toggled(bool)),
+				  parent(), SLOT(setShowData(bool)));
+			  connect(parent(), SIGNAL(showDataChanged(bool)),
+				  action, SLOT(setOn(bool)));
+			  action->setChecked(showData);
+			  headerPopup->addAction(action);
+		}
+		headerPopup->exec(e->globalPos());
+		e->accept();
+	} else
+		e->ignore();
 }
 
 ConfigView*ConfigView::viewList;
@@ -276,33 +850,78 @@ ConfigView::~ConfigView(void)
 
 void ConfigView::setOptionMode(QAction *act)
 {
+	if (act == showNormalAction)
+		list->optMode = normalOpt;
+	else if (act == showAllAction)
+		list->optMode = allOpt;
+	else
+		list->optMode = promptOpt;
+
+	list->updateListAll();
 }
 
 void ConfigView::setShowName(bool b)
 {
+	if (list->showName != b) {
+		list->showName = b;
+		list->reinit();
+		emit showNameChanged(b);
+	}
 }
 
 void ConfigView::setShowRange(bool b)
 {
+	if (list->showRange != b) {
+		list->showRange = b;
+		list->reinit();
+		emit showRangeChanged(b);
+	}
 }
 
 void ConfigView::setShowData(bool b)
 {
+	if (list->showData != b) {
+		list->showData = b;
+		list->reinit();
+		emit showDataChanged(b);
+	}
+}
+
+void ConfigList::setAllOpen(bool open)
+{
+	QTreeWidgetItemIterator it(this);
+
+	while (*it) {
+		(*it)->setExpanded(open);
+
+		++it;
+	}
 }
 
 void ConfigView::updateList(ConfigItem* item)
 {
+	ConfigView* v;
+
+	for (v = viewList; v; v = v->nextView)
+		v->list->updateList(item);
 }
 
 void ConfigView::updateListAll(void)
 {
+	ConfigView* v;
+
+	for (v = viewList; v; v = v->nextView)
+		v->list->updateListAll();
 }
 
 ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 	: Parent(parent), sym(0), _menu(0)
 {
-	if (name) {
-		configSettings->beginGroup(name);
+	setObjectName(name);
+
+
+	if (!objectName().isEmpty()) {
+		configSettings->beginGroup(objectName());
 		_showDebug = configSettings->value("/showDebug", false).toBool();
 		configSettings->endGroup();
 		connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
@@ -311,6 +930,11 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
 
 void ConfigInfoView::saveSettings(void)
 {
+	if (!objectName().isEmpty()) {
+		configSettings->beginGroup(objectName());
+		configSettings->setValue("/showDebug", showDebug());
+		configSettings->endGroup();
+	}
 }
 
 void ConfigInfoView::setShowDebug(bool b)
@@ -528,6 +1152,7 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
 ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name)
 	: Parent(parent), result(NULL)
 {
+	setObjectName(name);
 	setWindowTitle("Search Config");
 
 	QVBoxLayout* layout1 = new QVBoxLayout(this);
@@ -549,6 +1174,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	split = new QSplitter(this);
 	split->setOrientation(Qt::Vertical);
 	list = new ConfigView(split, name);
+	list->list->mode = listMode;
 	info = new ConfigInfoView(split, name);
 	connect(list->list, SIGNAL(menuChanged(struct menu *)),
 		info, SLOT(setInfo(struct menu *)));
@@ -580,10 +1206,35 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 
 void ConfigSearchWindow::saveSettings(void)
 {
+	if (!objectName().isEmpty()) {
+		configSettings->beginGroup(objectName());
+		configSettings->setValue("/window x", pos().x());
+		configSettings->setValue("/window y", pos().y());
+		configSettings->setValue("/window width", size().width());
+		configSettings->setValue("/window height", size().height());
+		configSettings->writeSizes("/split", split->sizes());
+		configSettings->endGroup();
+	}
 }
 
 void ConfigSearchWindow::search(void)
 {
+	struct symbol **p;
+	struct property *prop;
+	ConfigItem *lastItem = NULL;
+
+	free(result);
+	list->list->clear();
+	info->clear();
+
+	result = sym_re_search(editField->text().toLatin1());
+	if (!result)
+		return;
+	for (p = result; *p; p++) {
+		for_all_prompts((*p), prop)
+			lastItem = new ConfigItem(list->list, lastItem, prop->menu,
+						  menu_is_visible(prop->menu));
+	}
 }
 
 /*
@@ -739,6 +1390,23 @@ ConfigMainWindow::ConfigMainWindow(void)
 	helpMenu->addAction(showIntroAction);
 	helpMenu->addAction(showAboutAction);
 
+	connect(configList, SIGNAL(menuChanged(struct menu *)),
+		helpText, SLOT(setInfo(struct menu *)));
+	connect(configList, SIGNAL(menuSelected(struct menu *)),
+		SLOT(changeMenu(struct menu *)));
+	connect(configList, SIGNAL(parentSelected()),
+		SLOT(goBack()));
+	connect(menuList, SIGNAL(menuChanged(struct menu *)),
+		helpText, SLOT(setInfo(struct menu *)));
+	connect(menuList, SIGNAL(menuSelected(struct menu *)),
+		SLOT(changeMenu(struct menu *)));
+
+	connect(configList, SIGNAL(gotFocus(struct menu *)),
+		helpText, SLOT(setInfo(struct menu *)));
+	connect(menuList, SIGNAL(gotFocus(struct menu *)),
+		helpText, SLOT(setInfo(struct menu *)));
+	connect(menuList, SIGNAL(gotFocus(struct menu *)),
+		SLOT(listFocusChanged(void)));
 	connect(helpText, SIGNAL(menuSelected(struct menu *)),
 		SLOT(setMenuLink(struct menu *)));
 
@@ -796,19 +1464,86 @@ void ConfigMainWindow::searchConfig(void)
 
 void ConfigMainWindow::changeMenu(struct menu *menu)
 {
-
+	configList->setRootMenu(menu);
+	if (configList->rootEntry->parent == &rootmenu)
+		backAction->setEnabled(false);
+	else
+		backAction->setEnabled(true);
 }
 
 void ConfigMainWindow::setMenuLink(struct menu *menu)
 {
+	struct menu *parent;
+	ConfigList* list = NULL;
+	ConfigItem* item;
+
+	if (configList->menuSkip(menu))
+		return;
+
+	switch (configList->mode) {
+	case singleMode:
+		list = configList;
+		parent = menu_get_parent_menu(menu);
+		if (!parent)
+			return;
+		list->setRootMenu(parent);
+		break;
+	case symbolMode:
+		if (menu->flags & MENU_ROOT) {
+			configList->setRootMenu(menu);
+			configList->clearSelection();
+			list = menuList;
+		} else {
+			list = configList;
+			parent = menu_get_parent_menu(menu->parent);
+			if (!parent)
+				return;
+			item = menuList->findConfigItem(parent);
+			if (item) {
+				item->setSelected(true);
+				menuList->scrollToItem(item);
+			}
+			list->setRootMenu(parent);
+		}
+		break;
+	case fullMode:
+		list = configList;
+		break;
+	default:
+		break;
+	}
+
+	if (list) {
+		item = list->findConfigItem(menu);
+		if (item) {
+			item->setSelected(true);
+			list->scrollToItem(item);
+			list->setFocus();
+		}
+	}
 }
 
 void ConfigMainWindow::listFocusChanged(void)
 {
+	if (menuList->mode == menuMode)
+		configList->clearSelection();
 }
 
 void ConfigMainWindow::goBack(void)
 {
+	ConfigItem* item;
+
+	configList->setParentMenu();
+	if (configList->rootEntry == &rootmenu)
+		backAction->setEnabled(false);
+	item = (ConfigItem*)menuList->selectedItems().first();
+	while (item) {
+		if (item->menu == configList->rootEntry) {
+			item->setSelected(true);
+			break;
+		}
+		item = (ConfigItem*)item->parent();
+	}
 }
 
 void ConfigMainWindow::showSingleView(void)
@@ -821,6 +1556,12 @@ void ConfigMainWindow::showSingleView(void)
 	fullViewAction->setChecked(false);
 
 	menuView->hide();
+	menuList->setRootMenu(0);
+	configList->mode = singleMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
 	configList->setFocus();
 }
 
@@ -833,6 +1574,16 @@ void ConfigMainWindow::showSplitView(void)
 	fullViewAction->setEnabled(true);
 	fullViewAction->setChecked(false);
 
+	configList->mode = symbolMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
+	configList->setAllOpen(true);
+	configApp->processEvents();
+	menuList->mode = menuMode;
+	menuList->setRootMenu(&rootmenu);
+	menuList->setAllOpen(true);
 	menuView->show();
 	menuList->setFocus();
 }
@@ -847,6 +1598,12 @@ void ConfigMainWindow::showFullView(void)
 	fullViewAction->setChecked(true);
 
 	menuView->hide();
+	menuList->setRootMenu(0);
+	configList->mode = fullMode;
+	if (configList->rootEntry == &rootmenu)
+		configList->updateListAll();
+	else
+		configList->setRootMenu(&rootmenu);
 	configList->setFocus();
 }
 
@@ -914,7 +1671,22 @@ void ConfigMainWindow::saveSettings(void)
 	configSettings->setValue("/window height", size().height());
 
 	QString entry;
+	switch(configList->mode) {
+	case singleMode :
+		entry = "single";
+		break;
+
+	case symbolMode :
+		entry = "split";
+		break;
+
+	case fullMode :
+		entry = "full";
+		break;
 
+	default:
+		break;
+	}
 	configSettings->setValue("/listMode", entry);
 
 	configSettings->writeSizes("/split1", split1->sizes());
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (18 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2) Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names Thiago Macieira
                   ` (19 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index aceaaed..9b5b8c6 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -265,8 +265,8 @@ $(obj)/.tmp_qtcheck:
 	      moc="/usr/bin/moc"; \
 	    fi; \
 	else \
-	  cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
-	  libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
+	  cflags="\$$(shell pkg-config QtCore QtGui --cflags)"; \
+	  libs="\$$(shell pkg-config QtCore QtGui --libs)"; \
 	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
 	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
 	fi; \
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (19 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name Thiago Macieira
                   ` (18 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index e0518ca..a8b5452 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -270,7 +270,7 @@ ConfigItem::~ConfigItem(void)
 ConfigLineEdit::ConfigLineEdit(ConfigView* parent)
 	: Parent(parent)
 {
-	connect(this, SIGNAL(lostFocus()), SLOT(hide()));
+	connect(this, SIGNAL(editingFinished()), SLOT(hide()));
 }
 
 void ConfigLineEdit::show(ConfigItem* i)
@@ -318,7 +318,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	setSortingEnabled(-1);
 	setRootIsDecorated(true);
 
-	connect(this, SIGNAL(selectionChanged(void)),
+	connect(this, SIGNAL(itemSelectionChanged(void)),
 		SLOT(updateSelection(void)));
 
 	if (name) {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (20 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup Thiago Macieira
                   ` (17 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index a8b5452..3454c43 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -823,6 +823,7 @@ QAction *ConfigView::showPromptAction;
 ConfigView::ConfigView(QWidget* parent, const char *name)
 	: Parent(parent)
 {
+	setObjectName(name);
 	QVBoxLayout *verticalLayout = new QVBoxLayout(this);
 	verticalLayout->setContentsMargins(0, 0, 0, 0);
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (21 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles Thiago Macieira
                   ` (16 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 3454c43..8d72e4a 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -576,9 +576,6 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu)
 	enum prop_type type;
 
 	if (!menu) {
-		while ((item = parent->firstChild()))
-			item->parent()->removeChild(item);
-			delete item;
 		return;
 	}
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (22 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list Thiago Macieira
                   ` (15 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 8d72e4a..c64b905 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -318,6 +318,8 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	setSortingEnabled(-1);
 	setRootIsDecorated(true);
 
+	setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
+
 	connect(this, SIGNAL(itemSelectionChanged(void)),
 		SLOT(updateSelection(void)));
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (23 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode " Thiago Macieira
                   ` (14 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 819e029..d1383c6 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -124,17 +124,17 @@ class ConfigItem : public QTreeWidgetItem {
 	typedef class QTreeWidgetItem Parent;
 public:
 	ConfigItem(QTreeWidget *parent, ConfigItem *after, struct menu *m, bool v)
-	: Parent(parent, after), menu(m), visible(v), goParent(false)
+	: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
 	{
 		init();
 	}
 	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
-	: Parent(parent, after), menu(m), visible(v), goParent(false)
+	: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
 	{
 		init();
 	}
 	ConfigItem(QTreeWidget *parent, ConfigItem *after, bool v)
-	: Parent(parent, after), menu(0), visible(v), goParent(true)
+	: Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true)
 	{
 		init();
 	}
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode to initializer list.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (24 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template Thiago Macieira
                   ` (13 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c64b905..168f0cc 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -309,7 +309,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
 	  choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
 	  menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
-	  showName(false), showRange(false), showData(false), optMode(normalOpt),
+	  showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt),
 	  rootEntry(0), headerPopup(0)
 {
 	int i;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (25 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode " Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 28/39] Add current selection check Thiago Macieira
                   ` (12 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

ConfigItem executes parent->takeChild(0)

while

ConfigList executes parent->takeTopLevelItem(0)

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h  |  4 +--
 scripts/kconfig/qconf.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index d1383c6..d86ae3c 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -102,8 +102,8 @@ public:
 
 	bool menuSkip(struct menu *);
 
-	template <class P>
-	void updateMenuList(P*, struct menu*);
+	void updateMenuList(ConfigItem *parent, struct menu*);
+	void updateMenuList(ConfigList *parent, struct menu*);
 
 	bool updateAll;
 
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 168f0cc..f54f19f 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -568,8 +568,7 @@ void ConfigList::setParentMenu(void)
  * parent: either the menu list widget or a menu entry widget
  * menu: entry to be updated
  */
-template <class P>
-void ConfigList::updateMenuList(P* parent, struct menu* menu)
+void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
 {
 	struct menu* child;
 	ConfigItem* item;
@@ -578,6 +577,11 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu)
 	enum prop_type type;
 
 	if (!menu) {
+		while (parent->childCount() > 0)
+		{
+			delete parent->takeChild(0);
+		}
+
 		return;
 	}
 
@@ -629,6 +633,71 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu)
 	}
 }
 
+void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
+{
+	struct menu* child;
+	ConfigItem* item;
+	ConfigItem* last;
+	bool visible;
+	enum prop_type type;
+
+	if (!menu) {
+		while (parent->topLevelItemCount() > 0)
+		{
+			delete parent->takeTopLevelItem(0);
+		}
+
+		return;
+	}
+
+	last = (ConfigItem*)parent->topLevelItem(0);
+	if (last && !last->goParent)
+		last = 0;
+	for (child = menu->list; child; child = child->next) {
+		item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0);
+		type = child->prompt ? child->prompt->type : P_UNKNOWN;
+
+		switch (mode) {
+		case menuMode:
+			if (!(child->flags & MENU_ROOT))
+				goto hide;
+			break;
+		case symbolMode:
+			if (child->flags & MENU_ROOT)
+				goto hide;
+			break;
+		default:
+			break;
+		}
+
+		visible = menu_is_visible(child);
+		if (!menuSkip(child)) {
+			if (!child->sym && !child->list && !child->prompt)
+				continue;
+			if (!item || item->menu != child)
+				item = new ConfigItem(parent, last, child, visible);
+			else
+				item->testUpdateMenu(visible);
+
+			if (mode == fullMode || mode == menuMode || type != P_MENU)
+				updateMenuList(item, child);
+			else
+				updateMenuList(item, 0);
+			last = item;
+			continue;
+		}
+	hide:
+		if (item && item->menu == child) {
+			last = (ConfigItem*)parent->topLevelItem(0);
+			if (last == item)
+				last = 0;
+			else while (last->nextSibling() != item)
+				last = last->nextSibling();
+			delete item;
+		}
+	}
+}
+
 void ConfigList::keyPressEvent(QKeyEvent* ev)
 {
 	QTreeWidgetItem* i = currentItem();
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 28/39] Add current selection check.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (26 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring Thiago Macieira
                   ` (11 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index f54f19f..6de8589 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -399,6 +399,9 @@ void ConfigList::updateSelection(void)
 	struct menu *menu;
 	enum prop_type type;
 
+	if (selectedItems().count() == 0)
+		return;
+
 	ConfigItem* item = (ConfigItem*)selectedItems().first();
 	if (!item)
 		return;
@@ -1605,6 +1608,10 @@ void ConfigMainWindow::goBack(void)
 	configList->setParentMenu();
 	if (configList->rootEntry == &rootmenu)
 		backAction->setEnabled(false);
+
+	if (menuList->selectedItems().count() == 0)
+		return;
+
 	item = (ConfigItem*)menuList->selectedItems().first();
 	while (item) {
 		if (item->menu == configList->rootEntry) {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (27 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 28/39] Add current selection check Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type Thiago Macieira
                   ` (10 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 6de8589..e5bfa6b 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -315,7 +315,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	int i;
 
 	setObjectName(name);
-	setSortingEnabled(-1);
+	setSortingEnabled(false);
 	setRootIsDecorated(true);
 
 	setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (28 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
                   ` (9 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index d86ae3c..000403d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -123,7 +123,7 @@ public:
 class ConfigItem : public QTreeWidgetItem {
 	typedef class QTreeWidgetItem Parent;
 public:
-	ConfigItem(QTreeWidget *parent, ConfigItem *after, struct menu *m, bool v)
+	ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v)
 	: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
 	{
 		init();
@@ -133,7 +133,7 @@ public:
 	{
 		init();
 	}
-	ConfigItem(QTreeWidget *parent, ConfigItem *after, bool v)
+	ConfigItem(ConfigList *parent, ConfigItem *after, bool v)
 	: Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true)
 	{
 		init();
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (29 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-10-14 14:03   ` Michal Marek
  2015-09-22 18:36 ` [PATCH 32/39] Port xconfig to Qt5 - Source format Thiago Macieira
                   ` (8 subsequent siblings)
  39 siblings, 1 reply; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index e5bfa6b..2ef06c1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -318,6 +318,9 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
 	setSortingEnabled(false);
 	setRootIsDecorated(true);
 
+	setVerticalScrollMode(ScrollPerPixel);
+	setHorizontalScrollMode(ScrollPerPixel);
+
 	setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
 
 	connect(this, SIGNAL(itemSelectionChanged(void)),
@@ -453,11 +456,13 @@ void ConfigList::updateList(ConfigItem* item)
 
 		updateMenuList(item, rootEntry);
 		update();
+		resizeColumnToContents(0);
 		return;
 	}
 update:
 	updateMenuList(this, rootEntry);
 	update();
+	resizeColumnToContents(0);
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 32/39] Port xconfig to Qt5 - Source format.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (30 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code Thiago Macieira
                   ` (7 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 000403d..a40036d 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -157,10 +157,10 @@ public:
 		ConfigItem *_parent = (ConfigItem *)parent();
 
 		if(_parent) {
-		  ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1);
+			ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1);
 		} else {
-		  QTreeWidget *_treeWidget = treeWidget();
-		  ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1);
+			QTreeWidget *_treeWidget = treeWidget();
+			ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1);
 		}
 
 		return ret;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (31 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 32/39] Port xconfig to Qt5 - Source format Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing Thiago Macieira
                   ` (6 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 2ef06c1..8d96960 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -199,9 +199,6 @@ void ConfigItem::updateMenu(void)
 
 		data = sym_get_string_value(sym);
 
-		//int i = list->mapIdx(dataColIdx);
-		//if (i >= 0)
-		//	setRenameEnabled(i, true);
 		setText(dataColIdx, data);
 		if (type == S_STRING)
 			prompt = QString("%1: %2").arg(prompt).arg(data);
@@ -1356,7 +1353,6 @@ ConfigMainWindow::ConfigMainWindow(void)
 	configList = configView->list;
 
 	helpText = new ConfigInfoView(split2, "help");
-	//helpText->setTextFormat(Qt::RichText);
 
 	setTabOrder(configList, helpText);
 	configList->setFocus();
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (32 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle Thiago Macieira
                   ` (5 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 8d96960..455969c 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -521,6 +521,7 @@ void ConfigList::changeValue(ConfigItem* item)
 	case S_INT:
 	case S_HEX:
 	case S_STRING:
+		parent()->lineEdit->show(item);
 		break;
 	}
 }
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (33 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item Thiago Macieira
                   ` (4 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 455969c..a46aac7 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -779,10 +779,26 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e)
 
 	menu = item->menu;
 	x = header()->offset() + p.x();
-	idx = header()->sectionPosition(x);
+	idx = header()->logicalIndexAt(x);
 	switch (idx) {
 	case promptColIdx:
 		icon = item->pixmap(promptColIdx);
+		if (!icon.isNull()) {
+			int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly.
+			if (x >= off && x < off + icon.availableSizes().first().width()) {
+				if (item->goParent) {
+					emit parentSelected();
+					break;
+				} else if (!menu)
+					break;
+				ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+				if (ptype == P_MENU && rootEntry != menu &&
+				    mode != fullMode && mode != menuMode)
+					emit menuSelected(menu);
+				else
+					changeValue(item);
+			}
+		}
 		break;
 	case noColIdx:
 		setValue(item, no);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (34 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue Thiago Macieira
                   ` (3 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index a46aac7..d4e9cd5 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1621,7 +1621,7 @@ void ConfigMainWindow::listFocusChanged(void)
 
 void ConfigMainWindow::goBack(void)
 {
-	ConfigItem* item;
+	ConfigItem* item, *oldSelection;
 
 	configList->setParentMenu();
 	if (configList->rootEntry == &rootmenu)
@@ -1631,8 +1631,10 @@ void ConfigMainWindow::goBack(void)
 		return;
 
 	item = (ConfigItem*)menuList->selectedItems().first();
+	oldSelection = item;
 	while (item) {
 		if (item->menu == configList->rootEntry) {
+			oldSelection->setSelected(false);
 			item->setSelected(true);
 			break;
 		}
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (35 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 38/39] Port xconfig to Qt5 - Update copyright Thiago Macieira
                   ` (2 subsequent siblings)
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index d4e9cd5..1f31651 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -438,7 +438,7 @@ void ConfigList::updateList(ConfigItem* item)
 
 	if (rootEntry != &rootmenu && (mode == singleMode ||
 	    (mode == symbolMode && rootEntry->parent != &rootmenu))) {
-		item = firstChild();
+		item = (ConfigItem *)topLevelItem(0);
 		if (!item)
 			item = new ConfigItem(this, 0, true);
 		last = item;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 38/39] Port xconfig to Qt5 - Update copyright.
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (36 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
  2015-10-14 14:00 ` Port of [qx]config to Qt 5 Michal Marek
  39 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek, Boris Barbulovski

From: Boris Barbulovski <bbarbulovski@gmail.com>

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/qconf.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 1f31651..91b7e6f 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
+ * Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>
  * Released under the terms of the GNU GPL v2.0.
  */
 
@@ -1753,7 +1754,8 @@ void ConfigMainWindow::showIntro(void)
 
 void ConfigMainWindow::showAbout(void)
 {
-	static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
+	static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n"
+		"Copyright (C) 2015 Boris Barbulovski <bbarbulovski@gmail.com>.\n\n"
 		"Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n");
 
 	QMessageBox::information(this, "qconf", str);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 39/39] Update the buildsystem for KConfig finding Qt
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (37 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 38/39] Port xconfig to Qt5 - Update copyright Thiago Macieira
@ 2015-09-22 18:36 ` Thiago Macieira
  2015-10-16  4:12   ` Stefan Lippers-Hollmann
  2015-10-14 14:00 ` Port of [qx]config to Qt 5 Michal Marek
  39 siblings, 1 reply; 46+ messages in thread
From: Thiago Macieira @ 2015-09-22 18:36 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Michal Marek

The buildsystem will now only search for Qt 4 and Qt 5. Support for Qt 2
and 3 was dropped in the previous commits (Qt 3 was EOL'ed in 2010 or
so...).

For Qt 5, to be future-proof with the future direction notice appearing
in the 5.5 release, C++11 support is automatically enabled.

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
---
 scripts/kconfig/Makefile | 73 +++++++++++++++++++-----------------------------
 1 file changed, 28 insertions(+), 45 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 9b5b8c6..33c4994 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -226,53 +226,36 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
 
 # Qt needs some extra effort...
 $(obj)/.tmp_qtcheck:
-	@set -e; $(kecho) "  CHECK   qt"; dir=""; pkg=""; \
-	if ! pkg-config --exists QtCore 2> /dev/null; then \
-	    echo "* Unable to find the Qt4 tool qmake. Trying to use Qt3"; \
-	    pkg-config --exists qt 2> /dev/null && pkg=qt; \
-	    pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
-	    if [ -n "$$pkg" ]; then \
-	      cflags="\$$(shell pkg-config $$pkg --cflags)"; \
-	      libs="\$$(shell pkg-config $$pkg --libs)"; \
-	      moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
-	      dir="$$(pkg-config $$pkg --variable=prefix)"; \
-	    else \
-	      for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
-	        if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
-	      done; \
-	      if [ -z "$$dir" ]; then \
-	        echo >&2 "*"; \
-	        echo >&2 "* Unable to find any Qt installation. Please make sure that"; \
-	        echo >&2 "* the Qt4 or Qt3 development package is correctly installed and"; \
-	        echo >&2 "* either qmake can be found or install pkg-config or set"; \
-	        echo >&2 "* the QTDIR environment variable to the correct location."; \
-	        echo >&2 "*"; \
-	        false; \
-	      fi; \
-	      libpath=$$dir/lib; lib=qt; osdir=""; \
-	      $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
-	        osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
-	      test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
-	      test -f $$libpath/libqt-mt.so && lib=qt-mt; \
-	      cflags="-I$$dir/include"; \
-	      libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
-	      moc="$$dir/bin/moc"; \
-	    fi; \
-	    if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
-	      echo "*"; \
-	      echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
-	      echo "*"; \
-	      moc="/usr/bin/moc"; \
-	    fi; \
-	else \
-	  cflags="\$$(shell pkg-config QtCore QtGui --cflags)"; \
-	  libs="\$$(shell pkg-config QtCore QtGui --libs)"; \
-	  moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
-	  [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
-	fi; \
+	@set -e; $(kecho) "  CHECK   qt"; \
+	qtver=`qmake -query QT_VERSION` || { \
+	    echo >&2 "*"; \
+	    echo >&2 "* qmake failed."; \
+	    echo >&2 "*"; \
+	    exit 1; \
+	}; \
+	qtlibdir=`qmake -query QT_INSTALL_LIBS`; \
+	qthdrdir=`qmake -query QT_INSTALL_HEADERS`; \
+	qtbindir=`qmake -query QT_INSTALL_BINS`; \
+	cflags="-I$$qthdrdir -I$$qthdrdir/QtCore -I$$qthdrdir/QtGui"; \
+	case "$$qtver" in \
+	5.*) \
+	    cflags="$$cflags -I$$qthdrdir/QtWidgets -std=c++11 -fPIC"; \
+	    libs="-L$$qtlibdir -lQt5Widgets -lQt5Gui -lQt5Core "; \
+	    ;; \
+	4.*) \
+	    libs="-L$$qtlibdir -lQtGui -lQtCore"; \
+	    ;; \
+	*) \
+	    echo >&2 "*"; \
+	    echo >&2 "* Found qmake but it is for Qt version $$qtver, which is not supported."; \
+	    echo >&2 "* Please install either Qt 4.8 or 5.x."; \
+	    echo >&2 "*"; \
+	    exit 1; \
+	    ;; \
+	esac; \
 	echo "KC_QT_CFLAGS=$$cflags" > $@; \
 	echo "KC_QT_LIBS=$$libs" >> $@; \
-	echo "KC_QT_MOC=$$moc" >> $@
+	echo "KC_QT_MOC=$$qtbindir/moc" >> $@
 endif
 
 $(obj)/gconf.o: $(obj)/.tmp_gtkcheck
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: Port of [qx]config to Qt 5
  2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
                   ` (38 preceding siblings ...)
  2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
@ 2015-10-14 14:00 ` Michal Marek
  39 siblings, 0 replies; 46+ messages in thread
From: Michal Marek @ 2015-10-14 14:00 UTC (permalink / raw)
  To: Thiago Macieira, linux-kbuild; +Cc: linux-kernel

On 2015-09-22 20:36, Thiago Macieira wrote:
> This patch set contains the port of qconfig to Qt 5. At the same time,
> it removes Qt 2 and 3 support (the last Qt 3 release was in 2007).
> 
> Most of the work was done by Boris Barbulovski, so many thanks! I've
> reviewed and tested the changes.
> 
> The patch set contains one patch per functionality being ported, for
> ease of reviewing. The first patch contains the removal of the #ifdef'ed
> code for older versions and the last one contains an update to the
> buildsystem to find Qt 5.
> 
> Note that the Qt 5 build requires a host compiler that understands the
> -std=c++11 switch (for GCC, since 4.7).

Merged to kbuild.git#kconfig, sorry for the delay. I have one comment
about one of the patches, but this can be solved by an incremental update.

Michal


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel.
  2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
@ 2015-10-14 14:03   ` Michal Marek
  0 siblings, 0 replies; 46+ messages in thread
From: Michal Marek @ 2015-10-14 14:03 UTC (permalink / raw)
  To: Thiago Macieira, linux-kbuild; +Cc: linux-kernel, Boris Barbulovski

On 2015-09-22 20:36, Thiago Macieira wrote:
> From: Boris Barbulovski <bbarbulovski@gmail.com>
> 
> Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
> ---
>  scripts/kconfig/qconf.cc | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index e5bfa6b..2ef06c1 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -318,6 +318,9 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
>  	setSortingEnabled(false);
>  	setRootIsDecorated(true);
>  
> +	setVerticalScrollMode(ScrollPerPixel);
> +	setHorizontalScrollMode(ScrollPerPixel);
> +
>  	setHeaderLabels(QStringList() << _("Option") << _("Name") << "N" << "M" << "Y" << _("Value"));
>  
>  	connect(this, SIGNAL(itemSelectionChanged(void)),
> @@ -453,11 +456,13 @@ void ConfigList::updateList(ConfigItem* item)
>  
>  		updateMenuList(item, rootEntry);
>  		update();
> +		resizeColumnToContents(0);
>  		return;
>  	}
>  update:
>  	updateMenuList(this, rootEntry);
>  	update();
> +	resizeColumnToContents(0);
>  }

Somehow one of the patches to ConfigList (not this one) caused the
columns to take too much space. To reproduce this, enable Show Name,
Show Range and Show Data in the Option menu. Do you see the same issue?
The following patch fixes it for me, but perhaps there is a cleaner way
to do it.

Michal

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 73ce56a76271..1a428127711b 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -451,13 +451,17 @@ void ConfigList::updateList(ConfigItem* item)
 
 		updateMenuList(item, rootEntry);
 		update();
-		resizeColumnToContents(0);
+		for (int i = 0; i < columnCount(); i++) {
+			resizeColumnToContents(i);
+		}
 		return;
 	}
 update:
 	updateMenuList(this, rootEntry);
 	update();
-	resizeColumnToContents(0);
+	for (int i = 0; i < columnCount(); i++) {
+		resizeColumnToContents(i);
+	}
 }
 
 void ConfigList::setValue(ConfigItem* item, tristate val)


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH 39/39] Update the buildsystem for KConfig finding Qt
  2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
@ 2015-10-16  4:12   ` Stefan Lippers-Hollmann
  2015-10-16  4:21     ` Stefan Lippers-Hollmann
                       ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Stefan Lippers-Hollmann @ 2015-10-16  4:12 UTC (permalink / raw)
  To: Thiago Macieira; +Cc: linux-kbuild, linux-kernel, Michal Marek

Hi

On 2015-09-22, Thiago Macieira wrote:
> The buildsystem will now only search for Qt 4 and Qt 5. Support for Qt 2
> and 3 was dropped in the previous commits (Qt 3 was EOL'ed in 2010 or
> so...).
> 
> For Qt 5, to be future-proof with the future direction notice appearing
> in the 5.5 release, C++11 support is automatically enabled.
[...]
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
[...]
> +	@set -e; $(kecho) "  CHECK   qt"; \
> +	qtver=`qmake -query QT_VERSION` || { \
> +	    echo >&2 "*"; \
> +	    echo >&2 "* qmake failed."; \
> +	    echo >&2 "*"; \
> +	    exit 1; \
> +	}; \
[...]

"qmake -query QT_VERSION" appears to be a little fragile on Debian 
with both qt4-qmake and qt5-qmake installed, as it reports back 
"4.8.7" by default. The actual qmake is hiding behind qtchooser
(/usr/bin/qmake -> qtchooser) and will report different environments
based on the chosen personality:

$ qmake -query QT_VERSION
4.8.7

$ QT_SELECT=5 qmake -query QT_VERSION
5.4.2

While I'm not quite sure what would be the best kind of test
here (and if qtchooser can be commonly expected), the following 
might provide another approach to query the most recent installed 
qt version:

$ qtchooser --list-versions | grep ^[0-9]*$ | sort | tac | head -n1
5

(and then exporting QT_SELECT=5 to the rest of the build).

Another approach which appears to work for me (with both qt4 and qt5) 
would be this, but I'm not quite sure if this would be a good solution:

--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -227,6 +227,7 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
 # Qt needs some extra effort...
 $(obj)/.tmp_qtcheck:
 	@set -e; $(kecho) "  CHECK   qt"; \
+	QT_SELECT=5 qmake -query QT_VERSION >/dev/null 2>&1 && export QT_SELECT=5 ||: ; \
 	qtver=`qmake -query QT_VERSION` || { \
 	    echo >&2 "*"; \
 	    echo >&2 "* qmake failed."; \

Regards
	Stefan Lippers-Hollmann

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 39/39] Update the buildsystem for KConfig finding Qt
  2015-10-16  4:12   ` Stefan Lippers-Hollmann
@ 2015-10-16  4:21     ` Stefan Lippers-Hollmann
  2015-10-16  9:47     ` Michal Marek
  2015-10-16 15:28     ` Thiago Macieira
  2 siblings, 0 replies; 46+ messages in thread
From: Stefan Lippers-Hollmann @ 2015-10-16  4:21 UTC (permalink / raw)
  To: Thiago Macieira; +Cc: linux-kbuild, linux-kernel, Michal Marek

Hi

On 2015-10-16, Stefan Lippers-Hollmann wrote:
> On 2015-09-22, Thiago Macieira wrote:
[...]
> +	QT_SELECT=5 qmake -query QT_VERSION >/dev/null 2>&1 && export QT_SELECT=5 ||: ; \

Apparently this fails if qmake isn't guarded by qtchooser, but the
following should work (although I'm still not confident if that would
be the best approach):

--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -227,6 +227,7 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
 # Qt needs some extra effort...
 $(obj)/.tmp_qtcheck:
 	@set -e; $(kecho) "  CHECK   qt"; \
+	qtchooser --list-versions | grep -q ^5$ && export QT_SELECT=5 ||: ; \
 	qtver=`qmake -query QT_VERSION` || { \
 	    echo >&2 "*"; \
 	    echo >&2 "* qmake failed."; \


Regards
	Stefan Lippers-Hollmann

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 39/39] Update the buildsystem for KConfig finding Qt
  2015-10-16  4:12   ` Stefan Lippers-Hollmann
  2015-10-16  4:21     ` Stefan Lippers-Hollmann
@ 2015-10-16  9:47     ` Michal Marek
  2015-10-16 15:28     ` Thiago Macieira
  2 siblings, 0 replies; 46+ messages in thread
From: Michal Marek @ 2015-10-16  9:47 UTC (permalink / raw)
  To: Stefan Lippers-Hollmann, Thiago Macieira; +Cc: linux-kbuild, linux-kernel

On 2015-10-16 06:12, Stefan Lippers-Hollmann wrote:
> Hi
> 
> On 2015-09-22, Thiago Macieira wrote:
>> The buildsystem will now only search for Qt 4 and Qt 5. Support for Qt 2
>> and 3 was dropped in the previous commits (Qt 3 was EOL'ed in 2010 or
>> so...).
>>
>> For Qt 5, to be future-proof with the future direction notice appearing
>> in the 5.5 release, C++11 support is automatically enabled.
> [...]
>> --- a/scripts/kconfig/Makefile
>> +++ b/scripts/kconfig/Makefile
> [...]
>> +	@set -e; $(kecho) "  CHECK   qt"; \
>> +	qtver=`qmake -query QT_VERSION` || { \
>> +	    echo >&2 "*"; \
>> +	    echo >&2 "* qmake failed."; \
>> +	    echo >&2 "*"; \
>> +	    exit 1; \
>> +	}; \
> [...]
> 
> "qmake -query QT_VERSION" appears to be a little fragile on Debian 
> with both qt4-qmake and qt5-qmake installed, as it reports back 
> "4.8.7" by default.

On openSUSE, I had to change qmake and moc to qmake-qt5 and moc-qt5,
respectively. But I don't think that it is a reason to call it fragile.
make xconfig works fine if qmake defaults to Qt4 (which seems to be the
predominant choice nowadays), but it will continue work once
distributions start preferring Qt5. I don't think users have such strong
preference as to which Qt version to build against. In the end, it's a
simple application with three windows and some buttons.

Michal

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 39/39] Update the buildsystem for KConfig finding Qt
  2015-10-16  4:12   ` Stefan Lippers-Hollmann
  2015-10-16  4:21     ` Stefan Lippers-Hollmann
  2015-10-16  9:47     ` Michal Marek
@ 2015-10-16 15:28     ` Thiago Macieira
  2 siblings, 0 replies; 46+ messages in thread
From: Thiago Macieira @ 2015-10-16 15:28 UTC (permalink / raw)
  To: Stefan Lippers-Hollmann; +Cc: linux-kbuild, linux-kernel, Michal Marek

On Friday 16 October 2015 06:12:41 Stefan Lippers-Hollmann wrote:
> > +     @set -e; $(kecho) "  CHECK   qt"; \
> > +     qtver=`qmake -query QT_VERSION` || { \
> > +         echo >&2 "*"; \
> > +         echo >&2 "* qmake failed."; \
> > +         echo >&2 "*"; \
> > +         exit 1; \
> > +     }; \
> 
> [...]
> 
> "qmake -query QT_VERSION" appears to be a little fragile on Debian 
> with both qt4-qmake and qt5-qmake installed, as it reports back 
> "4.8.7" by default. The actual qmake is hiding behind qtchooser
> (/usr/bin/qmake -> qtchooser) and will report different environments
> based on the chosen personality:

Since xconfig still builds with Qt 4, I didn't feel the need to force the 
choice for Qt 5. If your environment is qtchooser, then you can just set 
QT_SELECT=5 before running "make xconfig".

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2015-10-16 15:28 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-22 18:36 Port of [qx]config to Qt 5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 01/39] Remove support for QT3 and older Thiago Macieira
2015-09-22 18:36 ` [PATCH 02/39] Port xconfig to Qt5 - Use QMainWindow, QToolBar Thiago Macieira
2015-09-22 18:36 ` [PATCH 03/39] Port xconfig to Qt5 - Use QAction Thiago Macieira
2015-09-22 18:36 ` [PATCH 04/39] Port xconfig to Qt5 - Use QFileDialog Thiago Macieira
2015-09-22 18:36 ` [PATCH 05/39] Port xconfig to Qt5 - Use QList Thiago Macieira
2015-09-22 18:36 ` [PATCH 06/39] Port xconfig to Qt5 - Use QTextBrowser Thiago Macieira
2015-09-22 18:36 ` [PATCH 07/39] Port xconfig to Qt5 - Use QMenu Thiago Macieira
2015-09-22 18:36 ` [PATCH 08/39] Port xconfig to Qt5 - Remove unused #include <q3dragobject.h> Thiago Macieira
2015-09-22 18:36 ` [PATCH 09/39] Port xconfig to Qt5 - Replace Q3VBox with QWidget Thiago Macieira
2015-09-22 18:36 ` [PATCH 10/39] Port xconfig to Qt5 - Fix layout Thiago Macieira
2015-09-22 18:36 ` [PATCH 11/39] Port xconfig to Qt5 - Fix layout margin Thiago Macieira
2015-09-22 18:36 ` [PATCH 12/39] Port xconfig to Qt5 - Update QAction checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 13/39] Port xconfig to Qt5 - Make single/split/full actions checkable Thiago Macieira
2015-09-22 18:36 ` [PATCH 14/39] Port xconfig to Qt5 - Remove custom ListView classes Thiago Macieira
2015-09-22 18:36 ` [PATCH 15/39] Port xconfig to Qt5 - Fix the code so it compiles with Qt5 Thiago Macieira
2015-09-22 18:36 ` [PATCH 16/39] Port xconfig to Qt5 - update signals Thiago Macieira
2015-09-22 18:36 ` [PATCH 17/39] Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem Thiago Macieira
2015-09-22 18:36 ` [PATCH 18/39] Port xconfig to Qt5 - Put back some of the old implementation Thiago Macieira
2015-09-22 18:36 ` [PATCH 19/39] Port xconfig to Qt5 - Put back some of the old implementation(part 2) Thiago Macieira
2015-09-22 18:36 ` [PATCH 20/39] Port xconfig to Qt5 - Remove Qt3Support from Makefile Thiago Macieira
2015-09-22 18:36 ` [PATCH 21/39] Port xconfig to Qt5 - Use correct signal names Thiago Macieira
2015-09-22 18:36 ` [PATCH 22/39] Port xconfig to Qt5 - Set ConfigView object name Thiago Macieira
2015-09-22 18:36 ` [PATCH 23/39] Port xconfig to Qt5 - Quick workaround to bypass app crash at startup Thiago Macieira
2015-09-22 18:36 ` [PATCH 24/39] Port xconfig to Qt5 - Tree widget set column titles Thiago Macieira
2015-09-22 18:36 ` [PATCH 25/39] Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list Thiago Macieira
2015-09-22 18:36 ` [PATCH 26/39] Port xconfig to Qt5 - Add ConfigList::mode " Thiago Macieira
2015-09-22 18:36 ` [PATCH 27/39] Port xconfig to Qt5 - Remove ConfigList::updateMenuList template Thiago Macieira
2015-09-22 18:36 ` [PATCH 28/39] Add current selection check Thiago Macieira
2015-09-22 18:36 ` [PATCH 29/39] Port xconfig to Qt5 - Disable ConfigList soring Thiago Macieira
2015-09-22 18:36 ` [PATCH 30/39] Port xconfig to Qt5 - Change ConfigItem constructor parent type Thiago Macieira
2015-09-22 18:36 ` [PATCH 31/39] Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel Thiago Macieira
2015-10-14 14:03   ` Michal Marek
2015-09-22 18:36 ` [PATCH 32/39] Port xconfig to Qt5 - Source format Thiago Macieira
2015-09-22 18:36 ` [PATCH 33/39] Port xconfig to Qt5 - Remove some commented code Thiago Macieira
2015-09-22 18:36 ` [PATCH 34/39] Port xconfig to Qt5 - Add(back) lineedit editing Thiago Macieira
2015-09-22 18:36 ` [PATCH 35/39] Port xconfig to Qt5 - Add(back) one click checkbox toggle Thiago Macieira
2015-09-22 18:36 ` [PATCH 36/39] Port xconfig to Qt5 - on Back clicked, deselect old item Thiago Macieira
2015-09-22 18:36 ` [PATCH 37/39] Port xconfig to Qt5 - Fix goParent issue Thiago Macieira
2015-09-22 18:36 ` [PATCH 38/39] Port xconfig to Qt5 - Update copyright Thiago Macieira
2015-09-22 18:36 ` [PATCH 39/39] Update the buildsystem for KConfig finding Qt Thiago Macieira
2015-10-16  4:12   ` Stefan Lippers-Hollmann
2015-10-16  4:21     ` Stefan Lippers-Hollmann
2015-10-16  9:47     ` Michal Marek
2015-10-16 15:28     ` Thiago Macieira
2015-10-14 14:00 ` Port of [qx]config to Qt 5 Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).