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
Akonadi
Commits
b4d98e03
Commit
b4d98e03
authored
Aug 06, 2020
by
David Faure
Browse files
Repair tagmodeltest, which requires these Q_PRIVATE_SLOT declarations
This is a (very) partial revert of commit
b5a23bfe
("clazy fixes")
parent
7c6c2b97
Pipeline
#30649
passed with stage
in 34 minutes and 44 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
autotests/libs/fakeakonadiservercommand.cpp
View file @
b4d98e03
...
...
@@ -48,13 +48,16 @@ void FakeAkonadiServerCommand::connectForwardingSignals()
const
auto
*
mo
=
FakeAkonadiServerCommand
::
metaObject
();
for
(
int
methodIndex
=
0
;
methodIndex
<
mo
->
methodCount
();
++
methodIndex
)
{
const
QMetaMethod
mm
=
mo
->
method
(
methodIndex
);
QByteArray
signature
=
mm
.
methodSignature
();
const
QByteArray
signature
=
mm
.
methodSignature
();
if
(
mm
.
methodType
()
==
QMetaMethod
::
Signal
)
{
if
((
qobject_cast
<
TagModel
*>
(
m_model
)
&&
isTagSignal
(
signature
))
||
(
qobject_cast
<
EntityTreeModel
*>
(
m_model
)
&&
(
isCollectionSignal
(
signature
)
||
isItemSignal
(
signature
))))
{
const
int
modelSlotIndex
=
m_model
->
metaObject
()
->
indexOfSlot
(
signature
.
remove
(
0
,
5
).
constData
());
Q_ASSERT
(
modelSlotIndex
>=
0
);
const
int
modelSlotIndex
=
m_model
->
metaObject
()
->
indexOfSlot
(
signature
.
mid
(
5
).
constData
());
if
(
modelSlotIndex
<
0
)
{
qWarning
()
<<
"Slot not found in"
<<
m_model
->
metaObject
()
->
className
()
<<
":"
<<
signature
.
mid
(
5
).
constData
();
Q_ASSERT
(
modelSlotIndex
>=
0
);
}
mo
->
connect
(
this
,
methodIndex
,
m_model
,
modelSlotIndex
);
}
}
...
...
src/core/models/tagmodel.h
View file @
b4d98e03
...
...
@@ -70,6 +70,11 @@ private:
bool
insertColumns
(
int
column
,
int
count
,
const
QModelIndex
&
index
=
QModelIndex
())
override
;
bool
removeColumns
(
int
column
,
int
count
,
const
QModelIndex
&
index
=
QModelIndex
())
override
;
bool
removeRows
(
int
row
,
int
count
,
const
QModelIndex
&
index
=
QModelIndex
())
override
;
// Used by FakeAkonadiServerCommand::connectForwardingSignals (tagmodeltest)
Q_PRIVATE_SLOT
(
d_func
(),
void
tagsFetched
(
const
Akonadi
::
Tag
::
List
&
tags
))
Q_PRIVATE_SLOT
(
d_func
(),
void
monitoredTagAdded
(
const
Akonadi
::
Tag
&
tag
))
Q_PRIVATE_SLOT
(
d_func
(),
void
monitoredTagRemoved
(
const
Akonadi
::
Tag
&
tag
))
Q_PRIVATE_SLOT
(
d_func
(),
void
monitoredTagChanged
(
const
Akonadi
::
Tag
&
tag
))
};
}
...
...
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