fix: don't indent inner namespaces (#6235)

This commit is contained in:
pajlada
2025-05-25 12:28:14 +02:00
committed by GitHub
parent 84c0b39fde
commit 8acca1c241
39 changed files with 934 additions and 951 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ IncludeCategories:
# Third party library includes
- Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$"
Priority: 3
NamespaceIndentation: Inner
NamespaceIndentation: None
PointerBindsToType: false
SpacesBeforeTrailingComments: 2
Standard: Auto
+5 -10
View File
@@ -63,14 +63,12 @@ namespace {
dark.setColor(QPalette::HighlightedText, Qt::white);
dark.setColor(QPalette::PlaceholderText, QColor(127, 127, 127));
dark.setColor(QPalette::Disabled, QPalette::Highlight,
QColor(80, 80, 80));
dark.setColor(QPalette::Disabled, QPalette::Highlight, QColor(80, 80, 80));
dark.setColor(QPalette::Disabled, QPalette::HighlightedText,
QColor(127, 127, 127));
dark.setColor(QPalette::Disabled, QPalette::ButtonText,
QColor(127, 127, 127));
dark.setColor(QPalette::Disabled, QPalette::Text,
QColor(127, 127, 127));
dark.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127));
dark.setColor(QPalette::Disabled, QPalette::WindowText,
QColor(127, 127, 127));
@@ -98,8 +96,7 @@ namespace {
#ifdef Q_OS_MAC
// On the Mac/Cocoa platform this attribute is enabled by default
// We override it to ensure shortcuts show in context menus on that platform
QApplication::setAttribute(Qt::AA_DontShowShortcutsInContextMenus,
false);
QApplication::setAttribute(Qt::AA_DontShowShortcutsInContextMenus, false);
#endif
installCustomPalette();
@@ -179,14 +176,12 @@ namespace {
#if defined(Q_OS_UNIX)
auto *sigintHandler = new UnixSignalHandler(SIGINT);
QObject::connect(sigintHandler, &UnixSignalHandler::signalFired, [] {
qCInfo(chatterinoApp)
<< "Received SIGINT, request application quit";
qCInfo(chatterinoApp) << "Received SIGINT, request application quit";
QApplication::quit();
});
auto *sigtermHandler = new UnixSignalHandler(SIGTERM);
QObject::connect(sigtermHandler, &UnixSignalHandler::signalFired, [] {
qCInfo(chatterinoApp)
<< "Received SIGTERM, request application quit";
qCInfo(chatterinoApp) << "Received SIGTERM, request application quit";
QApplication::quit();
});
#endif
@@ -31,8 +31,7 @@ namespace {
}
}
void addEmojis(std::vector<EmoteItem> &out,
const std::vector<EmojiPtr> &map)
void addEmojis(std::vector<EmoteItem> &out, const std::vector<EmojiPtr> &map)
{
for (const auto &emoji : map)
{
@@ -68,8 +68,7 @@ namespace {
void completeEmotes(
const std::vector<EmoteItem> &items, std::vector<EmoteItem> &output,
QStringView query, bool ignoreColonForCost,
const std::function<bool(EmoteItem, Qt::CaseSensitivity)>
&matchingFunction)
const std::function<bool(EmoteItem, Qt::CaseSensitivity)> &matchingFunction)
{
// Given these emotes: pajaW, PAJAW
// There are a few cases of input:
@@ -107,8 +107,8 @@ namespace pajlada {
namespace {
chatterino::HighlightPhrase constructError()
{
return chatterino::HighlightPhrase(QString(), false, false, false,
false, false, QString(), QColor());
return chatterino::HighlightPhrase(QString(), false, false, false, false,
false, QString(), QColor());
}
} // namespace
+1 -3
View File
@@ -29,9 +29,7 @@ namespace ffz::detail {
EmoteMap parseChannelEmotes(const QJsonObject &jsonRoot);
/**
* Parse the `user_badge_ids` into a map of User IDs -> Badge IDs
*/
/// Parse the `user_badge_ids` into a map of User IDs -> Badge IDs
FfzChannelBadgeMap parseChannelBadges(const QJsonObject &badgeRoot);
} // namespace ffz::detail
+1 -2
View File
@@ -82,8 +82,7 @@ namespace {
"this category.");
const QString CLIPS_FAILURE_NOT_AUTHENTICATED_TEXT(
"Failed to create a clip - you need to re-authenticate.");
const QString CLIPS_FAILURE_UNKNOWN_ERROR_TEXT(
"Failed to create a clip: %1");
const QString CLIPS_FAILURE_UNKNOWN_ERROR_TEXT("Failed to create a clip: %1");
const QString LOGIN_PROMPT_TEXT("Click here to add your account again.");
const Link ACCOUNTS_LINK(Link::OpenAccountsPage, QString());
+2 -4
View File
@@ -5,15 +5,13 @@
namespace chatterino {
namespace rj {
void addMember(rapidjson::Value &obj, const char *key,
rapidjson::Value &&value,
void addMember(rapidjson::Value &obj, const char *key, rapidjson::Value &&value,
rapidjson::Document::AllocatorType &a)
{
obj.AddMember(rapidjson::Value(key, a).Move(), value, a);
}
void addMember(rapidjson::Value &obj, const char *key,
rapidjson::Value &value,
void addMember(rapidjson::Value &obj, const char *key, rapidjson::Value &value,
rapidjson::Document::AllocatorType &a)
{
obj.AddMember(rapidjson::Value(key, a).Move(), value.Move(), a);
+2 -4
View File
@@ -11,11 +11,9 @@
namespace chatterino {
namespace rj {
void addMember(rapidjson::Value &obj, const char *key,
rapidjson::Value &&value,
void addMember(rapidjson::Value &obj, const char *key, rapidjson::Value &&value,
rapidjson::Document::AllocatorType &a);
void addMember(rapidjson::Value &obj, const char *key,
rapidjson::Value &value,
void addMember(rapidjson::Value &obj, const char *key, rapidjson::Value &value,
rapidjson::Document::AllocatorType &a);
template <typename Type>
@@ -13,9 +13,8 @@ namespace {
"%", "equals", "not equals", "<", ">", "<=",
">=", "contains", "starts with", "ends with", "(nothing)"};
const QStringList realBinaryOps = {
"&&", "||", "+", "-", "*", "/",
"%", "==", "!=", "<", ">", "<=",
">=", "contains", "startswith", "endswith", ""};
"&&", "||", "+", "-", "*", "/", "%", "==", "!=",
"<", ">", "<=", ">=", "contains", "startswith", "endswith", ""};
} // namespace
ChannelFilterEditorDialog::ChannelFilterEditorDialog(QWidget *parent)
+2 -4
View File
@@ -59,11 +59,9 @@ namespace {
}
std::string basePath = "/accounts/uid" + userID.toStdString();
pajlada::Settings::Setting<QString>::set(basePath + "/username",
username);
pajlada::Settings::Setting<QString>::set(basePath + "/username", username);
pajlada::Settings::Setting<QString>::set(basePath + "/userID", userID);
pajlada::Settings::Setting<QString>::set(basePath + "/clientID",
clientID);
pajlada::Settings::Setting<QString>::set(basePath + "/clientID", clientID);
pajlada::Settings::Setting<QString>::set(basePath + "/oauthToken",
oauthToken);