Commit 0427113c authored by Laurent Montel's avatar Laurent Montel 😁

Add method for showing details

parent 78d0d5be
......@@ -3199,7 +3199,7 @@ void ViewerPrivate::slotAddToWhiteList()
void ViewerPrivate::slotMailTrackingFound(const MessageViewer::BlockMailTrackingUrlInterceptor::MailTrackerBlackList &blacklist)
{
mMailTrackingWarning->animatedShow();
mMailTrackingWarning->addTracker(blacklist);
}
void ViewerPrivate::slotFormSubmittedForbidden()
......
......@@ -30,7 +30,10 @@ MailTrackingWarningWidget::MailTrackingWarningWidget(QWidget *parent)
setWordWrap(true);
//Add info here.
setText(i18n("Some Mail Tracker was found and was blocked."));
setText(i18n("Some Mail Tracker was found and was blocked.<a href=\"mailtrackingdetails\">(Details...)"));
connect(this, &MailTrackingWarningWidget::linkActivated, this,
&MailTrackingWarningWidget::slotShowDetails);
}
MailTrackingWarningWidget::~MailTrackingWarningWidget()
......@@ -38,6 +41,13 @@ MailTrackingWarningWidget::~MailTrackingWarningWidget()
}
void MailTrackingWarningWidget::slotShowDetails(const QString &content)
{
if (content == QLatin1String("mailtrackingdetails")) {
//TODO
}
}
void MailTrackingWarningWidget::addTracker(const MessageViewer::BlockMailTrackingUrlInterceptor::MailTrackerBlackList &tracker)
{
blackListFound item = mBackLists.value(tracker.mCompanyName);
......@@ -48,6 +58,10 @@ void MailTrackingWarningWidget::addTracker(const MessageViewer::BlockMailTrackin
item.number = item.number + 1;
mBackLists.insert(tracker.mCompanyName, item);
}
//TODO create list
if (!isVisible()) {
animatedShow();
}
//show info
}
......
......@@ -36,6 +36,7 @@ public:
void addTracker(const MessageViewer::BlockMailTrackingUrlInterceptor::MailTrackerBlackList &);
void hideAndClear();
private:
void slotShowDetails(const QString &content);
struct blackListFound {
QString url;
int number = 1;
......
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