Commit 9f1eb5b6 authored by Jan Möbius's avatar Jan Möbius

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
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include <OpenFlipper/common/GlobalOptions.hh> #include <OpenFlipper/common/GlobalOptions.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh> #include <OpenFlipper/BasePlugin/PluginFunctions.hh>
/////////////////////////////////////////////////
void LoadFromPluginThread::loadFromPlugin() void LoadFromPluginThread::loadFromPlugin()
{ {
for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
...@@ -21,23 +21,30 @@ void LoadFromPluginThread::loadFromPlugin() ...@@ -21,23 +21,30 @@ void LoadFromPluginThread::loadFromPlugin()
PluginFunctions::viewerProperties(i).unLockUpdate(); PluginFunctions::viewerProperties(i).unLockUpdate();
emit updateView(); emit updateView();
} }
/////////////////////////////////////////////////
LoadFromPluginThread::~LoadFromPluginThread() 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) : OpenFlipperThread(_jobName), infos_(_loadInfos), loadedIds_(_loadInfos.size(),-1)
{ {
connect( this ,SIGNAL(function()), this, SLOT(loadFromPlugin()), Qt::DirectConnection) ; connect( this ,SIGNAL(function()), this, SLOT(loadFromPlugin()), Qt::DirectConnection) ;
} }
/////////////////////////////////////////////////
int LoadFromPluginThread::getObjId(int index)const int LoadFromPluginThread::getObjId(int index)const
{ {
return loadedIds_[index]; return loadedIds_[index];
} }
/////////////////////////////////////////////////
const QString& LoadFromPluginThread::getFilename(int index) const const QString& LoadFromPluginThread::getFilename(int index) const
{ {
return infos_[index].filename; return infos_[index].filename;
......
...@@ -36,7 +36,7 @@ public slots: ...@@ -36,7 +36,7 @@ public slots:
public: public:
~LoadFromPluginThread(); ~LoadFromPluginThread();
LoadFromPluginThread(QVector<LoadInfos> _loadInfos, const QString& _jobName); LoadFromPluginThread(const QVector<LoadInfos>& _loadInfos, const QString& _jobName);
int getObjId(int index)const; int getObjId(int index)const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment