summaryrefslogtreecommitdiffstats
path: root/qt-ui/subsurfacewebservices.cpp
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-12-19 17:02:34 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-20 09:53:05 -0800
commit8eb6dfdb02cf7b9d2c92f9e6ef28ad5312415302 (patch)
treec30921972538ec90afa11eb62c664ea58efac8d0 /qt-ui/subsurfacewebservices.cpp
parentdbdf50d03cd19b8cf62f39a2578996215f47034e (diff)
downloadsubsurface-8eb6dfdb02cf7b9d2c92f9e6ef28ad5312415302.tar.gz
Use QFile::{encode,decode}Name for file names
And make them use UTF-8 on Windows instead of the local 8 bit encoding. This will also get us the proper NFD encoding on OS X. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r--qt-ui/subsurfacewebservices.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index 20e5707ea..ef3c9ffce 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -759,7 +759,7 @@ void DivelogsDeWebServices::downloadFinished()
if (!zip)
::close(duppedfd);
#else
- struct zip *zip = zip_open(zipFile.fileName().toUtf8().data(), 0, &errorcode);
+ struct zip *zip = zip_open(QFile::encodeName(zipFile.fileName()), 0, &errorcode);
#endif
if (!zip) {
char buf[512];
@@ -855,7 +855,7 @@ void DivelogsDeWebServices::buttonClicked(QAbstractButton* button)
}
/* parse file and import dives */
char *error = NULL;
- parse_file(zipFile.fileName().toUtf8().data(), &error);
+ parse_file(QFile::encodeName(zipFile.fileName()), &error);
if (error != NULL) {
mainWindow()->showError(error);
free(error);