Skip to content

Commit

Permalink
Add a trailing comma to last member in enum
Browse files Browse the repository at this point in the history
This makes clang-format not squash the whole enum on one line.

GIT_SILENT
  • Loading branch information
ahmadsamir committed Jul 10, 2021
1 parent 85337f2 commit 57006d5
Show file tree
Hide file tree
Showing 40 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion app/fileoperations.h
Expand Up @@ -32,7 +32,7 @@ namespace Gwenview
namespace FileOperations
{

enum Operation { TRASH, COPY, MOVE, LINK, UNKNOWN, PUT };
enum Operation { TRASH, COPY, MOVE, LINK, UNKNOWN, PUT, };

void copyTo(const QList<QUrl>& urlList, QWidget* parent, ContextManager* contextManager);
void moveTo(const QList<QUrl>& urlList, QWidget* parent, ContextManager* contextManager);
Expand Down
6 changes: 3 additions & 3 deletions app/filtercontroller.h
Expand Up @@ -65,7 +65,7 @@ class NameFilter : public AbstractSortedDirModelFilter
public:
enum Mode {
Contains,
DoesNotContain
DoesNotContain,
};
NameFilter(SortedDirModel* model)
: AbstractSortedDirModelFilter(model)
Expand Down Expand Up @@ -134,7 +134,7 @@ class DateFilter : public AbstractSortedDirModelFilter
enum Mode {
GreaterOrEqual,
Equal,
LessOrEqual
LessOrEqual,
};
DateFilter(SortedDirModel* model)
: AbstractSortedDirModelFilter(model)
Expand Down Expand Up @@ -207,7 +207,7 @@ class RatingFilter : public AbstractSortedDirModelFilter
enum Mode {
GreaterOrEqual,
Equal,
LessOrEqual
LessOrEqual,
};

RatingFilter(SortedDirModel* model)
Expand Down
2 changes: 1 addition & 1 deletion app/gvcore.h
Expand Up @@ -54,7 +54,7 @@ class GvCore : public QObject
NormalPalette = 0,
NormalViewPalette,
FullScreenPalette,
FullScreenViewPalette
FullScreenViewPalette,
};

QAbstractItemModel* recentFoldersModel() const;
Expand Down
2 changes: 1 addition & 1 deletion app/mainwindow.cpp
Expand Up @@ -142,7 +142,7 @@ static const char* SESSION_URL_KEY = "Url";
enum MainPageId {
StartMainPageId,
BrowseMainPageId,
ViewMainPageId
ViewMainPageId,
};

struct MainWindowState
Expand Down
2 changes: 1 addition & 1 deletion app/sidebar.h
Expand Up @@ -75,7 +75,7 @@ class SideBarTabBar : public QTabBar
enum TabButtonStyle {
TabButtonIconOnly,
TabButtonTextOnly,
TabButtonTextBesideIcon
TabButtonTextBesideIcon,
};
Q_ENUM(TabButtonStyle)

Expand Down
2 changes: 1 addition & 1 deletion importer/documentdirfinder.h
Expand Up @@ -52,7 +52,7 @@ class DocumentDirFinder : public QObject
enum Status {
NoDocumentFound,
DocumentDirFound,
MultipleDirsFound
MultipleDirsFound,
};

DocumentDirFinder(const QUrl& rootUrl);
Expand Down
2 changes: 1 addition & 1 deletion importer/fileutils.h
Expand Up @@ -34,7 +34,7 @@ enum RenameResult {
RenamedOK, /** Renamed without problem */
RenamedUnderNewName, /** Destination already existed, so rename() added a suffix to make the name unique */
Skipped, /** Destination already existed and contained the same data as source, so rename() just removed the source */
RenameFailed /** Rename failed */
RenameFailed, /** Rename failed */
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/crop/croptool.cpp
Expand Up @@ -53,7 +53,7 @@ enum CropHandleFlag {
CH_BottomLeft = CH_Bottom | CH_Left,
CH_TopRight = CH_Top | CH_Right,
CH_BottomRight = CH_Bottom | CH_Right,
CH_Content = 16
CH_Content = 16,
};

Q_DECLARE_FLAGS(CropHandle, CropHandleFlag)
Expand Down
2 changes: 1 addition & 1 deletion lib/document/document.h
Expand Up @@ -88,7 +88,7 @@ class GWENVIEWLIB_EXPORT Document : public QObject, public QSharedData
KindDetermined, ///< Image is still loading, but kind has been determined
MetaInfoLoaded, ///< Image is still loading, but meta info has been loaded
Loaded, ///< Full image has been loaded
LoadingFailed ///< Image loading has failed
LoadingFailed, ///< Image loading has failed
};

using Ptr = QExplicitlySharedDataPointer<Document>;
Expand Down
2 changes: 1 addition & 1 deletion lib/document/documentjob.h
Expand Up @@ -52,7 +52,7 @@ class GWENVIEWLIB_EXPORT DocumentJob : public KCompositeJob
Q_OBJECT
public:
enum {
NoDocumentEditorError = UserDefinedError + 1
NoDocumentEditorError = UserDefinedError + 1,
};
DocumentJob();
~DocumentJob() override;
Expand Down
2 changes: 1 addition & 1 deletion lib/documentview/abstractimageview.cpp
Expand Up @@ -43,7 +43,7 @@ struct AbstractImageViewPrivate
{
enum Verbosity {
Silent,
Notify
Notify,
};
AbstractImageView* q;
QCursor mZoomCursor;
Expand Down
4 changes: 2 additions & 2 deletions lib/documentview/abstractimageview.h
Expand Up @@ -46,12 +46,12 @@ class AbstractImageView : public QGraphicsWidget
public:
enum UpdateType {
UpdateIfNecessary,
ForceUpdate
ForceUpdate,
};
enum AlphaBackgroundMode {
AlphaBackgroundNone,
AlphaBackgroundCheckBoard,
AlphaBackgroundSolid
AlphaBackgroundSolid,
};

AbstractImageView(QGraphicsItem* parent);
Expand Down
2 changes: 1 addition & 1 deletion lib/fullscreenbackground.h
Expand Up @@ -37,7 +37,7 @@ namespace FullScreenBackground
*/
enum Enum {
Black,
Image
Image,
};

} // namespace FullScreenBackground
Expand Down
4 changes: 2 additions & 2 deletions lib/hud/hudtheme.h
Expand Up @@ -54,7 +54,7 @@ enum State
{
NormalState,
MouseOverState,
DownState
DownState,
};

enum WidgetType
Expand All @@ -63,7 +63,7 @@ enum WidgetType
FrameWidget,
CountDown,
SliderWidgetHandle,
SliderWidgetGroove
SliderWidgetGroove,
};

GWENVIEWLIB_EXPORT RenderInfo renderInfo(WidgetType, State = NormalState);
Expand Down
2 changes: 1 addition & 1 deletion lib/hud/hudwidget.h
Expand Up @@ -42,7 +42,7 @@ class GWENVIEWLIB_EXPORT HudWidget : public QGraphicsWidget
enum Option {
OptionNone = 0,
OptionCloseButton = 1 << 1,
OptionOpaque = 1 << 2
OptionOpaque = 1 << 2,
};
Q_DECLARE_FLAGS(Options, Option)

