messageviewer
scamcheckshorturl.cpp
Go to the documentation of this file.
43 connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(slotExpandFinished(QNetworkReply*)));
57 KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "No network connection detected, we cannot expand url.") );
60 const QUrl newUrl = QString::fromLatin1("http://api.longurl.org/v2/expand?url=%1&format=json").arg(url.url());
65 connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(slotError(QNetworkReply::NetworkError)));
94 KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "Short url \'%1\' redirects to \'%2\'.", shortUrl.url(), longUrl.prettyUrl() ) );
104 if (!url.path().isEmpty() && QString::compare(url.path(),QLatin1String("/")) && sSupportedServices.contains(url.host())) {
113 QFile servicesFile(KGlobal::dirs()->findResource("data", QLatin1String("messageviewer/longurlServices.json")));
void expandedUrl(const KUrl &url)
Definition: scamcheckshorturl.cpp:54
bool contains(const Key &key) const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
~ScamCheckShortUrl()
Definition: scamcheckshorturl.cpp:50
static void loadLongUrlServices()
Definition: scamcheckshorturl.cpp:111
QString fromUtf8(const char *str, int size)
static bool isShortUrl(const KUrl &url)
Definition: scamcheckshorturl.cpp:102
QVariant property(const char *name) const
bool isNull() const
QByteArray readAll()
void deleteLater()
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
void expandUrlError(QNetworkReply::NetworkError error)
ScamCheckShortUrl(QObject *parent=0)
Definition: scamcheckshorturl.cpp:38
QString fromLatin1(const char *str, int size)
bool setProperty(const char *name, const QVariant &value)
QNetworkReply * get(const QNetworkRequest &request)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int compare(const QString &other) const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
const T value(const Key &key) const
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.