diff options
Diffstat (limited to 'src/assistant/shared/collectionconfiguration.cpp')
-rw-r--r-- | src/assistant/shared/collectionconfiguration.cpp | 95 |
1 files changed, 30 insertions, 65 deletions
diff --git a/src/assistant/shared/collectionconfiguration.cpp b/src/assistant/shared/collectionconfiguration.cpp index 562cbfaab..8caf39d59 100644 --- a/src/assistant/shared/collectionconfiguration.cpp +++ b/src/assistant/shared/collectionconfiguration.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Assistant of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "collectionconfiguration.h" @@ -43,37 +7,39 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + namespace { - const QString AboutIconKey(QLatin1String("AboutIcon")); - const QString AboutImagesKey(QLatin1String("AboutImages")); - const QString AboutMenuTextsKey(QLatin1String("AboutMenuTexts")); - const QString AboutTextsKey(QLatin1String("AboutTexts")); - const QString ApplicationIconKey(QLatin1String("ApplicationIcon")); - const QString CacheDirKey(QLatin1String("CacheDirectory")); - const QString CacheDirRelativeToCollectionKey(QLatin1String("CacheDirRelativeToCollection")); - const QString CreationTimeKey(QLatin1String("CreationTime")); - const QString DefaultHomePageKey(QLatin1String("defaultHomepage")); - const QString EnableAddressBarKey(QLatin1String("EnableAddressBar")); - const QString EnableDocManagerKey(QLatin1String("EnableDocumentationManager")); - const QString EnableFilterKey(QLatin1String("EnableFilterFunctionality")); - const QString HideAddressBarKey(QLatin1String("HideAddressBar")); - const QString FilterToolbarHiddenKey(QLatin1String("HideFilterFunctionality")); - const QString LastPageKey(QLatin1String("LastTabPage")); - const QString LastRegisterTime(QLatin1String("LastRegisterTime")); - const QString LastShownPagesKey(QLatin1String("LastShownPages")); - const QString LastZoomFactorsKey(QLatin1String( + const QString AboutIconKey("AboutIcon"_L1); + const QString AboutImagesKey("AboutImages"_L1); + const QString AboutMenuTextsKey("AboutMenuTexts"_L1); + const QString AboutTextsKey("AboutTexts"_L1); + const QString ApplicationIconKey("ApplicationIcon"_L1); + const QString CacheDirKey("CacheDirectory"_L1); + const QString CacheDirRelativeToCollectionKey("CacheDirRelativeToCollection"_L1); + const QString CreationTimeKey("CreationTime"_L1); + const QString DefaultHomePageKey("defaultHomepage"_L1); + const QString EnableAddressBarKey("EnableAddressBar"_L1); + const QString EnableDocManagerKey("EnableDocumentationManager"_L1); + const QString EnableFilterKey("EnableFilterFunctionality"_L1); + const QString HideAddressBarKey("HideAddressBar"_L1); + const QString FilterToolbarHiddenKey("HideFilterFunctionality"_L1); + const QString LastPageKey("LastTabPage"_L1); + const QString LastRegisterTime("LastRegisterTime"_L1); + const QString LastShownPagesKey("LastShownPages"_L1); + const QString LastZoomFactorsKey( #if defined(BROWSER_QTWEBKIT) - "LastPagesZoomWebView" + "LastPagesZoomWebView"_L1 #else - "LastPagesZoomTextBrowser" + "LastPagesZoomTextBrowser"_L1 #endif - )); - const QString WindowTitleKey(QLatin1String("WindowTitle")); - const QString FullTextSearchFallbackKey(QLatin1String("FullTextSearchFallback")); + ); + const QString WindowTitleKey("WindowTitle"_L1); + const QString FullTextSearchFallbackKey("FullTextSearchFallback"_L1); } // anonymous namespace -const QString CollectionConfiguration::DefaultZoomFactor(QLatin1String("0.0")); -const QString CollectionConfiguration::ListSeparator(QLatin1String("|")); +const QString CollectionConfiguration::DefaultZoomFactor("0.0"_L1); +const QString CollectionConfiguration::ListSeparator("|"_L1); uint CollectionConfiguration::creationTime(const QHelpEngineCore &helpEngine) { @@ -226,8 +192,7 @@ void CollectionConfiguration::setAboutImages(QHelpEngineCore &helpEngine, const QString CollectionConfiguration::defaultHomePage(const QHelpEngineCore &helpEngine) { - return helpEngine.customValue(DefaultHomePageKey, QLatin1String("help")). - toString(); + return helpEngine.customValue(DefaultHomePageKey, "help"_L1).toString(); } void CollectionConfiguration::setDefaultHomePage(QHelpEngineCore &helpEngine, |