Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
e40bb2da
Commit
e40bb2da
authored
Feb 17, 2022
by
Laurent Montel
Browse files
Fix display text
parent
894899b1
Pipeline
#138877
passed with stage
in 10 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurewidget.cpp
View file @
e40bb2da
...
...
@@ -71,13 +71,18 @@ OpenUrlWithConfigureWidget::~OpenUrlWithConfigureWidget()
{
}
void
OpenUrlWithConfigureWidget
::
displayText
(
const
MessageViewer
::
OpenWithUrlInfo
&
r
,
OpenUrlWithConfigureItem
*
item
)
{
item
->
setInfo
(
r
);
item
->
setText
(
QStringLiteral
(
"%1 (%2)"
).
arg
(
r
.
command
()
+
r
.
commandLine
(),
r
.
url
()));
}
void
OpenUrlWithConfigureWidget
::
loadSettings
()
{
const
QVector
<
MessageViewer
::
OpenWithUrlInfo
>
rules
=
MessageViewer
::
OpenUrlWithManager
::
self
()
->
openWithUrlInfo
();
for
(
const
MessageViewer
::
OpenWithUrlInfo
&
r
:
rules
)
{
auto
item
=
new
OpenUrlWithConfigureItem
(
mListWidget
);
item
->
setInfo
(
r
);
item
->
setText
(
r
.
command
());
displayText
(
r
,
item
);
}
}
...
...
@@ -114,7 +119,7 @@ void OpenUrlWithConfigureWidget::slotAddRule()
}
}
auto
item
=
new
OpenUrlWithConfigureItem
(
mListWidget
);
item
->
setInfo
(
r
);
displayText
(
r
,
item
);
}
}
delete
dlg
;
...
...
@@ -137,8 +142,7 @@ void OpenUrlWithConfigureWidget::slotEditRule()
r
.
setCommand
(
info
.
command
);
r
.
setCommandLine
(
info
.
commandLines
);
r
.
setUrl
(
info
.
url
);
item
->
setInfo
(
r
);
item
->
setText
(
info
.
command
);
displayText
(
r
,
item
);
}
}
delete
dlg
;
...
...
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurewidget.h
View file @
e40bb2da
...
...
@@ -9,6 +9,11 @@
#include
"openurlwith_private_export.h"
#include
<QWidget>
class
QListWidget
;
class
OpenUrlWithConfigureItem
;
namespace
MessageViewer
{
class
OpenWithUrlInfo
;
}
class
LIBOPENURLWITHCONFIGURE_TESTS_EXPORT
OpenUrlWithConfigureWidget
:
public
QWidget
{
Q_OBJECT
...
...
@@ -23,5 +28,6 @@ private:
void
slotAddRule
();
void
slotEditRule
();
void
slotRemoveRule
();
void
displayText
(
const
MessageViewer
::
OpenWithUrlInfo
&
r
,
OpenUrlWithConfigureItem
*
item
);
QListWidget
*
const
mListWidget
;
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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