From a1565817f161d34f66ce760ab2ca54b14c7f0b8b Mon Sep 17 00:00:00 2001 From: ski Date: Tue, 8 Nov 2016 14:57:46 +0300 Subject: [PATCH] 0028064: Samples - Raytracing does not work in Qt samples QAction signal activated() was changed to signal triggered() to support Qt5. --- samples/qt/Common/src/ApplicationCommon.cxx | 2 +- samples/qt/Common/src/View.cxx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/qt/Common/src/ApplicationCommon.cxx b/samples/qt/Common/src/ApplicationCommon.cxx index e5b93cd067..05a86b82a4 100755 --- a/samples/qt/Common/src/ApplicationCommon.cxx +++ b/samples/qt/Common/src/ApplicationCommon.cxx @@ -86,7 +86,7 @@ void ApplicationCommonWindow::createStandardOperations() filePrefUseVBOAction->setStatusTip( QObject::tr("TBR_USE_VBO") ); filePrefUseVBOAction->setCheckable( true ); filePrefUseVBOAction->setChecked( true ); - connect( filePrefUseVBOAction, SIGNAL( activated() ) , this, SLOT( onUseVBO() ) ); + connect( filePrefUseVBOAction, SIGNAL( triggered() ) , this, SLOT( onUseVBO() ) ); myStdActions.insert( FilePrefUseVBOId, filePrefUseVBOAction ); fileQuitAction = new QAction( QObject::tr("MNU_QUIT"), this ); diff --git a/samples/qt/Common/src/View.cxx b/samples/qt/Common/src/View.cxx index 3447fbf4e6..f2090092c9 100755 --- a/samples/qt/Common/src/View.cxx +++ b/samples/qt/Common/src/View.cxx @@ -517,7 +517,7 @@ void View::initRaytraceActions() a->setStatusTip( QObject::tr("TBR_TOOL_RAYTRACING") ); a->setCheckable( true ); a->setChecked( false ); - connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onRaytraceAction() ) ); myRaytraceActions->insert( ToolRaytracingId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_SHADOWS") ), QObject::tr("MNU_TOOL_SHADOWS"), this ); @@ -525,7 +525,7 @@ void View::initRaytraceActions() a->setStatusTip( QObject::tr("TBR_TOOL_SHADOWS") ); a->setCheckable( true ); a->setChecked( true ); - connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onRaytraceAction() ) ); myRaytraceActions->insert( ToolShadowsId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_REFLECTIONS") ), QObject::tr("MNU_TOOL_REFLECTIONS"), this ); @@ -533,7 +533,7 @@ void View::initRaytraceActions() a->setStatusTip( QObject::tr("TBR_TOOL_REFLECTIONS") ); a->setCheckable( true ); a->setChecked( false ); - connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onRaytraceAction() ) ); myRaytraceActions->insert( ToolReflectionsId, a ); a = new QAction( QPixmap( dir+QObject::tr("ICON_TOOL_ANTIALIASING") ), QObject::tr("MNU_TOOL_ANTIALIASING"), this ); @@ -541,7 +541,7 @@ void View::initRaytraceActions() a->setStatusTip( QObject::tr("TBR_TOOL_ANTIALIASING") ); a->setCheckable( true ); a->setChecked( false ); - connect( a, SIGNAL( activated() ) , this, SLOT( onRaytraceAction() ) ); + connect( a, SIGNAL( triggered() ) , this, SLOT( onRaytraceAction() ) ); myRaytraceActions->insert( ToolAntialiasingId, a ); } @@ -900,13 +900,13 @@ void View::Popup( const int /*x*/, const int /*y*/ ) QAction* a = new QAction( QObject::tr("MNU_CH_BACK"), this ); a->setToolTip( QObject::tr("TBR_CH_BACK") ); - connect( a, SIGNAL( activated() ), this, SLOT( onBackground() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onBackground() ) ); myBackMenu->addAction( a ); addItemInPopup(myBackMenu); a = new QAction( QObject::tr("MNU_CH_ENV_MAP"), this ); a->setToolTip( QObject::tr("TBR_CH_ENV_MAP") ); - connect( a, SIGNAL( activated() ), this, SLOT( onEnvironmentMap() ) ); + connect( a, SIGNAL( triggered() ), this, SLOT( onEnvironmentMap() ) ); a->setCheckable( true ); a->setChecked( false ); myBackMenu->addAction( a ); -- 2.39.5