Browse Source

refactor: Remove html tags from 'IMPORTANT NOTE'

reviewable/pr3457/r14
Diadlo 9 years ago
parent
commit
61f81b824d
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
  1. 13
      src/widget/form/settings/advancedform.cpp
  2. 2
      src/widget/form/settings/advancedsettings.ui

13
src/widget/form/settings/advancedform.cpp

@ -57,6 +57,19 @@ AdvancedForm::AdvancedForm() @@ -57,6 +57,19 @@ AdvancedForm::AdvancedForm()
bodyUI->proxyType->setCurrentIndex(index);
on_proxyType_currentIndexChanged(index);
QString warningBody = tr("Unless you %1 know what you are doing, "
"please do %2 change anything here. Changes "
"made here may lead to problems with qTox, and even "
"to loss of your data, e.g. history.</p>")
.arg(QString("<b>%1</b>").arg(tr("really")))
.arg(QString("<b>%1</b>").arg(tr("not")));
QString warning = QString("<div style=\"color:#ff0000;\">"
"<p><b>%1</b></p><p>%2</p></div>")
.arg(tr("IMPORTANT NOTE")).arg(warningBody);
bodyUI->warningLabel->setText(warning);
eventsInit();
Translator::registerHandler(std::bind(&AdvancedForm::retranslateUi, this), this);
}

2
src/widget/form/settings/advancedsettings.ui

@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
<item>
<widget class="QLabel" name="warningLabel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;IMPORTANT NOTE&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;Unless you &lt;/span&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;really&lt;/span&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt; know what you are doing, please do &lt;/span&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;not&lt;/span&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt; change anything here. Changes made here may lead to problems with qTox, and even to loss of your data, e.g. history.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">{IMPORTANT NOTE HERE}</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

Loading…
Cancel
Save