Unverified Commit a93f96da authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6943 from patrickelectric/better_qstring

Do not call QString(char*) to build empty string. 
parents bcabdc26 402add83
......@@ -159,7 +159,7 @@ QString QGCQFileDialog::getSaveFileName(
}
break;
}
return QString("");
return {};
}
}
......@@ -190,7 +190,7 @@ QString QGCQFileDialog::_getFirstExtensionInFilter(const QString& filter) {
return match.captured(0).mid(2);
}
}
return QString("");
return {};
}
/// @brief Validates and updates the parameters for the file dialog calls
......
......@@ -435,7 +435,7 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
int y_max = 26 * pow(2, gap) + (2*gap - 1);
if ( zoom > 19 ) {
return QString("");
return {};
}
else if ( zoom > 5 && x >= x_min && x <= x_max && y >= y_min && y <= y_max ) {
return QString("http://xdworld.vworld.kr:8080/2d/Base/service/%1/%2/%3.png").arg(zoom).arg(x).arg(y);
......@@ -458,7 +458,7 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
int y_max = 26 * pow(2, gap) + (2*gap - 1);
if ( zoom > 19 ) {
return QString("");
return {};
}
else if ( zoom > 5 && x >= x_min && x <= x_max && y >= y_min && y <= y_max ) {
return QString("http://xdworld.vworld.kr:8080/2d/Satellite/service/%1/%2/%3.jpeg").arg(zoom).arg(x).arg(y);
......
......@@ -390,7 +390,7 @@ void BluetoothConfiguration::setDevName(const QString &name)
QString BluetoothConfiguration::address()
{
#ifdef __ios__
return QString("");
return {};
#else
return _device.address;
#endif
......
......@@ -262,7 +262,7 @@ static QString get_ip_address(const QString& address)
}
}
}
return QString("");
return {};
}
TCPConfiguration::TCPConfiguration(const QString& name) : LinkConfiguration(name)
......
......@@ -65,7 +65,7 @@ static QString get_ip_address(const QString& address)
}
}
}
return QString("");
return {};
}
static bool contains_target(const QList<UDPCLient*> list, const QHostAddress& address, quint16 port)
......
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