Make content selector tooltip localizable

macos_ci_fix
Andrei Kortunov 1 year ago
parent 225946b92b
commit f2c284688b

@ -4,13 +4,6 @@
#include <QIODevice> #include <QIODevice>
int ContentSelectorModel::EsmFile::sPropertyCount = 7; 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) ContentSelectorModel::EsmFile::EsmFile(const QString& fileName, ModelItem* parent)
: ModelItem(parent) : ModelItem(parent)

@ -59,7 +59,7 @@ namespace ContentSelectorModel
QString description() const { return mDescription; } QString description() const { return mDescription; }
QString toolTip() const QString toolTip() const
{ {
return sToolTip.arg(mAuthor) return mTooltipTemlate.arg(mAuthor)
.arg(mVersion) .arg(mVersion)
.arg(mModified.toString(Qt::ISODate)) .arg(mModified.toString(Qt::ISODate))
.arg(mPath) .arg(mPath)
@ -72,9 +72,16 @@ namespace ContentSelectorModel
public: public:
static int sPropertyCount; static int sPropertyCount;
static QString sToolTip;
private: 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 mFileName;
QString mAuthor; QString mAuthor;
QDateTime mModified; QDateTime mModified;

Loading…
Cancel
Save