Merge branch 'localize_tooltip' into 'master'

Make content selector tooltip localizable

See merge request OpenMW/openmw!3687
macos_ci_fix
AnyOldName3 1 year ago
commit 4567374e1f

@ -4,13 +4,6 @@
#include <QIODevice>
int ContentSelectorModel::EsmFile::sPropertyCount = 7;
QString ContentSelectorModel::EsmFile::sToolTip = QString(
"<b>Author:</b> %1<br/> \
<b>Version:</b> %2<br/> \
<b>Modified:</b> %3<br/> \
<b>Path:</b><br/>%4<br/> \
<br/><b>Description:</b><br/>%5<br/> \
<br/><b>Dependencies: </b>%6<br/>");
ContentSelectorModel::EsmFile::EsmFile(const QString& fileName, ModelItem* parent)
: ModelItem(parent)

@ -59,7 +59,7 @@ namespace ContentSelectorModel
QString description() const { return mDescription; }
QString toolTip() const
{
return sToolTip.arg(mAuthor)
return mTooltipTemlate.arg(mAuthor)
.arg(mVersion)
.arg(mModified.toString(Qt::ISODate))
.arg(mPath)
@ -72,9 +72,16 @@ namespace ContentSelectorModel
public:
static int sPropertyCount;
static QString sToolTip;
private:
QString mTooltipTemlate = tr(
"<b>Author:</b> %1<br/>"
"<b>Version:</b> %2<br/>"
"<b>Modified:</b> %3<br/>"
"<b>Path:</b><br/>%4<br/>"
"<br/><b>Description:</b><br/>%5<br/>"
"<br/><b>Dependencies: </b>%6<br/>");
QString mFileName;
QString mAuthor;
QDateTime mModified;

Loading…
Cancel
Save