diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-26 16:49:42 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-26 16:49:42 -0800 |
commit | 2268b6b212fca6bd84b11422b2b4f6eab6ad51ab (patch) | |
tree | a3ea1908306fdb610935c7e8e835803f12441871 /mobile-widgets/qmlmanager.cpp | |
parent | df9164f7e545ff2bcd19826240a4ec1aac409c4d (diff) | |
download | subsurface-2268b6b212fca6bd84b11422b2b4f6eab6ad51ab.tar.gz |
code cleanup: QLatin1Literal is deprecated in Qt 5.14
Simply replace it with QLatin1String. There is a tiny performance penalty,
but none of that code would care.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 8e5005447..d9f619d5a 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -53,8 +53,8 @@ QMLManager *QMLManager::m_instance = NULL; bool noCloudToCloud = false; -#define RED_FONT QLatin1Literal("<font color=\"red\">") -#define END_FONT QLatin1Literal("</font>") +#define RED_FONT QLatin1String("<font color=\"red\">") +#define END_FONT QLatin1String("</font>") extern "C" void showErrorFromC(char *buf) { @@ -276,9 +276,9 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state) } stateText.prepend("AppState changed to "); stateText.append(" with "); - stateText.append((alreadySaving ? QLatin1Literal("") : QLatin1Literal("no ")) + QLatin1Literal("save ongoing")); + stateText.append((alreadySaving ? QLatin1String("") : QLatin1String("no ")) + QLatin1String("save ongoing")); stateText.append(" and "); - stateText.append((unsaved_changes() ? QLatin1Literal("") : QLatin1Literal("no ")) + QLatin1Literal("unsaved changes")); + stateText.append((unsaved_changes() ? QLatin1String("") : QLatin1String("no ")) + QLatin1String("unsaved changes")); appendTextToLog(stateText); if (!alreadySaving && state == Qt::ApplicationInactive && unsaved_changes()) { @@ -1663,14 +1663,14 @@ void QMLManager::setVerboseEnabled(bool verboseMode) void QMLManager::syncLoadFromCloud() { QSettings s; - QString cloudMarker = QLatin1Literal("loadFromCloud") + QString(prefs.cloud_storage_email); + QString cloudMarker = QLatin1String("loadFromCloud") + QString(prefs.cloud_storage_email); m_loadFromCloud = s.contains(cloudMarker) && s.value(cloudMarker).toBool(); } void QMLManager::setLoadFromCloud(bool done) { QSettings s; - QString cloudMarker = QLatin1Literal("loadFromCloud") + QString(prefs.cloud_storage_email); + QString cloudMarker = QLatin1String("loadFromCloud") + QString(prefs.cloud_storage_email); s.setValue(cloudMarker, done); m_loadFromCloud = done; emit loadFromCloudChanged(); |