Fuel

Check-in [a4e2ab6686]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Switched to QWebEngineView, so Fuel now requires at least Qt 5.4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a4e2ab66866278039d31a13f7ef0ca774bea9cfb
User & Date: Kostas 2018-06-09 17:18:50
Context
2018-06-10
03:53
Updated travis.yml Leaf check-in: 6b21c5057d user: Kostas tags: trunk
2018-06-09
17:18
Switched to QWebEngineView, so Fuel now requires at least Qt 5.4 check-in: a4e2ab6686 user: Kostas tags: trunk
2015-10-16
09:43
Updated ChangeLog check-in: b8a962d79a user: Kostas tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fuel.pro.

1
2
3
4
5


6
7
8








9
10
11
12
13
14
15
16
17
#-------------------------------------------------
# Fuel
#-------------------------------------------------

QT    = core gui webkit



contains(QT_VERSION, ^5\\..*) {
	QT += widgets webkitwidgets








	QT -= quick multimediawidgets opengl printsupport qml multimedia positioning sensors
}

TARGET = Fuel
TEMPLATE = app

win32 {
	RC_FILE = rsrc/fuel.rc
	LIBS += -luser32 -lshell32 -luuid




|
>
>
|
<
<
>
>
>
>
>
>
>
>
|
|







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#-------------------------------------------------
# Fuel
#-------------------------------------------------

lessThan(QT_MAJOR_VERSION, 5) {
	message("Unsupported Qt version $${QT_VERSION}.")
	error("Fuel requires Qt 5.4.0 or greater")
}



# Fuel requires at least Qt 5.4 due to QtWebEngine
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 4) {
	message("Unsupported Qt version $${QT_VERSION}.")
	error("Fuel requires Qt 5.4.0 or greater")
}

QT = core gui widgets webengine webenginewidgets
QT-= quick multimediawidgets opengl printsupport qml multimedia positioning sensors


TARGET = Fuel
TEMPLATE = app

win32 {
	RC_FILE = rsrc/fuel.rc
	LIBS += -luser32 -lshell32 -luuid

Changes to src/CustomWebView.cpp.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "CustomWebView.h"
#include <QMouseEvent>

CustomWebView::CustomWebView(QWidget *parent) :
	QWebView(parent)
{
	setUrl(QUrl("about:blank"));
}

void CustomWebView::mousePressEvent(QMouseEvent *event)
{
	Qt::MouseButton but = event->button();
	if(but == Qt::XButton1)
		back();
	else if(but == Qt::XButton2)
		forward();
	else
		QWebView::mousePressEvent(event);
}




|












|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "CustomWebView.h"
#include <QMouseEvent>

CustomWebView::CustomWebView(QWidget *parent) :
	QWebEngineView(parent)
{
	setUrl(QUrl("about:blank"));
}

void CustomWebView::mousePressEvent(QMouseEvent *event)
{
	Qt::MouseButton but = event->button();
	if(but == Qt::XButton1)
		back();
	else if(but == Qt::XButton2)
		forward();
	else
		QWebEngineView::mousePressEvent(event);
}

Changes to src/CustomWebView.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef CUSTOMWEBVIEW_H
#define CUSTOMWEBVIEW_H

#include <QWebView>

class CustomWebView : public QWebView
{
	Q_OBJECT
public:
	explicit CustomWebView(QWidget *parent = 0);

signals:




|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef CUSTOMWEBVIEW_H
#define CUSTOMWEBVIEW_H

#include <QWebEngineView>

class CustomWebView : public QWebEngineView
{
	Q_OBJECT
public:
	explicit CustomWebView(QWidget *parent = 0);

signals: