Commit 0e2d0487 authored by Laurent Montel's avatar Laurent Montel 😁

Make insert short url working

parent 9d008876
......@@ -78,6 +78,7 @@ void IsgdShortUrlEngineInterface::slotShortUrlFinished(QNetworkReply *reply)
QVariant var = map.value(QStringLiteral("shorturl"));
if (var.isValid()) {
mTextCursor.insertText(var.toString());
Q_EMIT shortUrlGenerated(var.toString());
}
}
......@@ -50,6 +50,7 @@ void TinyUrlEngineInterface::slotShortUrlFinished(QNetworkReply *reply)
if (!mErrorFound) {
const QString data = QString::fromUtf8(reply->readAll());
if (!data.isEmpty()) {
mTextCursor.insertText(data);
Q_EMIT shortUrlGenerated(data);
}
}
......
......@@ -50,6 +50,7 @@ void TripAbShortUrlEngineInterface::slotShortUrlFinished(QNetworkReply *reply)
if (!mErrorFound) {
const QString data = QString::fromUtf8(reply->readAll());
if (!data.isEmpty()) {
mTextCursor.insertText(data);
Q_EMIT shortUrlGenerated(data);
}
}
......
......@@ -79,6 +79,7 @@ void Ur1CaShortUrlEngineInterface::slotShortUrlFinished(QNetworkReply *reply)
output = rx.cap(1);
qCDebug(UR1CASHORTURLENGINEPLUGIN_LOG) << "Short url is: " << output;
if (!output.isEmpty()) {
mTextCursor.insertText(output);
Q_EMIT shortUrlGenerated(output);
} else {
Q_EMIT shortUrlFailed(QString());
......
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