Skip to content

Commit 919ac14

Browse files
committed
fix compile error on macOS & Linux
1 parent e00bd98 commit 919ac14

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/docks/filesdock.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#include <QDesktopServices>
5555
#include <QProcess>
5656

57-
static const auto kInOutChangedTimeoutMs = 100;
5857
static const auto kTilePaddingPx = 10;
5958
static const auto kDetailedMode = QLatin1String("detailed");
6059
static const auto kIconsMode = QLatin1String("icons");
@@ -174,16 +173,13 @@ class FilesThumbnailTask : public QRunnable
174173
FilesModel *m_model;
175174
QString m_filePath;
176175
QModelIndex m_index;
177-
bool m_force;
178176

179177
public:
180-
FilesThumbnailTask(FilesModel *model, const QString &filePath, const QModelIndex &index,
181-
bool force = false)
178+
FilesThumbnailTask(FilesModel *model, const QString &filePath, const QModelIndex &index)
182179
: QRunnable()
183180
, m_model(model)
184181
, m_filePath(filePath)
185182
, m_index(index)
186-
, m_force(force)
187183
{
188184
}
189185

@@ -277,7 +273,6 @@ class FilesModel : public QFileSystemModel
277273
icon.paint(&painter, image.rect());
278274
return image;
279275
}
280-
int width = PlaylistModel::THUMBNAIL_WIDTH;
281276
QImage image;
282277
const auto path = filePath(index);
283278
const auto thumbnailKey = FilesThumbnailTask::cacheKey(path);
@@ -748,7 +743,7 @@ void FilesDock::setupActions()
748743
QIcon(":/icons/oxygen/32x32/actions/view-list-details.png"));
749744
action->setIcon(icon);
750745
action->setCheckable(true);
751-
connect(action, &QAction::triggered, this, [&](bool checked) {
746+
connect(action, &QAction::triggered, this, [&]() {
752747
Settings.setFilesViewMode(kTiledMode);
753748
updateViewMode();
754749
});
@@ -761,7 +756,7 @@ void FilesDock::setupActions()
761756
QIcon(":/icons/oxygen/32x32/actions/view-list-icons.png"));
762757
action->setIcon(icon);
763758
action->setCheckable(true);
764-
connect(action, &QAction::triggered, this, [&](bool checked) {
759+
connect(action, &QAction::triggered, this, [&]() {
765760
Settings.setFilesViewMode(kIconsMode);
766761
updateViewMode();
767762
});
@@ -774,7 +769,7 @@ void FilesDock::setupActions()
774769
QIcon(":/icons/oxygen/32x32/actions/view-list-text.png"));
775770
action->setIcon(icon);
776771
action->setCheckable(true);
777-
connect(action, &QAction::triggered, this, [&](bool checked) {
772+
connect(action, &QAction::triggered, this, [&]() {
778773
Settings.setFilesViewMode(kDetailedMode);
779774
updateViewMode();
780775
});
@@ -800,7 +795,7 @@ void FilesDock::setupActions()
800795
#if defined(Q_OS_WIN)
801796
const auto scheme = QLatin1String("file:///");
802797
#else
803-
QLatin1String("file://");
798+
const auto scheme = QLatin1String("file://");
804799
#endif
805800
QDesktopServices::openUrl({scheme + filePath, QUrl::TolerantMode});
806801
});

0 commit comments

Comments
 (0)