Expand Down
16 changes: 8 additions & 8 deletions lib/imageformats/fitsformat/bayer.h
Expand Up @@ -70,7 +70,7 @@ typedef enum {
DC1394_INVALID_STEREO_METHOD = -36,
DC1394_BASLER_NO_MORE_SFF_CHUNKS = -37,
DC1394_BASLER_CORRUPTED_SFF_CHUNK = -38,
DC1394_BASLER_UNKNOWN_SFF_CHUNK = -39
DC1394_BASLER_UNKNOWN_SFF_CHUNK = -39,
} dc1394error_t;
#define DC1394_ERROR_MIN DC1394_BASLER_UNKNOWN_SFF_CHUNK
#define DC1394_ERROR_MAX DC1394_SUCCESS
Expand Down Expand Up @@ -111,7 +111,7 @@ typedef enum {
DC1394_VIDEO_MODE_FORMAT7_4,
DC1394_VIDEO_MODE_FORMAT7_5,
DC1394_VIDEO_MODE_FORMAT7_6,
DC1394_VIDEO_MODE_FORMAT7_7
DC1394_VIDEO_MODE_FORMAT7_7,
} dc1394video_mode_t;
#define DC1394_VIDEO_MODE_MIN DC1394_VIDEO_MODE_160x120_YUV444
#define DC1394_VIDEO_MODE_MAX DC1394_VIDEO_MODE_FORMAT7_7
Expand All @@ -136,7 +136,7 @@ typedef enum {
DC1394_COLOR_CODING_MONO16S,
DC1394_COLOR_CODING_RGB16S,
DC1394_COLOR_CODING_RAW8,
DC1394_COLOR_CODING_RAW16
DC1394_COLOR_CODING_RAW16,
} dc1394color_coding_t;
#define DC1394_COLOR_CODING_MIN DC1394_COLOR_CODING_MONO8
#define DC1394_COLOR_CODING_MAX DC1394_COLOR_CODING_RAW16
Expand All @@ -154,7 +154,7 @@ typedef enum {
DC1394_COLOR_FILTER_RGGB = 512,
DC1394_COLOR_FILTER_GBRG,
DC1394_COLOR_FILTER_GRBG,
DC1394_COLOR_FILTER_BGGR
DC1394_COLOR_FILTER_BGGR,
} dc1394color_filter_t;
#define DC1394_COLOR_FILTER_MIN DC1394_COLOR_FILTER_RGGB
#define DC1394_COLOR_FILTER_MAX DC1394_COLOR_FILTER_BGGR
Expand All @@ -165,7 +165,7 @@ typedef enum {
*
* IIDC cameras always return data in UYVY order, but conversion functions can change this if requested.
*/
typedef enum { DC1394_BYTE_ORDER_UYVY = 800, DC1394_BYTE_ORDER_YUYV } dc1394byte_order_t;
typedef enum { DC1394_BYTE_ORDER_UYVY = 800, DC1394_BYTE_ORDER_YUYV, } dc1394byte_order_t;
#define DC1394_BYTE_ORDER_MIN DC1394_BYTE_ORDER_UYVY
#define DC1394_BYTE_ORDER_MAX DC1394_BYTE_ORDER_YUYV
#define DC1394_BYTE_ORDER_NUM (DC1394_BYTE_ORDER_MAX - DC1394_BYTE_ORDER_MIN + 1)
Expand All @@ -191,12 +191,12 @@ typedef struct
/**
* Yet another boolean data type
*/
typedef enum { DC1394_FALSE = 0, DC1394_TRUE } dc1394bool_t;
typedef enum { DC1394_FALSE = 0, DC1394_TRUE, } dc1394bool_t;

/**
* Yet another boolean data type, a bit more oriented towards electrical-engineers
*/
typedef enum { DC1394_OFF = 0, DC1394_ON } dc1394switch_t;
typedef enum { DC1394_OFF = 0, DC1394_ON, } dc1394switch_t;

/**
* A list of de-mosaicing techniques for Bayer-patterns.
Expand All @@ -211,7 +211,7 @@ typedef enum {
DC1394_BAYER_METHOD_DOWNSAMPLE,
DC1394_BAYER_METHOD_EDGESENSE,
DC1394_BAYER_METHOD_VNG,
DC1394_BAYER_METHOD_AHD
DC1394_BAYER_METHOD_AHD,
} dc1394bayer_method_t;
#define DC1394_BAYER_METHOD_MIN DC1394_BAYER_METHOD_NEAREST
#define DC1394_BAYER_METHOD_MAX DC1394_BAYER_METHOD_AHD
Expand Down
2 changes: 1 addition & 1 deletion lib/imageformats/fitsformat/fitsdata.h
Expand Up @@ -24,7 +24,7 @@ Gwenview: an image viewer

#include "bayer.h"

typedef enum { FITS_NORMAL, FITS_FOCUS, FITS_GUIDE, FITS_CALIBRATE, FITS_ALIGN } FITSMode;
typedef enum { FITS_NORMAL, FITS_FOCUS, FITS_GUIDE, FITS_CALIBRATE, FITS_ALIGN, } FITSMode;

#ifdef WIN32
// This header must be included before fitsio.h to avoid compiler errors with Visual Studio
Expand Down
4 changes: 2 additions & 2 deletions lib/imagemetainfomodel.cpp
Expand Up @@ -53,14 +53,14 @@ enum GroupRow {
IptcGroup,
XmpGroup,
NoGroupSpace, // second last entry
NoGroup // last entry
NoGroup, // last entry
};

class MetaInfoGroup
{
public:
enum {
InvalidRow = -1
InvalidRow = -1,
};

class Entry
Expand Down
4 changes: 2 additions & 2 deletions lib/mimetypeutils.h
Expand Up @@ -50,7 +50,7 @@ enum Kind {
KIND_FILE = 1 << 3,
KIND_RASTER_IMAGE = 1 << 4,
KIND_SVG_IMAGE = 1 << 5,
KIND_VIDEO = 1 << 6
KIND_VIDEO = 1 << 6,
};
Q_DECLARE_FLAGS(Kinds, Kind)

Expand All @@ -60,7 +60,7 @@ GWENVIEWLIB_EXPORT Kind mimeTypeKind(const QString& mimeType);

enum MimeTarget {
ClipboardTarget,
DropTarget
DropTarget,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/mousewheelbehavior.h
Expand Up @@ -35,7 +35,7 @@ namespace MouseWheelBehavior
enum Enum {
Scroll,
Browse,
Zoom
Zoom,
};

} // namespace MouseWheelBehavior
Expand Down
2 changes: 1 addition & 1 deletion lib/orientation.h
Expand Up @@ -49,7 +49,7 @@ enum Orientation {
TRANSPOSE = 5,
ROT_90 = 6,
TRANSVERSE = 7,
ROT_270 = 8
ROT_270 = 8,
};

}
Expand Down
4 changes: 2 additions & 2 deletions lib/print/printoptionspage.h
Expand Up @@ -39,14 +39,14 @@ class PrintOptionsPage : public QWidget
enum ScaleMode {
NoScale,
ScaleToPage,
ScaleToCustomSize
ScaleToCustomSize,
};

// Order should match the content of the unit combbox in the ui file
enum Unit {
Millimeters,
Centimeters,
Inches
Inches,
};

PrintOptionsPage(const QSize& imageSize);
Expand Down
2 changes: 1 addition & 1 deletion lib/redeyereduction/redeyereductiontool.h
Expand Up @@ -43,7 +43,7 @@ class GWENVIEWLIB_EXPORT RedEyeReductionTool : public AbstractRasterImageViewToo
public:
enum Status {
NotSet,
Adjusting
Adjusting,
};

explicit RedEyeReductionTool(RasterImageView* parent);
Expand Down
2 changes: 1 addition & 1 deletion lib/renderingintent.h
Expand Up @@ -33,7 +33,7 @@ namespace RenderingIntent
*/
enum Enum : cmsUInt32Number {
Perceptual = INTENT_PERCEPTUAL,
Relative = INTENT_RELATIVE_COLORIMETRIC
Relative = INTENT_RELATIVE_COLORIMETRIC,
};

} // namespace RenderingIntent
Expand Down
2 changes: 1 addition & 1 deletion lib/semanticinfo/fakesemanticinfobackend.h
Expand Up @@ -43,7 +43,7 @@ class GWENVIEWLIB_EXPORT FakeSemanticInfoBackEnd : public AbstractSemanticInfoBa
{
Q_OBJECT
public:
enum InitializeMode { InitializeEmpty, InitializeRandom };
enum InitializeMode { InitializeEmpty, InitializeRandom, };
FakeSemanticInfoBackEnd(QObject* parent, InitializeMode initializeMode);

virtual TagSet allTags() const;
Expand Down
2 changes: 1 addition & 1 deletion lib/semanticinfo/semanticinfodirmodel.h
Expand Up @@ -47,7 +47,7 @@ class SemanticInfoDirModel : public KDirModel
enum {
RatingRole = 0x21a43a51,
DescriptionRole = 0x26FB33FA,
TagsRole = 0x0462F0A8
TagsRole = 0x0462F0A8,
};
SemanticInfoDirModel(QObject* parent);
~SemanticInfoDirModel() override;
Expand Down
4 changes: 2 additions & 2 deletions lib/semanticinfo/tagmodel.h
Expand Up @@ -49,12 +49,12 @@ class GWENVIEWLIB_EXPORT TagModel : public QStandardItemModel
enum {
TagRole = Qt::UserRole,
SortRole,
AssignmentStatusRole
AssignmentStatusRole,
};

enum AssignmentStatus {
PartiallyAssigned,
FullyAssigned
FullyAssigned,
};

void setSemanticInfoBackEnd(AbstractSemanticInfoBackEnd*);
Expand Down
2 changes: 1 addition & 1 deletion lib/shadowfilter.h
Expand Up @@ -48,7 +48,7 @@ class GWENVIEWLIB_EXPORT ShadowFilter : public QObject
LeftEdge,
TopEdge,
RightEdge,
BottomEdge
BottomEdge,
};
explicit ShadowFilter(QWidget* parent);
~ShadowFilter() override;
Expand Down
2 changes: 1 addition & 1 deletion lib/slideshow.cpp
Expand Up @@ -50,7 +50,7 @@ namespace Gwenview
enum State {
Paused,
Started,
WaitForEndOfUrl
WaitForEndOfUrl,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/slideshow.h
Expand Up @@ -42,7 +42,7 @@ class GWENVIEWLIB_EXPORT SlideShow : public QObject
enum NavigationEndNotification {
NeverWarn,
WarnOnSlideshow,
AlwaysWarn
AlwaysWarn,
};
Q_ENUM(NavigationEndNotification)

Expand Down

0 comments on commit 57006d5

Please sign in to comment.