/***************************************************************************
- * Copyright (C) 2005-2018 by the Quassel Project *
+ * Copyright (C) 2005-2019 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
namespace {
-void printWarning(const QString &iconName, const QString &extra = {})
+void printWarning(const QString& iconName, const QString& extra = {})
{
static std::set<QString> warnedAbout;
if (warnedAbout.insert(iconName).second) {
}
}
-}
-
+} // namespace
-QIcon get(const QString &iconName, const QString &fallbackPath)
+QIcon get(const QString& iconName, const QString& fallbackPath)
{
return get(std::vector<QString>{iconName}, fallbackPath);
}
-
-QIcon get(const std::vector<QString> &iconNames, const QString &fallbackPath)
+QIcon get(const std::vector<QString>& iconNames, const QString& fallbackPath)
{
- for (auto &&iconName : iconNames) {
+ for (auto&& iconName : iconNames) {
// Exact match
if (QIcon::hasThemeIcon(iconName)) {
return QIcon::fromTheme(iconName);
}
}
- for (auto &&iconName : iconNames) {
+ for (auto&& iconName : iconNames) {
// Try to get something from the theme anyway (i.e. a more generic fallback)
QIcon fallback = QIcon::fromTheme(iconName);
if (!fallback.availableSizes().isEmpty()) {
// Build error string
QStringList requested;
- for (auto &&iconName : iconNames) {
+ for (auto&& iconName : iconNames) {
requested << iconName;
}
QString missing = "{" + requested.join(", ") + "}";
return {};
}
-}
+} // namespace icon