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.
|
||||
*/
|
||||
|
||||
TriStateAspect::TriStateAspect(const QString onString, const QString &offString,
|
||||
TriStateAspect::TriStateAspect(const QString &onString, const QString &offString,
|
||||
const QString &defaultString)
|
||||
{
|
||||
setDisplayStyle(DisplayStyle::ComboBox);
|
||||
setDefaultValue(TriState::Default);
|
||||
addOption(onString);
|
||||
addOption(offString);
|
||||
addOption(defaultString);
|
||||
addOption(onString.isEmpty() ? Tr::tr("Enable") : onString);
|
||||
addOption(offString.isEmpty() ? Tr::tr("Disable") : offString);
|
||||
addOption(defaultString.isEmpty() ? Tr::tr("Leave at Default") : defaultString);
|
||||
}
|
||||
|
||||
TriState TriStateAspect::value() const
|
||||
|
||||
@@ -499,11 +499,11 @@ private:
|
||||
class QTCREATOR_UTILS_EXPORT TriStateAspect : public SelectionAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TriStateAspect(
|
||||
const QString onString = QCoreApplication::tr("::Utils", "Enable"),
|
||||
const QString &offString = QCoreApplication::tr("::Utils", "Disable"),
|
||||
const QString &defaultString = QCoreApplication::tr("::Utils", "Leave at Default"));
|
||||
TriStateAspect(const QString &onString = {},
|
||||
const QString &offString = {},
|
||||
const QString &defaultString = {});
|
||||
|
||||
TriState value() const;
|
||||
void setValue(TriState setting);
|
||||
|
||||
Reference in New Issue
Block a user