forked from qt-creator/qt-creator
Use Q_ENUM instead of obsoleted Q_ENUMS
It fixes the following warning:
Use Q_ENUM instead of Q_ENUMS [clazy-qenums]
In addition, it amends 8588cf268f
where WidgetStyle got removed.
Change-Id: I4d72dd762a2f18ba8886360b3581b4ef19bf4c5e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -45,7 +45,6 @@ class ShellCommand;
|
||||
class CORE_EXPORT IVersionControl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(SettingsFlag Operation)
|
||||
public:
|
||||
enum SettingsFlag {
|
||||
AutoOpen = 0x1
|
||||
@@ -59,6 +58,8 @@ public:
|
||||
AnnotateOperation,
|
||||
InitialCheckoutOperation
|
||||
};
|
||||
Q_ENUM(SettingsFlag)
|
||||
Q_ENUM(Operation)
|
||||
|
||||
enum OpenSupportMode {
|
||||
NoOpen, /*!< Files can be edited without noticing the VCS */
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QMetaEnum>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QUrl>
|
||||
|
||||
@@ -35,8 +35,6 @@ struct NewClassWidgetPrivate;
|
||||
class NewClassWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(ClassType)
|
||||
|
||||
public:
|
||||
enum ClassType { NoClassType,
|
||||
ClassInheritsQObject,
|
||||
@@ -45,6 +43,7 @@ public:
|
||||
ClassInheritsQQuickItem,
|
||||
SharedDataClass
|
||||
};
|
||||
Q_ENUM(ClassType)
|
||||
explicit NewClassWidget(QWidget *parent = nullptr);
|
||||
~NewClassWidget() override;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ class PerfProfilerFlameGraphModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(PerfProfilerFlameGraphModel);
|
||||
Q_ENUMS(Role)
|
||||
public:
|
||||
PerfProfilerFlameGraphModel(PerfProfilerFlameGraphModel &&) = delete;
|
||||
PerfProfilerFlameGraphModel &operator=(PerfProfilerFlameGraphModel &&) = delete;
|
||||
@@ -61,6 +60,7 @@ public:
|
||||
ResourcePeakRole,
|
||||
MaxRole
|
||||
};
|
||||
Q_ENUM(Role)
|
||||
|
||||
struct Data {
|
||||
Data *parent = nullptr;
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace QmlDesigner {
|
||||
class QMLDESIGNERCORE_EXPORT Theme : public Utils::Theme
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_ENUMS(Icon)
|
||||
|
||||
public:
|
||||
enum Icon {
|
||||
actionIcon,
|
||||
@@ -146,6 +143,7 @@ public:
|
||||
zoomOut,
|
||||
zoomSelection
|
||||
};
|
||||
Q_ENUM(Icon)
|
||||
|
||||
static Theme *instance();
|
||||
static QString replaceCssColors(const QString &input);
|
||||
|
||||
@@ -74,14 +74,13 @@ class QmlAnchorBindingProxy : public QObject
|
||||
|
||||
Q_PROPERTY(QStringList possibleTargetItems READ possibleTargetItems NOTIFY itemNodeChanged)
|
||||
|
||||
Q_ENUMS(RelativeAnchorTarget)
|
||||
|
||||
public:
|
||||
enum RelativeAnchorTarget {
|
||||
SameEdge = 0,
|
||||
Center = 1,
|
||||
OppositeEdge = 2
|
||||
};
|
||||
Q_ENUM(RelativeAnchorTarget)
|
||||
|
||||
//only enable if node has parent
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ struct FlameGraphData {
|
||||
class FlameGraphModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(Role)
|
||||
public:
|
||||
enum Role {
|
||||
TypeIdRole = Qt::UserRole + 1, // Sort by data, not by displayed string
|
||||
@@ -74,6 +73,7 @@ public:
|
||||
MemoryRole,
|
||||
MaxRole
|
||||
};
|
||||
Q_ENUM(Role)
|
||||
|
||||
FlameGraphModel(QmlProfilerModelManager *modelManager, QObject *parent = nullptr);
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#include <QFile>
|
||||
#include <QCoreApplication>
|
||||
#include <QMetaEnum>
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
using namespace TextEditor;
|
||||
|
||||
@@ -41,13 +41,13 @@ class UpdateInfoPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "UpdateInfo.json")
|
||||
Q_ENUMS(CheckUpdateInterval)
|
||||
public:
|
||||
enum CheckUpdateInterval {
|
||||
DailyCheck,
|
||||
WeeklyCheck,
|
||||
MonthlyCheck
|
||||
};
|
||||
Q_ENUM(CheckUpdateInterval)
|
||||
|
||||
UpdateInfoPlugin();
|
||||
~UpdateInfoPlugin() override;
|
||||
|
||||
@@ -38,8 +38,6 @@ namespace Callgrind {
|
||||
class CallgrindController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(Option)
|
||||
|
||||
public:
|
||||
enum Option {
|
||||
Unknown,
|
||||
@@ -48,6 +46,7 @@ public:
|
||||
Pause,
|
||||
UnPause
|
||||
};
|
||||
Q_ENUM(Option)
|
||||
|
||||
CallgrindController();
|
||||
~CallgrindController() override;
|
||||
|
||||
Reference in New Issue
Block a user