Skip to content

Commit

Permalink
kconfig: qconf: clean deprecated warnings
Browse files Browse the repository at this point in the history
The recommended way to initialize a null string is with
QString(). This is there at least since Qt5.5, with is
when qconf was ported to Qt5.

Fix those warnings:

	scripts/kconfig/qconf.cc: In member function ‘void ConfigItem::updateMenu()’:
	scripts/kconfig/qconf.cc:158:31: warning: ‘QString::null’ is deprecated: use QString() [-Wdeprecated-declarations]
	  158 |    setText(noColIdx, QString::null);
	      |                               ^~~~
	In file included from /usr/include/qt5/QtCore/qobject.h:47,
	                 from /usr/include/qt5/QtWidgets/qwidget.h:45,
	                 from /usr/include/qt5/QtWidgets/qmainwindow.h:44,
	                 from /usr/include/qt5/QtWidgets/QMainWindow:1,
	                 from scripts/kconfig/qconf.cc:9:

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
mchehab authored and masahir0y committed Apr 8, 2020
1 parent 77342a0 commit cf497b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/kconfig/qconf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ void ConfigItem::updateMenu(void)

if (!sym_is_changeable(sym) && list->optMode == normalOpt) {
setPixmap(promptColIdx, QIcon());
setText(noColIdx, QString::null);
setText(modColIdx, QString::null);
setText(yesColIdx, QString::null);
setText(noColIdx, QString());
setText(modColIdx, QString());
setText(yesColIdx, QString());
break;
}
expr = sym_get_tristate_value(sym);
Expand Down Expand Up @@ -276,7 +276,7 @@ void ConfigLineEdit::show(ConfigItem* i)
if (sym_get_string_value(item->menu->sym))
setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym)));
else
setText(QString::null);
setText(QString());
Parent::show();
setFocus();
}
Expand Down

0 comments on commit cf497b9

Please sign in to comment.