mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(formatting): disable clang-format for certain code sections
This commit is contained in:
parent
d87f222c5c
commit
a1181e10f2
|
@ -38,6 +38,7 @@ enum TextStyle
|
|||
|
||||
static const QString HTML_CHARACTER_CODE = QStringLiteral("&#%1");
|
||||
|
||||
// clang-format off
|
||||
static const QVector<char> MARKDOWN_SYMBOLS {
|
||||
'*',
|
||||
'/',
|
||||
|
@ -97,6 +98,7 @@ static const QVector<QRegularExpression> urlPatterns {
|
|||
QRegularExpression("\\b(mailto|tox):[^ \\n]+@[^ \\n]+")
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
/**
|
||||
* @class TextFormatter
|
||||
*
|
||||
|
|
|
@ -93,6 +93,7 @@ CameraSource::CameraSource()
|
|||
: deviceName{"none"}
|
||||
, device{nullptr}
|
||||
, mode(VideoMode())
|
||||
// clang-format off
|
||||
, cctx{nullptr}
|
||||
#if LIBAVCODEC_VERSION_INT < 3747941
|
||||
, cctxOrig{nullptr}
|
||||
|
@ -107,6 +108,8 @@ CameraSource::CameraSource()
|
|||
avdevice_register_all();
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
/**
|
||||
* @brief Returns the singleton instance.
|
||||
*/
|
||||
|
|
|
@ -57,6 +57,7 @@ Time getTime(const QDate& date)
|
|||
}
|
||||
|
||||
QDate today = QDate::currentDate();
|
||||
// clang-format off
|
||||
const QMap<Time, QDate> dates {
|
||||
{ Time::Today, today.addDays(0) },
|
||||
{ Time::Yesterday, today.addDays(-1) },
|
||||
|
@ -68,6 +69,7 @@ Time getTime(const QDate& date)
|
|||
{ Time::Month4Ago, today.addMonths(-5) },
|
||||
{ Time::Month5Ago, today.addMonths(-6) },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
for (Time time : dates.keys()) {
|
||||
if (dates[time] <= date) {
|
||||
|
@ -193,6 +195,7 @@ void FriendListWidget::setMode(Mode mode)
|
|||
QLocale ql(Settings::getInstance().getTranslation());
|
||||
QDate today = QDate::currentDate();
|
||||
#define COMMENT "Category for sorting friends by activity"
|
||||
// clang-format off
|
||||
const QMap<Time, QString> names {
|
||||
{ Time::Today, tr("Today", COMMENT) },
|
||||
{ Time::Yesterday, tr("Yesterday", COMMENT) },
|
||||
|
@ -206,6 +209,7 @@ void FriendListWidget::setMode(Mode mode)
|
|||
{ Time::Month4Ago, ql.monthName(today.addMonths(-4).month()) },
|
||||
{ Time::Month5Ago, ql.monthName(today.addMonths(-5).month()) },
|
||||
};
|
||||
// clang-format on
|
||||
#undef COMMENT
|
||||
|
||||
activityLayout = new QVBoxLayout();
|
||||
|
|
Loading…
Reference in New Issue
Block a user