Use helper function to construct QString

This is shorter and avoids the need of 2 constructors.
This commit is contained in:
Chocobo1
2020-03-16 20:48:59 +08:00
parent 6c307774f1
commit b7e7d8019c
7 changed files with 9 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ StatusBar::StatusBar(QWidget *parent)
m_connecStatusLblIcon->setCursor(Qt::PointingHandCursor);
m_connecStatusLblIcon->setIcon(QIcon(":/icons/skin/firewalled.svg"));
m_connecStatusLblIcon->setToolTip(
QString(QLatin1String("<b>%1</b><br><i>%2</i>")).arg(tr("Connection status:")
QString::fromLatin1("<b>%1</b><br><i>%2</i>").arg(tr("Connection status:")
, tr("No direct connections. This may indicate network configuration problems.")));
connect(m_connecStatusLblIcon, &QAbstractButton::clicked, this, &StatusBar::connectionButtonClicked);