kconfig qconf: fix the type of the desktop widget
authorMarkus Heidelberg <markus.heidelberg@web.de>
Sun, 17 May 2009 23:36:52 +0000 (01:36 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Tue, 9 Jun 2009 20:37:50 +0000 (22:37 +0200)
QApplication::desktop() returns a pointer to QDesktopWidget, not to
QWidget.

Fixes the following compiler error after a quick conversion with 'qt3to4',
which occured with g++ 3.4.6 and 4.1.2, but not anymore with 4.3.2.

scripts/kconfig/qconf.cc: In constructor 'ConfigMainWindow::ConfigMainWindow()':
scripts/kconfig/qconf.cc:1289: error: cannot convert 'QDesktopWidget*' to 'QWidget*' in initialization

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kconfig/qconf.cc

index afae613ae0d875c815ada5166572f02930d19dcc..19811fcca6d6b90f28ce485cd09789dda3f86143 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <qapplication.h>
 #include <qmainwindow.h>
+#include <qdesktopwidget.h>
 #include <qtoolbar.h>
 #include <qlayout.h>
 #include <qvbox.h>
@@ -1275,7 +1276,7 @@ ConfigMainWindow::ConfigMainWindow(void)
        int x, y, width, height;
        char title[256];
 
-       QWidget *d = configApp->desktop();
+       QDesktopWidget *d = configApp->desktop();
        snprintf(title, sizeof(title), _("Linux Kernel v%s Configuration"),
                getenv("KERNELVERSION"));
        setCaption(title);