Bug 387795

Summary: error: ‘Q_FALLTHROUGH’ was not declared in this scope
Product: [Frameworks and Libraries] QtCurve Reporter: beojan <beojan>
Component: qt5Assignee: Yichao Yu <yyc1992>
Status: RESOLVED FIXED    
Severity: major CC: hein
Priority: NOR    
Version First Reported In: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description beojan 2017-12-11 13:38:26 UTC
Q_FALLTHROUGH was only introduced in Qt 5.8, so it shouldn't be used in the Qt 4 version.
Comment 1 Yichao Yu 2017-12-11 13:54:03 UTC
It is not used in qt4 version.
Comment 2 beojan 2017-12-11 13:55:29 UTC
Yes, it is. qt4/common/common.cpp line 242.
Comment 3 beojan 2017-12-11 13:57:10 UTC
It turns out it's because it's a symlink to the qt5 version.
Comment 4 Yichao Yu 2017-12-11 14:18:59 UTC
Git commit 14eec32771fc3384009d74c13c3557925a93c749 by Yichao Yu.
Committed on 11/12/2017 at 14:17.
Pushed by yuyichao into branch 'master'.

Introduce QTC_FALLTHROUGH (from LLVM)

* Fix compilation on gtk2, qt4, and possibly old version qt5 (< 5.8).
* Fix a few more fallthrough warnings.

M  +10   -0    lib/utils/utils.h
M  +9    -4    qt4/style/qtcurve.cpp
M  +19   -19   qt5/common/common.cpp
M  +2    -2    qt5/style/qtcurve.cpp
M  +1    -1    qt5/style/qtcurve_api.cpp

https://commits.kde.org/qtcurve/14eec32771fc3384009d74c13c3557925a93c749