mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Code Cleanup: Remove #if 0 code
As a personal habit I tend to use the C pre-processor to comment out code blocks I don't want to remove. This is in case the code will be required in the future. I think it is now safe to say the code commented out is not required -- most of it is legacy and marks the transition from earlier designs or legacy code. I've done this in one big commit since in theory it has no functional change, and in future can look in this commit for any code we may want to reinstate.
This commit is contained in:
@@ -422,29 +422,6 @@ ErgFilePlot::performancePlot(RealtimeData rtdata)
|
||||
if (!cadData->count()) cadData->append(&zero, &cad, 1);
|
||||
cadData->append(&x, &cad, 1);
|
||||
cadCurve->setData(cadData->x(), cadData->y(), cadData->count());
|
||||
|
||||
//const bool cacheMode = canvas()->testPaintAttribute(QwtPlotCanvas::PaintCached);
|
||||
|
||||
#if 0
|
||||
#if QT_VERSION >= 0x040000 && defined(Q_WS_X11)
|
||||
// Even if not recommended by TrollTech, Qt::WA_PaintOutsidePaintEvent
|
||||
// works on X11. This has an tremendous effect on the performance..
|
||||
|
||||
canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, true);
|
||||
#endif
|
||||
|
||||
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, false);
|
||||
wattsCurve->draw(0, wattsCurve->dataSize() - 1);
|
||||
hrCurve->draw(0, hrCurve->dataSize() - 1);
|
||||
cadCurve->draw(0, cadCurve->dataSize() - 1);
|
||||
speedCurve->draw(0, speedCurve->dataSize() - 1);
|
||||
canvas()->setPaintAttribute(QwtPlotCanvas::PaintCached, cacheMode);
|
||||
|
||||
#if QT_VERSION >= 0x040000 && defined(Q_WS_X11)
|
||||
canvas()->setAttribute(Qt::WA_PaintOutsidePaintEvent, false);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user