-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 9e8aa72..9e907d8 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -84,98 +84,98 @@ MScanListView::MScanListView( QWidget* parent, const char* name ) | |||
84 | 84 | ||
85 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), | 85 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), |
86 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); | 86 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); |
87 | 87 | ||
88 | #ifdef QWS | 88 | #ifdef QWS |
89 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 89 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | }; | 92 | }; |
93 | 93 | ||
94 | 94 | ||
95 | MScanListView::~MScanListView() | 95 | MScanListView::~MScanListView() |
96 | { | 96 | { |
97 | }; | 97 | }; |
98 | 98 | ||
99 | 99 | ||
100 | OListViewItem* MScanListView::childFactory() | 100 | OListViewItem* MScanListView::childFactory() |
101 | { | 101 | { |
102 | return new MScanListItem( this ); | 102 | return new MScanListItem( this ); |
103 | } | 103 | } |
104 | 104 | ||
105 | 105 | ||
106 | void MScanListView::serializeTo( QDataStream& s) const | 106 | void MScanListView::serializeTo( QDataStream& s) const |
107 | { | 107 | { |
108 | odebug << "serializing MScanListView" << oendl; | 108 | odebug << "serializing MScanListView" << oendl; |
109 | OListView::serializeTo( s ); | 109 | OListView::serializeTo( s ); |
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||
113 | void MScanListView::serializeFrom( QDataStream& s) | 113 | void MScanListView::serializeFrom( QDataStream& s) |
114 | { | 114 | { |
115 | odebug << "serializing MScanListView" << oendl; | 115 | odebug << "serializing MScanListView" << oendl; |
116 | OListView::serializeFrom( s ); | 116 | OListView::serializeFrom( s ); |
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | void MScanListView::addNewItem( const QString& type, | 120 | void MScanListView::addNewItem( const QString& type, |
121 | const QString& essid, | 121 | const QString& essid, |
122 | const OMacAddress& mac, | 122 | const OMacAddress& mac, |
123 | bool wep, | 123 | bool wep, |
124 | int channel, | 124 | int channel, |
125 | int signal, | 125 | int signal, |
126 | const GpsLocation& loc, | 126 | const GpsLocation& loc, |
127 | bool probe ) | 127 | bool probe ) |
128 | { | 128 | { |
129 | QString macaddr = mac.toString(true); | 129 | QString macaddr = mac.toString(true); |
130 | 130 | ||
131 | #ifdef DEBUG | 131 | #ifdef DEBUG |
132 | odebug << "MScanList::addNewItem( " << (const char*) type << " / " | 132 | odebug << "MScanList::addNewItem( " << type << " / " |
133 | << (const char*) essid << " / " << (const char*) macaddr | 133 | << essid << " / " << macaddr |
134 | << " [" << channel << "]" << oendl; | 134 | << " [" << channel << "]" << oendl; |
135 | #endif | 135 | #endif |
136 | 136 | ||
137 | // search, if we already have seen this net | 137 | // search, if we already have seen this net |
138 | 138 | ||
139 | QString s; | 139 | QString s; |
140 | MScanListItem* network; | 140 | MScanListItem* network; |
141 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); | 141 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); |
142 | 142 | ||
143 | while ( item && ( item->text( col_essid ) != essid ) ) | 143 | while ( item && ( item->text( col_essid ) != essid ) ) |
144 | { | 144 | { |
145 | #ifdef DEBUG | 145 | #ifdef DEBUG |
146 | odebug << "itemtext: " << item->text( col_essid ) << "" << oendl; | 146 | odebug << "itemtext: " << item->text( col_essid ) << "" << oendl; |
147 | #endif | 147 | #endif |
148 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 148 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
149 | } | 149 | } |
150 | if ( item ) | 150 | if ( item ) |
151 | { | 151 | { |
152 | // we have already seen this net, check all childs if MAC exists | 152 | // we have already seen this net, check all childs if MAC exists |
153 | 153 | ||
154 | network = item; | 154 | network = item; |
155 | 155 | ||
156 | item = static_cast<MScanListItem*> ( item->firstChild() ); | 156 | item = static_cast<MScanListItem*> ( item->firstChild() ); |
157 | assert( item ); // this shouldn't fail | 157 | assert( item ); // this shouldn't fail |
158 | 158 | ||
159 | while ( item && ( item->text( col_ap ) != macaddr ) ) | 159 | while ( item && ( item->text( col_ap ) != macaddr ) ) |
160 | { | 160 | { |
161 | #ifdef DEBUG | 161 | #ifdef DEBUG |
162 | odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl; | 162 | odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl; |
163 | #endif | 163 | #endif |
164 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 164 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
165 | } | 165 | } |
166 | 166 | ||
167 | if ( item ) | 167 | if ( item ) |
168 | { | 168 | { |
169 | // we have already seen this item, it's a dupe | 169 | // we have already seen this item, it's a dupe |
170 | #ifdef DEBUG | 170 | #ifdef DEBUG |
171 | odebug << "" << macaddr << " is a dupe - ignoring..." << oendl; | 171 | odebug << "" << macaddr << " is a dupe - ignoring..." << oendl; |
172 | #endif | 172 | #endif |
173 | item->receivedBeacon(); | 173 | item->receivedBeacon(); |
174 | return; | 174 | return; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | else | 177 | else |
178 | { | 178 | { |
179 | s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); | 179 | s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); |
180 | MLogWindow::logwindow()->log( s ); | 180 | MLogWindow::logwindow()->log( s ); |
181 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe ); | 181 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe ); |