mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kutils: fix WId type handling in KMediaPlayer constructor for 64-bit host
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
dfb620ff0b
commit
6512385459
1 changed files with 3 additions and 5 deletions
|
@ -168,9 +168,6 @@ static bool s_fullscreen = false;
|
|||
} \
|
||||
}
|
||||
|
||||
// QVariant cannot be constructed from WId type
|
||||
typedef quintptr WIdType;
|
||||
|
||||
// the video decoder may run into its own thread, make sure that does not cause trouble
|
||||
#if defined(HAVE_MPV) && defined(Q_WS_X11)
|
||||
static int kmp_x11_init_threads() {
|
||||
|
@ -509,11 +506,12 @@ KMediaPlayer::KMediaPlayer(QWidget *parent)
|
|||
if (d->m_handle) {
|
||||
mpv_set_wakeup_callback(d->m_handle, wakeup_media, this);
|
||||
|
||||
// QVariant cannot be constructed from WId type and the actual WId type is ulong
|
||||
QVariant wid;
|
||||
if (parent) {
|
||||
wid = QVariant::fromValue(static_cast<WIdType>(parent->winId()));
|
||||
wid = QVariant::fromValue(qlonglong(quintptr(parent->winId())));
|
||||
} else {
|
||||
wid = QVariant::fromValue(static_cast<WIdType>(winId()));
|
||||
wid = QVariant::fromValue(qlonglong(quintptr(winId())));
|
||||
}
|
||||
if (wid.isValid()) {
|
||||
setOption("wid", wid);
|
||||
|
|
Loading…
Add table
Reference in a new issue