Use Q_DECLARE_OPERATORS_FOR_FLAGS in flags' namespace only with Qt >= 5.12

Reverts bd8a49a1 for Qt < 5.12

GIT_SILENT
parent 33e01168
Pipeline #32214 passed with stage
in 57 minutes and 30 seconds
......@@ -198,8 +198,14 @@ private:
Q_DECLARE_PRIVATE(BreakpointModel)
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(BreakpointModel::ColumnFlags)
#endif
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::BreakpointModel::ColumnFlags)
#endif
#endif
......@@ -93,8 +93,14 @@ private:
Q_DECLARE_PRIVATE(IVariableController)
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(IVariableController::UpdateTypes)
#endif
} // namespace KDevelop
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IVariableController::UpdateTypes)
#endif
#endif
......@@ -228,8 +228,14 @@ Q_SIGNALS:
friend class IDocument;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(IDocumentController::DocumentActivationParams)
#endif
} // namespace KDevelop
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IDocumentController::DocumentActivationParams)
#endif
#endif
......@@ -246,8 +246,14 @@ private:
Q_DECLARE_PRIVATE(ParseJob)
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(ParseJob::SequentialProcessingFlags)
#endif
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::ParseJob::SequentialProcessingFlags)
#endif
#endif
......@@ -96,7 +96,9 @@ private:
virtual AbstractFunctionDeclarationData* dynamicData() = 0;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractFunctionDeclaration::FunctionSpecifiers)
#endif
///Use this to merge AbstractFunctionDeclaration into the class hierarchy. Base must be the base-class
///in the hierarchy, and Data must be the Data class of the following Declaration, and must be based on AbstractFunctionDeclarationData
......@@ -133,4 +135,8 @@ private:
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::AbstractFunctionDeclaration::FunctionSpecifiers)
#endif
#endif // KDEVPLATFORM_ABSTRACTFUNCTIONDECLARATION_H
......@@ -118,8 +118,14 @@ private:
Declaration* clonePrivate() const override;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(ClassMemberDeclaration::StorageSpecifiers)
#endif
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::ClassMemberDeclaration::StorageSpecifiers)
#endif
#endif // KDEVPLATFORM_CLASSMEMBERDECLARATION_H
......@@ -54,7 +54,9 @@ struct KDEVPLATFORMLANGUAGE_EXPORT Colorizer
Formatting m_formatting;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(Colorizer::Formatting)
#endif
class AbstractNavigationContext;
using NavigationContextPointer = QExplicitlySharedDataPointer<AbstractNavigationContext>;
......@@ -174,4 +176,8 @@ private:
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::Colorizer::Formatting)
#endif
#endif
......@@ -171,11 +171,18 @@ Q_SIGNALS:
void outputRemoved(int toolViewId, int outputId);
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(IOutputView::Behaviours)
Q_DECLARE_OPERATORS_FOR_FLAGS(IOutputView::Options)
#endif
} // namespace KDevelop
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IOutputView::Behaviours)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IOutputView::Options)
#endif
Q_DECLARE_METATYPE(KDevelop::IOutputView::StandardToolView)
Q_DECLARE_INTERFACE( KDevelop::IOutputView, "org.kdevelop.IOutputView" )
......
......@@ -262,8 +262,14 @@ private:
friend class OutputExecuteJobPrivate;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(OutputExecuteJob::JobProperties)
#endif
} // namespace KDevelop
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::OutputExecuteJob::JobProperties)
#endif
#endif // KDEVPLATFORM_OUTPUTEXECUTEJOB_H
......@@ -137,10 +137,16 @@ public:
virtual Path compiler(KDevelop::ProjectTargetItem* p) const = 0;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(IBuildSystemManager::BuildFeatures)
#endif
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IBuildSystemManager::BuildFeatures)
#endif
Q_DECLARE_INTERFACE( KDevelop::IBuildSystemManager, "org.kdevelop.IBuildSystemManager" )
#endif
......@@ -171,10 +171,16 @@ Q_SIGNALS:
void fileRenamed(const KDevelop::Path& oldFile, KDevelop::ProjectFileItem* newFile);
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(IProjectFileManager::Features)
#endif
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IProjectFileManager::Features)
#endif
Q_DECLARE_INTERFACE( KDevelop::IProjectFileManager, "org.kdevelop.IProjectFileManager")
#endif
......@@ -42,10 +42,16 @@ namespace Sublime {
AllPositions = Left|Right|Top|Bottom /**< all tool view positions */
};
Q_DECLARE_FLAGS(Positions, Position)
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(Positions)
#endif
KDEVPLATFORMSUBLIME_EXPORT Position dockAreaToPosition(Qt::DockWidgetArea dockArea);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(Sublime::Positions)
#endif
#endif
......@@ -81,7 +81,9 @@ private:
QSharedDataPointer<class VcsItemEventPrivate> d;
};
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(VcsItemEvent::Actions)
#endif
/**
* Small container class that contains information about a single revision.
......@@ -118,6 +120,9 @@ private:
}
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS( KDevelop::VcsItemEvent::Actions )
#endif
Q_DECLARE_METATYPE( KDevelop::VcsEvent )
Q_DECLARE_TYPEINFO( KDevelop::VcsEvent, Q_MOVABLE_TYPE );
Q_DECLARE_METATYPE( KDevelop::VcsItemEvent )
......
......@@ -50,7 +50,9 @@ enum DBGStateFlag
};
Q_ENUM_NS(DBGStateFlag)
Q_DECLARE_FLAGS(DBGStateFlags, DBGStateFlag)
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(DBGStateFlags)
#endif
enum DataType { typeUnknown, typeValue, typePointer, typeReference,
typeStruct, typeArray, typeQString, typeWhitespace,
......@@ -89,4 +91,8 @@ static const char LldbRemotePathEntry[] = "LLDB Remote Path";
} // end of namespace KDevMI
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevMI::DBGStateFlags)
#endif
#endif // _DBGGLOBAL_H_
......@@ -63,7 +63,9 @@ enum CommandFlag {
CmdInterrupt = 1 << 4,
};
Q_DECLARE_FLAGS(CommandFlags, CommandFlag)
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(CommandFlags)
#endif
//base class for handlers
class MICommandHandler
......@@ -375,4 +377,8 @@ CliCommand::CliCommand(
} // end of namespace MI
} // end of namespace KDevMI
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
Q_DECLARE_OPERATORS_FOR_FLAGS(KDevMI::MI::CommandFlags)
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment