Replace QLatin1String with operator _L1
This commit is contained in:
@@ -71,6 +71,8 @@
|
||||
#include "playlist/playlist.h"
|
||||
#include "playlistdelegates.h"
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
namespace {
|
||||
constexpr int kQueueBoxBorder = 1;
|
||||
constexpr int kQueueBoxCornerRadius = 3;
|
||||
@@ -258,10 +260,10 @@ bool PlaylistDelegateBase::helpEvent(QHelpEvent *event, QAbstractItemView *view,
|
||||
// Special case: we want newlines in the comment tooltip
|
||||
if (idx.column() == static_cast<int>(Playlist::Column::Comment)) {
|
||||
text = idx.data(Qt::ToolTipRole).toString().toHtmlEscaped();
|
||||
text.replace(QLatin1String("\\r\\n"), QLatin1String("<br />"));
|
||||
text.replace(QLatin1String("\\n"), QLatin1String("<br />"));
|
||||
text.replace(QLatin1String("\r\n"), QLatin1String("<br />"));
|
||||
text.replace(QLatin1String("\n"), QLatin1String("<br />"));
|
||||
text.replace("\\r\\n"_L1, "<br />"_L1);
|
||||
text.replace("\\n"_L1, "<br />"_L1);
|
||||
text.replace("\r\n"_L1, "<br />"_L1);
|
||||
text.replace("\n"_L1, "<br />"_L1);
|
||||
}
|
||||
|
||||
if (text.isEmpty() || !event) return false;
|
||||
@@ -440,7 +442,7 @@ QString NativeSeparatorsDelegate::displayText(const QVariant &value, const QLoca
|
||||
if (value.metaType().id() == QMetaType::QUrl) {
|
||||
url = value.toUrl();
|
||||
}
|
||||
else if (string_value.contains(QLatin1String("://"))) {
|
||||
else if (string_value.contains("://"_L1)) {
|
||||
url = QUrl::fromEncoded(string_value.toLatin1());
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user