mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
dcb580ed46
commit
6008d08557
2 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue