Assignment to private attribute of QGenericMatrix produces compilation error

Issue #3 resolved
Genba Tawaraboshi created an issue

I've tried to compile the latest code from master (as of this writing, commit 4b5f98c) on 64 bit Windows 7 with Qt Creator + MinGW

Qt Creator 3.3.0 (opensource)
Based on Qt 5.4.0 (MSVC 2010, 32 bit)

Built on Dec 8 2014 at 15:24:21

From revision d36c4d87db

and have got the following compilation errors:

WLP.png

C:\Users\Genba\Documents\Desarrollo\wavelengthpro\generalviewediting.cpp:356: error: within this context
                  qreal r = qBound<qreal>(0, (rgbOut.m[0][0]), 1); //X
                                                     ^
C:\Users\Genba\Documents\Desarrollo\wavelengthpro\generalviewediting.cpp:357: error: within this context
                  qreal g = qBound<qreal>(0, (rgbOut.m[1][0]), 1); //Y
                                                     ^
C:\Users\Genba\Documents\Desarrollo\wavelengthpro\generalviewediting.cpp:358: error: within this context
                  qreal b = qBound<qreal>(0, (rgbOut.m[2][0]), 1); //Z
                                                     ^

The problem is that the m attribute is a private attribute which we are trying to modify directly. We have to replace all these accesses to m with calls to QGenericMatrix::​operator()(int row, int column).

Comments (4)

  1. Log in to comment