Mercurial > hg > easyhg
changeset 671:ce29dc775650 qt5
Fix compiler warnings
author | Chris Cannam |
---|---|
date | Wed, 05 Dec 2018 09:43:26 +0000 |
parents | 8f3075eeaac2 |
children | 88fa1544b407 |
files | src/changesetdetailitem.cpp src/changesetitem.cpp src/historywidget.cpp src/mainwindow.cpp src/multichoicedialog.cpp src/panned.cpp |
diffstat | 6 files changed, 12 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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<QPointF> 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();
--- 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) {
--- 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);
--- 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 != "") {
--- 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(); }
--- 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; }; }