From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> To: unlisted-recipients:; (no To-header on input) Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Dan Carpenter <dan.carpenter@oracle.com>, linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org Subject: [PATCH 1/6] kconfig: qconf: clean deprecated warnings Date: Thu, 2 Apr 2020 11:27:58 +0200 [thread overview] Message-ID: <9e939a9af7adbfc1e567ca13955788608aecddd3.1585819250.git.mchehab+huawei@kernel.org> (raw) In-Reply-To: <cover.1585819250.git.mchehab+huawei@kernel.org> 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 <mchehab+huawei@kernel.org> --- scripts/kconfig/qconf.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 82773cc35d35..daa3325c0a49 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -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); @@ -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(); } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Dan Carpenter <dan.carpenter@oracle.com>, linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org Subject: [PATCH 1/6] kconfig: qconf: clean deprecated warnings Date: Thu, 2 Apr 2020 11:27:58 +0200 [thread overview] Message-ID: <9e939a9af7adbfc1e567ca13955788608aecddd3.1585819250.git.mchehab+huawei@kernel.org> (raw) In-Reply-To: <cover.1585819250.git.mchehab+huawei@kernel.org> 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 <mchehab+huawei@kernel.org> --- scripts/kconfig/qconf.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 82773cc35d35..daa3325c0a49 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -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); @@ -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(); } -- 2.25.1
next prev parent reply other threads:[~2020-04-02 9:28 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-02 9:27 [PATCH 0/6] Fix several issues at qconf.cc Mauro Carvalho Chehab 2020-04-02 9:27 ` Mauro Carvalho Chehab 2020-04-02 9:27 ` Mauro Carvalho Chehab [this message] 2020-04-02 9:27 ` [PATCH 1/6] kconfig: qconf: clean deprecated warnings Mauro Carvalho Chehab 2020-04-02 9:27 ` [PATCH 2/6] kconfig: qconf: Change title for the item window Mauro Carvalho Chehab 2020-04-02 9:27 ` Mauro Carvalho Chehab 2020-04-02 9:28 ` [PATCH 3/6] kconfig: qconf: fix the content of the main widget Mauro Carvalho Chehab 2020-04-02 9:28 ` Mauro Carvalho Chehab 2020-04-02 9:28 ` [PATCH 4/6] kconfig: qconf: fix support for the split view mode Mauro Carvalho Chehab 2020-04-02 9:28 ` Mauro Carvalho Chehab 2020-04-02 9:28 ` [PATCH 5/6] kconfig: qconf: remove some old bogus TODOs Mauro Carvalho Chehab 2020-04-02 9:28 ` Mauro Carvalho Chehab 2020-04-02 9:28 ` [PATCH 6/6] kconfig: qconf: Fix a few alignment issues Mauro Carvalho Chehab 2020-04-02 9:28 ` Mauro Carvalho Chehab 2020-04-02 16:55 ` [PATCH 0/6] Fix several issues at qconf.cc Masahiro Yamada
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9e939a9af7adbfc1e567ca13955788608aecddd3.1585819250.git.mchehab+huawei@kernel.org \ --to=mchehab+huawei@kernel.org \ --cc=dan.carpenter@oracle.com \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=masahiroy@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.