Commit 1bb92c51 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove expandurl action

parent e3385d3c
......@@ -82,7 +82,6 @@ void ViewerTest::shouldHaveDefaultValuesOnCreation()
QVERIFY(viewer.resetMessageDisplayFormatAction());
QVERIFY(viewer.blockImage());
QVERIFY(viewer.openBlockableItems());
QVERIFY(viewer.expandShortUrlAction());
QVERIFY(viewer.urlClicked().isEmpty());
QVERIFY(viewer.imageUrlClicked().isEmpty());
QCOMPARE(viewer.isFixedFont(), false);
......
......@@ -652,18 +652,6 @@ QAction *Viewer::openBlockableItems() const
return d->mBlockableItems;
}
bool Viewer::isAShortUrl(const QUrl &url) const
{
Q_D(const Viewer);
return d->isAShortUrl(url);
}
QAction *Viewer::expandShortUrlAction() const
{
Q_D(const Viewer);
return d->mExpandUrlAction;
}
KActionMenu *Viewer::shareServiceUrlMenu() const
{
Q_D(const Viewer);
......
......@@ -283,7 +283,6 @@ public:
QAction *resetMessageDisplayFormatAction() const;
QAction *blockImage() const;
QAction *openBlockableItems() const;
QAction *expandShortUrlAction() const;
KActionMenu *shareServiceUrlMenu() const;
HeaderStylePlugin *headerStylePlugin() const;
void setPluginName(const QString &pluginName);
......@@ -324,8 +323,6 @@ public:
void saveMainFrameScreenshotInFile(const QString &filename);
bool adblockEnabled() const;
bool isAShortUrl(const QUrl &url) const;
bool mimePartTreeIsEmpty() const;
void showOpenAttachmentFolderWidget(const QUrl &url);
......
......@@ -1709,11 +1709,6 @@ void ViewerPrivate::createActions()
ac->addAction(QStringLiteral("adblock_blockable_items"), mBlockableItems);
connect(mBlockableItems, &QAction::triggered, this, &ViewerPrivate::slotOpenBlockableItems);
mExpandUrlAction = new QAction(i18n("Expand Short URL"), this);
ac->addAction(QStringLiteral("expand_short_url"), mExpandUrlAction);
ac->setShortcutsConfigurable(mExpandUrlAction, false);
connect(mExpandUrlAction, &QAction::triggered, this, &ViewerPrivate::slotExpandShortUrl);
mShareServiceUrlMenu = mShareServiceManager->menu();
ac->addAction(QStringLiteral("shareservice_menu"), mShareServiceUrlMenu);
connect(mShareServiceManager, &PimCommon::ShareServiceUrlManager::serviceUrlSelected, this, &ViewerPrivate::slotServiceUrlSelected);
......@@ -2979,18 +2974,6 @@ void ViewerPrivate::slotOpenBlockableItems()
mViewer->openBlockableItemsDialog();
}
bool ViewerPrivate::isAShortUrl(const QUrl &url) const
{
return mViewer->isAShortUrl(url);
}
void ViewerPrivate::slotExpandShortUrl()
{
if (mClickedUrl.isValid()) {
mViewer->expandUrl(mClickedUrl);
}
}
void ViewerPrivate::addHelpTextAction(QAction *act, const QString &text)
{
act->setStatusTip(text);
......
......@@ -422,8 +422,6 @@ public:
void goOnline();
void goResourceOnline();
bool isAShortUrl(const QUrl &url) const;
void showOpenAttachmentFolderWidget(const QUrl &url);
bool mimePartTreeIsEmpty() const;
......@@ -560,7 +558,6 @@ public Q_SLOTS:
void slotResetMessageDisplayFormat();
void slotBlockImage();
void slotOpenBlockableItems();
void slotExpandShortUrl();
void slotGeneralFontChanged();
......@@ -643,7 +640,6 @@ public:
QAction *mCopyImageLocation;
QAction *mBlockImage;
QAction *mBlockableItems;
QAction *mExpandUrlAction;
QUrl mHoveredUrl;
QUrl mClickedUrl;
QUrl mImageUrl;
......
......@@ -36,7 +36,6 @@ public:
}
MailWebEngineAccessKey *mWebViewAccessKey;
ScamDetection *mScamDetection;
};
MailWebEngineView::MailWebEngineView(KActionCollection *ac, QWidget *parent)
......@@ -64,13 +63,3 @@ void MailWebEngineView::selectAll()
{
page()->triggerAction(QWebEnginePage::SelectAll);
}
void MailWebEngineView::expandUrl(const QUrl &url)
{
d->mScamDetection->scamCheckShortUrl()->expandedUrl(url);
}
bool MailWebEngineView::isAShortUrl(const QUrl &url) const
{
return d->mScamDetection->scamCheckShortUrl()->isShortUrl(url);
}
......@@ -31,8 +31,6 @@ public:
~MailWebEngineView();
void selectAll();
void expandUrl(const QUrl &url);
bool isAShortUrl(const QUrl &url) const;
Q_SIGNALS:
void openUrl(const QUrl &url);
private:
......
......@@ -364,15 +364,4 @@ void MailWebView::openBlockableItemsDialog()
}
delete dlg;
}
void MailWebView::expandUrl(const QUrl &url)
{
mScamDetection->scamCheckShortUrl()->expandedUrl(url);
}
bool MailWebView::isAShortUrl(const QUrl &url) const
{
return mScamDetection->scamCheckShortUrl()->isShortUrl(url);
}
#include "moc_mailwebview.cpp"
......@@ -66,9 +66,6 @@ public:
QUrl linkOrImageUrlAt(const QPoint &global) const;
bool isAShortUrl(const QUrl &url) const;
void expandUrl(const QUrl &url);
void scamCheck();
void saveMainFrameScreenshotInFile(const QString &filename);
void openBlockableItemsDialog();
......
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