Use doubles in DoubleSpinBoxDelegate

The previous code used qreals, but it feels clearer to use doubles when
the name of the class contains the word double. The performance loss of
using doubles instead of floats on arm is non-existent in this case.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-07-12 14:24:24 +02:00 committed by Dirk Hohndel
parent dcb580ed46
commit 6008d08557
2 changed files with 4 additions and 4 deletions

View file

@ -379,7 +379,7 @@ QWidget *SpinBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt
return w;
}
DoubleSpinBoxDelegate::DoubleSpinBoxDelegate(qreal min, qreal max, QObject *parent):
DoubleSpinBoxDelegate::DoubleSpinBoxDelegate(double min, double max, QObject *parent):
QStyledItemDelegate(parent),
min(min),
max(max)

View file

@ -101,11 +101,11 @@ private:
class DoubleSpinBoxDelegate : public QStyledItemDelegate {
Q_OBJECT
public:
DoubleSpinBoxDelegate(qreal min, qreal max, QObject *parent = 0);
DoubleSpinBoxDelegate(double min, double max, QObject *parent = 0);
virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
private:
qreal min;
qreal max;
double min;
double max;
};
#endif // MODELDELEGATES_H