Merge pull request #8944 from Chocobo1/literal

Make use of QStringLiteral
This commit is contained in:
Mike Tzou
2018-05-23 13:23:41 +08:00
committed by GitHub
12 changed files with 34 additions and 46 deletions

View File

@@ -65,7 +65,7 @@
#include "session.h"
#include "trackerentry.h"
const QString QB_EXT {".!qB"};
const QString QB_EXT {QStringLiteral(".!qB")};
namespace libt = libtorrent;
using namespace BitTorrent;

View File

@@ -36,7 +36,7 @@
#include "base/logger.h"
#include "base/settingsstorage.h"
static const QString KEY_ENABLED = QLatin1String("Network/PortForwardingEnabled");
static const QString KEY_ENABLED = QStringLiteral("Network/PortForwardingEnabled");
namespace libt = libtorrent;
using namespace Net;

View File

@@ -30,7 +30,7 @@
#include "base/settingsstorage.h"
#define SETTINGS_KEY(name) "Network/Proxy/" name
#define SETTINGS_KEY(name) QStringLiteral("Network/Proxy/" name)
const QString KEY_ONLY_FOR_TORRENTS = SETTINGS_KEY("OnlyForTorrents");
const QString KEY_TYPE = SETTINGS_KEY("Type");
const QString KEY_IP = SETTINGS_KEY("IP");

View File

@@ -36,7 +36,7 @@
using namespace RSS;
const QString Item::PathSeparator("\\");
const QChar Item::PathSeparator('\\');
Item::Item(const QString &path)
: m_path(path)

View File

@@ -58,7 +58,7 @@ namespace RSS
virtual QJsonValue toJsonValue(bool withData = false) const = 0;
static const QString PathSeparator;
static const QChar PathSeparator;
static bool isValidPath(const QString &path);
static QString joinPath(const QString &path1, const QString &path2);