From kde-games-devel Thu Apr 05 15:58:47 2012 From: Andreas Beckermann Date: Thu, 05 Apr 2012 15:58:47 +0000 To: kde-games-devel Subject: Re: [Kde-games-devel] KGame bug? Message-Id: <201204051758.48305.b_mann () gmx ! de> X-MARC-Message: https://marc.info/?l=kde-games-devel&m=133364163108395 On Thursday 05 April 2012, Zsur=F3 Tibor wrote: > Hello Hi > I want use the 'bool connectToServer( QString, int )' function in > KGame(KGameNetwork) class, to connect to server. If the server is not run > or the ip address is incorrect, always return true. > = > In the API: "Returns: true if connected". > = > This is bug? > = > I want show error messagge, when the connection is fail. Looking at the code, I'd say it's a lack of documentation. A comment in the = code: // OK: We say that we already have connected, but this isn't so yet! // If the connection cannot be established, it will look as being = disconnected // again ("slotConnectionLost" is called). // Shall we differ between these? So it seems to me that the code merely returns true here if the connection = was = initiated (not established) successfully and once the host not reachable (o= r = whatever) message is received, the connection is considered "lost". So KGameNetwork should emit the signalConnectionBroken() signal then. btw: The KGame library of libkdegames is unmaintained these days, I recomme= nd = against using it in new games. In fact it is supposed to be moved out of = libkdegames for that very reason, see http://community.kde.org/KDE_Games/API_cleanup and the recent discussion of this on this list. > Zsur=F3 Tibor Greetings Andi _______________________________________________ kde-games-devel mailing list kde-games-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-games-devel