clang format

This commit is contained in:
scatterflower 2020-08-16 21:59:44 -05:00
parent 359cad73d4
commit ecb0ee42a3
4 changed files with 132 additions and 111 deletions

View File

@ -117,7 +117,9 @@ public:
void set_widgets(); void set_widgets();
// sets font size based on theme ini files // sets font size based on theme ini files
void set_font(QWidget *widget, QString class_name, QString p_identifier, QString p_char="", QString font_name="", int f_pointsize=0); void set_font(QWidget *widget, QString class_name, QString p_identifier,
QString p_char = "", QString font_name = "",
int f_pointsize = 0);
// Get the properly constructed font // Get the properly constructed font
QFont get_qfont(QString font_name, int f_pointsize, bool antialias = true); QFont get_qfont(QString font_name, int f_pointsize, bool antialias = true);
@ -127,7 +129,7 @@ public:
QColor f_color = Qt::black, bool bold = false); QColor f_color = Qt::black, bool bold = false);
// helper function that calls above function on the relevant widgets // helper function that calls above function on the relevant widgets
void set_fonts(QString p_char=""); void set_fonts(QString p_char = "");
// sets dropdown menu stylesheet // sets dropdown menu stylesheet
void set_dropdown(QWidget *widget); void set_dropdown(QWidget *widget);
@ -220,7 +222,8 @@ public:
// this function keeps the chatlog scrolled to the top unless there's text // this function keeps the chatlog scrolled to the top unless there's text
// selected // selected
// or the user isn't already scrolled to the top // or the user isn't already scrolled to the top
void append_ic_text(QString p_text, QString p_name = "", QString action = "", int color = 0); void append_ic_text(QString p_text, QString p_name = "", QString action = "",
int color = 0);
// prints who played the song to IC chat and plays said song(if found on local // prints who played the song to IC chat and plays said song(if found on local
// filesystem) takes in a list where the first element is the song name and // filesystem) takes in a list where the first element is the song name and

View File

