Commit 461d5d48 authored by Laurent Montel's avatar Laurent Montel 😁

clean up

parent c1c7fdc0
......@@ -35,7 +35,6 @@ target_link_libraries(composereditorwebengineprivate
KF5::Completion
Qt5::WebEngine
Qt5::WebEngineWidgets
Qt5::PrintSupport
KF5::WebEngineViewer
KF5::I18n
KF5::SonnetUi
......
......@@ -237,9 +237,6 @@ void ComposerWebEngine::slotWebHitFinished(const WebEngineViewer::WebHitTestResu
QAction *openLinkAction = menu->addAction(i18n("Open Link"));
connect(openLinkAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotOpenLink()));
}
addExtraAction(menu);
menu->exec(mapToGlobal(result.pos()));
delete menu;
#if 0
d->hideImageResizeWidget();
......@@ -318,10 +315,10 @@ void ComposerWebEngine::slotWebHitFinished(const WebEngineViewer::WebHitTestResu
speakAction->setEnabled(!emptyDocument);
connect(speakAction, SIGNAL(triggered(bool)), this, SLOT(_k_slotSpeakText()));
}
#endif
addExtraAction(menu);
menu->exec(event->globalPos());
menu->exec(mapToGlobal(result.pos()));
delete menu;
#endif
}
void ComposerWebEngine::addExtraAction(QMenu *menu)
......@@ -339,6 +336,7 @@ void ComposerWebEngine::setActionsEnabled(bool enabled)
void ComposerWebEngine::forwardMousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event);
#if 0
if (event->button() == Qt::LeftButton) {
d->contextMenuResult = page()->mainFrame()->hitTestContent(event->pos());
......@@ -355,16 +353,19 @@ void ComposerWebEngine::forwardMousePressEvent(QMouseEvent *event)
void ComposerWebEngine::forwardKeyReleaseEvent(QKeyEvent *event)
{
Q_UNUSED(event);
d->hideImageResizeWidget();
}
void ComposerWebEngine::forwardWheelEvent(QWheelEvent *event)
{
Q_UNUSED(event);
d->hideImageResizeWidget();
}
void ComposerWebEngine::mouseDoubleClickEvent(QMouseEvent *event)
{
Q_UNUSED(event);
#if 0
if (event->button() == Qt::LeftButton) {
d->contextMenuResult = page()->mainFrame()->hitTestContent(event->pos());
......
......@@ -51,14 +51,11 @@
#include <QIcon>
#include <KStandardShortcut>
#include <PimCommon/KPimPrintPreviewDialog>
#include <QDBusConnectionInterface>
#include <image/composerimagedialog.h>
#include <link/composeranchordialog.h>
#include <link/composerlinkdialog.h>
#include <QPointer>
#include <QPrinter>
#include <QPrintDialog>
#include <QClipboard>
#include <QFileDialog>
......@@ -105,7 +102,7 @@ ComposerEditorWebEnginePrivate::ComposerEditorWebEnginePrivate(ComposerEditorWeb
action_insert_specialchar(Q_NULLPTR),
action_insert_anchor(Q_NULLPTR),
q(qq),
imageResizeWidget(Q_NULLPTR),
//imageResizeWidget(Q_NULLPTR),
mPageEngine(Q_NULLPTR)
{
}
......@@ -534,8 +531,8 @@ QAction *ComposerEditorWebEnginePrivate::getAction(QWebEnginePage::WebAction act
void ComposerEditorWebEnginePrivate::hideImageResizeWidget()
{
delete imageResizeWidget;
imageResizeWidget = 0;
//delete imageResizeWidget;
//imageResizeWidget = 0;
}
void ComposerEditorWebEnginePrivate::showImageResizeWidget()
......
......@@ -170,7 +170,7 @@ public:
QAction *action_insert_anchor;
ComposerWebEngine *q;
ComposerImageResizeWidget *imageResizeWidget;
//ComposerImageResizeWidget *imageResizeWidget;
WebEngineViewer::WebEnginePage *mPageEngine;
};
}
......
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