mirror of https://gitee.com/openkylin/peony.git
提升custom icon类型缩略图的显示优先级
This commit is contained in:
parent
f508938005
commit
aa7cb6a8e6
|
@ -389,8 +389,11 @@ void ThumbnailManager::createThumbnail(const QString &uri, std::shared_ptr<FileW
|
|||
|
||||
auto info = FileInfo::fromUri(uri);
|
||||
|
||||
if (!info->customIcon().isEmpty() /*&& info->customIcon().startsWith("/")*/)
|
||||
bool hasCustomIcon = false;
|
||||
if (!info->customIcon().isEmpty() /*&& info->customIcon().startsWith("/")*/) {
|
||||
needThumbnail = true;
|
||||
hasCustomIcon = true;
|
||||
}
|
||||
|
||||
if (!info->mimeType().isEmpty()) {
|
||||
if (info->isImageFile()) {
|
||||
|
@ -421,7 +424,7 @@ void ThumbnailManager::createThumbnail(const QString &uri, std::shared_ptr<FileW
|
|||
|
||||
auto thumbnailJob = new ThumbnailJob(uri, watcher, this);
|
||||
thumbnailJob->setForceUpdate(force);
|
||||
m_thumbnail_thread_pool->start(thumbnailJob);
|
||||
m_thumbnail_thread_pool->start(thumbnailJob, hasCustomIcon? QThread::HighestPriority: 0);
|
||||
qDebug() <<"createThumbnail thumbnailJob start:" <<uri;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue