+ fix various warnings

This commit is contained in:
wmayer
2015-08-29 22:05:09 +02:00
parent 1a12d109e9
commit cb16fec6bb
25 changed files with 55 additions and 40 deletions

View File

@@ -375,7 +375,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev)
this->mousedownConsumedEvent[cnt] = *event;//hopefully, a shallow copy is enough. There are no pointers stored in events, apparently. Will loose a subclass, though.
cnt++;
assert(cnt<=2);
if(cnt>sizeof(mousedownConsumedEvent)){
if(cnt>static_cast<int>(sizeof(mousedownConsumedEvent))){
cnt=sizeof(mousedownConsumedEvent);//we are in trouble
}
processed = true;//just consume this event, and wait for the move threshold to be broken to start dragging/panning

View File

@@ -67,6 +67,7 @@ public:
QString copy = input;
int len = copy.size();
pos = len;
const bool plus = max >= 0;
const bool minus = min <= 0;
@@ -274,7 +275,7 @@ void QuantitySpinBox::userInput(const QString & text)
Q_D(QuantitySpinBox);
QString tmp = text;
int pos;
int pos = 0;
QValidator::State state;
Base::Quantity res = d->validateAndInterpret(tmp, pos, state);
if (state == QValidator::Acceptable) {
@@ -446,7 +447,7 @@ void QuantitySpinBox::focusOutEvent(QFocusEvent * event)
{
Q_D(QuantitySpinBox);
int pos;
int pos = 0;
QString text = lineEdit()->text();
QValidator::State state;
d->validateAndInterpret(text, pos, state);

View File

@@ -60,7 +60,7 @@ QtCoinCompatibility::SbImageToQImage(const SbImage & sbimage, QImage & img)
"Implementation not tested for 3 colors or more"
);
}
QImage::Format format;
QImage::Format format=QImage::Format_Invalid;
if (nc==3||nc==4) {
format=QImage::Format_RGB32;
}