- Timestamp:
- Nov 8, 2006, 11:58:57 AM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r277 r278 34 34 // Constructor 35 35 //////////////////////////////////////////////////////////////////////////// 36 bncGetThread::bncGetThread(const QUrl& mountPoint, const QByteArray& format) { 36 bncGetThread::bncGetThread(const QUrl& mountPoint, 37 const QByteArray& format, int iMount) { 37 38 _decoder = 0; 38 39 _mountPoint = mountPoint; … … 43 44 _timeOut = 20*1000; // 20 seconds 44 45 _nextSleep = 1; // 1 second 46 _iMount = iMount; // index in mountpoints array 45 47 46 48 // Check name conflict … … 49 51 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 50 52 int num = 0; 51 int ind = 0;53 int ind = -1; 52 54 while (it.hasNext()) { 55 ++ind; 53 56 QStringList hlp = it.next().split(" "); 54 57 if (hlp.size() <= 1) continue; 55 58 QUrl url(hlp[0]); 56 59 if (_mountPoint.path() == url.path()) { 57 ++num;58 if (_mountPoint.host() == url.host()) {59 ind = num - 1;60 61 62 } 63 if (num > 1) {64 _staID = _staID.left(_staID.length()-1) + QString("%1").arg( ind).toAscii();60 if (_iMount > ind) { 61 ++num; 62 } 63 } 64 } 65 66 if (num > 0) { 67 _staID = _staID.left(_staID.length()-1) + QString("%1").arg(num).toAscii(); 65 68 } 66 69 } -
trunk/BNC/bncgetthread.h
r255 r278 13 13 14 14 public: 15 bncGetThread(const QUrl& mountPoint, const QByteArray& format); 15 bncGetThread(const QUrl& mountPoint, 16 const QByteArray& format, int iMount); 16 17 ~bncGetThread(); 17 18 … … 42 43 int _timeOut; 43 44 int _nextSleep; 45 int _iMount; 44 46 }; 45 47 -
trunk/BNC/bncmain.cpp
r274 r278 85 85 &app, SLOT(slotMessage(const QByteArray&))); 86 86 87 int iMount = -1; 87 88 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 88 89 while (it.hasNext()) { 90 ++iMount; 89 91 QStringList hlp = it.next().split(" "); 90 92 if (hlp.size() <= 1) continue; 91 93 QUrl url(hlp[0]); 92 94 QByteArray format = hlp[1].toAscii(); 93 bncGetThread* getThread = new bncGetThread(url, format );95 bncGetThread* getThread = new bncGetThread(url, format, iMount); 94 96 app.connect(getThread, SIGNAL(newMessage(const QByteArray&)), 95 97 &app, SLOT(slotMessage(const QByteArray&))); -
trunk/BNC/bncwindow.cpp
r276 r278 393 393 QByteArray format = _mountPointsTable->item(iRow, 2)->text().toAscii(); 394 394 395 bncGetThread* getThread = new bncGetThread(url, format );395 bncGetThread* getThread = new bncGetThread(url, format, iRow); 396 396 397 397 connect(getThread, SIGNAL(newMessage(const QByteArray&)),
Note:
See TracChangeset
for help on using the changeset viewer.