mirror of
https://github.com/overte-org/overte.git
synced 2025-06-16 15:40:12 +02:00
Fix Android build on Windows hosts
This commit is contained in:
parent
3f2f5b18ec
commit
4cf4a5582d
2 changed files with 2 additions and 4 deletions
|
@ -292,8 +292,8 @@ int InteractiveWindow::getPresentationMode() const {
|
||||||
return _qmlWindow->property(PRESENTATION_MODE_PROPERTY).toInt();
|
return _qmlWindow->property(PRESENTATION_MODE_PROPERTY).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
void InteractiveWindow::parentNativeWindowToMainWindow() {
|
void InteractiveWindow::parentNativeWindowToMainWindow() {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
QMetaObject::invokeMethod(this, "parentNativeWindowToMainWindow");
|
QMetaObject::invokeMethod(this, "parentNativeWindowToMainWindow");
|
||||||
return;
|
return;
|
||||||
|
@ -307,8 +307,8 @@ void InteractiveWindow::parentNativeWindowToMainWindow() {
|
||||||
}
|
}
|
||||||
const auto nativeWindow = qvariant_cast<QQuickWindow*>(nativeWindowProperty);
|
const auto nativeWindow = qvariant_cast<QQuickWindow*>(nativeWindowProperty);
|
||||||
SetWindowLongPtr((HWND)nativeWindow->winId(), GWLP_HWNDPARENT, (LONG)MainWindow::findMainWindow()->winId());
|
SetWindowLongPtr((HWND)nativeWindow->winId(), GWLP_HWNDPARENT, (LONG)MainWindow::findMainWindow()->winId());
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void InteractiveWindow::setPresentationMode(int presentationMode) {
|
void InteractiveWindow::setPresentationMode(int presentationMode) {
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
|
|
|
@ -84,9 +84,7 @@ private:
|
||||||
Q_INVOKABLE void setPresentationMode(int presentationMode);
|
Q_INVOKABLE void setPresentationMode(int presentationMode);
|
||||||
Q_INVOKABLE int getPresentationMode() const;
|
Q_INVOKABLE int getPresentationMode() const;
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
Q_INVOKABLE void parentNativeWindowToMainWindow();
|
Q_INVOKABLE void parentNativeWindowToMainWindow();
|
||||||
#endif
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue