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
libkdepim
Commits
5923142b
Commit
5923142b
authored
Oct 14, 2021
by
Laurent Montel
😁
Browse files
Allow to show or not dialogbox
parent
55c24f5a
Pipeline
#88671
passed with stage
in 4 minutes and 33 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
5923142b
cmake_minimum_required
(
VERSION 3.16 FATAL_ERROR
)
set
(
PIM_VERSION
"5.18.4
0
"
)
set
(
PIM_VERSION
"5.18.4
1
"
)
project
(
libkdepim VERSION
${
PIM_VERSION
}
)
...
...
src/libkdepim/multiplyingline/multiplyinglineeditor.cpp
View file @
5923142b
...
...
@@ -36,12 +36,12 @@ MultiplyingLineEditor::~MultiplyingLineEditor()
delete
mMultiplyingLineFactory
;
}
bool
MultiplyingLineEditor
::
addData
(
const
MultiplyingLineData
::
Ptr
&
data
)
bool
MultiplyingLineEditor
::
addData
(
const
MultiplyingLineData
::
Ptr
&
data
,
bool
showDialogBox
)
{
MultiplyingLine
*
line
=
mView
->
emptyLine
();
bool
tooManyAddress
=
false
;
if
(
!
line
)
{
line
=
mView
->
addLine
();
line
=
mView
->
addLine
(
showDialogBox
);
}
if
(
!
line
)
{
tooManyAddress
=
true
;
...
...
src/libkdepim/multiplyingline/multiplyinglineeditor.h
View file @
5923142b
...
...
@@ -105,7 +105,7 @@ public:
@param data The data you want to add.
Can be used to add an empty/default line.
*/
bool
addData
(
const
MultiplyingLineData
::
Ptr
&
data
=
MultiplyingLineData
::
Ptr
());
bool
addData
(
const
MultiplyingLineData
::
Ptr
&
data
=
MultiplyingLineData
::
Ptr
()
,
bool
showDialogBox
=
true
);
/** Removes data provided it can be found. The Data class must support operator==
@param data The data you want to add.
...
...
src/libkdepim/multiplyingline/multiplyinglineview_p.cpp
View file @
5923142b
...
...
@@ -53,13 +53,15 @@ MultiplyingLine *MultiplyingLineView::emptyLine() const
return
nullptr
;
}
MultiplyingLine
*
MultiplyingLineView
::
addLine
()
MultiplyingLine
*
MultiplyingLineView
::
addLine
(
bool
showDialogBox
)
{
const
int
maximumRecipients
=
mMultiplyingLineFactory
->
maximumRecipients
();
if
(
maximumRecipients
!=
-
1
)
{
int
numberOfLine
=
mLines
.
count
();
if
(
numberOfLine
++
>=
maximumRecipients
)
{
KMessageBox
::
sorry
(
this
,
i18n
(
"We can not add more recipients. We have reached maximum recipients"
));
if
(
showDialogBox
)
{
KMessageBox
::
sorry
(
this
,
i18n
(
"We can not add more recipients. We have reached maximum recipients"
));
}
return
nullptr
;
}
...
...
@@ -103,7 +105,7 @@ void MultiplyingLineView::slotReturnPressed(MultiplyingLine *line)
if
(
!
line
->
data
()
->
isEmpty
())
{
MultiplyingLine
*
empty
=
emptyLine
();
if
(
!
empty
)
{
empty
=
addLine
();
empty
=
addLine
(
true
);
}
if
(
!
empty
)
{
return
;
...
...
src/libkdepim/multiplyingline/multiplyinglineview_p.h
View file @
5923142b
...
...
@@ -78,10 +78,10 @@ public:
bool
dynamicSizeHint
()
const
;
QList
<
MultiplyingLine
*>
lines
()
const
;
MultiplyingLine
*
addLine
(
bool
showDialogBox
);
public
Q_SLOTS
:
void
setCompletionMode
(
KCompletion
::
CompletionMode
mode
);
MultiplyingLine
*
addLine
();
void
setFocus
();
void
setFocusTop
();
...
...
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