summaryrefslogtreecommitdiff
path: root/src/iconfetcher.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2023-07-09 17:36:03 +0200
committerGitHub <noreply@github.com>2023-07-09 17:36:03 +0200
commitef94aee28464039672b277243a0181ae93550d6c (patch)
tree0575a68af5f154e9d6d0738edbaefb16a11d6f5c /src/iconfetcher.cpp
parent7d6cb8528d20e36a4cee822263865ee2f7f32481 (diff)
parent3de050e9c03e553f7ae3f780f6bd080a30ae123e (diff)
Merge pull request #1839 from Holt59/ci/initial-gh-action-for-build
Clang-Format + Github Workflow
Diffstat (limited to 'src/iconfetcher.cpp')
-rw-r--r--src/iconfetcher.cpp23
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()