summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp7
-rw-r--r--noncore/net/opietooth/manager/btlistitem.cpp22
-rw-r--r--noncore/net/opietooth/manager/btlistitem.h16
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.cpp4
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.h4
-rw-r--r--noncore/net/opietooth/manager/main.cpp4
-rw-r--r--noncore/net/opietooth/manager/scandialog.cpp10
-rw-r--r--noncore/net/opietooth/manager/scandialog.h2
8 files changed, 31 insertions, 38 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index ff6981b..8ddc161 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -434,5 +434,6 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
void BlueBase::startScan() {
- ScanDialog *scan = new ScanDialog( this, "", true);
- QObject::connect( scan, SIGNAL( selectedDevices( QList<RemoteDevice>& ) ),
- this, SLOT( addSearchedDevices( QList<RemoteDevice>& ) ) );
+ ScanDialog *scan = new ScanDialog( this, "ScanDialog",
+ true, WDestructiveClose );
+ QObject::connect( scan, SIGNAL( selectedDevices( QValueList<RemoteDevice>& ) ),
+ this, SLOT( addSearchedDevices( QValueList<RemoteDevice>& ) ) );
diff --git a/noncore/net/opietooth/manager/btlistitem.cpp b/noncore/net/opietooth/manager/btlistitem.cpp
index ce5b141..82e7c00 100644
--- a/noncore/net/opietooth/manager/btlistitem.cpp
+++ b/noncore/net/opietooth/manager/btlistitem.cpp
@@ -7,5 +7,2 @@ namespace OpieTooth {
BTListItem::BTListItem( QListView * parent ) : QListViewItem( parent ) {
- m_name = "";
- m_mac ="";
- m_type ="";
}
@@ -13,5 +10,2 @@ namespace OpieTooth {
BTListItem::BTListItem( QListViewItem * parent ) : QListViewItem( parent ) {
- m_name = "";
- m_mac ="";
- m_type ="";
}
@@ -20,3 +14,3 @@ namespace OpieTooth {
// name, and then mac and then servicetype
- BTListItem::BTListItem( QListView * parent, QString name , QString mac, QString type )
+ BTListItem::BTListItem( QListView * parent, const QString &name , const QString& mac, const QString& type )
: QListViewItem( parent, name ){
@@ -29,3 +23,3 @@ namespace OpieTooth {
- BTListItem::BTListItem( QListViewItem * parent , QString name, QString mac, QString type )
+ BTListItem::BTListItem( QListViewItem * parent , const QString& name, const QString& mac, const QString& type )
: QListViewItem( parent, name ){
@@ -38,3 +32,3 @@ namespace OpieTooth {
- void BTListItem::setMac( QString mac ) {
+ void BTListItem::setMac( const QString& mac ) {
m_mac = mac;
@@ -42,3 +36,3 @@ namespace OpieTooth {
- QString BTListItem::mac() {
+ QString BTListItem::mac() const {
return m_mac;
@@ -46,3 +40,3 @@ namespace OpieTooth {
- void BTListItem::setName( QString name ) {
+ void BTListItem::setName( const QString& name ) {
m_name = name;
@@ -50,3 +44,3 @@ namespace OpieTooth {
- QString BTListItem::name() {
+ QString BTListItem::name() const {
return m_name;
@@ -54,3 +48,3 @@ namespace OpieTooth {
- void BTListItem::setType( QString type ) {
+ void BTListItem::setType( const QString& type ) {
m_type = type;
@@ -58,3 +52,3 @@ namespace OpieTooth {
- QString BTListItem::type() {
+ QString BTListItem::type() const {
return m_type;
diff --git a/noncore/net/opietooth/manager/btlistitem.h b/noncore/net/opietooth/manager/btlistitem.h
index 8963caa..d7ce03b 100644
--- a/noncore/net/opietooth/manager/btlistitem.h
+++ b/noncore/net/opietooth/manager/btlistitem.h
@@ -14,12 +14,12 @@ namespace OpieTooth {
// name, and then mac and then servicetype
- BTListItem( QListView * , QString, QString, QString );
- BTListItem( QListViewItem * parent , QString, QString , QString );
+ BTListItem( QListView * , const QString&, const QString&, const QString& );
+ BTListItem( QListViewItem * parent , const QString&, const QString& , const QString& );
~BTListItem();
- void setMac( QString );
- QString mac();
- void setName( QString );
- QString name();
- void setType( QString );
- QString type();
+ void setMac( const QString& );
+ QString mac()const;
+ void setName( const QString& );
+ QString name()const;
+ void setType( const QString& );
+ QString type()const;
private:
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp
index 0b90e87..5f74fee 100644
--- a/noncore/net/opietooth/manager/hciconfwrapper.cpp
+++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp
@@ -18,3 +18,3 @@ namespace OpieTooth {
- void HciConfWrapper::setPinHelper( QString app ) {
+ void HciConfWrapper::setPinHelper( const QString& app ) {
setValue( "pin_helper" , app );
@@ -22,3 +22,3 @@ namespace OpieTooth {
- void HciConfWrapper::setName( QString name ) {
+ void HciConfWrapper::setName( const QString &name ) {
qDebug ("NAME : " + name);
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.h b/noncore/net/opietooth/manager/hciconfwrapper.h
index 10738c0..de8c9a8 100644
--- a/noncore/net/opietooth/manager/hciconfwrapper.h
+++ b/noncore/net/opietooth/manager/hciconfwrapper.h
@@ -13,4 +13,4 @@ namespace OpieTooth {
- void setPinHelper( QString app );
- void setName( QString name );
+ void setPinHelper( const QString& app );
+ void setName( const QString& name );
void setIscan( bool enable );
diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp
index d60ef1c..a86e36d 100644
--- a/noncore/net/opietooth/manager/main.cpp
+++ b/noncore/net/opietooth/manager/main.cpp
@@ -29,6 +29,6 @@ int main( int argc, char ** argv ) {
- OpieTooth::BlueBase *t = new OpieTooth::BlueBase();
+ OpieTooth::BlueBase t;
// t.setCaption( OpieTooth::BlueBase::tr("Bluetooth Manager") );
- a.showMainWidget(t);
+ a.showMainWidget(&t);
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
@@ -160,4 +160,3 @@ namespace OpieTooth {
- QList<RemoteDevice> *deviceList = new QList<RemoteDevice>;
- deviceList->setAutoDelete(true);
+ QValueList<RemoteDevice> deviceList;
@@ -166,4 +165,4 @@ namespace OpieTooth {
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 );
}
@@ -171,4 +170,3 @@ namespace OpieTooth {
qDebug("vor emit");
- emit selectedDevices( *deviceList );
- delete deviceList;
+ emit selectedDevices( deviceList );
}
diff --git a/noncore/net/opietooth/manager/scandialog.h b/noncore/net/opietooth/manager/scandialog.h
index 7c84ce2..cc890f3 100644
--- a/noncore/net/opietooth/manager/scandialog.h
+++ b/noncore/net/opietooth/manager/scandialog.h
@@ -72,3 +72,3 @@ public slots:
signals:
- void selectedDevices(QList<RemoteDevice>&);
+ void selectedDevices(QValueList<RemoteDevice>&);
};