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 --- subsurface-mobile-main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subsurface-mobile-main.cpp') diff --git a/subsurface-mobile-main.cpp b/subsurface-mobile-main.cpp index 291a25125..f0199819f 100644 --- a/subsurface-mobile-main.cpp +++ b/subsurface-mobile-main.cpp @@ -34,7 +34,7 @@ int main(int argc, char **argv) for (i = 1; i < arguments.length(); i++) { QString a = arguments.at(i); if (!a.isEmpty() && a.at(0) == '-') { - parse_argument(a.toLocal8Bit().data()); + parse_argument(qPrintable(a)); continue; } } -- cgit v1.2.3-70-g09d2