summaryrefslogtreecommitdiff
path: root/client/sendrecieve.cc
diff options
context:
space:
mode:
authordeva <deva>2008-05-29 09:35:32 +0000
committerdeva <deva>2008-05-29 09:35:32 +0000
commit5d1efcc49ba47eaf5919923f6f6ba82566d9baaf (patch)
treeba07a263240a197aa0dceb53e9affaae1b0f1009 /client/sendrecieve.cc
parent9252ebd85447a3133701263b148adf77e325ecc0 (diff)
Rewrote the argument parser, for a more "The QT-Way"-like method.
Diffstat (limited to 'client/sendrecieve.cc')
-rw-r--r--client/sendrecieve.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/client/sendrecieve.cc b/client/sendrecieve.cc
index 0a664eb..95593c6 100644
--- a/client/sendrecieve.cc
+++ b/client/sendrecieve.cc
@@ -30,8 +30,6 @@
#include <stdio.h>
#include <QApplication>
#include <QMessageBox>
-#include <QTcpSocket>
-#include <QDomDocument>
#include <QByteArray>
#include <QSettings>
@@ -42,21 +40,16 @@
#include <unistd.h>
#endif
-SendRecieve::SendRecieve()
+SendRecieve::SendRecieve(QString host, quint16 port)
: QObject()
{
+ this->host = host;
+ this->port = port;
has_result = false;
}
void SendRecieve::tcpConnect()
{
- 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;