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