aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCerapter <43446478+Cerapter@users.noreply.github.com>2024-05-15 17:19:03 +0200
committerGitHub <noreply@github.com>2024-05-15 10:19:03 -0500
commit4fb61b7afd9f234492451ed34ee22c9a5ece0b7e (patch)
tree5dfa2102256149b98814d085839fdf4e894618b1 /src
parentc9eabf35dafa22f7ad7f012c23f63f1605a47668 (diff)
Lift out most server-related data into its own class (#955)
* Lift out most server-related data into its own class * Fix missing negation in the auth packet support check * Update `get_feature(BASE_FEATURE_SET)`'s documentation * Make the version numbers public * Add support for custom blips --------- Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r--src/courtroom.cpp107
-rw-r--r--src/packet_distribution.cpp156
-rw-r--r--src/serverdata.cpp40
3 files changed, 149 insertions, 154 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index c360d6b5..2965f339 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -665,7 +665,8 @@ void Courtroom::set_widgets()
// If there is a point to it, show all CCCC features.
// We also do this this soon so that set_size_and_pos can hide them all later,
// if needed.
- if (ao_app->cccc_ic_supported) {
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CCCC_IC_SUPPORT)) {
ui_pair_button->show();
ui_immediate->show();
ui_showname_enable->show();
@@ -1524,7 +1525,8 @@ void Courtroom::update_character(int p_cid, QString char_name, bool reset_emote)
set_iniswap_dropdown();
ui_custom_objection->hide();
- if (ao_app->custom_objection_supported) // if setting is enabled
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CUSTOMOBJECTIONS)) // if setting is enabled
{
custom_obj_menu->clear();
custom_objections_list.clear();
@@ -1588,12 +1590,12 @@ void Courtroom::enter_courtroom()
{
set_evidence_page();
- if (ao_app->flipping_supported)
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::FLIPPING))
ui_flip->show();
else
ui_flip->hide();
- if (ao_app->additive_supported)
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::ADDITIVE))
ui_additive->show();
else
ui_additive->hide();
@@ -1644,8 +1646,6 @@ void Courtroom::list_music()
QBrush found_brush(ao_app->get_color("found_song_color", f_file));
QBrush missing_brush(ao_app->get_color("missing_song_color", f_file));
- int n_listed_songs = 0;
-
QTreeWidgetItem *parent = nullptr;
for (int n_song = 0; n_song < music_list.size(); ++n_song) {
QString i_song = music_list.at(n_song);
@@ -1680,7 +1680,6 @@ void Courtroom::list_music()
if (i_song_listname ==
i_song) // Not supposed to be a song to begin with - a category?
parent = treeItem;
- ++n_listed_songs;
}
ui_music_list->expandAll(); // Needs to somehow remember which categories were
@@ -1700,7 +1699,7 @@ void Courtroom::list_areas()
QString i_area = "";
i_area.append(area_list.at(n_area));
- if (ao_app->arup_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::ARUP)) {
i_area.append("\n ");
i_area.append(arup_statuses.at(n_area));
@@ -1720,7 +1719,6 @@ void Courtroom::list_areas()
i_area.append(arup_locks.at(n_area));
}
-
QTreeWidgetItem *treeItem = ui_area_list->topLevelItem(n_area);
if (treeItem == nullptr) {
treeItem = new QTreeWidgetItem(ui_area_list);
@@ -1728,7 +1726,7 @@ void Courtroom::list_areas()
treeItem->setText(0, area_list.at(n_area));
treeItem->setText(1, i_area);
- if (ao_app->arup_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::ARUP)) {
// Coloring logic here.
treeItem->setBackground(1, free_brush);
if (arup_locks.at(n_area) == "LOCKED") {
@@ -1799,7 +1797,9 @@ void Courtroom::append_server_chatmessage(QString p_name, QString p_message,
color =
ao_app->get_color("server_chatlog_sender_color", "courtroom_fonts.ini")
.name();
- if (!ao_app->auth_packet_supported && p_message == "Logged in as a moderator.") {
+ if (!ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::AUTH_PACKET) &&
+ p_message == "Logged in as a moderator.") {
// Emulate successful authentication
on_authentication_state_received(1);
}
@@ -1871,9 +1871,10 @@ void Courtroom::on_chat_return_pressed()
int f_desk_mod = DESK_SHOW;
- if (ao_app->desk_mod_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::DESKMOD)) {
f_desk_mod = ao_app->get_desk_mod(current_char, current_emote);
- if (!ao_app->expanded_desk_mods_supported) {
+ if (!ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::EXPANDED_DESK_MODS)) {
if (f_desk_mod == DESK_PRE_ONLY_EX || f_desk_mod == DESK_PRE_ONLY)
f_desk_mod = DESK_HIDE;
else if (f_desk_mod == DESK_EMOTE_ONLY_EX || f_desk_mod == DESK_EMOTE_ONLY)
@@ -1911,7 +1912,8 @@ void Courtroom::on_chat_return_pressed()
f_emote_mod = PREANIM;
}
// Turn zoom into preanim zoom
- else if (f_emote_mod == ZOOM && ao_app->prezoom_supported) {
+ else if (f_emote_mod == ZOOM && ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::PREZOOM)) {
f_emote_mod = PREANIM_ZOOM;
}
// Play the sfx
@@ -1967,7 +1969,9 @@ void Courtroom::on_chat_return_pressed()
QString f_obj_state;
- if ((objection_state == 4 && !ao_app->custom_objection_supported) ||
+ if ((objection_state == 4 &&
+ !ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CUSTOMOBJECTIONS)) ||
(objection_state < 0))
f_obj_state = "0";
else if (objection_custom != "" && objection_state == 4) {
@@ -1993,7 +1997,7 @@ void Courtroom::on_chat_return_pressed()
QString f_flip;
- if (ao_app->flipping_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::FLIPPING)) {
if (ui_flip->isChecked())
f_flip = "1";
else
@@ -2018,8 +2022,10 @@ void Courtroom::on_chat_return_pressed()
packet_contents.append(f_text_color);
// If the server we're on supports CCCC stuff, we should use it!
- if (ao_app->cccc_ic_supported) {
- // If there is a showname entered, use that -- else, just send whatever the ini calls for.
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CCCC_IC_SUPPORT)) {
+ // If there is a showname entered, use that -- else, just send an empty
+ // packet-part.
if (!ui_ic_chat_name->text().isEmpty()) {
packet_contents.append(ui_ic_chat_name->text());
}
@@ -2031,8 +2037,10 @@ void Courtroom::on_chat_return_pressed()
// ourselves. Or a charid of -1 or lower, through some means.
if (other_charid > -1 && other_charid != m_cid) {
QString packet = QString::number(other_charid);
- if (ao_app->effects_supported) // Only servers with effects enabled will
- // support pair reordering
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::EFFECTS)) // Only servers with effects
+ // enabled will support pair
+ // reordering
packet += "^" + QString::number(pair_order);
packet_contents.append(packet);
}
@@ -2040,8 +2048,9 @@ void Courtroom::on_chat_return_pressed()
packet_contents.append("-1");
}
// Send the offset as it's gonna be used regardless
- if(ao_app->y_offset_supported)
- packet_contents.append(QString::number(char_offset) + "&" + QString::number(char_vert_offset));
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::Y_OFFSET))
+ packet_contents.append(QString::number(char_offset) + "&" +
+ QString::number(char_vert_offset));
else
packet_contents.append(QString::number(char_offset));
@@ -2056,7 +2065,7 @@ void Courtroom::on_chat_return_pressed()
// If the server we're on supports Looping SFX and Screenshake, use it if the
// emote uses it.
- if (ao_app->looping_sfx_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::LOOPING_SFX)) {
packet_contents.append(
ao_app->get_sfx_looping(current_char, current_emote));
packet_contents.append(QString::number(screenshake_state));
@@ -2087,10 +2096,10 @@ void Courtroom::on_chat_return_pressed()
}
}
- if (ao_app->additive_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::ADDITIVE)) {
packet_contents.append(ui_additive->isChecked() ? "1" : "0");
}
- if (ao_app->effects_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS)) {
QString p_effect_folder =
ao_app->read_char_ini(current_char, "effects", "Options");
QString fx_sound =
@@ -2250,7 +2259,9 @@ void Courtroom::unpack_chatmessage(QStringList p_contents)
// supports CCCC's IC features, or if it's just japing us. Also, don't
// forget! A size 15 message will have indices from 0 to 14.
if (n_string < p_contents.size() &&
- (n_string < MS_MINIMUM || ao_app->cccc_ic_supported)) {
+ (n_string < MS_MINIMUM ||
+ ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CCCC_IC_SUPPORT))) {
m_chatmessage[n_string] = p_contents.at(n_string);
}
else {
@@ -2575,7 +2586,9 @@ void Courtroom::display_pair_character(QString other_charid, QString other_offse
}
}
// Flip the pair character
- if (ao_app->flipping_supported && m_chatmessage[OTHER_FLIP].toInt() == 1)
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::FLIPPING) &&
+ m_chatmessage[OTHER_FLIP].toInt() == 1)
ui_vp_sideplayer_char->set_flipped(true);
else
ui_vp_sideplayer_char->set_flipped(false);
@@ -3660,8 +3673,10 @@ void Courtroom::start_chat_ticking()
QString f_blips = ao_app->get_blipname(m_chatmessage[CHAR_NAME]);
f_blips = ao_app->get_blips(f_blips);
- if (ao_app->custom_blips_supported && !m_chatmessage[BLIPNAME].isEmpty()) {
- f_blips = ao_app->get_blips(m_chatmessage[BLIPNAME]);
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CUSTOM_BLIPS) &&
+ !m_chatmessage[BLIPNAME].isEmpty()) {
+ f_blips = ao_app->get_blips(m_chatmessage[BLIPNAME]);
}
blip_player->set_blips(f_blips);
@@ -4053,9 +4068,11 @@ void Courtroom::handle_song(QStringList *p_contents)
return;
}
- if(!file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song))) && !f_song.startsWith("http")
- && f_song != "~stop.mp3" && !ao_app->asset_url.isEmpty()) {
- f_song = (ao_app->asset_url + "sounds/music/" + f_song).toLower();
+ if (!file_exists(ao_app->get_sfx_suffix(ao_app->get_music_path(f_song))) &&
+ !f_song.startsWith("http") && f_song != "~stop.mp3" &&
+ !ao_app->m_serverdata.get_asset_url().isEmpty()) {
+ f_song = (ao_app->m_serverdata.get_asset_url() + "sounds/music/" + f_song)
+ .toLower();
}
bool is_stop = (f_song == "~stop.mp3");
@@ -4252,7 +4269,8 @@ void Courtroom::on_ooc_return_pressed()
//We ignore it when the server is compatible with 2.8
//Using an arbitrary 2.8 feature flag certainly won't cause issues someday.
- if (ooc_message.startsWith("/pos") & !ao_app->effects_supported) {
+ if (ooc_message.startsWith("/pos") &&
+ ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS)) {
if (ooc_message == "/pos jud") {
show_judge_controls(true);
}
@@ -5006,10 +5024,12 @@ void Courtroom::on_music_list_double_clicked(QTreeWidgetItem *p_item,
QStringList packet_contents;
packet_contents.append(p_song);
packet_contents.append(QString::number(m_cid));
- if ((!ui_ic_chat_name->text().isEmpty() && ao_app->cccc_ic_supported) ||
- ao_app->effects_supported)
+ if ((!ui_ic_chat_name->text().isEmpty() &&
+ ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CCCC_IC_SUPPORT)) ||
+ ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS))
packet_contents.append(ui_ic_chat_name->text());
- if (ao_app->effects_supported)
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS))
packet_contents.append(QString::number(music_flags));
ao_app->send_server_packet(new AOPacket("MC", packet_contents));
}
@@ -5136,10 +5156,12 @@ void Courtroom::music_stop(bool no_effects)
packet_contents.append(
fake_song); // this is our fake song, playing it triggers special code
packet_contents.append(QString::number(m_cid));
- if ((!ui_ic_chat_name->text().isEmpty() && ao_app->cccc_ic_supported) ||
- ao_app->effects_supported)
+ if ((!ui_ic_chat_name->text().isEmpty() &&
+ ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::CCCC_IC_SUPPORT)) ||
+ ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS))
packet_contents.append(ui_ic_chat_name->text());
- if (ao_app->effects_supported) {
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::EFFECTS)) {
if (no_effects)
packet_contents.append("0");
else
@@ -5311,8 +5333,8 @@ void Courtroom::on_pair_clicked()
if (ui_pair_list->isHidden()) {
ui_pair_list->show();
ui_pair_offset_spinbox->show();
- if(ao_app->y_offset_supported)
- ui_pair_vert_offset_spinbox->show();
+ if (ao_app->m_serverdata.get_feature(server::BASE_FEATURE_SET::Y_OFFSET))
+ ui_pair_vert_offset_spinbox->show();
ui_pair_order_dropdown->show();
ui_mute_list->hide();
ui_mute->set_image("mute");
@@ -5596,7 +5618,8 @@ void Courtroom::on_spectator_clicked() { char_clicked(-1); }
void Courtroom::on_call_mod_clicked()
{
- if (ao_app->modcall_reason_supported) {
+ if (ao_app->m_serverdata.get_feature(
+ server::BASE_FEATURE_SET::MODCALL_REASON)) {
QMessageBox errorBox;
QInputDialog input;
diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp
index e5a17d27..8cb78eb8 100644
--- a/src/packet_distribution.cpp
+++ b/src/packet_distribution.cpp
@@ -42,21 +42,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
goto end;
// default(legacy) values
- yellow_text_supported = false;
- prezoom_supported = false;
- flipping_supported = false;
- custom_objection_supported = false;
- desk_mod_supported = false;
- evidence_supported = false;
- cccc_ic_supported = false;
- arup_supported = false;
- casing_alerts_supported = false;
- modcall_reason_supported = false;
- looping_sfx_supported = false;
- additive_supported = false;
- effects_supported = false;
- y_offset_supported = false;
- custom_blips_supported = false;
+ m_serverdata.set_features(QStringList());
QString f_hdid;
f_hdid = get_hdid();
@@ -71,7 +57,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
goto end;
client_id = f_contents.at(0).toInt();
- server_software = f_contents.at(1);
+ m_serverdata.set_server_software(f_contents.at(1));
net_manager->server_connected(true);
@@ -91,58 +77,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
f_contents.at(1), "0");
}
else if (header == "FL") {
- yellow_text_supported = false;
- prezoom_supported = false;
- flipping_supported = false;
- custom_objection_supported = false;
- desk_mod_supported = false;
- evidence_supported = false;
- cccc_ic_supported = false;
- arup_supported = false;
- casing_alerts_supported = false;
- modcall_reason_supported = false;
- looping_sfx_supported = false;
- additive_supported = false;
- effects_supported = false;
- expanded_desk_mods_supported = false;
- auth_packet_supported = false;
- custom_blips_supported = false;
+ QStringList l_features = f_packet.split("#", Qt::SkipEmptyParts);
+ l_features.removeAll("%");
+ l_features.removeAll("FL");
+ m_serverdata.set_features(l_features);
log_to_demo = false;
-
- if (f_packet.contains("yellowtext", Qt::CaseInsensitive))
- yellow_text_supported = true;
- if (f_packet.contains("prezoom", Qt::CaseInsensitive))
- prezoom_supported = true;
- if (f_packet.contains("flipping", Qt::CaseInsensitive))
- flipping_supported = true;
- if (f_packet.contains("customobjections", Qt::CaseInsensitive))
- custom_objection_supported = true;
- if (f_packet.contains("deskmod", Qt::CaseInsensitive))
- desk_mod_supported = true;
- if (f_packet.contains("evidence", Qt::CaseInsensitive))
- evidence_supported = true;
- if (f_packet.contains("cccc_ic_support", Qt::CaseInsensitive))
- cccc_ic_supported = true;
- if (f_packet.contains("arup", Qt::CaseInsensitive))
- arup_supported = true;
- if (f_packet.contains("casing_alerts", Qt::CaseInsensitive))
- casing_alerts_supported = true;
- if (f_packet.contains("modcall_reason", Qt::CaseInsensitive))
- modcall_reason_supported = true;
- if (f_packet.contains("looping_sfx", Qt::CaseInsensitive))
- looping_sfx_supported = true;
- if (f_packet.contains("additive", Qt::CaseInsensitive))
- additive_supported = true;
- if (f_packet.contains("effects", Qt::CaseInsensitive))
- effects_supported = true;
- if (f_packet.contains("y_offset", Qt::CaseInsensitive))
- y_offset_supported = true;
- if (f_packet.contains("expanded_desk_mods", Qt::CaseInsensitive))
- expanded_desk_mods_supported = true;
- if (f_packet.contains("auth_packet", Qt::CaseInsensitive))
- auth_packet_supported = true;
- if (f_packet.contains("custom_blips", Qt::CaseInsensitive))
- custom_blips_supported = true;
}
else if (header == "PN") {
if (!lobby_constructed || f_contents.size() < 2)
@@ -162,47 +101,40 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
goto end;
}
- char_list_size = f_contents.at(0).toInt();
- evidence_list_size = f_contents.at(1).toInt();
- music_list_size = f_contents.at(2).toInt();
+int char_list_size = f_contents.at(0).toInt();
+int evidence_list_size = f_contents.at(1).toInt();
+int music_list_size = f_contents.at(2).toInt();
- if (char_list_size < 0 || evidence_list_size < 0 || music_list_size < 0)
- goto end;
+if (char_list_size < 0 || evidence_list_size < 0 || music_list_size < 0)
+ goto end;
- loaded_chars = 0;
- loaded_evidence = 0;
- loaded_music = 0;
- generated_chars = 0;
-
- destruct_courtroom();
- construct_courtroom();
-
- courtroom_loaded = false;
-
- int selected_server = w_lobby->get_selected_server();
- QString server_address = "", server_name = "";
- switch (w_lobby->pageSelected()) {
- case 0:
- if (selected_server >= 0 && selected_server < server_list.size()) {
- auto info = server_list.at(selected_server);
- server_name = info.name;
- server_address =
- QString("%1:%2").arg(info.ip, QString::number(info.port));
- window_title = server_name;
- }
- break;
- case 1:
- {
- QVector<server_type> favorite_list = Options::getInstance().favorites();
- if (selected_server >= 0 && selected_server < favorite_list.size()) {
- auto info = favorite_list.at(selected_server);
- server_name = info.name;
- server_address =
- QString("%1:%2").arg(info.ip, QString::number(info.port));
- window_title = server_name;
- }
- }
- break;
+generated_chars = 0;
+
+destruct_courtroom();
+construct_courtroom();
+
+courtroom_loaded = false;
+
+int selected_server = w_lobby->get_selected_server();
+QString server_address = "", server_name = "";
+switch (w_lobby->pageSelected()) {
+case 0:
+ if (selected_server >= 0 && selected_server < server_list.size()) {
+ auto info = server_list.at(selected_server);
+ server_name = info.name;
+ server_address = QString("%1:%2").arg(info.ip, QString::number(info.port));
+ window_title = server_name;
+ }
+ break;
+case 1: {
+ QVector<server_type> favorite_list = Options::getInstance().favorites();
+ if (selected_server >= 0 && selected_server < favorite_list.size()) {
+ auto info = favorite_list.at(selected_server);
+ server_name = info.name;
+ server_address = QString("%1:%2").arg(info.ip, QString::number(info.port));
+ window_title = server_name;
+ }
+} break;
case 2:
window_title = "Local Demo Recording";
break;
@@ -285,7 +217,6 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
int areas = 0;
for (int n_element = 0; n_element < f_contents.size(); ++n_element) {
- ++loaded_music;
if (musics_time) {
w_courtroom->append_music(f_contents.at(n_element));
}
@@ -582,9 +513,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
}
// Auth packet
else if (header == "AUTH") {
- if (!courtroom_constructed || !auth_packet_supported || f_contents.isEmpty()) {
+ if (!courtroom_constructed ||
+ !m_serverdata.get_feature(server::BASE_FEATURE_SET::AUTH_PACKET) ||
+ f_contents.isEmpty()) {
goto end;
-}
+ }
bool ok;
int authenticated = f_contents.at(0).toInt(&ok);
if (!ok) {
@@ -617,9 +550,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
if (f_contents.size() > 1 || f_contents.isEmpty()) { // This can never be more than one link.
goto end;
}
- QUrl t_asset_url = QUrl::fromPercentEncoding(f_contents.at(0).toUtf8());
- if (t_asset_url.isValid())
- asset_url = t_asset_url.toString();
+
+ m_serverdata.set_asset_url(f_contents.at(0));
}
if (log_to_demo) {
diff --git a/src/serverdata.cpp b/src/serverdata.cpp
new file mode 100644
index 00000000..b8a08df8
--- /dev/null
+++ b/src/serverdata.cpp
@@ -0,0 +1,40 @@
+#include <serverdata.h>
+
+#include <QUrl>
+#include <QVariant>
+
+namespace server {
+ bool ServerData::get_feature(const BASE_FEATURE_SET &f_feature) const
+ {
+ return get_feature(QVariant::fromValue(f_feature).toString());
+ }
+
+ bool ServerData::get_feature(const QString &f_feature) const
+ {
+ return m_features.contains(f_feature, Qt::CaseInsensitive);
+ }
+
+ void ServerData::set_features(const QStringList &f_feature_list)
+ {
+ m_features = f_feature_list;
+ }
+
+ void ServerData::set_server_software(const QString &newServer_software)
+ {
+ m_server_software = newServer_software;
+ }
+
+ QString ServerData::get_asset_url() const { return m_asset_url; }
+
+ void ServerData::set_asset_url(const QString &f_asset_url)
+ {
+ QUrl l_asset_url = QUrl::fromPercentEncoding(f_asset_url.toUtf8());
+
+ if (l_asset_url.isValid()) {
+ m_asset_url = l_asset_url.toString();
+ }
+
+ m_asset_url = f_asset_url;
+ }
+
+} // namespace server