forked from qt-creator/qt-creator
Output pane settings: Make more more i18n-friendly
Change-Id: Iaccd369a8eea8df933cd036ed9f41f8730c9e973 Written-by: hjk <hjk@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -886,9 +886,11 @@ public:
|
|||||||
layout->addWidget(&m_popUpForRunOutputCheckBox);
|
layout->addWidget(&m_popUpForRunOutputCheckBox);
|
||||||
layout->addWidget(&m_popUpForDebugOutputCheckBox);
|
layout->addWidget(&m_popUpForDebugOutputCheckBox);
|
||||||
const auto maxCharsLayout = new QHBoxLayout;
|
const auto maxCharsLayout = new QHBoxLayout;
|
||||||
maxCharsLayout->addWidget(new QLabel(tr("Limit output to"))); // TODO: This looks problematic i18n-wise
|
const QString msg = tr("Limit output to %1 characters");
|
||||||
|
const QStringList parts = msg.split("%1") << QString() << QString();
|
||||||
|
maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed()));
|
||||||
maxCharsLayout->addWidget(&m_maxCharsBox);
|
maxCharsLayout->addWidget(&m_maxCharsBox);
|
||||||
maxCharsLayout->addWidget(new QLabel(tr("characters")));
|
maxCharsLayout->addWidget(new QLabel(parts.at(1).trimmed()));
|
||||||
maxCharsLayout->addStretch(1);
|
maxCharsLayout->addStretch(1);
|
||||||
layout->addLayout(maxCharsLayout);
|
layout->addLayout(maxCharsLayout);
|
||||||
layout->addStretch(1);
|
layout->addStretch(1);
|
||||||
|
@@ -381,9 +381,11 @@ public:
|
|||||||
layout->addWidget(&m_wrapOutputCheckBox);
|
layout->addWidget(&m_wrapOutputCheckBox);
|
||||||
layout->addWidget(&m_popUpCheckBox);
|
layout->addWidget(&m_popUpCheckBox);
|
||||||
const auto maxCharsLayout = new QHBoxLayout;
|
const auto maxCharsLayout = new QHBoxLayout;
|
||||||
maxCharsLayout->addWidget(new QLabel(tr("Limit output to"))); // TODO: This looks problematic i18n-wise
|
const QString msg = tr("Limit output to %1 characters");
|
||||||
|
const QStringList parts = msg.split("%1") << QString() << QString();
|
||||||
|
maxCharsLayout->addWidget(new QLabel(parts.at(0).trimmed()));
|
||||||
maxCharsLayout->addWidget(&m_maxCharsBox);
|
maxCharsLayout->addWidget(&m_maxCharsBox);
|
||||||
maxCharsLayout->addWidget(new QLabel(tr("characters")));
|
maxCharsLayout->addWidget(new QLabel(parts.at(1).trimmed()));
|
||||||
maxCharsLayout->addStretch(1);
|
maxCharsLayout->addStretch(1);
|
||||||
layout->addLayout(maxCharsLayout);
|
layout->addLayout(maxCharsLayout);
|
||||||
layout->addStretch(1);
|
layout->addStretch(1);
|
||||||
|
Reference in New Issue
Block a user