style: Use camelCase for variable names

Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/607
This commit is contained in:
Florian Müllner
2019-01-31 14:43:52 +01:00
parent 8fda3116f0
commit 4c5206954a
20 changed files with 100 additions and 100 deletions

View File

@ -26,33 +26,33 @@ function _getMobileProvidersDatabase() {
}
// _findProviderForMccMnc:
// @operator_name: operator name
// @operator_code: operator code
// @operatorName: operator name
// @operatorCode: operator code
//
// Given an operator name string (which may not be a real operator name) and an
// operator code string, tries to find a proper operator name to display.
//
function _findProviderForMccMnc(operator_name, operator_code) {
if (operator_name) {
if (operator_name.length != 0 &&
(operator_name.length > 6 || operator_name.length < 5)) {
function _findProviderForMccMnc(operatorName, operatorCode) {
if (operatorName) {
if (operatorName.length != 0 &&
(operatorName.length > 6 || operatorName.length < 5)) {
// this looks like a valid name, i.e. not an MCCMNC (that some
// devices return when not yet connected
return operator_name;
return operatorName;
}
if (isNaN(parseInt(operator_name))) {
if (isNaN(parseInt(operatorName))) {
// name is definitely not a MCCMNC, so it may be a name
// after all; return that
return operator_name;
return operatorName;
}
}
let needle;
if ((!operator_name || operator_name.length == 0) && operator_code)
needle = operator_code;
else if (operator_name && (operator_name.length == 6 || operator_name.length == 5))
needle = operator_name;
if ((!operatorName || operatorName.length == 0) && operatorCode)
needle = operatorCode;
else if (operatorName && (operatorName.length == 6 || operatorName.length == 5))
needle = operatorName;
else // nothing to search
return null;
@ -230,17 +230,17 @@ var BroadbandModem = class {
}
_reloadOperatorName() {
let new_name = "";
let newName = "";
if (this.operator_name_3gpp && this.operator_name_3gpp.length > 0)
new_name += this.operator_name_3gpp;
newName += this.operator_name_3gpp;
if (this.operator_name_cdma && this.operator_name_cdma.length > 0) {
if (new_name != "")
new_name += ", ";
new_name += this.operator_name_cdma;
if (newName != "")
newName += ", ";
newName += this.operator_name_cdma;
}
this.operator_name = new_name;
this.operator_name = newName;
this.emit('notify::operator-name');
}