From 8288ac948254ef02da0df73192d944eff7580e30 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Mon, 23 Dec 2013 06:59:44 +0000 Subject: [PATCH] git-svn-id: svn://imanolbarba.net/PAD@37 c2ee353e-ed0d-4329-bf56-03aec153487f --- QChatClient/QChatClient.pro | 2 -- QChatClient/QChatClient.pro.user | 2 +- QChatClient/client.cpp | 7 ------- QChatClient/client.h | 21 --------------------- QChatClient/loginscreen.cpp | 7 ++++++- build-QChatClient-Desktop-Debug/Makefile | 2 +- 6 files changed, 8 insertions(+), 33 deletions(-) delete mode 100644 QChatClient/client.cpp delete mode 100644 QChatClient/client.h 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 -- libgit2 0.22.2