aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-03-02 20:29:50 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-03-14 13:55:36 +0200
commit2105d3c7d00adef2ddce679a43a7a77f95168c7a (patch)
tree187481fead7eead3cd541802399bf952dd63c01f /desktop-widgets
parentd1572a8d9574e80955796b8667317c8dbd376081 (diff)
downloadsubsurface-2105d3c7d00adef2ddce679a43a7a77f95168c7a.tar.gz
Cleanup: consistently use toUtf8() instead of toLocal8Bit()
These do the same, since the text-codex is set to UTF-8 on startup. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divelogimportdialog.cpp2
-rw-r--r--desktop-widgets/plugins/facebook/facebookconnectwidget.cpp8
-rw-r--r--desktop-widgets/subsurfacewebservices.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index 006f9b742..dc68865bb 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -326,7 +326,7 @@ void ColumnDropCSVView::mousePressEvent(QMouseEvent *press)
QDrag *drag = new QDrag(this);
QMimeData *mimeData = new QMimeData;
mimeData->setData(subsurface_mimedata, atClick.data().toByteArray());
- mimeData->setData(subsurface_index, QString::number(atClick.column()).toLocal8Bit());
+ mimeData->setData(subsurface_index, QString::number(atClick.column()).toUtf8());
drag->setPixmap(pix);
drag->setMimeData(mimeData);
if (drag->exec() != Qt::IgnoreAction){
diff --git a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
index 37da1c018..13dc89d70 100644
--- a/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
+++ b/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp
@@ -144,7 +144,7 @@ void FacebookManager::createFacebookAlbum()
QNetworkRequest request(albumListUrl());
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/octet-stream");
- QNetworkReply *reply = manager->post(request, params.query().toLocal8Bit());
+ QNetworkReply *reply = manager->post(request, params.query().toUtf8());
connect(reply, &QNetworkReply::finished, this, &FacebookManager::facebookAlbumCreated);
}
@@ -255,7 +255,7 @@ void FacebookManager::sendDiveToAlbum(const QString& albumId)
QString bound="margin";
//according to rfc 1867 we need to put this string here:
- QByteArray data(QString("--" + bound + "\r\n").toLocal8Bit());
+ QByteArray data(QString("--" + bound + "\r\n").toUtf8());
data.append("Content-Disposition: form-data; name=\"action\"\r\n\r\n");
data.append(graphApi + "\r\n");
data.append("--" + bound + "\r\n"); //according to rfc 1867
@@ -273,8 +273,8 @@ void FacebookManager::sendDiveToAlbum(const QString& albumId)
data.append("\r\n");
data.append("--" + bound + "--\r\n"); //closing boundary according to rfc 1867
- request.setRawHeader(QByteArray("Content-Type"),QString("multipart/form-data; boundary=" + bound).toLocal8Bit());
- request.setRawHeader(QByteArray("Content-Length"), QString::number(data.length()).toLocal8Bit());
+ request.setRawHeader(QByteArray("Content-Type"),QString("multipart/form-data; boundary=" + bound).toUtf8());
+ request.setRawHeader(QByteArray("Content-Length"), QString::number(data.length()).toUtf8());
QNetworkReply *reply = manager->post(request,data);
connect(reply, &QNetworkReply::finished, this, &FacebookManager::uploadFinished);
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp
index d9ccb190c..31babff32 100644
--- a/desktop-widgets/subsurfacewebservices.cpp
+++ b/desktop-widgets/subsurfacewebservices.cpp
@@ -305,7 +305,7 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
memset(&gps_location_table, 0, sizeof(dive_table));
(void)changed;
clear_table(&gps_location_table);
- QByteArray url = tr("Webservice").toLocal8Bit();
+ QByteArray url = tr("Webservice").toUtf8();
parse_xml_buffer(url.data(), downloadedData.data(), downloadedData.length(), &gps_location_table, NULL);
// make sure we mark all the dive sites that were created
for (i = 0; i < gps_location_table.nr; i++) {