fix: replace defines with constexpr/const and use more absolute paths for includes (#5527)

bye bye nuuls
This commit is contained in:
nerix
2024-08-03 12:00:58 +02:00
committed by GitHub
parent 5ee5abf5b2
commit aed55ac1ba
83 changed files with 386 additions and 380 deletions
+5 -7
View File
@@ -1,4 +1,4 @@
#include "Toasts.hpp"
#include "singletons/Toasts.hpp"
#include "Application.hpp"
#include "common/Common.hpp"
@@ -83,19 +83,17 @@ bool Toasts::isEnabled()
QString Toasts::findStringFromReaction(const ToastReaction &reaction)
{
// The constants are macros right now, but we want to avoid ASCII casts,
// so we're concatenating them with a QString literal - effectively making them part of it.
switch (reaction)
{
case ToastReaction::OpenInBrowser:
return OPEN_IN_BROWSER u""_s;
return OPEN_IN_BROWSER;
case ToastReaction::OpenInPlayer:
return OPEN_PLAYER_IN_BROWSER u""_s;
return OPEN_PLAYER_IN_BROWSER;
case ToastReaction::OpenInStreamlink:
return OPEN_IN_STREAMLINK u""_s;
return OPEN_IN_STREAMLINK;
case ToastReaction::DontOpen:
default:
return DONT_OPEN u""_s;
return DONT_OPEN;
}
}