summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qbmphandler.cpp
diff options
context:
space:
mode:
authorKevin Funk <kfunk@kde.org>2014-08-07 17:42:16 +0200
committerKevin Funk <kevin.funk@kdab.com>2014-08-11 17:18:23 +0200
commitf5231b768e9986b9519af1a0d2eff1891adaeba2 (patch)
tree6dc2744965394449f5b3f108eda8ab2bdc0efca7 /src/gui/image/qbmphandler.cpp
parentbfa0be8a1bf68200f1ba98888deff4a9215ee066 (diff)
Remove use of 'register' from Qt.
It is deprecated and clang is warning about it [-Wdeprecated-register]. Original patch from Stephen Kelly, see commit d9fb6e6dbb2b322556d581265da2442e3b91a6a3 in qt5/qtbase This is a backport of this commit + additional manual replacements in header files. There are still some 'register' uses inside implementation files left, but headers are all 'register'-free now. Change-Id: I7225381df1f093073583d62fa86f7bd7cca869c7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/image/qbmphandler.cpp')
-rw-r--r--src/gui/image/qbmphandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 8b047d85bc..b22e842202 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -53,7 +53,7 @@ static void swapPixel01(QImage *image) // 1-bpp: swap 0 and 1 pixels
{
int i;
if (image->depth() == 1 && image->colorCount() == 2) {
- register uint *p = (uint *)image->bits();
+ uint *p = (uint *)image->bits();
int nbytes = image->byteCount();
for (i=0; i<nbytes/4; i++) {
*p = ~*p;
@@ -368,7 +368,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE4) { // run length compression
int x=0, y=0, c, i;
quint8 b;
- register uchar *p = data + (h-1)*bpl;
+ uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@@ -440,7 +440,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
while (--h >= 0) {
if (d->read((char*)buf,buflen) != buflen)
break;
- register uchar *p = data + h*bpl;
+ uchar *p = data + h*bpl;
uchar *b = buf;
for (int i=0; i<w/2; i++) { // convert nibbles to bytes
*p++ = *b >> 4;
@@ -457,7 +457,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
if (comp == BMP_RLE8) { // run length compression
int x=0, y=0;
quint8 b;
- register uchar *p = data + (h-1)*bpl;
+ uchar *p = data + (h-1)*bpl;
const uchar *endp = p + w;
while (y < h) {
if (!d->getChar((char *)&b))
@@ -520,7 +520,7 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
}
else if (nbits == 16 || nbits == 24 || nbits == 32) { // 16,24,32 bit BMP image
- register QRgb *p;
+ QRgb *p;
QRgb *end;
uchar *buf24 = new uchar[bpl];
int bpl24 = ((w*nbits+31)/32)*4;