fixed a hyperlink bug
This commit is contained in:
		
							parent
							
								
									47baf6ef1c
								
							
						
					
					
						commit
						38c01f2cca
					
				@ -858,7 +858,10 @@ void Courtroom::append_ms_chatmessage(QString f_message)
 | 
			
		||||
  for (QString i_word : word_list)
 | 
			
		||||
  {
 | 
			
		||||
    if (i_word.startsWith("http"))
 | 
			
		||||
    {
 | 
			
		||||
      i_word.replace("\n", "").replace("\r", "");
 | 
			
		||||
      ui_ms_chatlog->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> ");
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
      ui_ms_chatlog->insertPlainText(i_word + " ");
 | 
			
		||||
  }
 | 
			
		||||
@ -895,7 +898,10 @@ void Courtroom::append_server_chatmessage(QString f_name, QString f_message)
 | 
			
		||||
  for (QString i_word : word_list)
 | 
			
		||||
  {
 | 
			
		||||
    if (i_word.startsWith("http"))
 | 
			
		||||
    {
 | 
			
		||||
      i_word.replace("\n", "").replace("\r", "");
 | 
			
		||||
      ui_server_chatlog->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> ");
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
      ui_server_chatlog->insertPlainText(i_word + " ");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -350,7 +350,10 @@ void Lobby::append_chatmessage(QString f_message)
 | 
			
		||||
  for (QString i_word : word_list)
 | 
			
		||||
  {
 | 
			
		||||
    if (i_word.startsWith("http"))
 | 
			
		||||
    {
 | 
			
		||||
      i_word.replace("\n", "").replace("\r", "");
 | 
			
		||||
      ui_chatbox->insertHtml("<a href=\"" + i_word + "\">" + i_word + "</a> ");
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
      ui_chatbox->insertPlainText(i_word + " ");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -103,7 +103,7 @@ void AOApplication::write_to_serverlist_txt(QString p_line)
 | 
			
		||||
 | 
			
		||||
  QTextStream out(&serverlist_txt);
 | 
			
		||||
 | 
			
		||||
  out << p_line << "\r\n";
 | 
			
		||||
  out << "\r\n" << p_line;
 | 
			
		||||
 | 
			
		||||
  serverlist_txt.close();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user