From 10e0da56fa531668d9611190327953536a0c3cf6 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 17 Jun 2016 16:01:22 +0300 Subject: [PATCH] 0023270: [CEA 1822] PARAVIS GUI widgets should be instanciated only when needed: Qt4 compatibility. --- src/PVViewer/PVViewer_GUIElements.cxx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/PVViewer/PVViewer_GUIElements.cxx b/src/PVViewer/PVViewer_GUIElements.cxx index 9e795dc55..6061715ca 100644 --- a/src/PVViewer/PVViewer_GUIElements.cxx +++ b/src/PVViewer/PVViewer_GUIElements.cxx @@ -186,17 +186,31 @@ void PVViewer_GUIElements::buildPVWidgets() applyBehavior->registerPanel(ppanel); } - emit pqActiveObjects::instance().portChanged(pqActiveObjects::instance().activePort()); - emit pqActiveObjects::instance().viewChanged(pqActiveObjects::instance().activeView()); + QMetaObject::invokeMethod( &pqActiveObjects::instance(), + "portChanged", + Qt::AutoConnection, + Q_ARG( pqOutputPort*, pqActiveObjects::instance().activePort() ) ); + + QMetaObject::invokeMethod( &pqActiveObjects::instance(), + "viewChanged", + Qt::AutoConnection, + Q_ARG( pqView*, pqActiveObjects::instance().activeView() ) ); pqServerManagerModel *smModel = pqApplicationCore::instance()->getServerManagerModel(); pqServer* serv = pqActiveObjects::instance().activeServer(); if (serv) { - emit smModel->serverAdded(serv); - emit serv->nameChanged(NULL); + QMetaObject::invokeMethod( smModel, + "serverAdded", + Qt::AutoConnection, + Q_ARG( pqServer*, serv ) ); + + QMetaObject::invokeMethod( serv, + "nameChanged", + Qt::AutoConnection, + Q_ARG( pqServerManagerModelItem* , NULL ) ); } - + myPVWidgetsFlag = true; } } -- 2.39.2