Bug 425166 - warning: enum constant in boolean context [-Wint-in-bool-context]
Summary: warning: enum constant in boolean context [-Wint-in-bool-context]
Status: REPORTED
Alias: None
Product: frameworks-kdeclarative
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.65.0
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-09 17:20 UTC by Ralf Habacker
Modified: 2020-08-09 17:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2020-08-09 17:20:47 UTC
SUMMARY
While cross compiling kdeclarative I got the following warning

[   96s] /home/abuild/rpmbuild/BUILD/kdeclarative-5.65.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp: In member function 'bool KeySequenceHelperPrivate::conflictWithGlobalShortcuts(const QKeySequence&)':
[   96s] /home/abuild/rpmbuild/BUILD/kdeclarative-5.65.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:273:99: warning: enum constant in boolean context [-Wint-in-bool-context]
[   96s]   273 |     if (KeySequenceHelper::GlobalShortcuts && keySequence.toString().contains(QLatin1String("F12"))) {

STEPS TO REPRODUCE
1. register at https://build.opensuse.org
2a. inspect build log at https://build.opensuse.org/package/live_build_log/home:rhabacker:branches:windows:mingw:win32:KF565/mingw32-kdeclarative/openSUSE_Leap_15.2/x86_64 
or
2b. on opensuse os install osc with 
  sudo zypper install osc
3. run 
  osc co home:rhabacker:branches:windows:mingw:win32:KF565/mingw32-kdeclarative
  cd home:rhabacker:branches:windows:mingw:win32:KF565/mingw32-kdeclarative
  osc build openSUSE_Leap_15.2 -jxx (with xx number of threads)
4. inspect build log

OBSERVED RESULT
The mentioned warning appears

EXPECTED RESULT
The mentioned warning should not appear


SOFTWARE/OS VERSIONS
Windows: cross compiled on openSUSE Leap
KDE Frameworks Version: 5.65
Qt Version: 5.11