Commit 834bcde3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to remove/modify address

parent 46be6043
......@@ -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()) {
......
......@@ -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
......
......@@ -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 %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment