Skip to content

Commit

Permalink
fix: Screen saver filters invalid images
Browse files Browse the repository at this point in the history
Screen saver filters invalid images

Log: Screen saver filters invalid images

Bug: https://pms.uniontech.com/bug-view-268911.html
  • Loading branch information
zhx-uos committed Aug 19, 2024
1 parent 408ae33 commit 936542b
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,11 @@ void SlideshowScreenSaver::loadSlideshowImages()
int idx = 1;
for (auto info : infoList) {
if (info.size() < IMAGE_MAX_SIZE && validSuffix.contains(info.suffix(), Qt::CaseInsensitive)) {
m_imagefiles.append(info.absoluteFilePath()); // 记录图片列表
m_playOrder.insert(idx, info.absoluteFilePath());
QScopedPointer<QPixmap> pixmapPointer(new QPixmap(info.absoluteFilePath()));
if (pixmapPointer && !pixmapPointer->isNull()){
m_imagefiles.append(info.absoluteFilePath()); // 记录图片列表
m_playOrder.insert(idx, info.absoluteFilePath());
}
idx++;
}
}
Expand Down

0 comments on commit 936542b

Please sign in to comment.