summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2009-07-01 12:35:46 +1000
committerKeith Isdale <keith.isdale@nokia.com>2009-08-24 15:28:07 +1000
commitfefd6e45962ac915fe9cd43b245642985c36b36d (patch)
tree4d0694fcb0720d493b7bb4995533865535c32675 /src/gui/image
parent6c282e096c160ef0426466042bf4bb4e0e28f0b2 (diff)
Make assorted constructors follow good coding practice
Ensure that class members are initialized Moved some value assignment from constructor body into the the constructor's intializer list Reviewed-by: Jason McDonald
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qnativeimage.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index fc5ad2ade3..918454d08e 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -144,11 +144,15 @@ QImage::Format QNativeImage::systemFormat()
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* isTextBuffer */, QWidget *widget)
+ : xshmimg(0), xshmpm(0)
{
if (!X11->use_mitshm) {
- xshmimg = 0;
- xshmpm = 0;
image = QImage(width, height, format);
+ // follow good coding practice and set xshminfo attributes, though values not used in this case
+ xshminfo.readOnly = true;
+ xshminfo.shmaddr = 0;
+ xshminfo.shmid = 0;
+ xshminfo.shmseg = 0;
return;
}