mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Construct QString more efficiently
This commit is contained in:
parent
2c23840947
commit
7de8a4d6e0
25 changed files with 60 additions and 61 deletions
|
@ -88,7 +88,7 @@ void GeoIPManager::loadDatabase()
|
|||
m_geoIPDatabase = nullptr;
|
||||
|
||||
const QString filepath = Utils::Fs::expandPathAbs(
|
||||
QString("%1%2/%3").arg(specialFolderLocation(SpecialFolder::Data), GEODB_FOLDER, GEODB_FILENAME));
|
||||
QString::fromLatin1("%1%2/%3").arg(specialFolderLocation(SpecialFolder::Data), GEODB_FOLDER, GEODB_FILENAME));
|
||||
|
||||
QString error;
|
||||
m_geoIPDatabase = GeoIPDatabase::load(filepath, error);
|
||||
|
@ -442,7 +442,7 @@ void GeoIPManager::downloadFinished(const DownloadResult &result)
|
|||
specialFolderLocation(SpecialFolder::Data) + GEODB_FOLDER);
|
||||
if (!QDir(targetPath).exists())
|
||||
QDir().mkpath(targetPath);
|
||||
QFile targetFile(QString("%1/%2").arg(targetPath, GEODB_FILENAME));
|
||||
QFile targetFile(QString::fromLatin1("%1/%2").arg(targetPath, GEODB_FILENAME));
|
||||
if (!targetFile.open(QFile::WriteOnly) || (targetFile.write(data) == -1))
|
||||
LogMsg(tr("Couldn't save downloaded IP geolocation database file."), Log::WARNING);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue