diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/iconfetcher.cpp | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
Diffstat (limited to 'src/iconfetcher.cpp')
| -rw-r--r-- | src/iconfetcher.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/iconfetcher.cpp b/src/iconfetcher.cpp index 32b0d58b..c677424c 100644 --- a/src/iconfetcher.cpp +++ b/src/iconfetcher.cpp @@ -1,11 +1,13 @@ #include "iconfetcher.h" -#include "thread_utils.h" #include "shared/util.h" +#include "thread_utils.h" void IconFetcher::Waiter::wait() { std::unique_lock lock(m_wakeUpMutex); - m_wakeUp.wait(lock, [&]{ return m_queueAvailable; }); + m_wakeUp.wait(lock, [&] { + return m_queueAvailable; + }); m_queueAvailable = false; } @@ -19,14 +21,14 @@ void IconFetcher::Waiter::wakeUp() m_wakeUp.notify_one(); } - -IconFetcher::IconFetcher() - : m_iconSize(GetSystemMetrics(SM_CXSMICON)), m_stop(false) +IconFetcher::IconFetcher() : m_iconSize(GetSystemMetrics(SM_CXSMICON)), m_stop(false) { - m_quickCache.file = getPixmapIcon(QFileIconProvider::File); + m_quickCache.file = getPixmapIcon(QFileIconProvider::File); m_quickCache.directory = getPixmapIcon(QFileIconProvider::Folder); - m_thread = MOShared::startSafeThread([&]{ threadFun(); }); + m_thread = MOShared::startSafeThread([&] { + threadFun(); + }); } IconFetcher::~IconFetcher() @@ -73,10 +75,9 @@ bool IconFetcher::hasOwnIcon(const QString& path) const static const QString lnk = ".lnk"; static const QString ico = ".ico"; - return - path.endsWith(exe, Qt::CaseInsensitive) || - path.endsWith(lnk, Qt::CaseInsensitive) || - path.endsWith(ico, Qt::CaseInsensitive); + return path.endsWith(exe, Qt::CaseInsensitive) || + path.endsWith(lnk, Qt::CaseInsensitive) || + path.endsWith(ico, Qt::CaseInsensitive); } void IconFetcher::threadFun() |
