Skip to content

Commit

Permalink
Warnings (#406)
Browse files Browse the repository at this point in the history
* Fixes compiler warnings about unused variable/parameters

* Fix Clang warning about unused this lambda capture

In this case the this pointer is implicitly captured and Clang issues a
warning.
  • Loading branch information
luis-pereira authored and tsujan committed Apr 19, 2019
1 parent 06d8d31 commit 29e5296
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/filechangeattrjob.cpp
Expand Up @@ -152,7 +152,7 @@ bool FileChangeAttrJob::processFile(const FilePath& path, const GFileInfoPtr& in
return ret;
}

bool FileChangeAttrJob::handleError(GErrorPtr &err, const FilePath &path, const GFileInfoPtr &info, ErrorSeverity severity) {
bool FileChangeAttrJob::handleError(GErrorPtr &err, const FilePath & /*path*/, const GFileInfoPtr & /*info*/, ErrorSeverity severity) {
auto act = emitError(err, severity);
if (act == ErrorAction::RETRY) {
err.reset();
Expand Down
2 changes: 1 addition & 1 deletion src/core/filetransferjob.cpp
Expand Up @@ -145,7 +145,7 @@ bool FileTransferJob::copySpecialFile(const FilePath& srcPath, const GFileInfoPt
return ret;
}

bool FileTransferJob::copyDirContent(const FilePath& srcPath, GFileInfoPtr srcInfo, FilePath& destPath, bool skip) {
bool FileTransferJob::copyDirContent(const FilePath& srcPath, GFileInfoPtr /*srcInfo*/, FilePath& destPath, bool skip) {
bool ret = false;
// copy dir content
GErrorPtr err;
Expand Down
3 changes: 1 addition & 2 deletions src/folderview.cpp
Expand Up @@ -372,7 +372,7 @@ void FolderViewTreeView::headerContextMenu(const QPoint &p) {
}
else {
action->setChecked(!header()->isSectionHidden(columnId));
connect(action, &QAction::triggered, action, [this, column, columnId] (bool checked) {
connect(action, &QAction::triggered, action, [this, column] (bool checked) {
if(checked) {
hiddenColumns_.remove(column);
}
Expand Down Expand Up @@ -424,7 +424,6 @@ void FolderViewTreeView::mousePressEvent(QMouseEvent* event) {
mousePressPoint_ = event->pos() + QPoint(horizontalOffset(), verticalOffset());
QModelIndex index = indexAt(event->pos());
if(index.isValid()) {
QItemSelectionModel::SelectionFlags command;
Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers();
const Qt::MouseButton button = static_cast<const QMouseEvent*>(event)->button();
const bool shiftKeyPressed = modifiers & Qt::ShiftModifier;
Expand Down
2 changes: 1 addition & 1 deletion src/placesview.cpp
Expand Up @@ -157,7 +157,7 @@ PlacesView::PlacesView(QWidget* parent):
// for some reason (a Qt bug?), spanning is reset
spanFirstColumn();
});
connect(model_.get(), &QAbstractItemModel::rowsRemoved, this, [this](const QModelIndex&, int, int) {
connect(model_.get(), &QAbstractItemModel::rowsRemoved, this, [](const QModelIndex&, int, int) {
proxyModel_->setHidden(QString());
});

Expand Down

0 comments on commit 29e5296

Please sign in to comment.