Mr-Ntic / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Qt4.7 doesn't have QWinEventNotifier #91

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
it seems that Qt4.7.2 doesn't have QWinEventNotifier. So I can't compile the 
qextserialport.

Original issue reported on code.google.com by wbse...@gmail.com on 24 Mar 2011 at 2:06

GoogleCodeExporter commented 8 years ago
The same problem appears with 4.7.3, but I had no problems with 4.7.0
I'm looking for a solution...

Original comment by Kristen....@gmail.com on 27 Apr 2011 at 12:58

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi!
The class/file is still there; it's "just" that in 4.7.x (x>=2, it seems), the 
src files are no longer needed for include usage; thus, the private header 
files (and private classes) became what they were meant to be, private.

...\QtSDK\QtSources\4.7.3\src\corelib\kernel\qwineventnotifier_p.h

The code in QWinEventNotifier is mainly just adding an event listener to the 
threadData->eventDispatcher, casted to QEventDispatcherWin32.
That class is also private ... and its method "registerEventNotifier" can't be 
accessed without knowing the explicit type.

It also contains the main implementation in void 
QEventDispatcherWin32::activateEventNotifiers().

The classes, on the other hand, are declared as exported - thus, it might just 
work if we copy the 
private header file from the sources into a public directory ...
Mh, seems to be working. Of course, one needs to take special care that the 
right version
of the file is used ... though, there are no virtual methods declared in the 
class itself,
thus, it might break on dll binding/linking already, which is of course, far 
better.

So, just copy 4.7.3\src\corelib\kernel\qwineventnotifier_p.h into a newly 
created directory
4.7.3\include\QtCore\private\qwineventnotifier_p.h.

Yours,
Sebastian
PS: Sorry for having to remove the first try of this comment.

Original comment by csba...@googlemail.com on 30 Apr 2011 at 3:58

GoogleCodeExporter commented 8 years ago
A small note about my last post: 
I do not use qextserialport in event-driven mode, thus, I cannot be 100% sure 
that the codes works as before. Yet, it links and runs, and the code itself has 
not been changed ...

Original comment by csba...@googlemail.com on 30 Apr 2011 at 4:00

GoogleCodeExporter commented 8 years ago
I have 4.7.3 running, and the qwineventnotifier_p.h only contains #include 
"../../../src/corelib/kernel/qwineventnotifier_p.h", which doesn't exist. There 
isn't a src folder anywhere. 

Can I just get the file somewhere to get around this?

Original comment by Revenant...@gmail.com on 17 Jun 2011 at 7:07

GoogleCodeExporter commented 8 years ago
Download qt source code, it's src/corelib/kernel/qwineventnotifier_p.h

Original comment by wbse...@gmail.com on 17 Jun 2011 at 11:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
FYI: This hack seems to work well in event-driven mode.

Original comment by erle...@gmail.com on 22 Jun 2011 at 11:17

GoogleCodeExporter commented 8 years ago
I tried this, but no joy.  Debugging finds that:

1) qextserialport tries to create a wineventnotifier
2) the wineventnotifier constructor tries QEventDispatcherWin32 
*eventDispatcher = qobject_cast<QEventDispatcherWin32 
*>(d->threadData->eventDispatcher);
3) d->threadData->eventDispatcher is null so it fails an assertion

Threading isn't a skill I have much competence in...

Any help would be really appreciated as this is really causing me problems.

Soyeb

Original comment by soyeb1...@gmail.com on 7 Jul 2011 at 3:01

GoogleCodeExporter commented 8 years ago
Getting sources from http://qt.gitorious.org/qt/, and placing 
src/corelib/kernel/qwineventnotifier_p.h (also qwineventnotifier_p.cpp) to 
\4.7.3\mingw\include\QtCore\private\ folder has worked..

Original comment by heyy...@ozderya.net on 28 Jul 2011 at 9:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
That worked.  Thanks!

Original comment by soyeb1...@gmail.com on 22 Oct 2011 at 6:14

GoogleCodeExporter commented 8 years ago
How this issue could be solved in a non-hacking way ?
Do you plan to include the missing dependencies in the next release ?

Original comment by romain...@gmail.com on 24 Oct 2011 at 11:11

GoogleCodeExporter commented 8 years ago
I, too, look forward for a non-hacking way of solving this. This qextserialport 
is still needed for new projects on Windows!!

Original comment by albertog...@gmail.com on 2 Nov 2011 at 4:14

GoogleCodeExporter commented 8 years ago
It seems that a solution in this way as been found.
Need to try this :

http://code.google.com/p/qextserialport/issues/detail?id=105#c8
http://code.google.com/r/dbzhang800-qextserialport/

Original comment by romain...@gmail.com on 10 Nov 2011 at 2:39

GoogleCodeExporter commented 8 years ago
Issue 106 has been merged into this issue.

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 8:19

GoogleCodeExporter commented 8 years ago
Issue 105 has been merged into this issue.

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 8:20

GoogleCodeExporter commented 8 years ago
Thanks

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 8:21