summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-27 05:16:20 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-27 05:16:20 (GMT)
commitc139cf8fdc3d51bfc706fbaa9d5a65ab0d73f419 (patch)
treed2063f6a0bd4115a72594cac6fcea00082382353
parent22bf8f2a9ecfe4c6686348511285d7cc522d0d08 (diff)
Add info about url state
-rw-r--r--messageviewer/src/checkphishingurl/checkphishingurljob.cpp2
-rw-r--r--messageviewer/src/checkphishingurl/checkphishingurljob.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/messageviewer/src/checkphishingurl/checkphishingurljob.cpp b/messageviewer/src/checkphishingurl/checkphishingurljob.cpp
index fd95037..cb5022b 100644
--- a/messageviewer/src/checkphishingurl/checkphishingurljob.cpp
+++ b/messageviewer/src/checkphishingurl/checkphishingurljob.cpp
@@ -42,7 +42,7 @@ void CheckPhishingUrlJob::start()
if (canStart()) {
} else {
- //TODO emit signal
+ Q_EMIT result(MessageViewer::CheckPhishingUrlJob::Unknown);
deleteLater();
}
}
diff --git a/messageviewer/src/checkphishingurl/checkphishingurljob.h b/messageviewer/src/checkphishingurl/checkphishingurljob.h
index a8ab7d0..fed56e5 100644
--- a/messageviewer/src/checkphishingurl/checkphishingurljob.h
+++ b/messageviewer/src/checkphishingurl/checkphishingurljob.h
@@ -31,11 +31,20 @@ public:
explicit CheckPhishingUrlJob(QObject *parent = Q_NULLPTR);
~CheckPhishingUrlJob();
+ enum UrlStatus {
+ Ok = 0,
+ MalWare,
+ Unknown
+ };
+
void setUrl(const QUrl &url);
void start();
bool canStart() const;
+Q_SIGNALS:
+ void result(MessageViewer::CheckPhishingUrlJob::UrlStatus status);
+
private:
QUrl mUrl;
};