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
894899b1
Commit
894899b1
authored
Feb 17, 2022
by
Laurent Montel
Browse files
Avoid to duplicate rule
parent
4495c9b3
Pipeline
#138876
passed with stage
in 11 minutes and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
894899b1
...
...
@@ -79,7 +79,7 @@ set(LIBKLEO_LIB_VERSION "5.19.40")
set
(
AKONADI_LIB_VERSION
"5.19.40"
)
set
(
INCIDENCEEDITOR_LIB_VERSION
"5.19.40"
)
set
(
KTNEF_LIB_VERSION
"5.19.40"
)
set
(
MESSAGELIB_LIB_VERSION
"5.19.4
3
"
)
set
(
MESSAGELIB_LIB_VERSION
"5.19.4
4
"
)
set
(
AKONADICALENDAR_LIB_VERSION
"5.19.40"
)
set
(
CALENDAR_UTILS_VERSION
"5.19.40"
)
set
(
KPIMTEXTEDIT_LIB_VERSION
"5.19.40"
)
...
...
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurewidget.cpp
View file @
894899b1
...
...
@@ -99,11 +99,21 @@ void OpenUrlWithConfigureWidget::slotAddRule()
if
(
dlg
->
exec
())
{
const
OpenUrlWithConfigureCreateWidget
::
OpenUrlWithInfo
info
=
dlg
->
info
();
if
(
info
.
isValid
())
{
auto
item
=
new
OpenUrlWithConfigureItem
(
mListWidget
);
MessageViewer
::
OpenWithUrlInfo
r
;
r
.
setCommand
(
info
.
command
);
r
.
setCommandLine
(
info
.
commandLines
);
r
.
setUrl
(
info
.
url
);
for
(
int
i
=
0
,
total
=
mListWidget
->
count
();
i
<
total
;
++
i
)
{
OpenUrlWithConfigureItem
*
item
=
static_cast
<
OpenUrlWithConfigureItem
*>
(
mListWidget
->
item
(
i
));
const
MessageViewer
::
OpenWithUrlInfo
openInfo
=
item
->
info
();
if
(
openInfo
==
r
)
{
KMessageBox
::
information
(
this
,
i18n
(
"Rule already exists."
),
i18n
(
"Duplicate Rule"
));
delete
dlg
;
return
;
}
}
auto
item
=
new
OpenUrlWithConfigureItem
(
mListWidget
);
item
->
setInfo
(
r
);
}
}
...
...
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