@ -935,13 +935,19 @@ void Courtroom::set_widgets()
ui_spectator->setToolTip(tr("Become a spectator. You won't be able to " ui_spectator->setToolTip(tr("Become a spectator. You won't be able to "
"interact with the in-character screen.")); "interact with the in-character screen."));
free_brush = QBrush(ao_app->get_color("area_free_color", "courtroom_design.ini")); free_brush =
lfp_brush = QBrush(ao_app->get_color("area_lfp_color", "courtroom_design.ini")); QBrush(ao_app->get_color("area_free_color", "courtroom_design.ini"));
casing_brush = QBrush(ao_app->get_color("area_casing_color", "courtroom_design.ini")); lfp_brush =
recess_brush = QBrush(ao_app->get_color("area_recess_color", "courtroom_design.ini")); QBrush(ao_app->get_color("area_lfp_color", "courtroom_design.ini"));
casing_brush =
QBrush(ao_app->get_color("area_casing_color", "courtroom_design.ini"));
recess_brush =
QBrush(ao_app->get_color("area_recess_color", "courtroom_design.ini"));
rp_brush = QBrush(ao_app->get_color("area_rp_color", "courtroom_design.ini")); rp_brush = QBrush(ao_app->get_color("area_rp_color", "courtroom_design.ini"));
gaming_brush = QBrush(ao_app->get_color("area_gaming_color", "courtroom_design.ini")); gaming_brush =
locked_brush = QBrush(ao_app->get_color("area_locked_color", "courtroom_design.ini")); QBrush(ao_app->get_color("area_gaming_color", "courtroom_design.ini"));
locked_brush =
QBrush(ao_app->get_color("area_locked_color", "courtroom_design.ini"));
refresh_evidence(); refresh_evidence();
} }
@ -966,28 +972,29 @@ void Courtroom::set_font(QWidget *widget, QString class_name,
{ {
QString design_file = "courtroom_fonts.ini"; QString design_file = "courtroom_fonts.ini";
if (f_pointsize <= 0) if (f_pointsize <= 0)
f_pointsize = ao_app->get_design_element(p_identifier, design_file, p_char).toInt(); f_pointsize =
ao_app->get_design_element(p_identifier, design_file, p_char).toInt();
if (font_name == "") if (font_name == "")
font_name = font_name =
ao_app->get_design_element(p_identifier + "_font", design_file, p_char); ao_app->get_design_element(p_identifier + "_font", design_file, p_char);
QString f_color_result = ao_app->get_design_element(p_identifier + "_color", design_file, p_char); QString f_color_result =
ao_app->get_design_element(p_identifier + "_color", design_file, p_char);
QColor f_color(0, 0, 0); QColor f_color(0, 0, 0);
if (f_color_result != "") if (f_color_result != "") {
{
QStringList color_list = f_color_result.split(","); QStringList color_list = f_color_result.split(",");
if (color_list.size() >= 3) if (color_list.size() >= 3) {
{
f_color.setRed(color_list.at(0).toInt()); f_color.setRed(color_list.at(0).toInt());
f_color.setGreen(color_list.at(1).toInt()); f_color.setGreen(color_list.at(1).toInt());
f_color.setBlue(color_list.at(2).toInt()); f_color.setBlue(color_list.at(2).toInt());
} }
} }
bool bold = ao_app->get_design_element(p_identifier + "_bold", design_file, p_char) == bool bold =
"1"; // is the font bold or not? ao_app->get_design_element(p_identifier + "_bold", design_file, p_char) ==
bool antialias = "1"; // is the font bold or not?
ao_app->get_design_element(p_identifier + "_sharp", design_file, p_char) != bool antialias = ao_app->get_design_element(p_identifier + "_sharp",
"1"; // is the font anti-aliased or not? design_file, p_char) !=
"1"; // is the font anti-aliased or not?
this->set_qfont(widget, class_name, this->set_qfont(widget, class_name,
get_qfont(font_name, f_pointsize, antialias), f_color, bold); get_qfont(font_name, f_pointsize, antialias), f_color, bold);
@ -1138,8 +1145,8 @@ void Courtroom::set_background(QString p_background, bool display)
// Populate the dropdown list with all pos that exist on this bg // Populate the dropdown list with all pos that exist on this bg
QStringList pos_list = {}; QStringList pos_list = {};
for (QString key : default_pos.keys()) { for (QString key : default_pos.keys()) {
if (file_exists(ao_app->get_image_suffix( if (file_exists(
ao_app->get_background_path(key)))) { ao_app->get_image_suffix(ao_app->get_background_path(key)))) {
pos_list.append(default_pos[key]); pos_list.append(default_pos[key]);
} }
} }
@ -1293,8 +1300,7 @@ void Courtroom::update_character(int p_cid)
{ {
custom_obj_menu->clear(); custom_obj_menu->clear();
if (file_exists(ao_app->get_image_suffix( if (file_exists(ao_app->get_image_suffix(
ao_app->get_character_path(current_char, "custom")))) ao_app->get_character_path(current_char, "custom")))) {
{
ui_custom_objection->show(); ui_custom_objection->show();
QAction *action = custom_obj_menu->addAction("Default"); QAction *action = custom_obj_menu->addAction("Default");
custom_obj_menu->setDefaultAction(action); custom_obj_menu->setDefaultAction(action);
@ -1312,8 +1318,7 @@ void Courtroom::update_character(int p_cid)
QDir::Files); QDir::Files);
for (const QString &filename : custom_obj) { for (const QString &filename : custom_obj) {
QAction *action = custom_obj_menu->addAction(filename); QAction *action = custom_obj_menu->addAction(filename);
if (custom_obj_menu->defaultAction() == nullptr) if (custom_obj_menu->defaultAction() == nullptr) {
{
custom_obj_menu->setDefaultAction(action); custom_obj_menu->setDefaultAction(action);
objection_custom = action->text(); objection_custom = action->text();
} }
@ -1444,7 +1449,6 @@ void Courtroom::list_areas()
ui_area_list->clear(); ui_area_list->clear();
// ui_music_search->setText(""); // ui_music_search->setText("");
int n_listed_areas = 0; int n_listed_areas = 0;
for (int n_area = 0; n_area < area_list.size(); ++n_area) { for (int n_area = 0; n_area < area_list.size(); ++n_area) {
@ -1762,32 +1766,34 @@ void Courtroom::on_chat_return_pressed()
ao_app->send_server_packet(new AOPacket("MS", packet_contents)); ao_app->send_server_packet(new AOPacket("MS", packet_contents));
} }
void Courtroom::reset_ic(){ void Courtroom::reset_ic()
ui_vp_chat_arrow->stop(); {
text_state = 0; ui_vp_chat_arrow->stop();
anim_state = 0; text_state = 0;
ui_vp_objection->stop(); anim_state = 0;
chat_tick_timer->stop(); ui_vp_objection->stop();
ui_vp_evidence_display->reset(); chat_tick_timer->stop();
ui_vp_evidence_display->reset();
} }
void Courtroom::reset_ui(){ void Courtroom::reset_ui()
ui_ic_chat_message->clear(); {
if (ui_additive->isChecked()) ui_ic_chat_message->clear();
ui_ic_chat_message->insert(" "); if (ui_additive->isChecked())
objection_state = 0; ui_ic_chat_message->insert(" ");
realization_state = 0; objection_state = 0;
screenshake_state = 0; realization_state = 0;
is_presenting_evidence = false; screenshake_state = 0;
if (!ao_app->is_stickypres_enabled()) is_presenting_evidence = false;
ui_pre->setChecked(false); if (!ao_app->is_stickypres_enabled())
ui_hold_it->set_image("holdit"); ui_pre->setChecked(false);
ui_objection->set_image("objection"); ui_hold_it->set_image("holdit");
ui_take_that->set_image("takethat"); ui_objection->set_image("objection");
ui_custom_objection->set_image("custom"); ui_take_that->set_image("takethat");
ui_realization->set_image("realization"); ui_custom_objection->set_image("custom");
ui_screenshake->set_image("screenshake"); ui_realization->set_image("realization");
ui_evidence_present->set_image("present"); ui_screenshake->set_image("screenshake");
ui_evidence_present->set_image("present");
} }
void Courtroom::handle_chatmessage(QStringList *p_contents) void Courtroom::handle_chatmessage(QStringList *p_contents)
@ -1804,7 +1810,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
// amongst the packet's content. We also have to check if the server even // amongst the packet's content. We also have to check if the server even
// supports CCCC's IC features, or if it's just japing us. Also, don't // 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. // 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_support_enabled)) { if (n_string < p_contents->size() &&
(n_string < MS_MINIMUM || ao_app->cccc_ic_support_enabled)) {
m_chatmessage[n_string] = p_contents->at(n_string); m_chatmessage[n_string] = p_contents->at(n_string);
} }
else { else {
@ -1821,8 +1828,10 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
return; return;
QString f_displayname; QString f_displayname;
if (!is_spectator && (m_chatmessage[SHOWNAME].isEmpty() || !ui_showname_enable->isChecked())) { if (!is_spectator &&
// If the users is not a spectator and showname is disabled, use the character's name (m_chatmessage[SHOWNAME].isEmpty() || !ui_showname_enable->isChecked())) {
// If the users is not a spectator and showname is disabled, use the
// character's name
f_displayname = ao_app->get_showname(char_list.at(f_char_id).name); f_displayname = ao_app->get_showname(char_list.at(f_char_id).name);
} }
else { else {
@ -1839,10 +1848,11 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
QString custom_objection = ""; QString custom_objection = "";
if (m_chatmessage[OBJECTION_MOD].contains("4&")) { if (m_chatmessage[OBJECTION_MOD].contains("4&")) {
objection_mod = 4; objection_mod = 4;
custom_objection = m_chatmessage[OBJECTION_MOD].split("4&")[1]; // takes the name of custom objection. custom_objection = m_chatmessage[OBJECTION_MOD].split(
"4&")[1]; // takes the name of custom objection.
} }
else{ else {
objection_mod = m_chatmessage[OBJECTION_MOD].toInt(); objection_mod = m_chatmessage[OBJECTION_MOD].toInt();
} }
// Reset IC display // Reset IC display
@ -1861,7 +1871,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
f_charname = ao_app->get_showname(char_list.at(f_char_id).name); f_charname = ao_app->get_showname(char_list.at(f_char_id).name);
chatlogpiece *temp = chatlogpiece *temp =
new chatlogpiece(f_charname, f_displayname, m_chatmessage[MESSAGE], false, m_chatmessage[TEXT_COLOR].toInt()); new chatlogpiece(f_charname, f_displayname, m_chatmessage[MESSAGE], false,
m_chatmessage[TEXT_COLOR].toInt());
ic_chatlog_history.append(*temp); ic_chatlog_history.append(*temp);
if (ao_app->get_auto_logging_enabled()) if (ao_app->get_auto_logging_enabled())
ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true);
@ -1882,7 +1893,8 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
color_rgb_list.append(color); color_rgb_list.append(color);
} }
append_ic_text(m_chatmessage[MESSAGE], f_displayname, "", m_chatmessage[TEXT_COLOR].toInt()); append_ic_text(m_chatmessage[MESSAGE], f_displayname, "",
m_chatmessage[TEXT_COLOR].toInt());
// if an objection is used // if an objection is used
if (objection_mod <= 4 && objection_mod >= 1) { if (objection_mod <= 4 && objection_mod >= 1) {
@ -1904,11 +1916,15 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
// case 4 is AO2 only // case 4 is AO2 only
case 4: case 4:
if (custom_objection != "") { if (custom_objection != "") {
ui_vp_objection->play("custom_objections/" + custom_objection, f_char, f_custom_theme, shout_stay_time); ui_vp_objection->play("custom_objections/" + custom_objection, f_char,
objection_player->play("custom_objections/" + custom_objection.split('.')[0], f_char, f_custom_theme); f_custom_theme, shout_stay_time);
objection_player->play("custom_objections/" +
custom_objection.split('.')[0],
f_char, f_custom_theme);
} }
else { else {
ui_vp_objection->play("custom", f_char, f_custom_theme, shout_stay_time); ui_vp_objection->play("custom", f_char, f_custom_theme,
shout_stay_time);
objection_player->play("custom", f_char, f_custom_theme); objection_player->play("custom", f_char, f_custom_theme);
} }
break; break;
@ -2003,11 +2019,10 @@ void Courtroom::handle_chatmessage_2()
->get_design_element("showname_extra_width", "courtroom_design.ini", ->get_design_element("showname_extra_width", "courtroom_design.ini",
customchar) customchar)
.toInt(); .toInt();
QString align = QString align = ao_app
ao_app ->get_design_element("showname_align",
->get_design_element("showname_align", "courtroom_design.ini", "courtroom_design.ini", customchar)
customchar) .toLower();
.toLower();
if (align == "right") if (align == "right")
ui_vp_showname->setAlignment(Qt::AlignRight); ui_vp_showname->setAlignment(Qt::AlignRight);
else if (align == "center") else if (align == "center")
@ -2039,8 +2054,7 @@ void Courtroom::handle_chatmessage_2()
set_font(ui_vp_showname, "", "showname", customchar); set_font(ui_vp_showname, "", "showname", customchar);
} }
else else {
{
ui_vp_showname->resize(default_width.width, ui_vp_showname->height()); ui_vp_showname->resize(default_width.width, ui_vp_showname->height());
} }
} }
@ -2063,12 +2077,13 @@ void Courtroom::handle_chatmessage_2()
int emote_mod = m_chatmessage[EMOTE_MOD].toInt(); int emote_mod = m_chatmessage[EMOTE_MOD].toInt();
// Deal with invalid emote modifiers // Deal with invalid emote modifiers
if (emote_mod != 0 && emote_mod != 1 && emote_mod != 2 \ if (emote_mod != 0 && emote_mod != 1 && emote_mod != 2 && emote_mod != 5 &&
&& emote_mod != 5 && emote_mod != 6) { emote_mod != 6) {
if (emote_mod == 4) if (emote_mod == 4)
emote_mod = 6; // Addresses issue with an old bug that sent the wrong emote modifier for zoompre emote_mod = 6; // Addresses issue with an old bug that sent the wrong
else // emote modifier for zoompre
emote_mod = 0; else
emote_mod = 0;
} }
if (ao_app->flipping_enabled && m_chatmessage[FLIP].toInt() == 1) if (ao_app->flipping_enabled && m_chatmessage[FLIP].toInt() == 1)
@ -2574,7 +2589,8 @@ QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos,
return p_text_escaped; return p_text_escaped;
} }
void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action, int color) void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action,
int color)
{ {
QTextCharFormat bold; QTextCharFormat bold;
QTextCharFormat normal; QTextCharFormat normal;
@ -2586,8 +2602,7 @@ void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action,
const int old_scrollbar_value = ui_ic_chatlog->verticalScrollBar()->value(); const int old_scrollbar_value = ui_ic_chatlog->verticalScrollBar()->value();
if (p_action == "") if (p_action == "")
p_text = filter_ic_text(p_text, ao_app->is_colorlog_enabled(), -1, p_text = filter_ic_text(p_text, ao_app->is_colorlog_enabled(), -1, color);
color);
if (log_goes_downwards) { if (log_goes_downwards) {
const bool is_scrolled_down = const bool is_scrolled_down =
@ -2810,8 +2825,7 @@ void Courtroom::chat_tick()
} }
QString f_char; QString f_char;
QString f_custom_theme; QString f_custom_theme;
if (ao_app->is_customchat_enabled()) if (ao_app->is_customchat_enabled()) {
{
f_char = m_chatmessage[CHAR_NAME]; f_char = m_chatmessage[CHAR_NAME];
f_custom_theme = ao_app->get_chat(f_char); f_custom_theme = ao_app->get_chat(f_char);
} }
@ -3174,7 +3188,8 @@ void Courtroom::handle_song(QStringList *p_contents)
} }
if (!mute_map.value(n_char)) { if (!mute_map.value(n_char)) {
chatlogpiece *temp = new chatlogpiece(str_char, str_show, f_song, true, m_chatmessage[TEXT_COLOR].toInt()); chatlogpiece *temp = new chatlogpiece(str_char, str_show, f_song, true,
m_chatmessage[TEXT_COLOR].toInt());
ic_chatlog_history.append(*temp); ic_chatlog_history.append(*temp);
if (ao_app->get_auto_logging_enabled()) if (ao_app->get_auto_logging_enabled())
ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true); ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true);
@ -4100,8 +4115,7 @@ void Courtroom::on_music_list_context_menu_requested(const QPoint &pos)
{ {
QMenu *menu = new QMenu(); QMenu *menu = new QMenu();
menu->addAction(QString(tr("Play Random Song")), this, menu->addAction(QString(tr("Play Random Song")), this, SLOT(music_random()));
SLOT(music_random()));
menu->addSeparator(); menu->addSeparator();
menu->addAction(QString(tr("Expand All Categories")), this, menu->addAction(QString(tr("Expand All Categories")), this,
SLOT(music_list_expand_all())); SLOT(music_list_expand_all()));
@ -4157,7 +4171,9 @@ void Courtroom::music_synchronize(bool toggle)
void Courtroom::music_random() void Courtroom::music_random()
{ {
QList<QTreeWidgetItem *> clist; QList<QTreeWidgetItem *> clist;
QTreeWidgetItemIterator it(ui_music_list, QTreeWidgetItemIterator::NotHidden | QTreeWidgetItemIterator::NoChildren); QTreeWidgetItemIterator it(ui_music_list,
QTreeWidgetItemIterator::NotHidden |
QTreeWidgetItemIterator::NoChildren);
while (*it) { while (*it) {
clist += (*it); clist += (*it);
++it; ++it;
@ -4402,7 +4418,8 @@ void Courtroom::set_text_color_dropdown()
// Update markdown colors. TODO: make a loading function that only loads the // Update markdown colors. TODO: make a loading function that only loads the
// config file once instead of several times // config file once instead of several times
for (int c = 0; c < max_colors; ++c) { for (int c = 0; c < max_colors; ++c) {
QColor color = ao_app->get_chat_color("c" + QString::number(c), current_char); QColor color =
ao_app->get_chat_color("c" + QString::number(c), current_char);
color_rgb_list.append(color); color_rgb_list.append(color);
color_markdown_start_list.append(ao_app->get_chat_markdown( color_markdown_start_list.append(ao_app->get_chat_markdown(
"c" + QString::number(c) + "_start", current_char)); "c" + QString::number(c) + "_start", current_char));
@ -4578,10 +4595,7 @@ void Courtroom::on_char_select_right_clicked()
set_char_select_page(); set_char_select_page();
} }
void Courtroom::on_spectator_clicked() void Courtroom::on_spectator_clicked() { char_clicked(-1); }
{
char_clicked(-1);
}
void Courtroom::on_call_mod_clicked() void Courtroom::on_call_mod_clicked()
{ {
@ -4654,14 +4668,16 @@ void Courtroom::on_showname_enable_clicked()
append_ic_text(item.get_message(), item.get_showname(), append_ic_text(item.get_message(), item.get_showname(),
tr("has played a song")); tr("has played a song"));
else else
append_ic_text(item.get_message(), item.get_showname(), "", item.get_chat_color()); append_ic_text(item.get_message(), item.get_showname(), "",
item.get_chat_color());
} }
else { else {
if (item.is_song()) if (item.is_song())
append_ic_text(item.get_message(), item.get_name(), append_ic_text(item.get_message(), item.get_name(),
tr("has played a song")); tr("has played a song"));
else else
append_ic_text(item.get_message(), item.get_name(), "", item.get_chat_color()); append_ic_text(item.get_message(), item.get_name(), "",
item.get_chat_color());
} }
} }

View File

@ -176,7 +176,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
} }
} }
else if (header == "FL") { else if (header == "FL") {
// encryption_needed = true; // encryption_needed = true;
yellow_text_enabled = false; yellow_text_enabled = false;
prezoom_enabled = false; prezoom_enabled = false;
flipping_enabled = false; flipping_enabled = false;
@ -292,14 +292,14 @@ void AOApplication::server_packet_received(AOPacket *p_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
if (AOApplication::get_auto_logging_enabled()){ if (AOApplication::get_auto_logging_enabled()) {
this->log_filename = QDateTime::currentDateTime().toUTC().toString( this->log_filename = QDateTime::currentDateTime().toUTC().toString(
"'logs/" + server_name.remove(QRegExp("[\\\\/:*?\"<>|\']")) + "'logs/" + server_name.remove(QRegExp("[\\\\/:*?\"<>|\']")) +
"/'ddd MMMM yyyy hh.mm.ss t'.log'"); "/'ddd MMMM yyyy hh.mm.ss t'.log'");
this->write_to_file("Joined server " + server_name + " on address " + this->write_to_file("Joined server " + server_name + " on address " +
server_address + " on " + server_address + " on " +
QDateTime::currentDateTime().toUTC().toString(), QDateTime::currentDateTime().toUTC().toString(),
log_filename, true); log_filename, true);
} }
QCryptographicHash hash(QCryptographicHash::Algorithm::Sha256); QCryptographicHash hash(QCryptographicHash::Algorithm::Sha256);
@ -335,8 +335,8 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
++loaded_chars; ++loaded_chars;
w_lobby->set_loading_text(tr("Loading chars:\n%1/%2") w_lobby->set_loading_text(tr("Loading chars:\n%1/%2")
.arg(QString::number(loaded_chars)) .arg(QString::number(loaded_chars))
.arg(QString::number(char_list_size))); .arg(QString::number(char_list_size)));
w_courtroom->append_char(f_char); w_courtroom->append_char(f_char);

View File

@ -435,7 +435,8 @@ QString AOApplication::get_tagged_stylesheet(QString target_tag, QString p_file)
QString AOApplication::get_chat_markdown(QString p_identifier, QString p_chat) QString AOApplication::get_chat_markdown(QString p_identifier, QString p_chat)
{ {
QString design_ini_path = get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini"; QString design_ini_path =
get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini";
QString default_path = get_base_path() + "misc/default/config.ini"; QString default_path = get_base_path() + "misc/default/config.ini";
QString f_result = read_design_ini(p_identifier, design_ini_path); QString f_result = read_design_ini(p_identifier, design_ini_path);
@ -449,7 +450,8 @@ QColor AOApplication::get_chat_color(QString p_identifier, QString p_chat)
{ {
QColor return_color(255, 255, 255); QColor return_color(255, 255, 255);
QString design_ini_path = get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini"; QString design_ini_path =
get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini";
QString default_path = get_base_path() + "misc/default/config.ini"; QString default_path = get_base_path() + "misc/default/config.ini";
QString f_result = read_design_ini(p_identifier, design_ini_path); QString f_result = read_design_ini(p_identifier, design_ini_path);
@ -909,8 +911,8 @@ QString AOApplication::get_effect_sound(QString fx_name, QString p_char)
} }
} }
if(fx_name == "realization"){ if (fx_name == "realization") {
f_result = get_custom_realization(p_char); f_result = get_custom_realization(p_char);
} }
return f_result; return f_result;
@ -1056,7 +1058,7 @@ QString AOApplication::get_casing_can_host_cases()
} }
bool AOApplication::get_auto_logging_enabled() bool AOApplication::get_auto_logging_enabled()
{ {
QString result = QString result =
configini->value("automatic_logging_enabled", "true").value<QString>(); configini->value("automatic_logging_enabled", "true").value<QString>();
return result.startsWith("true"); return result.startsWith("true");
} }