Project

General

Profile

Bug #1604 ยป 1604_qt.patch

Dean Brown, 07/14/2025 04:39 AM

View differences:

client/gui-qt/helpdlg.cpp
struct canvas *canvas;
const struct unit_type *obsolete;
struct unit_type *utype, *max_utype;
QList<int> list;
QString str;
utype = unit_type_by_translated_name(title);
......
add_info_separator();
// Tech requirement
tech = utype_primary_tech_req(utype);
if (advance_number(tech) != A_NONE) {
QLabel *tb;
tb = new QLabel(this);
// Tech requirements
// see if any reqs
if (utype->build_reqs.size == 0) {
add_info_label(_("No technology required."));
} else {
// there is >= 1 req
// TRANS: this and similar literal strings interpreted as (Qt) HTML
str = _("Requires");
str = "<b>" + str + "</b> "
+ link_me(advance_name_translation(tech), HELP_TECH);
str = "<b>" + str + "</b> ";
// iterate all the reqs, building the str
unit_tech_reqs_iterate(utype, padv) {
str = str + link_me(advance_name_translation(padv), HELP_TECH);
} unit_tech_reqs_iterate_end;
QLabel *tb;
tb = new QLabel(this);
tb->setProperty(fonts::help_label, "true");
tb->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
tb->setTextFormat(Qt::RichText);
......
connect(tb, &QLabel::linkActivated,
this, &help_widget::anchor_clicked);
info_layout->addWidget(tb);
} else {
add_info_label(_("No technology required."));
}
// Obsolescence
    (1-1/1)