Review Request 117107: Do not use WId in KCookieServer

Alexander Richardson arichardson.kde at googlemail.com
Thu Mar 27 17:41:15 UTC 2014



> On March 27, 2014, 3:42 p.m., Alexander Richardson wrote:
> > qwindowdefs.h has typedef QT_PREPEND_NAMESPACE(quintptr) WId; uncoditionally for all platforms (apparently they changed the windows define from HWND to quintptr), so I guess using quintptr should be the correct solution (then it works fine for 32 bit as well)
> 
> Aurélien Gâteau wrote:
>     Just tried it, but qdbuscpp2xml complains the same: "Unregistered input type in parameter list: quintptr".

Okay go for it with qlonglong/quint64/qulonglong, whatever you prefer. 32 bit will need a tiny bit more stack space, but that doesn't really matter


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117107/#review54300
-----------------------------------------------------------


On March 27, 2014, 10:59 a.m., Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117107/
> -----------------------------------------------------------
> 
> (Updated March 27, 2014, 10:59 a.m.)
> 
> 
> Review request for KDE Frameworks and Alexander Richardson.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> KCookieServer is exposed over DBus and DBus does not know about WId. Using WId as an argument in a method prevents it from being exposed, breaking KHTML build (see http://build.kde.org/view/Frameworks/job/khtml_master_qt5/60/console ). This patch partially reverts commit 08548e2ff72923aa72437f2f7cf68c5c0b81f605.
> 
> I haven't tested on Windows, but I see parent of 08548e2ff72923aa72437f2f7cf68c5c0b81f605 has this code:
> 
>     #ifndef Q_OS_WIN
>         KWindowSystem::setMainWindow(kw, static_cast<WId>(windowId));
>     #else
>         KWindowSystem::setMainWindow(kw, (HWND)(long)windowId);
>     #endif
> 
> Do we need something like this? If so, I was thinking of adding this:
> 
>     inline WId toWid(qlonglong value)
>     {
>     #ifdef Q_OS_WIN
>         return (HWND)(long)value;
>     #else
>         return static_cast<WId>(value);
>     #endif
>     }
> 
> And then wrapping all qlonglong args with it. Does it make sense?
> 
> 
> Diffs
> -----
> 
>   src/ioslaves/http/kcookiejar/kcookieserver.h 204f3ca 
>   src/ioslaves/http/kcookiejar/kcookieserver.cpp 81ea2bc 
> 
> Diff: https://git.reviewboard.kde.org/r/117107/diff/
> 
> 
> Testing
> -------
> 
> Builds, fixes KHTML build.
> 
> 
> Thanks,
> 
> Aurélien Gâteau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140327/8c8e94fc/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list