forked from qt-creator/qt-creator
Add Q_FALLTHROUGH for Qt < 5.8
... and make use of it. With gcc 7, the new option -Wimplicit-fallthrough is introduced and added to the -Wextra set, triggering dozens of warnings in our sources. Therefore, we annotate all obviously intended fall-throughs. The ones that are still left are unclear and need to be checked by the respective maintainer. Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
@@ -4119,7 +4120,7 @@ public:
|
||||
break;
|
||||
case FromReference:
|
||||
removeReferenceOperator(changes);
|
||||
// fallthrough intended
|
||||
Q_FALLTHROUGH();
|
||||
case FromVariable:
|
||||
convertToPointer(changes);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user