8 changes: 4 additions & 4 deletions src/libkst/vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,11 +589,11 @@ void Vector::oldChange(QByteArray &data) {
qds >> _v[i];
if(!i) {
_min=_max=_minPos=sum=_v[i];
_minPos=qMax(_minPos,0.0);
_minPos=qMax(_minPos,qreal(0.0));
} else {
_min=qMin(_v[i],_min);
_max=qMax(_v[i],_max);
_minPos=qMin(qMax(_v[i],0.0),_minPos);
_minPos=qMin(qMax(_v[i],qreal(0.0)),_minPos);
sum+=_v[i];
}
}
Expand All @@ -620,11 +620,11 @@ void Vector::change(QByteArray &data) {
qds >> _v[i];
if(!i) {
_min=_max=_minPos=sum=_v[i];
_minPos=qMax(_minPos,0.0);
_minPos=qMax(_minPos,qreal(0.0));
} else {
_min=qMin(_v[i],_min);
_max=qMax(_v[i],_max);
_minPos=qMin(qMax(_v[i],0.0),_minPos);
_minPos=qMin(qMax(_v[i],qreal(0.0)),_minPos);
sum+=_v[i];
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/changedatasampledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ ChangeDataSampleDialog::ChangeDataSampleDialog(QWidget *parent)
connect(_removeAll, SIGNAL(clicked()), this, SLOT(removeAll()));
connect(_addAll, SIGNAL(clicked()), this, SLOT(addAll()));

connect(_vectorList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedVectorList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));
connect(_vectorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedVectorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));

connect(_vectorList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
connect(_selectedVectorList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
Expand Down
6 changes: 3 additions & 3 deletions src/libkstapp/changefiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ ChangeFileDialog::ChangeFileDialog(QWidget *parent)
connect(_removeAll, SIGNAL(clicked()), this, SLOT(removeAll()));
connect(_addAll, SIGNAL(clicked()), this, SLOT(addAll()));

connect(_changeFilePrimitiveList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedFilePrimitiveList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));
connect(_changeFilePrimitiveList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedFilePrimitiveList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));

connect(_allFromFile, SIGNAL(clicked()), this, SLOT(selectAllFromFile()));

Expand Down Expand Up @@ -157,7 +157,7 @@ void ChangeFileDialog::fileNameChanged(const QString &file) {

_requestID += 1;
ValidateDataSourceThread *validateDSThread = new ValidateDataSourceThread(file, _requestID);
connect(validateDSThread, SIGNAL(dataSourceValid(QString, int)), this, SLOT(sourceValid(QString, int)));
connect(validateDSThread, SIGNAL(dataSourceValid(QString,int)), this, SLOT(sourceValid(QString,int)));
QThreadPool::globalInstance()->start(validateDSThread);
}

Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/contenttab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ ContentTab::ContentTab(QWidget *parent, ObjectStore *store)
connect(_up, SIGNAL(clicked()), this, SIGNAL(modified()));
connect(_down, SIGNAL(clicked()), this, SIGNAL(modified()));

connect(_availableRelationList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_displayedRelationList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(displayedDoubleClicked(QListWidgetItem*)));
connect(_availableRelationList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_displayedRelationList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(displayedDoubleClicked(QListWidgetItem*)));

connect(_availableRelationList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
connect(_displayedRelationList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
Expand Down
4 changes: 2 additions & 2 deletions src/libkstapp/exportvectorsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ ExportVectorsDialog::ExportVectorsDialog(QWidget *parent) :
connect(_removeAll, SIGNAL(clicked()), this, SLOT(removeAll()));
connect(_addAll, SIGNAL(clicked()), this, SLOT(addAll()));

connect(_changeVectorList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedVectorList, SIGNAL(itemDoubleClicked (QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));
connect(_changeVectorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(availableDoubleClicked(QListWidgetItem*)));
connect(_selectedVectorList, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(selectedDoubleClicked(QListWidgetItem*)));

connect(_changeVectorList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
connect(_selectedVectorList, SIGNAL(itemSelectionChanged()), this, SLOT(updateButtons()));
Expand Down
6 changes: 3 additions & 3 deletions src/libkstmath/curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,14 +676,14 @@ RelationPtr Curve::makeDuplicate() const {
// and not just pulled out of the air by what looks ~good.
// They are currently "about right" for printing to US Letter.
double Curve::pointDim(QRectF w) const {
return qMax(1.01, PointSize * ((w.width() + w.height()) * (1.0 / 4000.0)));
return qMax(qreal(1.01), PointSize * ((w.width() + w.height()) * (1.0 / 4000.0)));
}

double Curve::lineDim(const QRectF &R, double linewidth) {
double lw = qMax(1.01, linewidth*(R.width()+R.height())*(1.0/2000.0));
double lw = qMax(qreal(1.01), linewidth*(R.width()+R.height())*(1.0/2000.0));
// if you ask for a thicker line, make sure it is at least 2 px wide
if (linewidth>1.9) {
lw = qMax(2.0,lw);
lw = qMax(qreal(2.0),lw);
}

return (int(lw+0.5));
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dataobject/activitylevel/activitylevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ bool ActivityLevelSource::algorithm() {
incomingValueNext = outputVectorDenoised->value()[i+1];
}
if ( (outgoingValue-outgoingValuePrev)*(outgoingValueNext-outgoingValue) < 0) {
dNbReversals = qMax(dNbReversals - 1.0, 0.0); // Avoid getting negative values, which can happen
dNbReversals = qMax(dNbReversals - 1.0, qreal(0.0)); // Avoid getting negative values, which can happen
}
if ( (incomingValue-incomingValuePrev)*(incomingValueNext-incomingValue) < 0) {
dNbReversals += 1.0;
Expand Down