Robin Thoni před 10 roky
rodič
revize
1582715330
4 změnil soubory, kde provedl 7 přidání a 7 odebrání
  1. 1
    1
      ptsocket/broadcast.cpp
  2. 1
    1
      ptsocket/broadcast.h
  3. 4
    4
      tests/bctest.cpp
  4. 1
    1
      tests/bctest.h

+ 1
- 1
ptsocket/broadcast.cpp Zobrazit soubor

@@ -90,7 +90,7 @@ void Broadcast::readyRead()
90 90
 			if(m_data[client].size() < serverData().size())
91 91
 				continue;
92 92
 			if(m_data[client] == serverData())
93
-				emit serverDiscovered(QHostAddress(client.first), client.second);
93
+				emit serverDiscovered(QHostAddress(client.first));
94 94
 			m_data.remove(client);
95 95
 		}
96 96
 	}

+ 1
- 1
ptsocket/broadcast.h Zobrazit soubor

@@ -19,7 +19,7 @@ public:
19 19
 	static QByteArray serverData();
20 20
 
21 21
 signals:
22
-	void serverDiscovered(QHostAddress, quint16);
22
+	void serverDiscovered(QHostAddress);
23 23
 
24 24
 public slots:
25 25
 	void setTimeout(int t);

+ 4
- 4
tests/bctest.cpp Zobrazit soubor

@@ -4,12 +4,12 @@ BcTest::BcTest() : QObject()
4 4
 {
5 5
 	m_bc = new Broadcast(false, this);
6 6
 	m_serv = new Broadcast(true, this);
7
-	connect(m_bc, SIGNAL(serverDiscovered(QHostAddress, quint16)), this, SLOT(newServer(QHostAddress, quint16)));
7
+	connect(m_bc, SIGNAL(serverDiscovered(QHostAddress)), this, SLOT(newServer(QHostAddress)));
8 8
 }
9 9
 
10 10
 void BcTest::test()
11 11
 {
12
-	int ps = 4242, pc = 4241;
12
+	int ps = 6949, pc = 6948;
13 13
 	if(!m_serv->start(ps, pc))
14 14
 	{
15 15
 		qDebug()<<m_serv->getError();
@@ -22,7 +22,7 @@ void BcTest::test()
22 22
 	}
23 23
 }
24 24
 
25
-void BcTest::newServer(QHostAddress ad, quint16 port)
25
+void BcTest::newServer(QHostAddress ad)
26 26
 {
27
-	qDebug()<<"New Server:"<<ad<<port;
27
+	qDebug()<<"New Server:"<<ad;
28 28
 }

+ 1
- 1
tests/bctest.h Zobrazit soubor

@@ -14,7 +14,7 @@ public slots:
14 14
 	void test();
15 15
 
16 16
 private slots:
17
-	void newServer(QHostAddress ad, quint16 port);
17
+	void newServer(QHostAddress ad);
18 18
 
19 19
 private:
20 20
 	Broadcast* m_bc;

Načítá se…
Zrušit
Uložit