summaryrefslogtreecommitdiff
path: root/interchange.cxx
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-14 11:49:43 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-03-14 11:49:43 +0800
commit9cb11759ce9ce106c8bc4e43fdde54bfcdbf81cb (patch)
treea9b7010549a2b6709570ad6d627cd5fb6361079c /interchange.cxx
parent9de5897f3769ef17e146d436d9e14d1f13c3510e (diff)
Keep a copy of the current path
cause the original might get lost in the way, so we can't rely on just pointing to it.
Diffstat (limited to 'interchange.cxx')
-rw-r--r--interchange.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/interchange.cxx b/interchange.cxx
index 22561cc..06e5957 100644
--- a/interchange.cxx
+++ b/interchange.cxx
@@ -4,7 +4,7 @@
namespace QInterchange {
static Interchange* interchange;
- static const QString* currentPath;
+ static QString currentPath;
Interchange::Interchange(const char* sampleURL, const char* image_Dir,
const QString& cookie, const QString& certificate)
@@ -24,10 +24,10 @@ namespace QInterchange {
void Interchange::page(QString const& path)
{
- currentPath = &path;
+ currentPath = path;
interchange_page(path.toLatin1().constData(),
[](interchange_response* response) {
- interchange->emitPage(*currentPath,
+ interchange->emitPage(currentPath,
QString{response->data});
interchange_free_response(response);
});