Verified Commit 4672a5ce authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Only use QLatin1String where an overload for it exists

parent 70324835
......@@ -108,7 +108,7 @@ private Q_SLOTS:
}
void testSetTab() {
m_tabsModel->setTab(0, QLatin1String("https://debian.org"));
m_tabsModel->setTab(0, QStringLiteral("https://debian.org"));
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({TabState("https://debian.org", false), TabState("third", false)}));
}
......
......@@ -32,7 +32,7 @@ TabsModel::TabsModel(QObject *parent) : QAbstractListModel(parent) {
connect(this, &TabsModel::privateModeChanged, [&] {
qDebug() << "initialUrl" << AngelFish::BrowserManager::instance()->initialUrl();
if (AngelFish::BrowserManager::instance()->initialUrl().isEmpty()) {
if (!loadTabs() && m_tabs.first().url() == QLatin1String("about:blank") && !m_privateMode) {
if (!loadTabs() && m_tabs.first().url() == QStringLiteral("about:blank") && !m_privateMode) {
load(AngelFish::BrowserManager::instance()->homepage());
}
} else {
......@@ -174,7 +174,7 @@ bool TabsModel::saveTabs() const
QString outputDir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)
+ QStringLiteral("/angelfish/");
QFile outputFile(outputDir + QLatin1String("tabs.json"));
QFile outputFile(outputDir + QStringLiteral("tabs.json"));
if (!QDir(outputDir).mkpath(".")) {
qDebug() << "Destdir doesn't exist and I can't create it: " << outputDir;
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment