forked from qt-creator/qt-creator
Utils: Move some translated strings from .h to .cpp
Default values shouldn't have complex initializations anyway, these end up in each instance on user side. Change-Id: I81394c3df353b34b19454130f58bd646318feccd Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -2010,14 +2010,14 @@ void DoubleAspect::setSingleStep(double step)
|
|||||||
Its visual representation is a QComboBox with three items.
|
Its visual representation is a QComboBox with three items.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
TriStateAspect::TriStateAspect(const QString onString, const QString &offString,
|
TriStateAspect::TriStateAspect(const QString &onString, const QString &offString,
|
||||||
const QString &defaultString)
|
const QString &defaultString)
|
||||||
{
|
{
|
||||||
setDisplayStyle(DisplayStyle::ComboBox);
|
setDisplayStyle(DisplayStyle::ComboBox);
|
||||||
setDefaultValue(TriState::Default);
|
setDefaultValue(TriState::Default);
|
||||||
addOption(onString);
|
addOption(onString.isEmpty() ? Tr::tr("Enable") : onString);
|
||||||
addOption(offString);
|
addOption(offString.isEmpty() ? Tr::tr("Disable") : offString);
|
||||||
addOption(defaultString);
|
addOption(defaultString.isEmpty() ? Tr::tr("Leave at Default") : defaultString);
|
||||||
}
|
}
|
||||||
|
|
||||||
TriState TriStateAspect::value() const
|
TriState TriStateAspect::value() const
|
||||||
|
|||||||
@@ -499,11 +499,11 @@ private:
|
|||||||
class QTCREATOR_UTILS_EXPORT TriStateAspect : public SelectionAspect
|
class QTCREATOR_UTILS_EXPORT TriStateAspect : public SelectionAspect
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TriStateAspect(
|
TriStateAspect(const QString &onString = {},
|
||||||
const QString onString = QCoreApplication::tr("::Utils", "Enable"),
|
const QString &offString = {},
|
||||||
const QString &offString = QCoreApplication::tr("::Utils", "Disable"),
|
const QString &defaultString = {});
|
||||||
const QString &defaultString = QCoreApplication::tr("::Utils", "Leave at Default"));
|
|
||||||
|
|
||||||
TriState value() const;
|
TriState value() const;
|
||||||
void setValue(TriState setting);
|
void setValue(TriState setting);
|
||||||
|
|||||||
Reference in New Issue
Block a user