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
PIM EventViews
Commits
f75ec56e
Commit
f75ec56e
authored
Mar 06, 2022
by
Laurent Montel
Browse files
Fix some compile error against qt6
parent
94610f4b
Pipeline
#145879
passed with stage
in 2 minutes and 1 second
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/agenda/agenda.cpp
View file @
f75ec56e
...
...
@@ -203,7 +203,7 @@ public:
,
mWorkingHoursYTop
(
0
)
,
mWorkingHoursYBottom
(
0
)
,
mHasSelection
(
false
)
,
mSelectedId
(
-
1
)
,
mSelectedId
(
QChar
(
-
1
)
)
,
mMarcusBains
(
nullptr
)
,
mActionType
(
Agenda
::
NOP
)
,
mItemMoved
(
false
)
...
...
@@ -406,7 +406,7 @@ void Agenda::init()
d
->
mItemMoved
=
false
;
d
->
mSelectedItem
=
nullptr
;
d
->
mSelectedId
=
-
1
;
d
->
mSelectedId
=
QChar
(
-
1
)
;
setAcceptDrops
(
true
);
installEventFilter
(
this
);
...
...
src/agenda/agendaitem.cpp
View file @
f75ec56e
...
...
@@ -1027,7 +1027,11 @@ void AgendaItem::paintEvent(QPaintEvent *ev)
p
.
setBackground
(
QBrush
(
bgColor
));
p
.
setPen
(
textColor
);
QString
ws
=
ww
.
wrappedString
();
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
if
(
ws
.
leftRef
(
ws
.
length
()
-
1
).
indexOf
(
QLatin1Char
(
'\n'
))
>=
0
)
{
#else
if
(
QStringView
(
ws
).
left
(
ws
.
length
()
-
1
).
indexOf
(
QLatin1Char
(
'\n'
))
>=
0
)
{
#endif
ww
.
drawText
(
&
p
,
eventX
,
y
,
Qt
::
AlignLeft
|
KWordWrap
::
FadeOut
);
}
else
{
ww
.
drawText
(
&
p
,
eventX
+
(
txtWidth
-
ww
.
boundingRect
().
width
()
-
2
*
margin
)
/
2
,
y
,
Qt
::
AlignHCenter
|
KWordWrap
::
FadeOut
);
...
...
src/agenda/viewcalendar.cpp
View file @
f75ec56e
...
...
@@ -8,8 +8,8 @@
#include
"agendaview.h"
#include
"calendarview_debug.h"
#include
"helper.h"
#include
<CalendarSupport/Utils>
#include
<QSharedPointer>
using
namespace
EventViews
;
...
...
@@ -96,13 +96,13 @@ QString MultiViewCalendar::iconForIncidence(const KCalendarCore::Incidence::Ptr
bool
MultiViewCalendar
::
isValid
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
)
const
{
ViewCalendar
::
Ptr
cal
=
findCalendar
(
incidence
);
return
cal
;
return
!
cal
.
isNull
()
;
}
bool
MultiViewCalendar
::
isValid
(
const
QString
&
incidenceIdentifier
)
const
{
ViewCalendar
::
Ptr
cal
=
findCalendar
(
incidenceIdentifier
);
return
cal
;
return
!
cal
.
isNull
()
;
}
QColor
MultiViewCalendar
::
resourceColor
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
)
const
...
...
src/whatsnext/whatsnextview.cpp
View file @
f75ec56e
...
...
@@ -17,8 +17,11 @@
#include
<QBoxLayout>
using
namespace
EventViews
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
WhatsNextTextBrowser
::
setSource
(
const
QUrl
&
name
)
#else
void
WhatsNextTextBrowser
::
doSetSource
(
const
QUrl
&
name
,
QTextDocument
::
ResourceType
type
)
#endif
{
const
QString
uri
=
name
.
toString
();
if
(
uri
.
startsWith
(
QLatin1String
(
"event:"
)))
{
...
...
src/whatsnext/whatsnextview.h
View file @
f75ec56e
...
...
@@ -28,7 +28,11 @@ public:
}
/** Reimplemented from QTextBrowser to handle links. */
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void
setSource
(
const
QUrl
&
name
)
override
;
#else
void
doSetSource
(
const
QUrl
&
name
,
QTextDocument
::
ResourceType
type
=
QTextDocument
::
UnknownResource
)
override
;
#endif
Q_SIGNALS:
void
showIncidence
(
const
QString
&
uid
);
...
...
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