diff options
-rw-r--r-- | interchange.cxx | 10 | ||||
-rw-r--r-- | interchange.hxx | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/interchange.cxx b/interchange.cxx index f0141d6..4806865 100644 --- a/interchange.cxx +++ b/interchange.cxx @@ -5,11 +5,15 @@ namespace QInterchange { static Interchange* interchange; - Interchange::Interchange(char const* sampleURL, char const* image_Dir, - char const* cookie, char const* certificate) + Interchange::Interchange(const char* sampleURL, const char* image_Dir, + const QString& cookie, const QString& certificate) { interchange = this; - interchange_init(sampleURL, image_Dir, cookie, certificate); + interchange_init(sampleURL, image_Dir, + cookie.isEmpty() ? nullptr + : cookie.toLatin1().constData(), + certificate.isEmpty() ? nullptr + : certificate.toLatin1().constData()); } Interchange::~Interchange() diff --git a/interchange.hxx b/interchange.hxx index 4b4f44c..8a4dfc3 100644 --- a/interchange.hxx +++ b/interchange.hxx @@ -20,10 +20,10 @@ namespace QInterchange { * \param cookie Path to the cookie file. * \param certificate Path to the CA certificate file. */ - Interchange(char const* sampleURL, - char const* image_Dir, - char const* cookie = nullptr, - char const* certificate = nullptr); + Interchange(const char* sampleURL, + const char* image_Dir, + const QString& cookie = "", + const QString& certificate = ""); /*! * \brief Destructor. */ |