diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2021-12-06 03:51:08 -0600 |
|---|---|---|
| committer | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2022-04-19 15:17:23 +0200 |
| commit | c4b2be45d29a247422e60bb8fdf1664c10384eee (patch) | |
| tree | 729640dc3e5105fe6eea04a5a03451176fc91a7e /src/iconfetcher.cpp | |
| parent | ec01532ecbd2d7c99d1b3bdd8cf261795df59327 (diff) | |
First pass for Qt6 compatibility
Diffstat (limited to 'src/iconfetcher.cpp')
| -rw-r--r-- | src/iconfetcher.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<QString, QPixmap> 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); |
