summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/scandialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp
index bd7d23c..f8f7b15 100644
--- a/noncore/net/opietooth/manager/scandialog.cpp
+++ b/noncore/net/opietooth/manager/scandialog.cpp
@@ -144,21 +144,23 @@ namespace OpieTooth {
if (!ListView1) {
return;
}
QList<RemoteDevice> *deviceList = new QList<RemoteDevice>;
+ deviceList->setAutoDelete(true);
QListViewItemIterator it( ListView1 );
for ( ; it.current(); ++it ) {
if ( ((QCheckListItem*)it.current())->isOn() ) {
RemoteDevice * device = new RemoteDevice( it.current()->text(1), it.current()->text(0));
deviceList->append( device );
}
}
emit selectedDevices( *deviceList );
+ delete deviceList;
}
/*
* Cleanup
*/
ScanDialog::~ScanDialog() {