summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-24 19:09:04 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-09-24 19:09:04 +0800
commit13df4883c897a1fc0386d1601762054dbecfde3f (patch)
treeacf16cdc03ac1854141c26df813cf0a23e29b933
parentb48fd101e2c74c34f78b9f2212efe117f9e87931 (diff)
Reuse path
-rw-r--r--controller.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/controller.cxx b/controller.cxx
index d007855..8447242 100644
--- a/controller.cxx
+++ b/controller.cxx
@@ -10,13 +10,11 @@
Controller::Controller(QObject* parent) : QObject{parent}
{
#ifdef ANDROID
+ QDir location{QStandardPaths::writableLocation
+ (QStandardPaths::AppDataLocation)};
+ QString path{location.absolutePath() % "/ca-certificates.crt"};
QFile file{"assets:/certs/ca-certificates.crt"};
- file.copy(QDir{QStandardPaths::writableLocation
- (QStandardPaths::AppDataLocation)}.absolutePath()
- % "/ca-certificates.crt");
- auto path = QDir{QStandardPaths::writableLocation
- (QStandardPaths::AppDataLocation)}.absolutePath()
- % "/ca-certificates.crt";
+ file.copy(path);
auto client = new RTClient::Client{"https://darapsa.co.id/rt"
, path.toLatin1().constData()};
#else