mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 13:41:26 -07:00
Use QString literals
It covers src/webui and enables `QT_NO_CAST_FROM_ASCII`.
This commit is contained in:
parent
f888fb4ac7
commit
efc04645b7
25 changed files with 836 additions and 824 deletions
|
@ -43,6 +43,7 @@
|
|||
#include <QSysInfo>
|
||||
#endif
|
||||
|
||||
#include "base/global.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/utils/version.h"
|
||||
#include "base/version.h"
|
||||
|
@ -79,7 +80,7 @@ void ProgramUpdater::checkForUpdates() const
|
|||
// Don't change this User-Agent. In case our updater goes haywire,
|
||||
// the filehost can identify it and contact us.
|
||||
Net::DownloadManager::instance()->download(
|
||||
Net::DownloadRequest(RSS_URL).userAgent("qBittorrent/" QBT_VERSION_2 " ProgramUpdater (www.qbittorrent.org)")
|
||||
Net::DownloadRequest(RSS_URL).userAgent(QStringLiteral("qBittorrent/" QBT_VERSION_2 " ProgramUpdater (www.qbittorrent.org)"))
|
||||
, this, &ProgramUpdater::rssDownloadFinished);
|
||||
}
|
||||
|
||||
|
@ -108,11 +109,11 @@ void ProgramUpdater::rssDownloadFinished(const Net::DownloadResult &result)
|
|||
};
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
const QString OS_TYPE {"Mac OS X"};
|
||||
const QString OS_TYPE = u"Mac OS X"_qs;
|
||||
#elif defined(Q_OS_WIN)
|
||||
const QString OS_TYPE {(::IsWindows7OrGreater()
|
||||
&& QSysInfo::currentCpuArchitecture().endsWith("64"))
|
||||
? "Windows x64" : "Windows"};
|
||||
const QString OS_TYPE = (::IsWindows7OrGreater() && QSysInfo::currentCpuArchitecture().endsWith(u"64"))
|
||||
? u"Windows x64"_qs
|
||||
: u"Windows"_qs;
|
||||
#endif
|
||||
|
||||
bool inItem = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue