Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
4725dc24
Commit
4725dc24
authored
Aug 15, 2015
by
Sergio Martins
Browse files
Avoid QLatin1String wherever it allocates heap memory
parent
d34a3653
Changes
3
Hide whitespace changes
Inline
Side-by-side
autostart/autostart.cpp
View file @
4725dc24
...
...
@@ -76,7 +76,7 @@ AutostartApp::AutostartApp()
void
AutostartApp
::
slotAutostart
()
{
QDBusReply
<
bool
>
reply
=
QDBusConnection
::
sessionBus
().
interface
()
->
isServiceRegistered
(
Q
Latin1
String
(
KALARM_DBUS_SERVICE
));
QDBusReply
<
bool
>
reply
=
QDBusConnection
::
sessionBus
().
interface
()
->
isServiceRegistered
(
QString
Literal
(
KALARM_DBUS_SERVICE
));
if
(
reply
.
isValid
()
&&
reply
.
value
())
qCDebug
(
KALARMAUTOSTART_LOG
)
<<
"KAlarm already running"
;
else
...
...
functions.cpp
View file @
4725dc24
...
...
@@ -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"
)),
Q
Latin1
String
(
"EditEnableAlarms"
))
QString
Literal
(
"EditEnableAlarms"
))
==
KMessageBox
::
Yes
)
theApp
()
->
setAlarmsEnabled
(
true
);
}
...
...
kalarmapp.cpp
View file @
4725dc24
...
...
@@ -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
=
Q
Latin1
String
(
"korganizer"
);
const
QString
korg
=
QString
Literal
(
"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
=
Q
Latin1
String
(
"
\n
******* KAlarm *******
\n
"
);
heading
=
QString
Literal
(
"
\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
=
Q
Latin1
String
(
"Pre"
);
dontShowAgain
=
QString
Literal
(
"Pre"
);
cmderr
=
KAEvent
::
CMD_ERROR_PRE
;
}
else
if
(
flags
&
ProcData
::
POST_ACTION
)
{
errmsgs
+=
i18nc
(
"@info"
,
"Post-alarm action:"
);
dontShowAgain
=
Q
Latin1
String
(
"Post"
);
dontShowAgain
=
QString
Literal
(
"Post"
);
cmderr
=
(
event
.
commandError
()
==
KAEvent
::
CMD_ERROR_PRE
)
?
KAEvent
::
CMD_ERROR_PRE_POST
:
KAEvent
::
CMD_ERROR_POST
;
}
else
{
dontShowAgain
=
Q
Latin1
String
(
"Exec"
);
dontShowAgain
=
QString
Literal
(
"Exec"
);
cmderr
=
KAEvent
::
CMD_ERROR
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment