diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-17 11:48:51 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-17 11:49:14 (GMT) |
commit | 3d50220423b96a84f1ca4c0f5ef9246345aad359 (patch) | |
tree | 82d66d5da9ae7820abd04577fe6a93a983a5277b /src/gui | |
parent | 025a7395153c3708e2964cfd93957532b19ae04f (diff) | |
download | Qt-3d50220423b96a84f1ca4c0f5ef9246345aad359.zip Qt-3d50220423b96a84f1ca4c0f5ef9246345aad359.tar.gz Qt-3d50220423b96a84f1ca4c0f5ef9246345aad359.tar.bz2 |
Fix coverity warnings
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qmovie.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qppmhandler.cpp | 2 | ||||
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qcssparser.cpp | 6 |
5 files changed, 6 insertions, 9 deletions
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp index 2265e7b..c341e5e 100644 --- a/src/gui/image/qmovie.cpp +++ b/src/gui/image/qmovie.cpp @@ -356,7 +356,7 @@ QFrameInfo QMoviePrivate::infoForFrame(int frameNumber) reader = new QImageReader(device, format); else reader = new QImageReader(absoluteFilePath, format); - reader->canRead(); // Provoke a device->open() call + (void)reader->canRead(); // Provoke a device->open() call reader->device()->seek(initialDevicePos); reader->setBackgroundColor(bgColor); reader->setScaledSize(scaledSize); diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp index 77ccb48..ed8f4c1 100644 --- a/src/gui/image/qppmhandler.cpp +++ b/src/gui/image/qppmhandler.cpp @@ -80,7 +80,7 @@ static int read_pbm_int(QIODevice *d) else if (isspace((uchar) c)) continue; else if (c == '#') - d->readLine(buf, buflen); + (void)d->readLine(buf, buflen); else break; } diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 633dd53..96df758 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -2615,7 +2615,7 @@ void QHeaderView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bot int first = orientation() == Qt::Horizontal ? topLeft.column() : topLeft.row(); int last = orientation() == Qt::Horizontal ? bottomRight.column() : bottomRight.row(); for (int i = first; i <= last && !resizeRequired; ++i) - resizeRequired = (resizeRequired && resizeMode(i)); + resizeRequired = (resizeMode(i) == ResizeToContents); if (resizeRequired) d->doDelayedResizeSections(); } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 654870f..d00329b 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1022,9 +1022,6 @@ void QRasterPaintEnginePrivate::drawImage(const QPointF &pt, if (alpha == 0 || !clip.isValid()) return; - if (alpha ==0) - return; - Q_ASSERT(img.depth() >= 8); int srcBPL = img.bytesPerLine(); diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index f11104f..d3dcf50 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -789,7 +789,7 @@ static BrushData parseBrushValue(const Value &v, const QPalette &pal) } else { parser.next(); Value value; - parser.parseTerm(&value); + (void)parser.parseTerm(&value); if (attr.compare(QLatin1String("spread"), Qt::CaseInsensitive) == 0) { spread = spreads.indexOf(value.variant.toString()); } else { @@ -797,7 +797,7 @@ static BrushData parseBrushValue(const Value &v, const QPalette &pal) } } parser.skipSpace(); - parser.test(COMMA); + (void)parser.test(COMMA); } if (gradType == 0) { @@ -2458,7 +2458,7 @@ bool Parser::parseAttrib(AttributeSelector *attr) bool Parser::parsePseudo(Pseudo *pseudo) { - test(COLON); + (void)test(COLON); pseudo->negated = test(EXCLAMATION_SYM); if (test(IDENT)) { pseudo->name = lexem(); |