summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/torrent/filemanager.cpp12
-rw-r--r--examples/network/torrent/metainfo.cpp2
2 files changed, 7 insertions, 7 deletions
diff --git a/examples/network/torrent/filemanager.cpp b/examples/network/torrent/filemanager.cpp
index b4e921b0a5..58330014cf 100644
--- a/examples/network/torrent/filemanager.cpp
+++ b/examples/network/torrent/filemanager.cpp
@@ -219,8 +219,8 @@ bool FileManager::generateFiles()
QString prefix;
if (!destinationPath.isEmpty()) {
prefix = destinationPath;
- if (!prefix.endsWith("/"))
- prefix += "/";
+ if (!prefix.endsWith('/'))
+ prefix += '/';
QDir dir;
if (!dir.mkpath(prefix)) {
errString = tr("Failed to create directory %1").arg(prefix);
@@ -261,13 +261,13 @@ bool FileManager::generateFiles()
if (!destinationPath.isEmpty()) {
prefix = destinationPath;
- if (!prefix.endsWith("/"))
- prefix += "/";
+ if (!prefix.endsWith('/'))
+ prefix += '/';
}
if (!metaInfo.name().isEmpty()) {
prefix += metaInfo.name();
- if (!prefix.endsWith("/"))
- prefix += "/";
+ if (!prefix.endsWith('/'))
+ prefix += '/';
}
if (!dir.mkpath(prefix)) {
errString = tr("Failed to create directory %1").arg(prefix);
diff --git a/examples/network/torrent/metainfo.cpp b/examples/network/torrent/metainfo.cpp
index cca52c7e7e..52e7afe43a 100644
--- a/examples/network/torrent/metainfo.cpp
+++ b/examples/network/torrent/metainfo.cpp
@@ -96,7 +96,7 @@ bool MetaInfo::parse(const QByteArray &data)
QByteArray path;
foreach (QVariant p, pathElements) {
if (!path.isEmpty())
- path += "/";
+ path += '/';
path += p.toByteArray();
}