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
KMail
Commits
f3a14f84
Commit
f3a14f84
authored
Feb 08, 2021
by
Laurent Montel
😁
Browse files
const'ify
parent
db20410a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/configuredialog/configagentdelegate.cpp
View file @
f3a14f84
...
...
@@ -54,8 +54,8 @@ QTextDocument *ConfigAgentDelegate::document(const QStyleOptionViewItem &option,
}
const
QString
name
=
index
.
model
()
->
data
(
index
,
Qt
::
DisplayRole
).
toString
();
int
status
=
index
.
model
()
->
data
(
index
,
AgentInstanceModel
::
StatusRole
).
toInt
();
uint
progress
=
index
.
model
()
->
data
(
index
,
AgentInstanceModel
::
ProgressRole
).
toUInt
();
const
int
status
=
index
.
model
()
->
data
(
index
,
AgentInstanceModel
::
StatusRole
).
toInt
();
const
uint
progress
=
index
.
model
()
->
data
(
index
,
AgentInstanceModel
::
ProgressRole
).
toUInt
();
const
QString
statusMessage
=
index
.
model
()
->
data
(
index
,
AgentInstanceModel
::
StatusMessageRole
).
toString
();
auto
document
=
new
QTextDocument
(
nullptr
);
...
...
@@ -214,8 +214,8 @@ QStyleOptionButton ConfigAgentDelegate::buttonOption(const QStyleOptionViewItem
const
QString
label
=
i18n
(
"Retrieval Options"
);
QStyleOptionButton
buttonOpt
;
QRect
buttonRect
=
option
.
rect
;
int
height
=
option
.
rect
.
height
()
/
2
;
int
width
=
22
+
option
.
fontMetrics
.
boundingRect
(
label
).
width
()
+
40
;
// icon size + label size + arrow and padding
const
int
height
=
option
.
rect
.
height
()
/
2
;
const
int
width
=
22
+
option
.
fontMetrics
.
boundingRect
(
label
).
width
()
+
40
;
// icon size + label size + arrow and padding
buttonRect
.
setTop
(
0
);
buttonRect
.
setHeight
(
height
);
buttonRect
.
setLeft
(
option
.
rect
.
right
()
-
width
);
...
...
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