1

Style and naming correction

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2022-03-29 22:41:19 +02:00
parent 04e40f1241
commit 7ee07ad363
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
7 changed files with 18 additions and 20 deletions

View File

@ -37,4 +37,3 @@ different from yours.
### Code ### Code
The code for this example can be found at The code for this example can be found at
[extensions/qml_tutorial_5](../extensions/qml_tutorial_5) [extensions/qml_tutorial_5](../extensions/qml_tutorial_5)

View File

@ -17,4 +17,3 @@ to copy something and other to copy image URL to the clipboard.
### Code ### Code
The code for this example can be found at The code for this example can be found at
[extensions/qml_tutorial_6](../extensions/qml_tutorial_6) [extensions/qml_tutorial_6](../extensions/qml_tutorial_6)

View File

@ -4,13 +4,13 @@ import QtQuick 2.3
Falkon.PluginInterface { Falkon.PluginInterface {
QtObject { QtObject {
id: tutorial3Object id: tutorial4Object
property int clickCount property int clickCount
} }
init: function(state, settingsPath) { init: function(state, settingsPath) {
console.log(i18n('"Tutorial4" plugin loaded')) console.log(i18n('"Tutorial4" plugin loaded'))
tutorial3Object.clickCount = 0; tutorial4Object.clickCount = 0;
} }
testPlugin: function() { testPlugin: function() {
@ -22,8 +22,8 @@ Falkon.PluginInterface {
} }
function buttonClicked() { function buttonClicked() {
tutorial3Object.clickCount++; tutorial4Object.clickCount++;
console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial3Object.clickCount)) console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial4Object.clickCount))
} }
Falkon.BrowserAction { Falkon.BrowserAction {
@ -32,7 +32,7 @@ Falkon.PluginInterface {
title: i18n('Qml Tutorial 4') title: i18n('Qml Tutorial 4')
toolTip: i18n('My little button') toolTip: i18n('My little button')
icon: 'falkon' icon: 'falkon'
badgeText: tutorial3Object.clickCount badgeText: tutorial4Object.clickCount
location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar location: Falkon.BrowserAction.NavigationToolBar | Falkon.BrowserAction.StatusBar
popup: Rectangle { popup: Rectangle {
width: 100; width: 100;
@ -48,8 +48,8 @@ Falkon.PluginInterface {
}) })
action_always.triggered.connect(function() { action_always.triggered.connect(function() {
tutorial3Object.clickCount++; tutorial4Object.clickCount++;
console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial3Object.clickCount)) console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial4Object.clickCount))
}) })
if (webHitTestResult.isImage()) { if (webHitTestResult.isImage()) {
@ -59,9 +59,9 @@ Falkon.PluginInterface {
}) })
action_image.triggered.connect(function() { action_image.triggered.connect(function() {
tutorial3Object.clickCount += 2; tutorial4Object.clickCount += 2;
console.log(i18n('"Tutorial4" Surprise, this is an image with url: ' + webHitTestResult.imageUrl)) console.log(i18n('"Tutorial4" Surprise, this is an image with url: ' + webHitTestResult.imageUrl))
console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial3Object.clickCount)) console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial4Object.clickCount))
}) })
} }
@ -81,8 +81,8 @@ Falkon.PluginInterface {
}) })
sm_action_always.triggered.connect(function() { sm_action_always.triggered.connect(function() {
tutorial3Object.clickCount++; tutorial4Object.clickCount++;
console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial3Object.clickCount)) console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial4Object.clickCount))
}) })
if (webHitTestResult.isImage()) { if (webHitTestResult.isImage()) {
@ -92,9 +92,9 @@ Falkon.PluginInterface {
}) })
sm_action_image.triggered.connect(function() { sm_action_image.triggered.connect(function() {
tutorial3Object.clickCount += 2; tutorial4Object.clickCount += 2;
console.log(i18n('"Tutorial4" Surprise, this is an image with url: ' + webHitTestResult.imageUrl)) console.log(i18n('"Tutorial4" Surprise, this is an image with url: ' + webHitTestResult.imageUrl))
console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial3Object.clickCount)) console.log(i18n('"Tutorial4" clickCount increased to ' + tutorial4Object.clickCount))
}) })
} }