diff options
author | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2009-11-06 09:33:33 +0100 |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2009-11-06 15:45:10 +0100 |
commit | e53c26b52c890f242491e0dfed4201313d98f720 (patch) | |
tree | 7fac2b3f8972ea22c1136995864f6eacda87ccac /tools/qvfb | |
parent | 98e0b95581f46b94773a55195e0e67a466c333ed (diff) | |
download | qt4-tools-e53c26b52c890f242491e0dfed4201313d98f720.tar.gz |
API review: Rename functions numColors(), setNumColors() and numBytes()
QPaintDevice and QImage used the functions numColors(), setNumColors(),
and numBytes(). However, this is not consistent with the rest of the Qt
API which uses *Count() and set*Count().
Removed all usage of these functions inside Qt and test-cases.
Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'tools/qvfb')
-rw-r--r-- | tools/qvfb/qvfbview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/qvfb/qvfbview.cpp b/tools/qvfb/qvfbview.cpp index 8cab641e0b..69817bdb8e 100644 --- a/tools/qvfb/qvfbview.cpp +++ b/tools/qvfb/qvfbview.cpp @@ -596,7 +596,7 @@ QImage QVFbView::getBuffer(const QRect &r, int &leading) const r.width(), r.height(), mView->linestep(), QImage::Format_Indexed8); img.setColorTable(mView->clut()); - if (img.numColors() <= 0) + if (img.colorCount() <= 0) img = QImage(); break; } @@ -613,10 +613,10 @@ QImage QVFbView::getBuffer(const QRect &r, int &leading) const if ( img.format() != QImage::Format_ARGB32_Premultiplied ) img = img.convertToFormat(QImage::Format_RGB32); - // NOTE: calling bits() may change numBytes(), so do not + // NOTE: calling bits() may change byteCount(), so do not // pass them as parameters (which are evaluated right-to-left). QRgb *b = (QRgb*)img.bits(); - int n = img.numBytes()/4; + int n = img.byteCount()/4; dim(b,n,brightness); } } |