Commit 646bcc1d authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral

parent d385704c
......@@ -38,7 +38,7 @@ const static QString lcLanguage = QStringLiteral("LANGUAGE");
void writeExports()
{
const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/" + exportFile;
const QString configPath = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + exportFile;
QString script(QStringLiteral("# Generated script, do not edit\n"));
script.append(QLatin1String("# Exports language-format specific env vars from startkde.\n"));
......
......@@ -36,9 +36,9 @@ LaunchFeedback::LaunchFeedback(QObject *parent, const QVariantList &args)
, m_taskManagerNotification(true)
, m_notificationTimeout(STARTUP_DEFAULT_TIMEOUT)
{
KAboutData *about = new KAboutData("kcm_launchfeedback",
KAboutData *about = new KAboutData(QStringLiteral("kcm_launchfeedback"),
i18n("Configure application launch feedback"),
"0.2", QString(), KAboutLicense::LGPL);
QStringLiteral("0.2"), QString(), KAboutLicense::LGPL);
setAboutData(about);
setButtons(Apply | Default);
......
......@@ -309,7 +309,7 @@ void KCMLookandFeel::save()
setColors(package.metadata().name(), colorsFile);
}
} else if (!colorScheme.isEmpty()) {
colorScheme.remove('\''); // So Foo's does not become FooS
colorScheme.remove(QLatin1Char('\'')); // So Foo's does not become FooS
QRegExp fixer(QStringLiteral("[\\W,.-]+(.?)"));
int offset;
while ((offset = fixer.indexIn(colorScheme)) >= 0) {
......@@ -597,7 +597,7 @@ QDir KCMLookandFeel::cursorThemeDir(const QString &theme, const int depth)
}
// Open the index.theme file, so we can get the list of inherited themes
KConfig config(dir.path() + "/index.theme", KConfig::NoGlobals);
KConfig config(dir.path() + QStringLiteral("/index.theme"), KConfig::NoGlobals);
KConfigGroup cg(&config, "Icon Theme");
// Recurse through the list of inherited themes, to check if one of them
......
......@@ -43,8 +43,8 @@ KCMQtQuickSettingsModule::KCMQtQuickSettingsModule(QWidget *parent, const QVaria
m_ui->setupUi(this);
m_ui->backendCombo->addItem(i18n("Automatic"), QVariant(QStringLiteral()));//so data matches empty config
m_ui->backendCombo->addItem(i18n("Open GL"), QVariant("opengl"));
m_ui->backendCombo->addItem(i18n("Software"), QVariant("software"));
m_ui->backendCombo->addItem(i18n("Open GL"), QVariant(QStringLiteral("opengl")));
m_ui->backendCombo->addItem(i18n("Software"), QVariant(QStringLiteral("software")));
m_ui->renderLoopCombo->addItem(i18n("Automatic"), QVariant(QStringLiteral()));
m_ui->renderLoopCombo->addItem(i18n("Basic"), QVariant(QStringLiteral("basic")));
......
......@@ -41,12 +41,12 @@ class KCMQtQuickSettingsModule : public KCModule
Q_OBJECT
public:
KCMQtQuickSettingsModule(QWidget *parent, const QVariantList &);
virtual ~KCMQtQuickSettingsModule();
explicit KCMQtQuickSettingsModule(QWidget *parent, const QVariantList &);
~KCMQtQuickSettingsModule() override;
void load() Q_DECL_OVERRIDE;
void save() Q_DECL_OVERRIDE;
void defaults() Q_DECL_OVERRIDE;
void load() override;
void save() override;
void defaults() override;
private:
QScopedPointer<Ui::KCMQtQuickSettingsWidget> m_ui;
......
......@@ -37,9 +37,9 @@ Translations::Translations(QObject *parent, const QVariantList &args)
, m_availableTranslationsModel(new AvailableTranslationsModel(this))
, m_everSaved(false)
{
KAboutData *about = new KAboutData("kcm_translations",
KAboutData *about = new KAboutData(QStringLiteral("kcm_translations"),
i18n("Configure Plasma translations"),
"2.0", QString(), KAboutLicense::LGPL);
QStringLiteral("2.0"), QString(), KAboutLicense::LGPL);
setAboutData(about);
setButtons(Apply | Default);
......@@ -82,7 +82,7 @@ bool Translations::everSaved() const
void Translations::load()
{
m_configuredLanguages = m_config.readEntry(lcLanguage,
QString()).split(':', QString::SkipEmptyParts);
QString()).split(QLatin1Char(':'), QString::SkipEmptyParts);
m_selectedTranslationsModel->setSelectedLanguages(m_configuredLanguages);
}
......
......@@ -41,7 +41,7 @@ class Translations : public KQuickAddons::ConfigModule
Q_PROPERTY(bool everSaved READ everSaved NOTIFY everSavedChanged)
public:
explicit Translations(QObject* parent = 0, const QVariantList &list = QVariantList());
explicit Translations(QObject* parent = nullptr, const QVariantList &list = QVariantList());
~Translations() override;
QAbstractItemModel* translationsModel() const;
......@@ -51,9 +51,9 @@ class Translations : public KQuickAddons::ConfigModule
bool everSaved() const;
public Q_SLOTS:
void load();
void save();
void defaults();
void load() override;
void save() override;
void defaults() override;
Q_SIGNALS:
void everSavedChanged() const;
......
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