提交 8d90c97e 编写于 作者: M Markus Heidelberg 提交者: Sam Ravnborg

kconfig qconf: fix the type of the desktop widget

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: NMarkus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
上级 fbb86374
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册