From 61f81b824d4a9c53a04a5367f863cb03d1bfbefe Mon Sep 17 00:00:00 2001 From: Diadlo Date: Thu, 18 Aug 2016 23:50:11 +0300 Subject: [PATCH] refactor: Remove html tags from 'IMPORTANT NOTE' --- src/widget/form/settings/advancedform.cpp | 13 +++++++++++++ src/widget/form/settings/advancedsettings.ui | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/widget/form/settings/advancedform.cpp b/src/widget/form/settings/advancedform.cpp index 06d9878b8..ae31d4bd3 100644 --- a/src/widget/form/settings/advancedform.cpp +++ b/src/widget/form/settings/advancedform.cpp @@ -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.

") + .arg(QString("%1").arg(tr("really"))) + .arg(QString("%1").arg(tr("not"))); + + QString warning = QString("
" + "

%1

%2

") + .arg(tr("IMPORTANT NOTE")).arg(warningBody); + + bodyUI->warningLabel->setText(warning); + eventsInit(); Translator::registerHandler(std::bind(&AdvancedForm::retranslateUi, this), this); } diff --git a/src/widget/form/settings/advancedsettings.ui b/src/widget/form/settings/advancedsettings.ui index 790fd1160..5082b02ae 100644 --- a/src/widget/form/settings/advancedsettings.ui +++ b/src/widget/form/settings/advancedsettings.ui @@ -32,7 +32,7 @@ - <html><head/><body><p><span style=" font-weight:600; color:#ff0000;">IMPORTANT NOTE</span></p><p><span style=" color:#ff0000;">Unless you </span><span style=" font-weight:600; color:#ff0000;">really</span><span style=" color:#ff0000;"> know what you are doing, please do </span><span style=" font-weight:600; color:#ff0000;">not</span><span style=" color:#ff0000;"> change anything here. Changes made here may lead to problems with qTox, and even to loss of your data, e.g. history.</span></p></body></html> + {IMPORTANT NOTE HERE} Qt::RichText