Diffstat (limited to 'noncore/net/opietooth/manager/scandialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index 0e6e93b..3d6c928 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp @@ -155,25 +155,23 @@ namespace OpieTooth { qDebug("vor liste durchsuchen"); if (!ListView1) { return; } - QList<RemoteDevice> *deviceList = new QList<RemoteDevice>; - deviceList->setAutoDelete(true); + QValueList<RemoteDevice> deviceList; 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 ); + RemoteDevice device( it.current()->text(1), it.current()->text(0)); + deviceList.append( device ); } } qDebug("vor emit"); - emit selectedDevices( *deviceList ); - delete deviceList; + emit selectedDevices( deviceList ); } /* * Cleanup */ ScanDialog::~ScanDialog() { |