From eded65bbcabd8e2267ef3a1d7df467ab403b27e0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 29 Jul 2021 15:55:09 +0200 Subject: to rebase --- api/plugin-support.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'api') diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp index 9c0a3ae0..105b2c29 100644 --- a/api/plugin-support.hpp +++ b/api/plugin-support.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -132,9 +133,9 @@ private: static QString trim_filename(const QString& in_) { - QStringRef in(&in_); + QString in(in_); - const int idx = in.lastIndexOf("/"); + const int idx = in.lastIndexOf('/'); if (idx != -1) { @@ -143,8 +144,8 @@ private: if (in.startsWith(OPENTRACK_LIBRARY_PREFIX) && in.endsWith("." OPENTRACK_LIBRARY_EXTENSION)) { - constexpr unsigned pfx_len = sizeof(OPENTRACK_LIBRARY_PREFIX) - 1; - constexpr unsigned rst_len = sizeof("." OPENTRACK_LIBRARY_EXTENSION) - 1; + constexpr auto pfx_len = (qsizetype)sizeof(OPENTRACK_LIBRARY_PREFIX) - 1; + constexpr auto rst_len = (qsizetype)sizeof("." OPENTRACK_LIBRARY_EXTENSION) - 1; in = in.mid(pfx_len); in = in.left(in.size() - rst_len); @@ -161,7 +162,7 @@ private: for (auto name : names) { if (in.startsWith(name)) - return in.mid(std::strlen(name)).toString(); + return in.mid((qsizetype)std::strlen(name)); } } } -- cgit v1.2.3