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
libkleo
Commits
941f82fb
Commit
941f82fb
authored
May 11, 2021
by
Ingo Klöcker
Browse files
Add enum for model columns
GnuPG-bug-id: 5245
parent
4c8b79fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/useridlistmodel.cpp
View file @
941f82fb
...
...
@@ -127,15 +127,17 @@ public:
QVariant
toolTip
(
int
column
)
const
{
if
(
column
==
5
/*Status*/
)
{
return
i18n
(
"class %1"
,
mSig
.
certClass
());
if
(
!
mSig
.
isNull
())
{
if
(
column
==
static_cast
<
int
>
(
UserIDListModel
::
Column
::
Status
))
{
return
i18n
(
"class %1"
,
mSig
.
certClass
());
}
}
return
mItemData
.
value
(
column
);
}
QVariant
icon
(
int
column
)
const
{
if
(
!
mSig
.
isNull
()
&&
column
==
5
/*
Status
*/
)
{
if
(
!
mSig
.
isNull
()
&&
column
==
static_cast
<
int
>
(
UserIDListModel
::
Column
::
Status
)
)
{
return
Formatting
::
validityIcon
(
mSig
);
}
return
QVariant
();
...
...
src/models/useridlistmodel.h
View file @
941f82fb
...
...
@@ -27,6 +27,17 @@ class KLEO_EXPORT UserIDListModel : public QAbstractItemModel
{
Q_OBJECT
public:
enum
class
Column
{
Id
,
Name
,
Email
,
ValidFrom
,
ValidUntil
,
Status
,
Exportable
,
Tags
,
};
explicit
UserIDListModel
(
QObject
*
parent
=
nullptr
);
~
UserIDListModel
()
override
;
...
...
Write
Preview
Markdown
is supported
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