mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Deep redesign: corrections after Valgrind memcheck
This commit is contained in:
parent
43a783aceb
commit
cebedf1460
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
||||
CMakeLists.txt.user*
|
||||
build/*
|
||||
qtbuild/*
|
||||
LOCAL/*
|
||||
sdrangelove.supp
|
||||
.cproject
|
||||
.project
|
||||
.settings/
|
||||
|
@ -42,6 +42,7 @@ BladerfGui::BladerfGui(PluginAPI* pluginAPI, QWidget* parent) :
|
||||
|
||||
BladerfGui::~BladerfGui()
|
||||
{
|
||||
delete m_sampleSource; // Valgrind memcheck
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,8 @@ const PluginDescriptor BlderfPlugin::m_pluginDescriptor = {
|
||||
};
|
||||
|
||||
BlderfPlugin::BlderfPlugin(QObject* parent) :
|
||||
QObject(parent)
|
||||
QObject(parent),
|
||||
m_pluginAPI(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -51,6 +52,7 @@ PluginInterface::SampleSourceDevices BlderfPlugin::enumSampleSources()
|
||||
{
|
||||
SampleSourceDevices result;
|
||||
struct bladerf_devinfo *devinfo;
|
||||
|
||||
int count = bladerf_get_device_list(&devinfo);
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
@ -61,16 +63,27 @@ PluginInterface::SampleSourceDevices BlderfPlugin::enumSampleSources()
|
||||
s.writeString(2, devinfo[i].serial);
|
||||
result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.bladerf", s.final()));
|
||||
}
|
||||
|
||||
bladerf_free_device_list(devinfo); // Valgrind memcheck
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PluginGUI* BlderfPlugin::createSampleSourcePluginGUI(const QString& sourceName, const QByteArray& address)
|
||||
{
|
||||
if(sourceName == "org.osmocom.sdr.samplesource.bladerf") {
|
||||
if (!m_pluginAPI)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(sourceName == "org.osmocom.sdr.samplesource.bladerf")
|
||||
{
|
||||
BladerfGui* gui = new BladerfGui(m_pluginAPI);
|
||||
m_pluginAPI->setInputGUI(gui);
|
||||
return gui;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ ThreadedSampleSink::ThreadedSampleSink(SampleSink* sampleSink, QObject *parent)
|
||||
|
||||
ThreadedSampleSink::~ThreadedSampleSink()
|
||||
{
|
||||
delete m_threadedSampleFifo; // Valgrind memcheck
|
||||
delete m_thread;
|
||||
}
|
||||
|
||||
|
@ -347,8 +347,9 @@ void PluginManager::loadPlugins(const QDir& dir)
|
||||
else
|
||||
{
|
||||
loader->unload();
|
||||
delete loader;
|
||||
}
|
||||
|
||||
delete loader; // Valgrind memcheck
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user