Use QStringLiteral

This commit is contained in:
Jonas Kvinge
2024-04-09 23:20:26 +02:00
parent 3cfffa5fbb
commit 58944993b8
233 changed files with 3885 additions and 3885 deletions

View File

@@ -29,7 +29,7 @@ SnapDialog::SnapDialog(QWidget *parent) : MessageDialog(parent) {
setWindowTitle(tr("Strawberry is running as a Snap"));
const QIcon icon = IconLoader::Load("dialog-warning");
const QIcon icon = IconLoader::Load(QStringLiteral("dialog-warning"));
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
const QPixmap pixmap = icon.pixmap(QSize(64, 64), devicePixelRatioF());
#else
@@ -38,56 +38,56 @@ SnapDialog::SnapDialog(QWidget *parent) : MessageDialog(parent) {
ui_->label_logo->setPixmap(pixmap);
QString text;
text += QString("<p>");
text += QStringLiteral("<p>");
text += tr("It is detected that Strawberry is running as a Snap");
text += QString("</p>");
text += QStringLiteral("</p>");
text += QString("<p>");
text += QStringLiteral("<p>");
text += tr("Strawberry is slower, and has restrictions when running as a Snap. Accessing the root filesystem (/) will not work. There also might be other restrictions such as accessing certain devices or network shares.");
text += QString("</p>");
text += QStringLiteral("</p>");
text += QString("<p>");
text += QString("Strawberry is available natively in the official package repositories for Fedora, openSUSE, Mageia, Arch, Manjaro, MX Linux and most other popular Linux distributions.");
text += QString("</p>");
text += QStringLiteral("<p>");
text += QStringLiteral("Strawberry is available natively in the official package repositories for Fedora, openSUSE, Mageia, Arch, Manjaro, MX Linux and most other popular Linux distributions.");
text += QStringLiteral("</p>");
text += QString("<p>");
text += tr("For Ubuntu there is an official PPA repository available at %1.").arg(QString("<a style=\"color:%1;\" href=\"https://launchpad.net/~jonaski/+archive/ubuntu/strawberry\">https://launchpad.net/~jonaski/+archive/ubuntu/strawberry</a>").arg(palette().text().color().name()));
text += QString("</p>");
text += QStringLiteral("<p>");
text += tr("For Ubuntu there is an official PPA repository available at %1.").arg(QStringLiteral("<a style=\"color:%1;\" href=\"https://launchpad.net/~jonaski/+archive/ubuntu/strawberry\">https://launchpad.net/~jonaski/+archive/ubuntu/strawberry</a>").arg(palette().text().color().name()));
text += QStringLiteral("</p>");
text += QString("<p>");
text += tr("Official releases are available for Debian and Ubuntu which also work on most of their derivatives. See %1 for more information.").arg(QString("<a style=\"color:%1;\" href=\"https://www.strawberrymusicplayer.org/\">https://www.strawberrymusicplayer.org/</a>").arg(palette().text().color().name()));
text += QString("</p>");
text += QStringLiteral("<p>");
text += tr("Official releases are available for Debian and Ubuntu which also work on most of their derivatives. See %1 for more information.").arg(QStringLiteral("<a style=\"color:%1;\" href=\"https://www.strawberrymusicplayer.org/\">https://www.strawberrymusicplayer.org/</a>").arg(palette().text().color().name()));
text += QStringLiteral("</p>");
text += QString("<p>");
text += QStringLiteral("<p>");
text += tr("For a better experience please consider the other options above.");
text += QString("</p>");
text += QStringLiteral("</p>");
text += QString("<p>");
text += QStringLiteral("<p>");
text += tr("Copy your strawberry.conf and strawberry.db from your ~/snap directory to avoid losing configuration before you uninstall the snap:");
text += QString("<br />");
text += QString("cp ~/snap/strawberry/current/.config/strawberry/strawberry.conf ~/.config/strawberry/strawberry.conf<br />");
text += QString("cp ~/snap/strawberry/current/.local/share/strawberry/strawberry/strawberry.db ~/.local/share/strawberry/strawberry/strawberry.db<br />");
text += QString("</p>");
text += QString("<p>");
text += QStringLiteral("<br />");
text += QStringLiteral("cp ~/snap/strawberry/current/.config/strawberry/strawberry.conf ~/.config/strawberry/strawberry.conf<br />");
text += QStringLiteral("cp ~/snap/strawberry/current/.local/share/strawberry/strawberry/strawberry.db ~/.local/share/strawberry/strawberry/strawberry.db<br />");
text += QStringLiteral("</p>");
text += QStringLiteral("<p>");
text += tr("Uninstall the snap with:");
text += QString("<br />");
text += QString("snap remove strawberry");
text += QString("</p>");
text += QString("<p>");
text += QStringLiteral("<br />");
text += QStringLiteral("snap remove strawberry");
text += QStringLiteral("</p>");
text += QStringLiteral("<p>");
text += tr("Install strawberry through PPA:");
text += QString("<br />");
text += QString("sudo add-apt-repository ppa:jonaski/strawberry<br />");
text += QString("sudo apt-get update<br />");
text += QString("sudo apt install strawberry");
text += QString("</p>");
text += QString("<p></p>");
text += QStringLiteral("<br />");
text += QStringLiteral("sudo add-apt-repository ppa:jonaski/strawberry<br />");
text += QStringLiteral("sudo apt-get update<br />");
text += QStringLiteral("sudo apt install strawberry");
text += QStringLiteral("</p>");
text += QStringLiteral("<p></p>");
ui_->label_text->setText(text);
ui_->label_text->adjustSize();
adjustSize();
settings_group_ = MainWindow::kSettingsGroup;
do_not_show_message_again_ = "ignore_snap";
do_not_show_message_again_ = QStringLiteral("ignore_snap");
if (parent) {
Utilities::CenterWidgetOnScreen(Utilities::GetScreen(parent), this);