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
Akonadi Contacts
Commits
834bcde3
Commit
834bcde3
authored
Feb 03, 2016
by
Laurent Montel
Browse files
Allow to remove/modify address
parent
46be6043
Changes
3
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/editor/addresseditor/addresseslocationviewer.cpp
View file @
834bcde3
...
...
@@ -31,6 +31,7 @@ AddressesLocationViewer::AddressesLocationViewer(QWidget *parent)
mAddressesLocationGrantleeFormatter
(
new
AddressesLocationGrantleeFormater
(
this
))
{
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
page
()
->
setLinkDelegationPolicy
(
QWebPage
::
DelegateAllLinks
);
settings
()
->
setAttribute
(
QWebSettings
::
JavascriptEnabled
,
false
);
settings
()
->
setAttribute
(
QWebSettings
::
JavaEnabled
,
false
);
settings
()
->
setAttribute
(
QWebSettings
::
PluginsEnabled
,
false
);
...
...
@@ -46,6 +47,7 @@ AddressesLocationViewer::~AddressesLocationViewer()
void
AddressesLocationViewer
::
slotLinkClicked
(
const
QUrl
&
url
)
{
qDebug
()
<<
" url "
<<
url
;
if
(
url
.
scheme
()
==
QLatin1String
(
"addresslocationaction"
))
{
const
QString
urlPath
(
url
.
path
());
if
(
url
.
hasQuery
())
{
...
...
akonadi-contact/src/editor/addresseditor/addresslocationwidget.cpp
View file @
834bcde3
...
...
@@ -32,6 +32,7 @@
#include
<QLabel>
#include
<QCheckBox>
#include
<QPushButton>
#include
<QDebug>
AddressLocationWidget
::
AddressLocationWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
...
...
@@ -171,6 +172,7 @@ KContacts::Address AddressLocationWidget::address() const
void
AddressLocationWidget
::
slotModifyAddress
(
const
KContacts
::
Address
&
address
,
int
currentIndex
)
{
qDebug
()
<<
" void AddressLocationWidget::slotModifyAddress(const KContacts::Address &address, int currentIndex)"
<<
currentIndex
;
setAddress
(
address
);
//TODO store currentIndex.
//TODO
...
...
akonadi-contact/src/editor/addresseditor/html/default/addresseslocation.html
View file @
834bcde3
...
...
@@ -6,7 +6,8 @@
<body>
{% if addresses %}
{% for address in addresses %}
<div>
{{ address.formattedAddress }}
</div>
<div>
{{ address.formattedAddress }} {{ address.modifyAddressAction|safe}} {{ address.removeAddressAction|safe}}
</div>
</br>
{% endfor %}
{% endif %}
...
...
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