mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Fix crash : Qet crash when we save a project and the element collection is not loaded.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4951 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -46,6 +46,14 @@ ElementsCollectionWidget::ElementsCollectionWidget(QWidget *parent):
|
||||
QWidget(parent),
|
||||
m_model(nullptr)
|
||||
{
|
||||
//The connection in the method ElementsCollectionWidget::reload return a warning message at compilation :
|
||||
//**********
|
||||
//QObject::connect: Cannot queue arguments of type 'QVector<int>'
|
||||
//(Make sure 'QVector<int>' is registered using qRegisterMetaType().)
|
||||
//**********
|
||||
//Register meta type has recommended by the message.
|
||||
qRegisterMetaType<QVector<int>>();
|
||||
|
||||
setUpWidget();
|
||||
setUpAction();
|
||||
setUpConnection();
|
||||
@@ -103,6 +111,7 @@ void ElementsCollectionWidget::removeProject(QETProject *project) {
|
||||
*/
|
||||
void ElementsCollectionWidget::highlightUnusedElement()
|
||||
{
|
||||
if (m_model)
|
||||
m_model->highlightUnusedElement();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user