[Qt-interest] [qt4.5-rc1] QVariant(void*) made private
Constantin Makshin
dinosaur-rus at users.sourceforge.net
Sun Feb 15 18:43:17 CET 2009
AFAIK, mingwm10.dll is MinGW library needed by multi-threaded applications
to deal with some internal data.
On Sun, 15 Feb 2009 20:05:12 +0300, Jeff Schiller <codedread at gmail.com>
wrote:
> Hi J-P,
>
> Thanks for responding!
>
> On 2/15/09, J-P Nurmi <jpnurmi at gmail.com> wrote:
>> On Sun, Feb 15, 2009 at 5:33 PM, Jeff Schiller <codedread at gmail.com>
>> wrote:
>>> I had the following code which worked fine in Qt 4.5 TP1 and Beta:
>>>
>>> SomeClass* somePersistentObject = ...;
>>> QAction* theAction = ...;
>>>
>>> theAction->setData(somePersistentObject);
>>>
>>> However, now that becomes an error in Qt RC1 because QVariant(void*)
>>> has been made private.
>>>
>>> What's the right way to pass an arbitrary pointer into a QVariant?
>>
>> Actually it was using the implicit QVariant(bool) constructor. The
>> private
>> constructor was added to prevent this undesired behavior. You can still
>> use
>> QVariant::fromValue().
>
> When I tried this, I received additional compiler errors stating that
> my SomeClass was not registered as a metatype. I'm quite confused
> about metatypes, so a simple example would be great!
>
>>> Also, what's the reason that mingw was added to the Qt 4.5 release?
>>
>> Sorry, what do you mean?
>
> When deploying an app using the Qt 4.5 Beta, I only needed to include
> QtCore4.dll, QtGui4.dll, ... However, when I installed the Qt 4.5 RC1,
> launching the app in Windows it complained that the mingw10.dll could
> not be found (I included this DLL in my deployment package, but I'm
> curious about what's going on).
>
> Thanks again,
> Jeff
--
Constantin "Dinosaur" Makshin
More information about the Qt-interest-old
mailing list