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
Plasma
Milou
Commits
7f936de1
Verified
Commit
7f936de1
authored
Apr 11, 2021
by
Alexander Lohnau
💬
Browse files
Allow runners to display multiline display text
CCBUG: 395376 Counterpart of
frameworks/krunner!65
parent
bfa1ee49
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/qml/ResultDelegate.qml
View file @
7f936de1
...
...
@@ -192,8 +192,8 @@ MouseArea {
height
:
undefined
elide
:
Text
.
ElideMiddle
wrapMode
:
Text
.
NoWrap
maximumLineCount
:
1
wrapMode
:
model
.
multiLine
?
Text
.
WordWrap
:
Text
.
NoWrap
maximumLineCount
:
model
.
multiLine
?
Infinity
:
1
verticalAlignment
:
Text
.
AlignVCenter
textFormat
:
Text
.
PlainText
...
...
lib/resultsmodel.cpp
View file @
7f936de1
...
...
@@ -419,6 +419,7 @@ QHash<int, QByteArray> ResultsModel::roleNames() const
names
[
SubtextRole
]
=
QByteArrayLiteral
(
"subtext"
);
names
[
DuplicateRole
]
=
QByteArrayLiteral
(
"isDuplicate"
);
names
[
ActionsRole
]
=
QByteArrayLiteral
(
"actions"
);
names
[
MultiLineRole
]
=
QByteArrayLiteral
(
"multiLine"
);
return
names
;
}
...
...
lib/resultsmodel.h
View file @
7f936de1
...
...
@@ -65,6 +65,7 @@ public:
SubtextRole
,
DuplicateRole
,
ActionsRole
,
MultiLineRole
,
};
Q_ENUM
(
Roles
)
...
...
lib/runnerresultsmodel.cpp
View file @
7f936de1
...
...
@@ -300,6 +300,8 @@ QVariant RunnerResultsModel::data(const QModelIndex &index, int role) const
return
match
.
matchCategory
();
case
ResultsModel
::
SubtextRole
:
return
match
.
subtext
();
case
ResultsModel
::
MultiLineRole
:
return
match
.
isMultiLine
();
case
ResultsModel
::
ActionsRole
:
{
const
auto
actions
=
m_manager
->
actionsForMatch
(
match
);
if
(
actions
.
isEmpty
())
{
...
...
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