Qt 5.9 compat; remove dead code

This commit is contained in:
oldmud0 2021-12-18 22:22:30 -06:00
parent d137022174
commit cf12168ebd
6 changed files with 1 additions and 48 deletions

View File

@ -32,7 +32,6 @@ public:
QString ms_baseurl = "https://servers.aceattorneyonline.com";
const int timeout_milliseconds = 5000;
const int heartbeat_interval = 60 * 5;
bool partial_packet = false;

View File

@ -151,35 +151,6 @@ void AOApplication::loading_cancelled()
w_lobby->hide_loading_overlay();
}
/*
void AOApplication::ms_connect_finished(bool connected, bool will_retry)
{
if (connected) {
AOPacket *f_packet = new AOPacket("ALL#%");
send_ms_packet(f_packet);
}
else {
if (will_retry) {
if (lobby_constructed)
w_lobby->append_error(
tr("Error connecting to master server. Will try again in %1 "
"seconds.")
.arg(QString::number(net_manager->ms_reconnect_delay)));
}
else {
call_error(tr("There was an error connecting to the master server.\n"
"We deploy multiple master servers to mitigate any "
"possible downtime, "
"but the client appears to have exhausted all possible "
"methods of finding "
"and connecting to one.\n"
"Please check your Internet connection and firewall, and "
"please try again."));
}
}
}
*/
void AOApplication::call_settings_menu()
{
AOOptionsDialog settings(nullptr, this);

View File

@ -4307,9 +4307,6 @@ void Courtroom::on_ooc_return_pressed()
if (server_ooc)
ao_app->send_server_packet(f_packet);
else {
// ao_app->send_ms_packet(f_packet);
}
ui_ooc_chat_message->clear();

View File

@ -495,14 +495,6 @@ void Lobby::on_chatfield_return_pressed()
if (ui_chatname->text() == "" || ui_chatmessage->text() == "")
return;
QString f_header = "CT";
QStringList f_contents{ui_chatname->text(), ui_chatmessage->text()};
append_chatmessage("", "Stubbed lmao");
// AOPacket *f_packet = new AOPacket(f_header, f_contents);
// ao_app->send_ms_packet(f_packet);
ui_chatmessage->clear();
}

View File

@ -36,7 +36,6 @@ void NetworkManager::get_server_list(const std::function<void()> &cb)
{
QNetworkRequest req(QUrl(ms_baseurl + "/servers"));
req.setRawHeader("User-Agent", get_user_agent().toUtf8());
req.setTransferTimeout(timeout_milliseconds);
QNetworkReply *reply = http->get(req);
connect(reply, &QNetworkReply::finished,
@ -84,7 +83,6 @@ void NetworkManager::send_heartbeat()
QNetworkRequest req(QUrl(ms_baseurl + "/playing"));
req.setRawHeader("User-Agent", get_user_agent().toUtf8());
req.setTransferTimeout(timeout_milliseconds);
http->post(req, QByteArray());
}
@ -109,7 +107,6 @@ void NetworkManager::request_document(MSDocumentType document_type,
language = QLocale::system().name();
req.setRawHeader("Accept-Language", language.toUtf8());
req.setTransferTimeout(5000);
qDebug().noquote().nospace()
<< "Getting " << endpoint << ", Accept-Language: " << language;
@ -160,7 +157,7 @@ void NetworkManager::handle_server_packet()
}
}
const QStringList packet_list = in_data.split("%", Qt::SkipEmptyParts);
const QStringList packet_list = in_data.split("%", QString::SkipEmptyParts);
for (const QString &packet : packet_list) {
AOPacket *f_packet = new AOPacket(packet);

View File

@ -67,9 +67,6 @@ void AOApplication::ms_packet_received(AOPacket *p_packet)
}
}
else if (header == "AO2CHECK") {
// send_ms_packet(new AOPacket("ID#AO2#" + get_version_string() + "#%"));
// send_ms_packet(new AOPacket("HI#" + get_hdid() + "#%"));
if (f_contents.size() < 1)
goto end;