Commit ddf42148 authored by kh1's avatar kh1

Fix compile error while using QTextBrowser as help viewer.

Reviewed-by: Thorbjorn
parent 3984c057
......@@ -572,6 +572,14 @@ bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *e)
return false;
}
void HelpViewer::mousePressEvent(QMouseEvent *e)
{
#ifdef Q_OS_LINUX
if (handleForwardBackwardMouseButtons(e))
return;
#endif
}
void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
{
#ifndef Q_OS_LINUX
......@@ -591,11 +599,6 @@ void HelpViewer::mouseReleaseEvent(QMouseEvent *e)
void HelpViewer::keyPressEvent(QKeyEvent *e)
{
#ifdef Q_OS_LINUX
if (handleForwardBackwardMouseButtons(e))
return;
#endif
if ((e->key() == Qt::Key_Home && e->modifiers() != Qt::NoModifier)
|| (e->key() == Qt::Key_End && e->modifiers() != Qt::NoModifier)) {
QKeyEvent* event = new QKeyEvent(e->type(), e->key(), Qt::NoModifier,
......
......@@ -158,6 +158,7 @@ private:
void openLinkInNewTab(const QString &link);
bool hasAnchorAt(const QPoint& pos);
void contextMenuEvent(QContextMenuEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent *e);
......
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