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),
|
QWidget(parent),
|
||||||
m_model(nullptr)
|
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();
|
setUpWidget();
|
||||||
setUpAction();
|
setUpAction();
|
||||||
setUpConnection();
|
setUpConnection();
|
||||||
@@ -103,7 +111,8 @@ void ElementsCollectionWidget::removeProject(QETProject *project) {
|
|||||||
*/
|
*/
|
||||||
void ElementsCollectionWidget::highlightUnusedElement()
|
void ElementsCollectionWidget::highlightUnusedElement()
|
||||||
{
|
{
|
||||||
m_model->highlightUnusedElement();
|
if (m_model)
|
||||||
|
m_model->highlightUnusedElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ElementsCollectionWidget::event(QEvent *event)
|
bool ElementsCollectionWidget::event(QEvent *event)
|
||||||
|
|||||||
Reference in New Issue
Block a user