Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KCalUtils
Commits
5a6bb5f6
Commit
5a6bb5f6
authored
Sep 02, 2021
by
Laurent Montel
😁
Browse files
Fix some clazy warning
parent
39be443e
Pipeline
#78162
passed with stage
in 4 minutes and 42 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/testtodotooltip.cpp
View file @
5a6bb5f6
...
...
@@ -44,7 +44,7 @@ using namespace KCalUtils::IncidenceFormatter;
// Create a to-do that may or may not be an all-day to-do, may or may nor recur,
// and with the given start and due dates (which may be invalid).
// Other to-do fields are fixed.
static
KCalendarCore
::
Todo
::
Ptr
makeToDo
(
bool
allday
,
bool
recurs
,
QDateTime
dtStart
,
QDateTime
dtDue
)
static
KCalendarCore
::
Todo
::
Ptr
makeToDo
(
bool
allday
,
bool
recurs
,
const
QDateTime
&
dtStart
,
const
QDateTime
&
dtDue
)
{
KCalendarCore
::
Todo
::
Ptr
todo
{
new
KCalendarCore
::
Todo
};
todo
->
setSummary
(
SUMMARY
);
...
...
src/incidenceformatter.cpp
View file @
5a6bb5f6
...
...
@@ -3308,12 +3308,12 @@ QString IncidenceFormatter::recurrenceString(const Incidence::Ptr &incidence)
return
recurStr
;
}
QString
IncidenceFormatter
::
timeToString
(
const
QTime
&
time
,
bool
shortfmt
)
QString
IncidenceFormatter
::
timeToString
(
QTime
time
,
bool
shortfmt
)
{
return
QLocale
().
toString
(
time
,
shortfmt
?
QLocale
::
ShortFormat
:
QLocale
::
LongFormat
);
}
QString
IncidenceFormatter
::
dateToString
(
const
QDate
&
date
,
bool
shortfmt
)
QString
IncidenceFormatter
::
dateToString
(
QDate
date
,
bool
shortfmt
)
{
return
QLocale
().
toString
(
date
,
(
shortfmt
?
QLocale
::
ShortFormat
:
QLocale
::
LongFormat
));
}
...
...
src/incidenceformatter.h
View file @
5a6bb5f6
...
...
@@ -158,7 +158,7 @@ KCALUTILS_EXPORT QStringList reminderStringList(const KCalendarCore::Incidence::
@param shortfmt If true, display info in short format.
@see dateToString(), dateTimeToString().
*/
KCALUTILS_EXPORT
QString
timeToString
(
const
QTime
&
time
,
bool
shortfmt
=
true
);
KCALUTILS_EXPORT
QString
timeToString
(
QTime
time
,
bool
shortfmt
=
true
);
/**
Build a QString date representation of a QDate object.
...
...
@@ -167,7 +167,7 @@ KCALUTILS_EXPORT QString timeToString(const QTime &time, bool shortfmt = true);
@param shortfmt If true, display info in short format.
@see dateToString(), dateTimeToString().
*/
KCALUTILS_EXPORT
QString
dateToString
(
const
QDate
&
date
,
bool
shortfmt
=
true
);
KCALUTILS_EXPORT
QString
dateToString
(
QDate
date
,
bool
shortfmt
=
true
);
KCALUTILS_EXPORT
QString
formatStartEnd
(
const
QDateTime
&
start
,
const
QDateTime
&
end
,
bool
isAllDay
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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