author | korovkin <korovkin> | 2006-03-19 14:45:26 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-03-19 14:45:26 (UTC) |
commit | d17df3ff1677779bfc23cfb08d27c83b03a3dfb4 (patch) (unidiff) | |
tree | 1a21e4d7c52f20716a193a1ccf5edd0bc034d934 | |
parent | adbd8bde1b0b24e5ea7047dea7228451964ac23a (diff) | |
download | opie-d17df3ff1677779bfc23cfb08d27c83b03a3dfb4.zip opie-d17df3ff1677779bfc23cfb08d27c83b03a3dfb4.tar.gz opie-d17df3ff1677779bfc23cfb08d27c83b03a3dfb4.tar.bz2 |
Added port number.
-rw-r--r-- | noncore/net/opietooth/manager/btserviceitem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/btserviceitem.cpp b/noncore/net/opietooth/manager/btserviceitem.cpp index fb5f21e..8e6459d 100644 --- a/noncore/net/opietooth/manager/btserviceitem.cpp +++ b/noncore/net/opietooth/manager/btserviceitem.cpp | |||
@@ -1,21 +1,24 @@ | |||
1 | 1 | ||
2 | #include "btserviceitem.h" | 2 | #include "btserviceitem.h" |
3 | 3 | ||
4 | using namespace OpieTooth; | 4 | using namespace OpieTooth; |
5 | 5 | ||
6 | BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv ) | 6 | BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv ) |
7 | : BTListItem( item ) { | 7 | : BTListItem( item ) { |
8 | int port = serv.protocolDescriptorList().last().port(); | ||
8 | m_service = serv; | 9 | m_service = serv; |
9 | setText(0, QObject::tr(serv.serviceName() ) ); | 10 | setText(0, QObject::tr(serv.serviceName() ) ); |
11 | if (port > 0) | ||
12 | setText(1, QString::number(port) ); | ||
10 | } | 13 | } |
11 | BTServiceItem::~BTServiceItem() { | 14 | BTServiceItem::~BTServiceItem() { |
12 | 15 | ||
13 | } | 16 | } |
14 | QString BTServiceItem::type() const { | 17 | QString BTServiceItem::type() const { |
15 | return QString::fromLatin1("service"); | 18 | return QString::fromLatin1("service"); |
16 | } | 19 | } |
17 | int BTServiceItem::typeId() const { | 20 | int BTServiceItem::typeId() const { |
18 | return Service; | 21 | return Service; |
19 | } | 22 | } |
20 | Services BTServiceItem::services() const { | 23 | Services BTServiceItem::services() const { |
21 | return m_service; | 24 | return m_service; |