From 9cb11759ce9ce106c8bc4e43fdde54bfcdbf81cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 14 Mar 2023 11:49:43 +0800 Subject: 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. --- interchange.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'interchange.cxx') 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); }); -- cgit v1.2.3