mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
Fixed warning QObject::connect: No such signal Desktop_QMLTYPE_217::sendToScript(QVariant)
(cherry picked from commit ef4bea2cd4811364e65baec2c48ce2205a0e2cb3)
This commit is contained in:
parent
156166ce4a
commit
7318ec468b
2 changed files with 7 additions and 2 deletions
|
@ -59,7 +59,8 @@ bool OffscreenGLCanvas::create(QOpenGLContext* sharedContext) {
|
|||
|
||||
bool OffscreenGLCanvas::makeCurrent() {
|
||||
bool result = _context->makeCurrent(_offscreenSurface);
|
||||
Q_ASSERT(result);
|
||||
//Q_ASSERT(result);
|
||||
|
||||
std::call_once(_reportOnce, [this]{
|
||||
qCDebug(glLogging) << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||
qCDebug(glLogging) << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
|
|
|
@ -607,7 +607,11 @@ QObject* OffscreenQmlSurface::finishQmlLoad(std::function<void(QQmlContext*, QOb
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
//check if the item contains sendToScript signal
|
||||
int sendToScriptIndex = newItem->metaObject()->indexOfSignal("sendToScript");
|
||||
if (sendToScriptIndex != -1) {
|
||||
connect(newItem, SIGNAL(sendToScript(QVariant)), this, SIGNAL(fromQml(QVariant)));
|
||||
}
|
||||
|
||||
// The root item is ready. Associate it with the window.
|
||||
_rootItem = newItem;
|
||||
|
|
Loading…
Reference in a new issue