mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Silence some warnings
One of them actually looks like it was a bug... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
be6e6638de
commit
6b08a6d428
2 changed files with 6 additions and 4 deletions
|
@ -27,8 +27,6 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
|
|||
setScene(new QGraphicsScene());
|
||||
scene()->setSceneRect(0,0,1920,1080);
|
||||
|
||||
QRectF r = scene()->sceneRect();
|
||||
|
||||
verticalLine = new QGraphicsLineItem(
|
||||
fromPercent(0, Qt::Horizontal),
|
||||
fromPercent(0, Qt::Vertical),
|
||||
|
@ -439,7 +437,7 @@ void Ruler::updateTicks()
|
|||
double steps = (max - min) / interval;
|
||||
double stepSize = (m.x2() - m.x1()) / steps;
|
||||
qreal pos;
|
||||
for (qreal pos = m.x1(); pos < m.x2(); pos += stepSize) {
|
||||
for (pos = m.x1(); pos < m.x2(); pos += stepSize) {
|
||||
item = new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this);
|
||||
item->setPen(pen());
|
||||
ticks.push_back(item);
|
||||
|
@ -500,7 +498,6 @@ qreal Ruler::posAtValue(qreal value)
|
|||
qreal Ruler::percentAt(const QPointF& p)
|
||||
{
|
||||
qreal value = valueAt(p);
|
||||
QLineF m = line();
|
||||
double size = max - min;
|
||||
double percent = value / size;
|
||||
return percent;
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
#include <libdivecomputer/version.h>
|
||||
|
||||
static struct graphics_context last_gc;
|
||||
|
||||
#if PRINT_IMPLEMENTED
|
||||
static double plot_scale = SCALE_SCREEN;
|
||||
#endif
|
||||
|
||||
struct text_render_options{
|
||||
double size;
|
||||
|
@ -122,6 +125,7 @@ bool ProfileGraphicsView::eventFilter(QObject* obj, QEvent* event)
|
|||
return QGraphicsView::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
#if PRINT_IMPLEMENTED
|
||||
static void plot_set_scale(scale_mode_t scale)
|
||||
{
|
||||
switch (scale) {
|
||||
|
@ -134,6 +138,7 @@ static void plot_set_scale(scale_mode_t scale)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ProfileGraphicsView::showEvent(QShowEvent* event)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue