[Qt-interest] qfontdatabase_qws.cpp access private data from qfontdatabase.cpp
Linda Maria
linda.maria.bjork at gmail.com
Thu Jul 9 13:22:56 CEST 2009
Hi
Thanks for you reply. I am reffering to the code in the QtGui/text lib. What
we got is:
qfontdatabase.cpp has declaration of a private class:
class QFontDatabasePrivate
{
...
};
qfonddatabase.h has forward declaration of that class:
class QFontDatabasePrivate;
Then strange things happens when qfontdatabase_qws.cpp has access to
QFontDatabasePrivate (qfontdatabase_qws.cpp is not including
qfontdatabase.cpp and, therefore only has access to the forward declaration
in qfonddatabase.h).
Thanks,
Linda
On Thu, Jul 9, 2009 at 1:07 PM, Donal O'Connor <donaloconnor at gmail.com>wrote:
> I don't have any code to look here but is it declared as a friend class?
>
>
> On Thu, Jul 9, 2009 at 11:54 AM, Linda Maria <linda.maria.bjork at gmail.com>wrote:
>
>> Hi again
>>
>> My question was obviously not well formulated. It is simple,
>> qfontdatabase_qws.cpp is accessing private implementation declared in
>> qfontdatabase.cpp. How is this done?
>>
>> Thanks,
>> Linda
>>
>>
>>> Message: 5
>>> Date: Thu, 9 Jul 2009 11:38:45 +0200
>>> From: Linda Maria <linda.maria.bjork at gmail.com>
>>> Subject: [Qt-interest] How does qfontdatabase_qws.cpp access private
>>> data from qfontdatabase.h?
>>> To: qt-interest at trolltech.com
>>> Message-ID:
>>> <9ecdb1790907090238j1bee2ca1u4917f9b832ed28 at mail.gmail.com>
>>> Content-Type: text/plain; charset="iso-8859-1"
>>>
>>> Hi
>>>
>>> I thought I knew how to read C++ code, but obviously I was wrong. I
>>> cannot
>>> figure out how private data from qfontdatabase.cpp can be accessed from
>>> qfontdatabase.h. For example:
>>>
>>>
>>> QFontDatabasePrivate is delclared and partly implemented in
>>> qfontdatabase.cpp and only forward declared in qfontdatabase.h. Then,
>>> qfontdatabase_qws.cpp starts accessing the QFontDatabasePrivate
>>> implementation. How is this done?
>>>
>>> It would be nice if Qt used more of pure C++ code rather than showing off
>>> with macro definitions.
>>>
>>> Thanks,
>>>
>>> Linda
>>> -------------- next part --------------
>>> An HTML attachment was scrubbed...
>>> URL:
>>> http://lists.trolltech.com/pipermail/qt-interest/attachments/20090709/9f4f6644/attachment-0001.html
>>>
>>> ------------------------------
>>>
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>>
>>> End of Qt-interest Digest, Vol 8, Issue 79
>>> ******************************************
>>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090709/ec5e2948/attachment.html
More information about the Qt-interest-old
mailing list