Skip to content

Commit

Permalink
kconfig qconf: fix the type of the desktop widget
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
marcows authored and sravnborg committed Jun 9, 2009
1 parent fbb8637 commit 8d90c97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <qapplication.h>
#include <qmainwindow.h>
#include <qdesktopwidget.h>
#include <qtoolbar.h>
#include <qlayout.h>
#include <qvbox.h>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8d90c97

Please sign in to comment.