Commit e5bfcf7a authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Laurent Montel
Browse files

Add trailing comma to enums

parent 6a9380f0
......@@ -42,7 +42,13 @@
#include <QUuid>
#include <QVBoxLayout>
enum { Local = 0, Latin1 = 1, Uni = 2, MSBug = 3, Codec = 4 };
enum {
Local = 0,
Latin1 = 1,
Uni = 2,
MSBug = 3,
Codec = 4,
};
class ContactFieldComboBox : public QComboBox
{
......
......@@ -72,7 +72,13 @@ QCsvReader::~QCsvReader()
bool QCsvReader::read(QIODevice *device)
{
enum State { StartLine, QuotedField, QuotedFieldEnd, NormalField, EmptyField };
enum State {
StartLine,
QuotedField,
QuotedFieldEnd,
NormalField,
EmptyField,
};
int row, column;
......
......@@ -16,7 +16,15 @@ class VCardExportSelectionWidget : public QWidget
public:
explicit VCardExportSelectionWidget(QWidget *parent = nullptr);
~VCardExportSelectionWidget() override;
enum ExportField { None = 0, Private = 1, Business = 2, Other = 4, Encryption = 8, Picture = 16, DiplayName = 32 };
enum ExportField {
None = 0,
Private = 1,
Business = 2,
Other = 4,
Encryption = 8,
Picture = 16,
DiplayName = 32,
};
Q_ENUMS(ExportField)
Q_DECLARE_FLAGS(ExportFields, ExportField)
......
......@@ -23,7 +23,11 @@ public:
Q_REQUIRED_RESULT bool canImportFileType(const QUrl &url) override;
private:
enum ExportVCardType { VCard2_1 = 0, VCard3, VCard4 };
enum ExportVCardType {
VCard2_1 = 0,
VCard3,
VCard4,
};
KContacts::Addressee::List parseVCard(const QByteArray &data) const;
KContacts::Addressee::List filterContacts(const KContacts::Addressee::List &addrList,
KAddressBookImportExport::ExportSelectionWidget::ExportFields exportFieldType) const;
......
......@@ -39,7 +39,7 @@ public:
FreeBusy = 65536,
FamilyName = 131072,
PartnerName = 262144,
Keys = 524288
Keys = 524288,
};
Q_ENUMS(ConflictInformation)
Q_DECLARE_FLAGS(ConflictInformations, ConflictInformation)
......
......@@ -15,7 +15,11 @@ class MergeContactErrorLabel : public QLabel
{
Q_OBJECT
public:
enum ErrorType { NotEnoughContactsSelected = 0, NoContactDuplicatesFound, NoContactSelected };
enum ErrorType {
NotEnoughContactsSelected = 0,
NoContactDuplicatesFound,
NoContactSelected,
};
explicit MergeContactErrorLabel(MergeContactErrorLabel::ErrorType type, QWidget *parent = nullptr);
~MergeContactErrorLabel() override;
};
......
......@@ -29,7 +29,13 @@ private:
void upperCase();
void lowerCase();
void reverseCase();
enum ChangeCaseType { Unknown = -1, UpperCase = 0, LowerCase, SentenseCase, ReverseCase };
enum ChangeCaseType {
Unknown = -1,
UpperCase = 0,
LowerCase,
SentenseCase,
ReverseCase,
};
ChangeCaseType mType = Unknown;
};
......
......@@ -29,7 +29,13 @@ public:
void exportQuickText();
private:
enum class EditMode { AddSnippet, EditSnippet, AddGroup, EditGroup, Unknown };
enum class EditMode {
AddSnippet,
EditSnippet,
AddGroup,
EditGroup,
Unknown,
};
void addSnippet();
void editSnippet();
void addSnippetGroup();
......
......@@ -30,7 +30,12 @@ private:
void zoomReset();
void zoomIn();
void zoomOut();
enum ZoomTextType { Unknown = -1, ZoomReset = 0, ZoomIn, ZoomOut };
enum ZoomTextType {
Unknown = -1,
ZoomReset = 0,
ZoomIn,
ZoomOut,
};
ZoomTextType mType = Unknown;
ZoomLabel *mZoomLabelWidget = nullptr;
};
......
......@@ -36,7 +36,9 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY(GrammarResultTextEdit)
void slotReplaceWord(const MessageComposer::PluginGrammarAction &act, const QString &replacementWord);
enum TextInfo { ReplaceFormatInfo = QTextFormat::UserProperty + 1 };
enum TextInfo {
ReplaceFormatInfo = QTextFormat::UserProperty + 1,
};
void slotOpenGrammarUrlInfo(const QString &url);
void generalPaletteChanged();
QColor mTextColor;
......
......@@ -41,7 +41,13 @@ Q_SIGNALS:
private:
Q_DISABLE_COPY(LanguageToolResultJob)
enum class JobError { NotError, EmptyText, UrlNotDefined, NetworkManagerNotDefined, LanguageNotDefined };
enum class JobError {
NotError,
EmptyText,
UrlNotDefined,
NetworkManagerNotDefined,
LanguageNotDefined,
};
LanguageToolResultJob::JobError canStartError() const;
void slotCheckGrammarFinished();
......
......@@ -89,7 +89,10 @@ public:
/** The wizard can be used for setting up anti-spam tools and for
setting up anti-virus tools.
*/
enum WizardMode { AntiSpam, AntiVirus };
enum WizardMode {
AntiSpam,
AntiVirus,
};
/** Constructor that needs to initialize from the main folder tree
of KMail.
......
......@@ -21,7 +21,10 @@ class MailMergeWidget : public QWidget
{
Q_OBJECT
public:
enum SourceType { AddressBook = 0, CSV = 1 };
enum SourceType {
AddressBook = 0,
CSV = 1,
};
explicit MailMergeWidget(QWidget *parent = nullptr);
~MailMergeWidget() override;
......
......@@ -26,7 +26,10 @@ public:
Element::List createDayElements(const QDate &) override;
Element::List createWeekElements(const QDate &) override;
enum DayNumber { DayOfYear = 1, DaysRemaining = 2 };
enum DayNumber {
DayOfYear = 1,
DaysRemaining = 2,
};
Q_DECLARE_FLAGS(DayNumbers, DayNumber)
Q_REQUIRED_RESULT QString info() const override;
......
......@@ -74,9 +74,37 @@ class Converter
friend class HebrewDate;
public:
enum HebrewMonths { Nissan = 1, Iyar, Sivan, Tamuz, Ab, Elul, Tishrei, Cheshvan, Kislev, Tevet, Shvat, Adar, AdarII, AdarI = 12 };
enum SecularMonths { January = 1, February, March, April, May, June, July, August, September, October, November, December };
enum HebrewMonths {
Nissan = 1,
Iyar,
Sivan,
Tamuz,
Ab,
Elul,
Tishrei,
Cheshvan,
Kislev,
Tevet,
Shvat,
Adar,
AdarII,
AdarI = 12,
};
enum SecularMonths {
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December,
};
private:
static bool hebrew_leap_year_p(int year);
......
......@@ -45,7 +45,15 @@ QStringList Holiday::findHoliday(int month,
bool showChol,
bool showOmer)
{
enum { Sunday = 1, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
enum {
Sunday = 1,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
};
QStringList holidays;
bool isAShabbat = (weekday == Saturday);
......
......@@ -60,7 +60,7 @@ private:
Shvat = 11,
Adar = 12,
AdarII = 13,
AdarI = 12
AdarI = 12,
};
static QStringList findHoliday(int month,
......
......@@ -34,7 +34,7 @@ public:
PersianCalendar = 13,
ROCCalendar = 14,
ThaiCalendar = 15,
LastCalendar = ThaiCalendar
LastCalendar = ThaiCalendar,
};
explicit QCalendarSystem(QCalendarSystem::CalendarSystem calendar = QCalendarSystem::DefaultCalendar);
......
......@@ -483,7 +483,12 @@ public:
return newMyself;
}
enum MailType { Answer, Delegation, Forward, DeclineCounter };
enum MailType {
Answer,
Delegation,
Forward,
DeclineCounter,
};
bool mailICal(const QString &receiver,
const QString &to,
......
......@@ -22,7 +22,11 @@ public:
bool render(const MimeTreeParser::MessagePartPtr &msgPart, MessageViewer::HtmlWriter *htmlWriter, MessageViewer::RenderContext *context) const override;
private:
enum WKSStatus { CheckingPublishing, NotPublished, Published };
enum WKSStatus {
CheckingPublishing,
NotPublished,
Published,
};
QString render(const GnuPGWKSMessagePart &mp, WKSStatus status) const;
};
......
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