From b72cc1f31784346884c8552c22f1e4c3c6d5ed1d Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 25 Feb 2018 13:51:41 +0100 Subject: Cleanup: consistently use qPrintable() Replace constructs of the kind s.toUtf8().data(), s.toUtf8().constData(), s.toLocal8Bit().data(), s.toLocal8Bit.constData() or qUtf8Printable(s) by qPrintable(s). This is concise, consistent and - in principle - more performant than the .data() versions. Sadly, owing to a suboptimal implementation, qPrintable(s) currently is a pessimization compared to s.toUtf8().data(). A fix is scheduled for new Qt versions: https://codereview.qt-project.org/#/c/221331/ Signed-off-by: Berthold Stoeger --- smtk-import/smrtk2ssrfc_window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'smtk-import/smrtk2ssrfc_window.cpp') diff --git a/smtk-import/smrtk2ssrfc_window.cpp b/smtk-import/smrtk2ssrfc_window.cpp index fffa170dc..344bd4642 100644 --- a/smtk-import/smrtk2ssrfc_window.cpp +++ b/smtk-import/smrtk2ssrfc_window.cpp @@ -92,7 +92,7 @@ void Smrtk2ssrfcWindow::on_importButton_clicked() ui->plainTextEdit->appendPlainText(error_buf); } ui->progressBar->setValue(inputFiles.size()); - save_dives_logic(outputFile.toUtf8().data(), false); + save_dives_logic(qPrintable(outputFile), false); ui->progressBar->setDisabled(true); } -- cgit v1.2.3-70-g09d2