From 6cbd8761972281325956d6bc2c34850fe09acf91 Mon Sep 17 00:00:00 2001 From: senator Date: Tue, 18 Mar 2008 08:35:08 +0000 Subject: host and port now taken from pracro.ini --- client/sendrecieve.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/sendrecieve.cc b/client/sendrecieve.cc index ee7cc6d..914b4af 100644 --- a/client/sendrecieve.cc +++ b/client/sendrecieve.cc @@ -33,6 +33,7 @@ #include #include #include +#include SendRecieve::SendRecieve() : QObject() @@ -42,8 +43,16 @@ SendRecieve::SendRecieve() void SendRecieve::tcpConnect() { - tcpsocket->connectToHost("gargamel.j.auh.dk", 12345); - tcpConnected = TCP_CONNECTING; + QSettings settings("pracro.ini", QSettings::IniFormat); + + settings.beginGroup("server"); + QString host = settings.value("host").toString(); + int port = settings.value("port").toInt(); + settings.endGroup(); + + printf("%s, %d\n", host.toStdString().c_str(), port); + tcpsocket->connectToHost(host, port); + tcpConnected = TCP_CONNECTING; } void SendRecieve::tcpDisconnect() -- cgit v1.2.3