clazy cleanup
This commit is contained in:
		
							parent
							
								
									ca660cc439
								
							
						
					
					
						commit
						9d88356c0f
					
				@ -66,7 +66,7 @@ void AOApplication::server_packet_received(AOPacket packet)
 | 
				
			|||||||
    client_id = content.at(0).toInt();
 | 
					    client_id = content.at(0).toInt();
 | 
				
			||||||
    m_serverdata.set_server_software(content.at(1));
 | 
					    m_serverdata.set_server_software(content.at(1));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    net_manager->server_connected(true);
 | 
					    emit net_manager->server_connected(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QStringList f_contents = {"AO2", get_version_string()};
 | 
					    QStringList f_contents = {"AO2", get_version_string()};
 | 
				
			||||||
    send_server_packet(AOPacket("ID", f_contents));
 | 
					    send_server_packet(AOPacket("ID", f_contents));
 | 
				
			||||||
@ -161,10 +161,11 @@ void AOApplication::server_packet_received(AOPacket packet)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Remove any characters not accepted in folder names for the server_name
 | 
					    // Remove any characters not accepted in folder names for the server_name
 | 
				
			||||||
    // here
 | 
					    // here
 | 
				
			||||||
 | 
					    static QRegularExpression illegal_filename_chars("[\\\\/:*?\"<>|\']");
 | 
				
			||||||
    if (Options::getInstance().logToDemoFileEnabled() && server_name != "Demo playback")
 | 
					    if (Options::getInstance().logToDemoFileEnabled() && server_name != "Demo playback")
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      this->log_filename = QDateTime::currentDateTime().toUTC().toString("'logs/" + server_name.remove(QRegularExpression("[\\\\/:*?\"<>|\']")) + "/'yyyy-MM-dd hh-mm-ss t'.log'");
 | 
					      this->log_filename = QDateTime::currentDateTimeUtc().toString("'logs/" + server_name.remove(illegal_filename_chars) + "/'yyyy-MM-dd hh-mm-ss t'.log'");
 | 
				
			||||||
      this->write_to_file("Joined server " + server_name + " hosted on address " + server_address + " on " + QDateTime::currentDateTime().toUTC().toString(), log_filename, true);
 | 
					      this->write_to_file("Joined server " + server_name + " hosted on address " + server_address + " on " + QDateTime::currentDateTimeUtc().toString(), log_filename, true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -426,7 +427,7 @@ void AOApplication::server_packet_received(AOPacket packet)
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      QVector<EvidenceItem> f_evi_list;
 | 
					      QVector<EvidenceItem> f_evi_list;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      for (QString f_string : packet.content())
 | 
					      for (const QString &f_string : packet.content())
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        QStringList sub_contents = f_string.split("&");
 | 
					        QStringList sub_contents = f_string.split("&");
 | 
				
			||||||
        if (sub_contents.size() < 3)
 | 
					        if (sub_contents.size() < 3)
 | 
				
			||||||
@ -714,7 +715,6 @@ void AOApplication::server_packet_received(AOPacket packet)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void AOApplication::send_server_packet(AOPacket p_packet)
 | 
					void AOApplication::send_server_packet(AOPacket p_packet)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  QString f_packet = p_packet.toString();
 | 
					 | 
				
			||||||
#ifdef DEBUG_NETWORK
 | 
					#ifdef DEBUG_NETWORK
 | 
				
			||||||
  qDebug() << "S:" << p_packet.to_string();
 | 
					  qDebug() << "S:" << p_packet.to_string();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user