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
Akonadi Contacts
Commits
553f99db
Commit
553f99db
authored
Jul 14, 2021
by
Laurent Montel
😁
Browse files
Make sure that we don't cancel dialog
parent
0519ad90
Pipeline
#70666
skipped
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/contact-editor/editor/widgets/imagewidget.cpp
View file @
553f99db
...
...
@@ -267,14 +267,17 @@ void ImageWidget::changeUrl()
if
(
mReadOnly
)
{
return
;
}
const
QString
path
=
QInputDialog
::
getText
(
this
,
i18n
(
"Change image URL"
),
i18n
(
"Image URL:"
),
QLineEdit
::
Normal
,
mPicture
.
url
());
if
(
!
path
.
isEmpty
())
{
bool
ok
;
const
QImage
image
=
imageLoader
()
->
loadImage
(
QUrl
(
path
),
&
ok
,
false
);
if
(
ok
&&
!
image
.
isNull
())
{
mPicture
.
setUrl
(
path
);
mHasImage
=
true
;
updateView
();
bool
okPath
=
false
;
const
QString
path
=
QInputDialog
::
getText
(
this
,
i18n
(
"Change image URL"
),
i18n
(
"Image URL:"
),
QLineEdit
::
Normal
,
mPicture
.
url
(),
&
okPath
);
if
(
okPath
)
{
if
(
!
path
.
isEmpty
())
{
bool
ok
;
const
QImage
image
=
imageLoader
()
->
loadImage
(
QUrl
(
path
),
&
ok
,
false
);
if
(
ok
&&
!
image
.
isNull
())
{
mPicture
.
setUrl
(
path
);
mHasImage
=
true
;
updateView
();
}
}
}
}
...
...
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