From 7050b911db95a67b611ddb967a65332f5c924d01 Mon Sep 17 00:00:00 2001 From: Cristian Tibirna Date: Mon, 3 Sep 2018 11:20:08 -0400 Subject: [PATCH] Silence compilation warnings --- src/filelist.cpp | 2 +- src/listview.cpp | 13 +++++++------ src/mainimpl.cpp | 3 +++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/filelist.cpp b/src/filelist.cpp index 47b6234..0196d98 100644 --- a/src/filelist.cpp +++ b/src/filelist.cpp @@ -116,7 +116,7 @@ void FileList::on_customContextMenuRequested(const QPoint&) { emit contextMenu(currentText(), QGit::POPUP_FILE_EV); } -bool FileList::startDragging(QMouseEvent* e) { +bool FileList::startDragging(QMouseEvent* /*e*/) { const QString& dragFileName = currentText(); if (dragFileName.isEmpty()) return false; diff --git a/src/listview.cpp b/src/listview.cpp index 8388b2f..d49545e 100644 --- a/src/listview.cpp +++ b/src/listview.cpp @@ -321,7 +321,7 @@ QPixmap ListView::pixmapFromSelection(const QStringList &revs, const QString &re const int maxRows = 10; const int dotdotRow = 5; QStyleOptionViewItem opt; opt.initFrom(this); - ListViewDelegate *lvd = dynamic_cast(itemDelegate()); +// ListViewDelegate *lvd = dynamic_cast(itemDelegate()); QFontMetrics fm(opt.font); int height = fm.height()+2; @@ -356,7 +356,7 @@ QPixmap ListView::pixmapFromSelection(const QStringList &revs, const QString &re return pixmap; } -void ListView::startDragging(QMouseEvent* e) { +void ListView::startDragging(QMouseEvent* /*e*/) { QStringList selRevs; getSelectedItems(selRevs); @@ -438,7 +438,7 @@ struct ListView::DropInfo { case RebaseAction: return "rebasing"; case MoveRefAction: return "moving"; case MergeAction: return "merging"; - default: "This should not happen."; + default: return "This should not happen."; } } }; @@ -591,9 +591,10 @@ void ListView::dragMoveEvent(QDragMoveEvent* e) { e->setDropAction(static_cast(action & 0x7)); } -void ListView::dragLeaveEvent(QDragLeaveEvent *e) +void ListView::dragLeaveEvent(QDragLeaveEvent* /*e*/) { - if (dropInfo) delete dropInfo; dropInfo = NULL; + if (dropInfo) delete dropInfo; + dropInfo = NULL; showStatusMessage(""); } @@ -610,7 +611,7 @@ void ListView::dropEvent(QDropEvent *e) { } SCRef targetRef = refNameAt(e->pos()); - uint targetRefType = refTypeFromName(targetRef); +// uint targetRefType = refTypeFromName(targetRef); SCRef targetSHA = sha(indexAt(e->pos()).row()); switch(dropInfo->action) { case DropInfo::PatchAction: diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp index 59332fd..21d4a9d 100644 --- a/src/mainimpl.cpp +++ b/src/mainimpl.cpp @@ -771,6 +771,9 @@ void MainImpl::rebase(const QString &from, const QString &to, const QString &ont } else { success = git->run(QString("git rebase --onto %3 %1^ %2").arg(from, to, onto)); } + if (!success) { + // TODO say something about rebase failure + } refreshRepo(true); QApplication::restoreOverrideCursor(); } -- 2.11.4.GIT