Skip to content
Snippets Groups Projects
Commit 9f1eb5b6 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed const ref initialization causing segfault

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@21053 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f6867722
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
#include <OpenFlipper/common/GlobalOptions.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
/////////////////////////////////////////////////
void LoadFromPluginThread::loadFromPlugin()
{
for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
......@@ -21,23 +21,30 @@ void LoadFromPluginThread::loadFromPlugin()
PluginFunctions::viewerProperties(i).unLockUpdate();
emit updateView();
}
/////////////////////////////////////////////////
LoadFromPluginThread::~LoadFromPluginThread()
{
}
/////////////////////////////////////////////////
LoadFromPluginThread::LoadFromPluginThread(QVector<LoadInfos> _loadInfos, const QString& _jobName)
LoadFromPluginThread::LoadFromPluginThread(const QVector<LoadInfos>& _loadInfos, const QString& _jobName)
: OpenFlipperThread(_jobName), infos_(_loadInfos), loadedIds_(_loadInfos.size(),-1)
{
connect( this ,SIGNAL(function()), this, SLOT(loadFromPlugin()), Qt::DirectConnection) ;
}
/////////////////////////////////////////////////
int LoadFromPluginThread::getObjId(int index)const
{
return loadedIds_[index];
}
/////////////////////////////////////////////////
const QString& LoadFromPluginThread::getFilename(int index) const
{
return infos_[index].filename;
......
......@@ -36,7 +36,7 @@ public slots:
public:
~LoadFromPluginThread();
LoadFromPluginThread(QVector<LoadInfos> _loadInfos, const QString& _jobName);
LoadFromPluginThread(const QVector<LoadInfos>& _loadInfos, const QString& _jobName);
int getObjId(int index)const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment