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
628ea4b7
Commit
628ea4b7
authored
May 11, 2021
by
Ingo Klöcker
Browse files
Always add the Tags column to the model
It has to be hidden by the user of the model. GnuPG-bug-id: 5245
parent
32a3eb6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/models/useridlistmodel.cpp
View file @
628ea4b7
...
...
@@ -50,15 +50,15 @@ public:
<<
Formatting
::
validityShort
(
sig
)
<<
(
sig
.
isExportable
()
?
QStringLiteral
(
"✓"
)
:
QString
());
QString
lastNotation
;
if
(
showRemarks
&&
parentItem
)
{
QString
lastNotation
;
for
(
const
auto
&
notation
:
sig
.
notations
())
{
if
(
notation
.
name
()
&&
!
strcmp
(
notation
.
name
(),
"rem@gnupg.org"
))
{
lastNotation
=
QString
::
fromUtf8
(
notation
.
value
());
}
}
mItemData
<<
lastNotation
;
}
mItemData
<<
lastNotation
;
}
explicit
UIDModelItem
(
const
UserID
&
uid
,
UIDModelItem
*
parentItem
)
...
...
@@ -69,7 +69,7 @@ public:
}
// The root item
explicit
UIDModelItem
(
bool
showRemarks
)
UIDModelItem
()
{
mItemData
<<
i18n
(
"ID"
)
<<
i18n
(
"Name"
)
...
...
@@ -77,11 +77,8 @@ public:
<<
i18n
(
"Valid From"
)
<<
i18n
(
"Valid Until"
)
<<
i18n
(
"Status"
)
<<
i18n
(
"Exportable"
);
if
(
showRemarks
)
{
mItemData
<<
i18n
(
"Tags"
);
}
<<
i18n
(
"Exportable"
)
<<
i18n
(
"Tags"
);
}
~
UIDModelItem
()
...
...
@@ -191,7 +188,7 @@ void UserIDListModel::setKey(const Key &key)
beginResetModel
();
mKey
=
key
;
mRootItem
.
reset
(
new
UIDModelItem
(
mRemarksEnabled
)
);
mRootItem
.
reset
(
new
UIDModelItem
);
for
(
int
i
=
0
,
ids
=
key
.
numUserIDs
();
i
<
ids
;
++
i
)
{
UserID
uid
=
key
.
userID
(
i
);
auto
uidItem
=
new
UIDModelItem
(
uid
,
mRootItem
.
get
());
...
...
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