diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-14 11:49:43 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2023-03-14 11:49:43 +0800 |
commit | 9cb11759ce9ce106c8bc4e43fdde54bfcdbf81cb (patch) | |
tree | a9b7010549a2b6709570ad6d627cd5fb6361079c | |
parent | 9de5897f3769ef17e146d436d9e14d1f13c3510e (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.
-rw-r--r-- | interchange.cxx | 6 |
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); }); |