change slot parameter from pointer to object as the object might have been deallocated when the slot is activated

This commit is contained in:
canpadawan
2016-06-08 11:36:26 +02:00
parent 39e07dc3a7
commit 7165b11399
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -281,7 +281,8 @@ QVariant CANFrameModel::headerData(int section, Qt::Orientation orientation,
return QVariant();
}
void CANFrameModel::addFrame(const CANFrame &frame, bool autoRefresh = false)
void CANFrameModel::addFrame(CANFrame frame, bool autoRefresh = false)
{
mutex.lock();
CANFrame tempFrame;
+3 -1
View File
@@ -23,7 +23,6 @@ public:
int columnCount(const QModelIndex &) const;
int totalFrameCount();
void addFrame(const CANFrame &, bool);
void sendRefresh();
void sendRefresh(int);
void sendBulkRefresh(int);
@@ -46,6 +45,9 @@ public:
const QVector<CANFrame> *getFilteredListReference() const; //Thus saith the Lord, NO.
const QMap<int, bool> *getFiltersReference() const; //this neither
public slots:
void addFrame(CANFrame, bool);
signals:
void updatedFiltersList();