# HG changeset patch # User Chris Cannam # Date 1544003006 0 # Node ID ce29dc7756508b4c7c2eb40dec00ceeeb4ac2822 # Parent 8f3075eeaac224e5c545d2b8e9c6480b30b75656 Fix compiler warnings diff -r 8f3075eeaac2 -r ce29dc775650 src/changesetdetailitem.cpp --- a/src/changesetdetailitem.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/changesetdetailitem.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -65,14 +65,13 @@ void ChangesetDetailItem::paint(QPainter *paint, - const QStyleOptionGraphicsItem *option, - QWidget *w) + const QStyleOptionGraphicsItem *, + QWidget *) { paint->save(); ColourSet *colourSet = ColourSet::instance(); QColor branchColour = colourSet->getColourFor(m_changeset->branch()); - QColor userColour = colourSet->getColourFor(m_changeset->author()); QTransform t = paint->worldTransform(); float scale = std::min(t.m11(), t.m22()); @@ -105,15 +104,6 @@ pts.push_back(QPointF(0, height/3 - 5)); paint->drawPolygon(QPolygonF(pts)); -/* - paint->setBrush(branchColour); - QVector pts; - pts.push_back(QPointF(width/2 - 5, 0)); - pts.push_back(QPointF(width/2 + 5, 0)); - pts.push_back(QPointF(width/2, -10)); - pts.push_back(QPointF(width/2 - 5, 0)); - paint->drawPolygon(QPolygonF(pts)); -*/ m_doc->drawContents(paint, r); paint->restore(); diff -r 8f3075eeaac2 -r ce29dc775650 src/changesetitem.cpp --- a/src/changesetitem.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/changesetitem.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -513,7 +513,6 @@ f.setPixelSize(ps); } - bool showText = (scale >= 0.2); bool showProperLines = (scale >= 0.1); if (!showProperLines) { diff -r 8f3075eeaac2 -r ce29dc775650 src/historywidget.cpp --- a/src/historywidget.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/historywidget.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -219,8 +219,6 @@ setChangesetParents(); ChangesetScene *scene = new ChangesetScene(); - ChangesetItem *tipItem = 0; - QGraphicsScene *oldScene = m_panned->scene(); m_panned->setScene(0); diff -r 8f3075eeaac2 -r ce29dc775650 src/mainwindow.cpp --- a/src/mainwindow.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/mainwindow.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -858,7 +858,7 @@ hgRefresh(); } -void MainWindow::hgUnIgnoreFiles(QStringList files) +void MainWindow::hgUnIgnoreFiles(QStringList) { // Not implemented: edit the .hgignore instead hgEditIgnore(); @@ -2048,7 +2048,7 @@ output); } -void MainWindow::commandStarting(HgAction action) +void MainWindow::commandStarting(HgAction) { m_commandSequenceInProgress = true; } @@ -2591,7 +2591,7 @@ } } -void MainWindow::commandCancelled(HgAction cancelledAction) +void MainWindow::commandCancelled(HgAction) { // Originally I had this checking whether the cancelled action was // a network one and, if so, calling hgQueryPaths to update the @@ -3115,9 +3115,6 @@ spacerBefore = spacerAfter = " "; #endif - bool spacingReqd = false; - QString spacer = ""; - m_repoToolBar = addToolBar(tr("Remote")); m_repoToolBar->setIconSize(QSize(sz, sz)); if (spacerBefore != "") { diff -r 8f3075eeaac2 -r ce29dc775650 src/multichoicedialog.cpp --- a/src/multichoicedialog.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/multichoicedialog.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -221,14 +221,14 @@ } void -MultiChoiceDialog::urlChanged(const QString &s) +MultiChoiceDialog::urlChanged(const QString &) { updateOkButton(); updateFileComboFromURL(); } void -MultiChoiceDialog::fileChanged(const QString &s) +MultiChoiceDialog::fileChanged(const QString &) { updateOkButton(); } diff -r 8f3075eeaac2 -r ce29dc775650 src/panned.cpp --- a/src/panned.cpp Fri May 27 11:02:53 2016 +0100 +++ b/src/panned.cpp Wed Dec 05 09:43:26 2018 +0000 @@ -88,7 +88,7 @@ } void -Panned::drawForeground(QPainter *paint, const QRectF &) +Panned::drawForeground(QPainter *, const QRectF &) { QPointF nearpt = mapToScene(0, 0); QPointF farpt = mapToScene(width(), height()); @@ -222,6 +222,10 @@ m_dragDirection = FreeDrag; } break; + + case FreeDrag: + // stick with it + break; }; }