qnetdice

diff src/main.cc @ 3:2e57c80653af

more stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 23 Dec 2013 06:09:25 +0200
parents 92377189a5c6
children
line diff
     1.1 --- a/src/main.cc	Sun Dec 22 04:09:23 2013 +0200
     1.2 +++ b/src/main.cc	Mon Dec 23 06:09:25 2013 +0200
     1.3 @@ -18,17 +18,19 @@
     1.4  QTcpSocket *socket;
     1.5  
     1.6  static std::string srv_passwd;
     1.7 -static MainWindow win_main;
     1.8 +static MainWindow *win_main;
     1.9  
    1.10  int main(int argc, char *argv[])
    1.11  {
    1.12  	srand(time(0));
    1.13  
    1.14  	QApplication app(argc, argv);
    1.15 -	win_main.show();
    1.16 +
    1.17 +	win_main = new MainWindow;
    1.18 +	win_main->show();
    1.19  
    1.20  	set_log_file(stdout);
    1.21 -	set_log_callback(status_log, win_main.statusBar());
    1.22 +	set_log_callback(status_log, win_main->statusBar());
    1.23  
    1.24  	return app.exec();
    1.25  }
    1.26 @@ -59,7 +61,7 @@
    1.27  	log_message("received connection request from: %s\n", client_addr.toString().toUtf8().data());
    1.28  }
    1.29  
    1.30 -void connect(const char *host, int port, const char *passwd)
    1.31 +void start_client(const char *host, int port, const char *passwd)
    1.32  {
    1.33  	log_message("connecting to host: %s port: %d\n", host, port);
    1.34  }