From: PeterLValve Date: Wed, 26 Mar 2014 00:19:36 +0000 (-0700) Subject: UI: Fix one of the 'No matching signal' errors that are output when vogleditor starts X-Git-Url: https://git.cworth.org/git?p=vogl;a=commitdiff_plain;h=6b82ad0021cc8f833b47f346b089088d09de4a9a UI: Fix one of the 'No matching signal' errors that are output when vogleditor starts * It is simply caused by Qt trying to be smart and automatically connecting signals and slots, however not all the objects are created when it does this. Renaming the function avoids this automatic behavior. --- diff --git a/src/vogleditor/vogleditor_qframebufferexplorer.cpp b/src/vogleditor/vogleditor_qframebufferexplorer.cpp index a67bf28..d24dde7 100644 --- a/src/vogleditor/vogleditor_qframebufferexplorer.cpp +++ b/src/vogleditor/vogleditor_qframebufferexplorer.cpp @@ -316,7 +316,7 @@ void vogleditor_QFramebufferExplorer::selectedFramebufferIndexChanged(int index) (*iter)->setFixedHeight((*iter)->get_preferred_height()); ++viewerIndex; - connect(*iter, SIGNAL(zoomFactorChanged(double)), this, SLOT(on_zoomFactorChanged(double))); + connect(*iter, SIGNAL(zoomFactorChanged(double)), this, SLOT(slot_zoomFactorChanged(double))); } } @@ -335,7 +335,7 @@ void vogleditor_QFramebufferExplorer::selectedFramebufferIndexChanged(int index) m_depthExplorer->set_texture_objects(depthVec); m_depthExplorer->set_active_texture(depthVec[0]->get_snapshot_handle()); } - connect(m_depthExplorer, SIGNAL(zoomFactorChanged(double)), this, SLOT(on_zoomFactorChanged(double))); + connect(m_depthExplorer, SIGNAL(zoomFactorChanged(double)), this, SLOT(slot_zoomFactorChanged(double))); m_depthExplorer->setMinimumHeight(m_depthExplorer->get_preferred_height()); } @@ -354,7 +354,7 @@ void vogleditor_QFramebufferExplorer::selectedFramebufferIndexChanged(int index) m_stencilExplorer->set_texture_objects(stencilVec); m_stencilExplorer->set_active_texture(stencilVec[0]->get_snapshot_handle()); } - connect(m_stencilExplorer, SIGNAL(zoomFactorChanged(double)), this, SLOT(on_zoomFactorChanged(double))); + connect(m_stencilExplorer, SIGNAL(zoomFactorChanged(double)), this, SLOT(slot_zoomFactorChanged(double))); m_stencilExplorer->setMinimumHeight(m_stencilExplorer->get_preferred_height()); } } @@ -403,7 +403,7 @@ vogl_renderbuffer_state* vogleditor_QFramebufferExplorer::get_renderbuffer_attac return pRenderbufferState; } -void vogleditor_QFramebufferExplorer::on_zoomFactorChanged(double zoomFactor) +void vogleditor_QFramebufferExplorer::slot_zoomFactorChanged(double zoomFactor) { VOGL_NOTE_UNUSED(zoomFactor); diff --git a/src/vogleditor/vogleditor_qframebufferexplorer.h b/src/vogleditor/vogleditor_qframebufferexplorer.h index c00025c..b275a34 100644 --- a/src/vogleditor/vogleditor_qframebufferexplorer.h +++ b/src/vogleditor/vogleditor_qframebufferexplorer.h @@ -53,7 +53,7 @@ private: private slots: void selectedFramebufferIndexChanged(int index); - void on_zoomFactorChanged(double zoomFactor); + void slot_zoomFactorChanged(double zoomFactor); }; #endif // VOGLEDITOR_QFRAMEBUFFEREXPLORER_H