- Use QtWidgets/QWidget include instead of obsolete QWidget - QWidget->winId() doesn't work for some reason
Created attachment 145814 [details] Patch
(In reply to comment #0) > - Use QtWidgets/QWidget include instead of obsolete QWidget > - QWidget->winId() doesn't work for some reason The patch only fixes the first bug. The second one is here, but I don't know how to fix it: f:\WebKit\Source\WebCore\plugins\win\PluginViewWin.cpp(105) : error C2440: 'return' : cannot convert from 'WId' to 'HWND' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
(In reply to comment #2) > (In reply to comment #0) > > - Use QtWidgets/QWidget include instead of obsolete QWidget > > - QWidget->winId() doesn't work for some reason > > The patch only fixes the first bug. > > The second one is here, but I don't know how to fix it: > f:\WebKit\Source\WebCore\plugins\win\PluginViewWin.cpp(105) : error C2440: 'return' : cannot convert from 'WId' to 'HWND' > Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast WId used to be a typedef to HWND, but it isn't anymore. It seems to me we need to do more work to get the HWND. By insepcting Qt code, it seems using QApplicationPrivate::getHWNDForWidget() instead of winId() would suffice.
Comment on attachment 145814 [details] Patch Hm no, if we were using QT += widgets in WebCore, then this would not be needed. But we shouldn't use QT += widgets in WebCore, so the question is: Why dos PluginViewWin.cpp need QWidget? I have the feeling that for Qt 5 it's not actually QWidget that's needed but QWindow instead, to make the resolution from the WebView to a HWND.
(In reply to comment #3) > By insepcting Qt code, it seems using QApplicationPrivate::getHWNDForWidget() instead of winId() would suffice. Note that getHWNDForWidget() is implemented using the QWidget's QWindow, so we possibly can do the same, getting rid of the QWidget dependency.
(In reply to comment #5) > Note that getHWNDForWidget() is implemented using the QWidget's QWindow, so we possibly can do the same, getting rid of the QWidget dependency. (...in this particular case.)
I don't understand what are you talking about. :) Any volunteer to fix it?
Created attachment 146311 [details] Patch Please don't review it, I don't want to land it. It is only a workaround until proper fix to be able test other build problems.
No, I didn't want to assign it to myself, but webkit-patch did it again ...
Created attachment 146573 [details] Patch
Ossy, could you test it? Maybe a cast is missing.
(In reply to comment #11) > Ossy, could you test it? Maybe a cast is missing. Sure. PluginViewWin.cpp f:\WebKit\Source\WebCore\plugins\win\PluginViewWin.cpp(104) : error C2027: use of undefined type 'QWindow' f:\qt5\qtbase\include\qtgui\../../src/gui/kernel/qwindowdefs.h(57) : see declaration of 'QWindow' f:\WebKit\Source\WebCore\plugins\win\PluginViewWin.cpp(104) : error C2227: left of '->winId' must point to class/struct/union/generic type NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\Bin\cl.EXE"' : return code '0x2' Stop. It seems we need different codepaths for Qt4 and Qt5: #if HAVE(QT5) #include <QWindow> #else #include <QWidget> #endif ... and similar when we use included things and after this fix I got the following error: f:\WebKit\Source\WebCore\plugins\win\PluginViewWin.cpp(109) : error C2440: return' : cannot convert from 'WId' to 'HWND' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Created attachment 146590 [details] Patch
Comment on attachment 146590 [details] Patch Clearing flags on attachment: 146590 Committed r119927: <http://trac.webkit.org/changeset/119927>
All reviewed patches have been landed. Closing bug.