Commit 8288ac948254ef02da0df73192d944eff7580e30
1 parent
1fd2cc4a
git-svn-id: svn://imanolbarba.net/PAD@37 c2ee353e-ed0d-4329-bf56-03aec153487f
Showing
6 changed files
with
8 additions
and
33 deletions
QChatClient/QChatClient.pro
@@ -17,7 +17,6 @@ SOURCES += main.cpp\ | @@ -17,7 +17,6 @@ SOURCES += main.cpp\ | ||
17 | loginscreen.cpp \ | 17 | loginscreen.cpp \ |
18 | chatroom.cpp \ | 18 | chatroom.cpp \ |
19 | Socket.cpp \ | 19 | Socket.cpp \ |
20 | - client.cpp \ | ||
21 | chatwidget.cpp | 20 | chatwidget.cpp |
22 | 21 | ||
23 | HEADERS += chatwindow.h \ | 22 | HEADERS += chatwindow.h \ |
@@ -25,7 +24,6 @@ HEADERS += chatwindow.h \ | @@ -25,7 +24,6 @@ HEADERS += chatwindow.h \ | ||
25 | chatroom.h \ | 24 | chatroom.h \ |
26 | SocketException.h \ | 25 | SocketException.h \ |
27 | Socket.h \ | 26 | Socket.h \ |
28 | - client.h \ | ||
29 | chatwidget.h | 27 | chatwidget.h |
30 | 28 | ||
31 | FORMS += chatwindow.ui \ | 29 | FORMS += chatwindow.ui \ |
QChatClient/QChatClient.pro.user
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <!DOCTYPE QtCreatorProject> | 2 | <!DOCTYPE QtCreatorProject> |
3 | -<!-- Written by QtCreator 2.7.1, 2013-12-18T16:20:32. --> | 3 | +<!-- Written by QtCreator 2.7.1, 2013-12-19T13:24:57. --> |
4 | <qtcreator> | 4 | <qtcreator> |
5 | <data> | 5 | <data> |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
QChatClient/client.cpp deleted
QChatClient/client.h deleted
1 | -#ifndef CLIENT_H_ | ||
2 | -#define CLIENT_H_ | ||
3 | - | ||
4 | -#include "Socket.h" | ||
5 | -#include <iostream> | ||
6 | -#include "SocketException.h" | ||
7 | -#include <sstream> | ||
8 | -#include <signal.h> | ||
9 | -#include <cstdlib> | ||
10 | -#include <sys/time.h> | ||
11 | - | ||
12 | -//!Argumentos de los threads | ||
13 | -/** | ||
14 | -\brief Este struct define los argumentos que recibe un thread abierto por la aplicación servidor al recibir una conexión entrante | ||
15 | -\author Imanol Barba Sabariego | ||
16 | -\date 11/06/2013 */ | ||
17 | - | ||
18 | - | ||
19 | - | ||
20 | - | ||
21 | -#endif /* CLIENT_H_ */ |
QChatClient/loginscreen.cpp
@@ -12,7 +12,12 @@ LoginScreen::LoginScreen(QWidget *parent) : | @@ -12,7 +12,12 @@ LoginScreen::LoginScreen(QWidget *parent) : | ||
12 | 12 | ||
13 | void LoginScreen::parseURL(QString host, int port, QString URL) | 13 | void LoginScreen::parseURL(QString host, int port, QString URL) |
14 | { | 14 | { |
15 | - | 15 | + if(validateURL(URL)) |
16 | + { | ||
17 | + QStringList strings = URL.split(':'); | ||
18 | + host = strings[0].toStdString(); | ||
19 | + port = strings[1].toInt(); | ||
20 | + } | ||
16 | } | 21 | } |
17 | 22 | ||
18 | bool LoginScreen::validateURL(QString& url) | 23 | bool LoginScreen::validateURL(QString& url) |
build-QChatClient-Desktop-Debug/Makefile
1 | ############################################################################# | 1 | ############################################################################# |
2 | # Makefile for building: QChatClient | 2 | # Makefile for building: QChatClient |
3 | -# Generated by qmake (3.0) (Qt 5.0.2) on: mié dic 18 16:05:46 2013 | 3 | +# Generated by qmake (3.0) (Qt 5.0.2) on: mié dic 18 21:28:34 2013 |
4 | # Project: ../QChatClient/QChatClient.pro | 4 | # Project: ../QChatClient/QChatClient.pro |
5 | # Template: app | 5 | # Template: app |
6 | # 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 | 6 | # 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 |