Commit 4725dc24 authored by Sergio Martins's avatar Sergio Martins
Browse files

Avoid QLatin1String wherever it allocates heap memory

parent d34a3653
......@@ -76,7 +76,7 @@ AutostartApp::AutostartApp()
void AutostartApp::slotAutostart()
{
QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String(KALARM_DBUS_SERVICE));
QDBusReply<bool> reply = QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral(KALARM_DBUS_SERVICE));
if (reply.isValid() && reply.value())
qCDebug(KALARMAUTOSTART_LOG) << "KAlarm already running";
else
......
......@@ -1331,7 +1331,7 @@ void outputAlarmWarnings(QWidget* parent, const KAEvent* event)
{
if (KAMessageBox::warningYesNo(parent, xi18nc("@info", "<para>Alarms are currently disabled.</para><para>Do you want to enable alarms now?</para>"),
QString(), KGuiItem(i18nc("@action:button", "Enable")), KGuiItem(i18nc("@action:button", "Keep Disabled")),
QLatin1String("EditEnableAlarms"))
QStringLiteral("EditEnableAlarms"))
== KMessageBox::Yes)
theApp()->setAlarmsEnabled(true);
}
......
......@@ -168,7 +168,7 @@ KAlarmApp::KAlarmApp()
mSpeechEnabled = (KServiceTypeTrader::self()->query(QStringLiteral("DBUS/Text-to-Speech"), QStringLiteral("Name == 'KTTSD'")).count() > 0);
if (!mSpeechEnabled) { qCDebug(KALARM_LOG) << "Speech synthesis disabled (KTTSD not found)"; }
// Check if KOrganizer is installed
const QString korg = QLatin1String("korganizer");
const QString korg = QStringLiteral("korganizer");
mKOrganizerEnabled = !QStandardPaths::findExecutable(korg).isNull() || !KStandardDirs::findExe(korg).isNull();
if (!mKOrganizerEnabled) { qCDebug(KALARM_LOG) << "KOrganizer options disabled (KOrganizer not found)"; }
}
......@@ -2025,7 +2025,7 @@ ShellProcess* KAlarmApp::doShellCommand(const QString& command, const KAEvent& e
heading.sprintf("\n******* KAlarm %s *******\n", dateTime.toLatin1().data());
}
else
heading = QLatin1String("\n******* KAlarm *******\n");
heading = QStringLiteral("\n******* KAlarm *******\n");
QFile logfile(event.logFile());
if (logfile.open(QIODevice::Append | QIODevice::Text))
{
......@@ -2224,19 +2224,19 @@ void KAlarmApp::commandErrorMsg(const ShellProcess* proc, const KAEvent& event,
if (event.extraActionOptions() & KAEvent::DontShowPreActError)
return; // don't notify user of any errors for the alarm
errmsgs += i18nc("@info", "Pre-alarm action:");
dontShowAgain = QLatin1String("Pre");
dontShowAgain = QStringLiteral("Pre");
cmderr = KAEvent::CMD_ERROR_PRE;
}
else if (flags & ProcData::POST_ACTION)
{
errmsgs += i18nc("@info", "Post-alarm action:");
dontShowAgain = QLatin1String("Post");
dontShowAgain = QStringLiteral("Post");
cmderr = (event.commandError() == KAEvent::CMD_ERROR_PRE)
? KAEvent::CMD_ERROR_PRE_POST : KAEvent::CMD_ERROR_POST;
}
else
{
dontShowAgain = QLatin1String("Exec");
dontShowAgain = QStringLiteral("Exec");
cmderr = KAEvent::CMD_ERROR;
}
......
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