Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 2d9003dd authored by Laurent Montel's avatar Laurent Montel 😁

Save textcursor

parent a3400ee5
......@@ -10,7 +10,7 @@ generate_export_header(shorturlpluginprivate BASE_NAME shorturl)
target_link_libraries(shorturlpluginprivate
PRIVATE
Qt5::Network KF5::I18n KF5::CoreAddons
Qt5::Network KF5::I18n KF5::CoreAddons Qt5::Gui
)
set_target_properties(shorturlpluginprivate
......
......@@ -99,10 +99,9 @@ void InsertShorturlPluginEditorInterface::exec()
Q_EMIT message(i18n("No network connection detected, we cannot shorten URL."));
return;
}
/*
mCurrentEngine->setTextCursor(textCursor);
mCurrentEngine->setShortUrl(urlStr);
mCurrentEngine->generateShortUrl();
*/
//textCursor.insertText(newText);
}
}
......
......@@ -8,6 +8,6 @@ kcoreaddons_add_plugin(pimcommon_isgdshorturlengineplugin JSON pimcommon_isgdsho
${pimcommon_isgdshorturlengineplugin_SRCS} INSTALL_NAMESPACE pimcommon)
target_link_libraries(pimcommon_isgdshorturlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
......@@ -60,3 +60,8 @@ QString ShortUrlEngineInterface::pluginName() const
{
return mEnginePlugin->pluginName();
}
void ShortUrlEngineInterface::setTextCursor(const QTextCursor &cursor)
{
mTextCursor = cursor;
}
......@@ -22,6 +22,7 @@
#include <QObject>
#include <QNetworkReply>
#include <QTextCursor>
#include "shorturl_export.h"
class QNetworkAccessManager;
class ShortUrlEnginePlugin;
......@@ -37,6 +38,7 @@ public:
virtual QString engineName() const = 0;
QString pluginName() const;
void setTextCursor(const QTextCursor &cursor);
protected Q_SLOTS:
void slotErrorFound(QNetworkReply::NetworkError error);
......@@ -46,6 +48,7 @@ Q_SIGNALS:
protected:
QString mOriginalUrl;
QTextCursor mTextCursor;
bool mErrorFound = false;
QNetworkAccessManager *mNetworkAccessManager = nullptr;
ShortUrlEnginePlugin *mEnginePlugin = nullptr;
......
......@@ -8,6 +8,6 @@ kcoreaddons_add_plugin(pimcommon_tinyurlengineplugin JSON pimcommon_tinyurlengin
target_link_libraries(pimcommon_tinyurlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
......@@ -7,6 +7,6 @@ kcoreaddons_add_plugin(pimcommon_triopabshorturlengineplugin JSON pimcommon_trio
${pimcommon_triopabshorturlengineplugin_SRCS} INSTALL_NAMESPACE pimcommon)
target_link_libraries(pimcommon_triopabshorturlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
......@@ -9,6 +9,6 @@ kcoreaddons_add_plugin(pimcommon_ur1cashorturlengineplugin JSON pimcommon_ur1cas
${pimcommon_ur1cashorturlengineplugin_SRCS} INSTALL_NAMESPACE pimcommon)
target_link_libraries(pimcommon_ur1cashorturlengineplugin
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate
KF5::Service KF5::I18n Qt5::Network KF5::CoreAddons shorturlpluginprivate Qt5::Gui
)
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