From c4b2be45d29a247422e60bb8fdf1664c10384eee Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Mon, 6 Dec 2021 03:51:08 -0600 Subject: First pass for Qt6 compatibility --- src/iconfetcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/iconfetcher.cpp') diff --git a/src/iconfetcher.cpp b/src/iconfetcher.cpp index c10adc8d..32b0d58b 100644 --- a/src/iconfetcher.cpp +++ b/src/iconfetcher.cpp @@ -53,7 +53,7 @@ QVariant IconFetcher::icon(const QString& path) const return m_quickCache.file; } - return extensionIcon(path.midRef(dot)); + return extensionIcon(QStringView{path}.mid(dot)); } } @@ -110,7 +110,7 @@ void IconFetcher::checkCache(Cache& cache) std::map map; for (auto&& ext : queue) { - map.emplace(std::move(ext), getPixmapIcon(ext)); + map.emplace(std::move(ext), getPixmapIcon(QFileInfo(ext))); } { @@ -145,7 +145,7 @@ QVariant IconFetcher::fileIcon(const QString& path) const return {}; } -QVariant IconFetcher::extensionIcon(const QStringRef& ext) const +QVariant IconFetcher::extensionIcon(const QStringView& ext) const { { std::scoped_lock lock(m_extensionCache.mapMutex); -- cgit v1.3.1