Skip to content

Commit

Permalink
Fix warnings in Qt 5.15.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Incognito committed Jun 10, 2020
1 parent 3499fbd commit b4cd47e
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
12 changes: 6 additions & 6 deletions src/ui/about.qml
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ ColumnLayout {
Connections {
target: AppProxy

onAppVersionReady: function(appVersion) {
function onAppVersionReady(appVersion) {
labelAppVersion.text = labelAppVersion.value = appVersion
}

onV2RayCoreVersionReady: function(v2RayVersion) {
function onV2RayCoreVersionReady(v2RayVersion) {
labelV2rayVersion.text = labelV2rayVersion.value = v2RayVersion
}

onLatestReleaseReady: function(name, latestVersion) {
function onLatestReleaseReady(name, latestVersion) {
var buttonCheckUpdates, buttonUpgrade, labelVersion

if (name === "v2ray-core") {
Expand All @@ -203,7 +203,7 @@ ColumnLayout {
buttonCheckUpdates.enabled = true
}

onLatestReleaseError: function(name, errorMsg) {
function onLatestReleaseError(name, errorMsg) {
var buttonCheckUpdates, buttonUpgrade, labelVersion

if (name === "v2ray-core") {
Expand All @@ -218,7 +218,7 @@ ColumnLayout {
buttonCheckUpdates.enabled = true
}

onUpgradeCompleted: function(name) {
function onUpgradeCompleted(name) {
var buttonCheckUpdates, buttonUpgrade

if (name === "v2ray-core") {
Expand All @@ -236,7 +236,7 @@ ColumnLayout {
buttonCheckUpdates.visible = true
}

onUpgradeError: function(name, errorMsg) {
function onUpgradeError(name, errorMsg) {
var buttonUpgrade, labelVersion

if (name === "v2ray-core") {
Expand Down
10 changes: 5 additions & 5 deletions src/ui/dashboard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ ColumnLayout {
Connections {
target: AppProxy

onAppVersionReady: function(appVersion) {
function onAppVersionReady(appVersion) {
labelAppVersion.text = appVersion
}

onV2RayCoreVersionReady: function(v2RayVersion) {
function onV2RayCoreVersionReady(v2RayVersion) {
labelV2rayVersion.text = v2RayVersion
}

onOperatingSystemReady: function(operatingSystem) {
function onOperatingSystemReady(operatingSystem) {
labelOperatingSystem.text = operatingSystem
}

onNetworkStatusReady: function(networkStatus) {
function onNetworkStatusReady(networkStatus) {
networkStatus = JSON.parse(networkStatus)
if (networkStatus["isGoogleAccessible"]) {
labelNetworkStatus.text = qsTr("Everything works fine.\nYou can access the free Internet.")
Expand All @@ -141,7 +141,7 @@ ColumnLayout {
}
}

onProxySettingsReady: function(proxySettings) {
function onProxySettingsReady(proxySettings) {
proxySettings = JSON.parse(proxySettings)
var pSettings = "";
pSettings += qsTr("System Proxy: ") + proxySettings["systemProxy"] + "\n"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/logs.qml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ColumnLayout {
Connections {
target: AppProxy

onLogsReady: function(logs) {
function onLogsReady(logs) {
textLogs.text = logs
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ ApplicationWindow {
Connections {
target: AppProxy

onAppVersionReady: function(appVersion) {
function onAppVersionReady(appVersion) {
appName.text = qsTr("V2Ray Desktop") + " " + appVersion
}

onAppConfigReady: function(config) {
function onAppConfigReady(config) {
config = JSON.parse(config)
if (appWindow.firstRun && config["hideWindow"]) {
appWindow.close()
Expand All @@ -488,7 +488,7 @@ ApplicationWindow {
}
}

onV2RayCoreStatusReady: function(isRunning) {
function onV2RayCoreStatusReady(isRunning) {
if (!isRunning) {
triggerV2RayCore.text = qsTr("Turn V2Ray Desktop On")
triggerV2RayCore.isV2RayRunning = false
Expand Down Expand Up @@ -523,7 +523,7 @@ ApplicationWindow {
}
}

onProxyModeChanged: function(proxyMode) {
function onProxyModeChanged(proxyMode) {
menuItemRuleMode.checked = false
menuItemGlobalMode.checked = false
menuItemDirectMode.checked = false
Expand Down
6 changes: 3 additions & 3 deletions src/ui/rules.qml
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,17 @@ ColumnLayout {
Connections {
target: AppProxy

onAppConfigReady: function(config) {
function onAppConfigReady(config) {
config = JSON.parse(config)
labelGfwLastUpdatedTime.text = config["gfwListLastUpdated"]
}

onAppConfigError: function(errorMsg) {
function onAppConfigError(errorMsg) {
labelErrorMsg.text = errorMsg
labelErrorMsg.visible = true
}

onGfwListUpdated: function(updatedTime) {
function onGfwListUpdated(updatedTime) {
buttonUpdateGfwList.text = qsTr("Update GFW List Now")
buttonUpdateGfwListContentItem.color = "#3498db"
buttonUpdateGfwList.enabled = true
Expand Down
16 changes: 8 additions & 8 deletions src/ui/servers.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ ColumnLayout {
return subscriptionUrls
}

onServersReady: function(servers) {
function onServersReady(servers) {
servers = JSON.parse(servers)
listModelServers.clear()
listModelSubscriptions.clear()
Expand All @@ -1446,7 +1446,7 @@ ColumnLayout {
}
}

onServerLatencyReady: function(serverLatency) {
function onServerLatencyReady(serverLatency) {
serverLatency = JSON.parse(serverLatency)
// Refresh latency in server list
for (var i = 0; i < listModelServers.count; ++ i) {
Expand All @@ -1463,7 +1463,7 @@ ColumnLayout {
menuItemTestAllLatency.enabled = true
}

onServerConfigError: function(errorMsg) {
function onServerConfigError(errorMsg) {
var popUpButtons = [
buttonV2RayAddServer, buttonShadowsocksAddServer, buttonTrojanAddServer,
buttonSubscriptionAddServer, buttonConfigAddServer,
Expand All @@ -1480,7 +1480,7 @@ ColumnLayout {
labelSubscriptionErrorMsg.visible = true
}

onServerConnectivityChanged: function(serverName, connected) {
function onServerConnectivityChanged(serverName, connected) {
// Refresh connectivity for the server
for (var i = 0; i < listModelServers.count; ++ i) {
var _serverName = listModelServers.get(i).values.get(0).value
Expand All @@ -1492,7 +1492,7 @@ ColumnLayout {
}
}

onServerChanged: function(serverName, serverConfig) {
function onServerChanged(serverName, serverConfig) {
serverConfig = JSON.parse(serverConfig)

for (var i = 0; i < listModelServers.count; ++ i) {
Expand All @@ -1508,7 +1508,7 @@ ColumnLayout {
popUpSubscription.close()
}

onServerRemoved: function(serverName) {
function onServerRemoved(serverName) {
for (var i = 0; i < listModelServers.count; ++ i) {
var _serverName = listModelServers.get(i).values.get(0).value
if (_serverName === serverName) {
Expand All @@ -1518,13 +1518,13 @@ ColumnLayout {
}
}

onServersChanged: function() {
function onServersChanged() {
AppProxy.getServers()
popUpServer.close()
popUpSubscription.close()
}

onServerDInfoReady: function(server) {
function onServerDInfoReady(server) {
server = JSON.parse(server)
layoutServer.resetPopUpServerFields("name" in server ? "edit" : "add")

Expand Down
10 changes: 5 additions & 5 deletions src/ui/settings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ ColumnLayout {
Connections {
target: AppProxy

onAppConfigReady: function(config) {
function onAppConfigReady(config) {
config = JSON.parse(config)
checkboxAutoStart.checked = config["autoStart"]
checkboxHideWindow.checked = config["hideWindow"]
Expand All @@ -260,20 +260,20 @@ ColumnLayout {
textGfwListUrl.text = config["gfwListUrl"]
}

onV2RayCoreStatusReady: function(isRunning) {
function onV2RayCoreStatusReady(isRunning) {
comboProxyMode.enabled = isRunning
}

onAppConfigChanged: function() {
function onAppConfigChanged() {
messageDialog.open()
}

onAppConfigError: function(errorMsg) {
function onAppConfigError(errorMsg) {
labelErrorMsg.text = errorMsg
labelErrorMsg.visible = true
}

onProxyModeChanged: function(proxyMode) {
function onProxyModeChanged(proxyMode) {
comboProxyMode.currentIndex = comboProxyMode.indexOfValue(proxyMode)
}
}
Expand Down

0 comments on commit b4cd47e

Please sign in to comment.