diff --git a/QChatClient/QChatClient.pro b/QChatClient/QChatClient.pro index 7423386..c970da3 100644 --- a/QChatClient/QChatClient.pro +++ b/QChatClient/QChatClient.pro @@ -17,7 +17,6 @@ SOURCES += main.cpp\ loginscreen.cpp \ chatroom.cpp \ Socket.cpp \ - client.cpp \ chatwidget.cpp HEADERS += chatwindow.h \ @@ -25,7 +24,6 @@ HEADERS += chatwindow.h \ chatroom.h \ SocketException.h \ Socket.h \ - client.h \ chatwidget.h FORMS += chatwindow.ui \ diff --git a/QChatClient/QChatClient.pro.user b/QChatClient/QChatClient.pro.user index cce2f63..01dd7af 100644 --- a/QChatClient/QChatClient.pro.user +++ b/QChatClient/QChatClient.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/QChatClient/client.cpp b/QChatClient/client.cpp deleted file mode 100644 index bcd17e5..0000000 --- a/QChatClient/client.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "client.h" - -using namespace std; - -//! Método principal del cliente -/*! Este método inicializa el Socket, establece la conexión y realiza las acciones que se le hayan programado para comunicarse con el servidor.*/ -/ diff --git a/QChatClient/client.h b/QChatClient/client.h deleted file mode 100644 index 448e0b2..0000000 --- a/QChatClient/client.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CLIENT_H_ -#define CLIENT_H_ - -#include "Socket.h" -#include -#include "SocketException.h" -#include -#include -#include -#include - -//!Argumentos de los threads -/** -\brief Este struct define los argumentos que recibe un thread abierto por la aplicación servidor al recibir una conexión entrante -\author Imanol Barba Sabariego -\date 11/06/2013 */ - - - - -#endif /* CLIENT_H_ */ diff --git a/QChatClient/loginscreen.cpp b/QChatClient/loginscreen.cpp index e1e75f6..8312af4 100644 --- a/QChatClient/loginscreen.cpp +++ b/QChatClient/loginscreen.cpp @@ -12,7 +12,12 @@ LoginScreen::LoginScreen(QWidget *parent) : void LoginScreen::parseURL(QString host, int port, QString URL) { - + if(validateURL(URL)) + { + QStringList strings = URL.split(':'); + host = strings[0].toStdString(); + port = strings[1].toInt(); + } } bool LoginScreen::validateURL(QString& url) diff --git a/build-QChatClient-Desktop-Debug/Makefile b/build-QChatClient-Desktop-Debug/Makefile index d6540bc..0f73fb6 100644 --- a/build-QChatClient-Desktop-Debug/Makefile +++ b/build-QChatClient-Desktop-Debug/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: QChatClient -# Generated by qmake (3.0) (Qt 5.0.2) on: mié dic 18 16:05:46 2013 +# Generated by qmake (3.0) (Qt 5.0.2) on: mié dic 18 21:28:34 2013 # Project: ../QChatClient/QChatClient.pro # Template: app # Command: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake -spec linux-g++-64 CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug -o Makefile ../QChatClient/QChatClient.pro