예제 #1
0
TomConnection::TomConnection(const ConnectionCredentials credentials)
: TygemConnection(credentials)
{
	serverCodec = QTextCodec::codecForName(getCodecString());
	if(!serverCodec)
	{
		new CodecWarnDialog(getCodecString());
		serverCodec = QTextCodec::codecForLocale();
    }
}
예제 #2
0
EWeiQiConnection::EWeiQiConnection(const QString & user, const QString & pass)
: TygemConnection(user, pass, TypeEWEIQI)
{
	serverCodec = QTextCodec::codecForName(getCodecString());
	if(!serverCodec)
	{
		new CodecWarnDialog(getCodecString());
		serverCodec = QTextCodec::codecForLocale();
	}
	if(!getServerListStorage().restoreServerList(TypeEWEIQI, serverList))
			requestServerInfo();
	else
	{
		if(reconnectToServer() < 0)
		{
			qDebug("User canceled");
			connectionState = CANCELED;
			return;
		}
	}
}