mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
Rename literal operator
Qt 6.4 introduced `QString operator""_s()` and the previous `""_qs` is deprecated since Qt 6.8.
This commit is contained in:
@@ -40,11 +40,11 @@
|
||||
#include "base/global.h"
|
||||
#include "color.h"
|
||||
|
||||
inline const QString CONFIG_FILE_NAME = u"config.json"_qs;
|
||||
inline const QString STYLESHEET_FILE_NAME = u"stylesheet.qss"_qs;
|
||||
inline const QString KEY_COLORS = u"colors"_qs;
|
||||
inline const QString KEY_COLORS_LIGHT = u"colors.light"_qs;
|
||||
inline const QString KEY_COLORS_DARK = u"colors.dark"_qs;
|
||||
inline const QString CONFIG_FILE_NAME = u"config.json"_s;
|
||||
inline const QString STYLESHEET_FILE_NAME = u"stylesheet.qss"_s;
|
||||
inline const QString KEY_COLORS = u"colors"_s;
|
||||
inline const QString KEY_COLORS_LIGHT = u"colors.light"_s;
|
||||
inline const QString KEY_COLORS_DARK = u"colors.dark"_s;
|
||||
|
||||
struct UIThemeColor
|
||||
{
|
||||
@@ -56,126 +56,126 @@ inline QHash<QString, UIThemeColor> defaultUIThemeColors()
|
||||
{
|
||||
const QPalette palette = QApplication::palette();
|
||||
return {
|
||||
{u"Log.TimeStamp"_qs, {Color::Primer::Light::fgSubtle, Color::Primer::Dark::fgSubtle}},
|
||||
{u"Log.Normal"_qs, {palette.color(QPalette::Active, QPalette::WindowText), palette.color(QPalette::Active, QPalette::WindowText)}},
|
||||
{u"Log.Info"_qs, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"Log.Warning"_qs, {Color::Primer::Light::severeFg, Color::Primer::Dark::severeFg}},
|
||||
{u"Log.Critical"_qs, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"Log.BannedPeer"_qs, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"Log.TimeStamp"_s, {Color::Primer::Light::fgSubtle, Color::Primer::Dark::fgSubtle}},
|
||||
{u"Log.Normal"_s, {palette.color(QPalette::Active, QPalette::WindowText), palette.color(QPalette::Active, QPalette::WindowText)}},
|
||||
{u"Log.Info"_s, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"Log.Warning"_s, {Color::Primer::Light::severeFg, Color::Primer::Dark::severeFg}},
|
||||
{u"Log.Critical"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"Log.BannedPeer"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
|
||||
{u"RSS.ReadArticle"_qs, {palette.color(QPalette::Inactive, QPalette::WindowText), palette.color(QPalette::Inactive, QPalette::WindowText)}},
|
||||
{u"RSS.UnreadArticle"_qs, {palette.color(QPalette::Active, QPalette::Link), palette.color(QPalette::Active, QPalette::Link)}},
|
||||
{u"RSS.ReadArticle"_s, {palette.color(QPalette::Inactive, QPalette::WindowText), palette.color(QPalette::Inactive, QPalette::WindowText)}},
|
||||
{u"RSS.UnreadArticle"_s, {palette.color(QPalette::Active, QPalette::Link), palette.color(QPalette::Active, QPalette::Link)}},
|
||||
|
||||
{u"TransferList.Downloading"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.StalledDownloading"_qs, {Color::Primer::Light::successEmphasis, Color::Primer::Dark::successEmphasis}},
|
||||
{u"TransferList.DownloadingMetadata"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.ForcedDownloadingMetadata"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.ForcedDownloading"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.Uploading"_qs, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"TransferList.StalledUploading"_qs, {Color::Primer::Light::accentEmphasis, Color::Primer::Dark::accentEmphasis}},
|
||||
{u"TransferList.ForcedUploading"_qs, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"TransferList.QueuedDownloading"_qs, {Color::Primer::Light::scaleYellow6, Color::Primer::Dark::scaleYellow6}},
|
||||
{u"TransferList.QueuedUploading"_qs, {Color::Primer::Light::scaleYellow6, Color::Primer::Dark::scaleYellow6}},
|
||||
{u"TransferList.CheckingDownloading"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingUploading"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingResumeData"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.PausedDownloading"_qs, {Color::Primer::Light::fgMuted, Color::Primer::Dark::fgMuted}},
|
||||
{u"TransferList.PausedUploading"_qs, {Color::Primer::Light::doneFg, Color::Primer::Dark::doneFg}},
|
||||
{u"TransferList.Moving"_qs, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.MissingFiles"_qs, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"TransferList.Error"_qs, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}}
|
||||
{u"TransferList.Downloading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.StalledDownloading"_s, {Color::Primer::Light::successEmphasis, Color::Primer::Dark::successEmphasis}},
|
||||
{u"TransferList.DownloadingMetadata"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.ForcedDownloadingMetadata"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.ForcedDownloading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.Uploading"_s, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"TransferList.StalledUploading"_s, {Color::Primer::Light::accentEmphasis, Color::Primer::Dark::accentEmphasis}},
|
||||
{u"TransferList.ForcedUploading"_s, {Color::Primer::Light::accentFg, Color::Primer::Dark::accentFg}},
|
||||
{u"TransferList.QueuedDownloading"_s, {Color::Primer::Light::scaleYellow6, Color::Primer::Dark::scaleYellow6}},
|
||||
{u"TransferList.QueuedUploading"_s, {Color::Primer::Light::scaleYellow6, Color::Primer::Dark::scaleYellow6}},
|
||||
{u"TransferList.CheckingDownloading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingUploading"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.CheckingResumeData"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.PausedDownloading"_s, {Color::Primer::Light::fgMuted, Color::Primer::Dark::fgMuted}},
|
||||
{u"TransferList.PausedUploading"_s, {Color::Primer::Light::doneFg, Color::Primer::Dark::doneFg}},
|
||||
{u"TransferList.Moving"_s, {Color::Primer::Light::successFg, Color::Primer::Dark::successFg}},
|
||||
{u"TransferList.MissingFiles"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}},
|
||||
{u"TransferList.Error"_s, {Color::Primer::Light::dangerFg, Color::Primer::Dark::dangerFg}}
|
||||
};
|
||||
}
|
||||
|
||||
inline QSet<QString> defaultUIThemeIcons()
|
||||
{
|
||||
return {
|
||||
u"application-exit"_qs,
|
||||
u"application-rss"_qs,
|
||||
u"application-url"_qs,
|
||||
u"browser-cookies"_qs,
|
||||
u"chart-line"_qs,
|
||||
u"checked-completed"_qs,
|
||||
u"configure"_qs,
|
||||
u"connected"_qs,
|
||||
u"dialog-warning"_qs,
|
||||
u"directory"_qs,
|
||||
u"disconnected"_qs,
|
||||
u"download"_qs,
|
||||
u"downloading"_qs,
|
||||
u"edit-clear"_qs,
|
||||
u"edit-copy"_qs,
|
||||
u"edit-find"_qs,
|
||||
u"edit-rename"_qs,
|
||||
u"error"_qs,
|
||||
u"fileicon"_qs,
|
||||
u"filter-active"_qs,
|
||||
u"filter-all"_qs,
|
||||
u"filter-inactive"_qs,
|
||||
u"filter-stalled"_qs,
|
||||
u"firewalled"_qs,
|
||||
u"folder-documents"_qs,
|
||||
u"folder-new"_qs,
|
||||
u"folder-remote"_qs,
|
||||
u"force-recheck"_qs,
|
||||
u"go-bottom"_qs,
|
||||
u"go-down"_qs,
|
||||
u"go-top"_qs,
|
||||
u"go-up"_qs,
|
||||
u"hash"_qs,
|
||||
u"help-about"_qs,
|
||||
u"help-contents"_qs,
|
||||
u"insert-link"_qs,
|
||||
u"ip-blocked"_qs,
|
||||
u"list-add"_qs,
|
||||
u"list-remove"_qs,
|
||||
u"loading"_qs,
|
||||
u"mail-inbox"_qs,
|
||||
u"name"_qs,
|
||||
u"network-connect"_qs,
|
||||
u"network-server"_qs,
|
||||
u"object-locked"_qs,
|
||||
u"peers"_qs,
|
||||
u"peers-add"_qs,
|
||||
u"peers-remove"_qs,
|
||||
u"plugins"_qs,
|
||||
u"preferences-advanced"_qs,
|
||||
u"preferences-bittorrent"_qs,
|
||||
u"preferences-desktop"_qs,
|
||||
u"preferences-webui"_qs,
|
||||
u"qbittorrent-tray"_qs,
|
||||
u"qbittorrent-tray-dark"_qs,
|
||||
u"qbittorrent-tray-light"_qs,
|
||||
u"queued"_qs,
|
||||
u"ratio"_qs,
|
||||
u"reannounce"_qs,
|
||||
u"security-high"_qs,
|
||||
u"security-low"_qs,
|
||||
u"set-location"_qs,
|
||||
u"slow"_qs,
|
||||
u"slow_off"_qs,
|
||||
u"speedometer"_qs,
|
||||
u"stalledDL"_qs,
|
||||
u"stalledUP"_qs,
|
||||
u"stopped"_qs,
|
||||
u"system-log-out"_qs,
|
||||
u"tags"_qs,
|
||||
u"task-complete"_qs,
|
||||
u"task-reject"_qs,
|
||||
u"torrent-creator"_qs,
|
||||
u"torrent-magnet"_qs,
|
||||
u"torrent-start"_qs,
|
||||
u"torrent-start-forced"_qs,
|
||||
u"torrent-stop"_qs,
|
||||
u"tracker-error"_qs,
|
||||
u"tracker-warning"_qs,
|
||||
u"trackerless"_qs,
|
||||
u"trackers"_qs,
|
||||
u"upload"_qs,
|
||||
u"view-categories"_qs,
|
||||
u"view-preview"_qs,
|
||||
u"view-refresh"_qs,
|
||||
u"view-statistics"_qs,
|
||||
u"wallet-open"_qs
|
||||
u"application-exit"_s,
|
||||
u"application-rss"_s,
|
||||
u"application-url"_s,
|
||||
u"browser-cookies"_s,
|
||||
u"chart-line"_s,
|
||||
u"checked-completed"_s,
|
||||
u"configure"_s,
|
||||
u"connected"_s,
|
||||
u"dialog-warning"_s,
|
||||
u"directory"_s,
|
||||
u"disconnected"_s,
|
||||
u"download"_s,
|
||||
u"downloading"_s,
|
||||
u"edit-clear"_s,
|
||||
u"edit-copy"_s,
|
||||
u"edit-find"_s,
|
||||
u"edit-rename"_s,
|
||||
u"error"_s,
|
||||
u"fileicon"_s,
|
||||
u"filter-active"_s,
|
||||
u"filter-all"_s,
|
||||
u"filter-inactive"_s,
|
||||
u"filter-stalled"_s,
|
||||
u"firewalled"_s,
|
||||
u"folder-documents"_s,
|
||||
u"folder-new"_s,
|
||||
u"folder-remote"_s,
|
||||
u"force-recheck"_s,
|
||||
u"go-bottom"_s,
|
||||
u"go-down"_s,
|
||||
u"go-top"_s,
|
||||
u"go-up"_s,
|
||||
u"hash"_s,
|
||||
u"help-about"_s,
|
||||
u"help-contents"_s,
|
||||
u"insert-link"_s,
|
||||
u"ip-blocked"_s,
|
||||
u"list-add"_s,
|
||||
u"list-remove"_s,
|
||||
u"loading"_s,
|
||||
u"mail-inbox"_s,
|
||||
u"name"_s,
|
||||
u"network-connect"_s,
|
||||
u"network-server"_s,
|
||||
u"object-locked"_s,
|
||||
u"peers"_s,
|
||||
u"peers-add"_s,
|
||||
u"peers-remove"_s,
|
||||
u"plugins"_s,
|
||||
u"preferences-advanced"_s,
|
||||
u"preferences-bittorrent"_s,
|
||||
u"preferences-desktop"_s,
|
||||
u"preferences-webui"_s,
|
||||
u"qbittorrent-tray"_s,
|
||||
u"qbittorrent-tray-dark"_s,
|
||||
u"qbittorrent-tray-light"_s,
|
||||
u"queued"_s,
|
||||
u"ratio"_s,
|
||||
u"reannounce"_s,
|
||||
u"security-high"_s,
|
||||
u"security-low"_s,
|
||||
u"set-location"_s,
|
||||
u"slow"_s,
|
||||
u"slow_off"_s,
|
||||
u"speedometer"_s,
|
||||
u"stalledDL"_s,
|
||||
u"stalledUP"_s,
|
||||
u"stopped"_s,
|
||||
u"system-log-out"_s,
|
||||
u"tags"_s,
|
||||
u"task-complete"_s,
|
||||
u"task-reject"_s,
|
||||
u"torrent-creator"_s,
|
||||
u"torrent-magnet"_s,
|
||||
u"torrent-start"_s,
|
||||
u"torrent-start-forced"_s,
|
||||
u"torrent-stop"_s,
|
||||
u"tracker-error"_s,
|
||||
u"tracker-warning"_s,
|
||||
u"trackerless"_s,
|
||||
u"trackers"_s,
|
||||
u"upload"_s,
|
||||
u"view-categories"_s,
|
||||
u"view-preview"_s,
|
||||
u"view-refresh"_s,
|
||||
u"view-statistics"_s,
|
||||
u"wallet-open"_s
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user