Commit fbe3657e authored by Jan Grulich's avatar Jan Grulich

Minor coding style improvements

parent 50d145c4
......@@ -23,7 +23,7 @@ import QtQuick.Layouts 1.2
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.ScrollArea{
PlasmaExtras.ScrollArea {
property var details
property var str: 0
property var connection : ({})
......@@ -48,7 +48,7 @@ PlasmaExtras.ScrollArea{
id: editorIpSection
}
SecuritySection{
SecuritySection {
id: editorSecuritySection
//anchors.top: editorIpSection.bottom
anchors.topMargin: units.gridUnit
......
......@@ -22,7 +22,7 @@ import QtQuick.Controls 2.2 as Controls
import QtQuick.Layouts 1.2
import org.kde.plasma.components 2.0 as PlasmaComponents
ColumnLayout{
ColumnLayout {
id: ipmain
property var ipmap: ({})
......@@ -44,7 +44,7 @@ ColumnLayout{
Controls.ComboBox {
id: ipMethodComb
model:["Automatic","Manual"]
model: ["Automatic","Manual"]
onCurrentIndexChanged: {
if (ipMethodComb.currentIndex == 0){
ipmain.state = "Automatic"
......@@ -90,12 +90,12 @@ ColumnLayout{
text: prefix
}
PlasmaComponents.Label{
PlasmaComponents.Label {
text: i18n("DNS")
}
Controls.TextField {
id:manualIPdns
id: manualIPdns
placeholderText: i18n("8.8.8.8")
text: dns
}
......@@ -110,8 +110,8 @@ ColumnLayout{
State {
name:"Manual"
PropertyChanges{ target: manualIPSettings; visible : true }
PropertyChanges{
PropertyChanges { target: manualIPSettings; visible : true }
PropertyChanges {
target: ipmain;
ipmap : {
"method" : "manual",
......
......@@ -23,7 +23,7 @@ import QtQuick.Layouts 1.2
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.ScrollArea{
PlasmaExtras.ScrollArea {
property var details
property alias signal_strength: signalStrengthLabel.text
property alias signal_speed: linkSpeedLabel.text
......@@ -32,7 +32,6 @@ PlasmaExtras.ScrollArea{
property var map: []
Column {
Column {
id: staticInfo
anchors.bottomMargin: units.gridUnit
......@@ -107,8 +106,8 @@ PlasmaExtras.ScrollArea{
visible: advancedOptionsSwitch.checked
}
SecuritySection{
id:s
SecuritySection {
id: s
visible: advancedOptionsSwitch.checked
}
}
......@@ -122,7 +121,7 @@ PlasmaExtras.ScrollArea{
if (map.hasOwnProperty(i)) {
console.info(i + ' = ' + map[i]);
}
}
}
if (d['Access point (SSID)'])
detailsDialog.titleText = d['Access point (SSID)']
signal_strength = d['Signal strength']
......
......@@ -96,14 +96,14 @@ Kirigami.SwipeListItem {
]
function getDetails(){
if (ConnectionDetails)
if (ConnectionDetails)
networkDetailsViewContent.details = ConnectionDetails
if (ConnectionDetails[1] !== "") {
detailsDialog.titleText = ItemUniqueName
} else {
detailsDialog.titleText = i18n("Network details")
}
map = handler.getConnectionSettings(ConnectionPath,"ipv4")
map = handler.getConnectionSettings(ConnectionPath,"ipv4")
if (ConnectionState == PlasmaNM.Enums.Activated){
handler.getActiveConnectionInfo(ConnectionPath)
}
......@@ -113,11 +113,11 @@ Kirigami.SwipeListItem {
detailsDialog.open()
}
function connect(){
console.info(ConnectionDetails[1]+' trying to connect')
function connect() {
console.info(ConnectionDetails[1] + ' trying to connect')
}
function forgetNetwork(){
console.info(ConnectionPath+' trying to forget')
function forgetNetwork() {
console.info(ConnectionPath + ' trying to forget')
deleteConfirmation.open()
// ItemUniqueName
}
......
......@@ -5,7 +5,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.networkmanagement 0.2 as PlasmaNM
Layouts.ColumnLayout{
Layouts.ColumnLayout {
id:securitySectionView
property var securityMap: {}
property var enabledSave: false
......@@ -31,47 +31,47 @@ Layouts.ColumnLayout{
anchors.bottomMargin: 50
model: [i18n("None"), i18n("WEP Key"), i18n("Dynamic WEP"), i18n("WPA/WPA2 Personal"), i18n("WPA/WPA2 Enterprise")]
}
Controls.Label{
Controls.Label {
anchors.bottomMargin: units.Gridunit
visible: !(securityCombobox.currentText == "None")
text: securityCombobox.currentText
}
}
Layouts.ColumnLayout{
Layouts.ColumnLayout {
id: wep
anchors.top: securitySectionHeader.bottom
width: parent.width
Column{
Column {
width: parent.width
visible: (securityCombobox.currentText === "WEP Key")
PasswordField{
PasswordField {
width: parent.width
securityType: PlasmaNM.Enums.StaticWep
}
}
}
Layouts.ColumnLayout{
Layouts.ColumnLayout {
id: wpaPSK
width: parent.width
anchors.top: securitySectionHeader.bottom
Column{
Column {
width: parent.width
visible: (securityCombobox.currentText === "WPA/WPA2 Personal")
PasswordField{
PasswordField {
width: parent.width
securityType: PlasmaNM.Enums.Wpa2Psk
}
}
}
Layouts.ColumnLayout{
Layouts.ColumnLayout {
id: eap
anchors.top: securitySectionHeader.bottom
Column{
Column {
visible: (securityCombobox.currentText === "Dynamic WEP")
Controls.Label{
Controls.Label {
text:i18n("Authentication")
}
Controls.ComboBox {
......
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