1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(profileform): Removed HTML tags from translation

This commit is contained in:
Diadlo 2016-09-10 23:55:51 +03:00
parent 2d63e441d4
commit a7ddf5ef56
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 12 additions and 6 deletions

View File

@ -174,9 +174,15 @@ void ProfileForm::show(ContentLayout* contentLayout)
head->show(); head->show();
QWidget::show(); QWidget::show();
prFileLabelUpdate(); prFileLabelUpdate();
QString DirPath = Settings::getInstance().getMakeToxPortable() ? QApplication::applicationDirPath() : bool portable = Settings::getInstance().getMakeToxPortable();
QDir(Settings::getInstance().getSettingsDirPath()).path().trimmed(); QString defaultPath = QDir(Settings::getInstance().getSettingsDirPath()).path().trimmed();
bodyUI->dirPrLink->setText(bodyUI->dirPrLink->text().replace("Dir_Path",DirPath)); QString appPath = QApplication::applicationDirPath();
QString dirPath = portable ? appPath : defaultPath;
QString dirPrLink = tr("Current profile location: %1")
.arg(QString("<a href=\"file://%1\">%1</a>").arg(dirPath));
bodyUI->dirPrLink->setText(dirPrLink);
bodyUI->dirPrLink->setOpenExternalLinks(true); bodyUI->dirPrLink->setOpenExternalLinks(true);
bodyUI->dirPrLink->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::TextSelectableByMouse); bodyUI->dirPrLink->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::TextSelectableByMouse);
bodyUI->dirPrLink->setMaximumSize(bodyUI->dirPrLink->sizeHint()); bodyUI->dirPrLink->setMaximumSize(bodyUI->dirPrLink->sizeHint());

View File

@ -39,8 +39,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>536</width> <width>577</width>
<height>844</height> <height>796</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1"> <layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,1">
@ -292,7 +292,7 @@ Share it with your friends to communicate.</string>
<enum>Qt::ClickFocus</enum> <enum>Qt::ClickFocus</enum>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;p&gt;&lt;a href=&quot;file:///Dir_Path&quot;&gt;&lt;span style=&quot; text-decoration: NONE; color:#000000;&quot;&gt;Current profile location: Dir_Path&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</string> <string notr="true">{Current profile location}</string>
</property> </property>
<property name="textFormat"> <property name="textFormat">
<enum>Qt::RichText</enum> <enum>Qt::RichText</enum>