aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp2
-rw-r--r--qt-ui/mainwindow.cpp4
-rw-r--r--qt-ui/subsurfacewebservices.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 2090f61a5..11d7124bc 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -765,7 +765,7 @@ void DiveListView::saveSelectedDivesAs()
settings.setValue("LastDir",fileInfo.dir().path());
settings.endGroup();
- QByteArray bt = fileName.toLocal8Bit();
+ QByteArray bt = QFile::encodeName(fileName);
save_dives_logic(bt.data(), TRUE);
}
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 276f24ba9..5f410ff3c 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -825,7 +825,7 @@ void MainWindow::importFiles(const QStringList fileNames)
QByteArray fileNamePtr;
char *error = NULL;
for (int i = 0; i < fileNames.size(); ++i) {
- fileNamePtr = fileNames.at(i).toUtf8();
+ fileNamePtr = QFile::encodeName(fileNames.at(i));
parse_file(fileNamePtr.data(), &error);
if (error != NULL) {
showError(error);
@@ -846,7 +846,7 @@ void MainWindow::loadFiles(const QStringList fileNames)
QByteArray fileNamePtr;
for (int i = 0; i < fileNames.size(); ++i) {
- fileNamePtr = fileNames.at(i).toUtf8();
+ fileNamePtr = QFile::encodeName(fileNames.at(i));
parse_file(fileNamePtr.data(), &error);
set_filename(fileNamePtr.data(), TRUE);
setTitle(MWTF_FILENAME);
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);