Commit 77c9d59f authored by Laurent Montel's avatar Laurent Montel
Browse files

Port more I18N_NOOP

parent 8688007d
Pipeline #205232 passed with stage
in 5 minutes and 18 seconds
This diff is collapsed.
......@@ -49,7 +49,7 @@ QString ConstructibleAction::description() const
return mctor->description();
}
QByteArray ConstructibleAction::iconFileName( const bool canBeNull ) const
QString ConstructibleAction::iconFileName( const bool canBeNull ) const
{
return mctor->iconFileName( canBeNull );
}
......@@ -73,7 +73,7 @@ KigGUIAction::KigGUIAction( GUIAction* act,
mact( act ),
mdoc( doc )
{
QByteArray icon = act->iconFileName( true );
QString icon = act->iconFileName( true );
if ( !icon.isEmpty() )
setIcon( QIcon( new KIconEngine( icon, doc.iconLoader() ) ) );
setWhatsThis( act->description() );
......@@ -108,9 +108,9 @@ QString ConstructPointAction::description() const
);
}
QByteArray ConstructPointAction::iconFileName( const bool ) const
QString ConstructPointAction::iconFileName( const bool ) const
{
return "point";
return QStringLiteral("point");
}
QString ConstructPointAction::descriptiveName() const
......@@ -159,9 +159,9 @@ QString ConstructTextLabelAction::description() const
return i18n( "Construct a text label." );
}
QByteArray ConstructTextLabelAction::iconFileName( const bool ) const
QString ConstructTextLabelAction::iconFileName( const bool ) const
{
return "kig_text";
return QStringLiteral("kig_text");
}
QString ConstructTextLabelAction::descriptiveName() const
......@@ -190,9 +190,9 @@ QString AddFixedPointAction::description() const
return i18n( "Construct a Point by its Coordinates" );
}
QByteArray AddFixedPointAction::iconFileName( const bool ) const
QString AddFixedPointAction::iconFileName( const bool ) const
{
return "pointxy";
return QStringLiteral("pointxy");
}
QString AddFixedPointAction::descriptiveName() const
......@@ -235,9 +235,9 @@ QString ConstructNumericLabelAction::description() const
return i18n( "Construct a Numeric Value" );
}
QByteArray ConstructNumericLabelAction::iconFileName( const bool ) const
QString ConstructNumericLabelAction::iconFileName( const bool ) const
{
return "kig_numericvalue";
return QStringLiteral("kig_numericvalue");
}
QString ConstructNumericLabelAction::descriptiveName() const
......@@ -304,7 +304,7 @@ QString TestAction::description() const
return QString::fromLatin1( "Test stuff !!!" );
}
QByteArray TestAction::iconFileName( const bool ) const
QString TestAction::iconFileName( const bool ) const
{
return "new";
}
......@@ -366,7 +366,7 @@ QString NewScriptAction::description() const
return i18n( mdescription );
}
QByteArray NewScriptAction::iconFileName( const bool ) const
QString NewScriptAction::iconFileName( const bool ) const
{
return micon;
}
......
......@@ -41,7 +41,7 @@ public:
virtual ~GUIAction();
virtual QString description() const = 0;
virtual QByteArray iconFileName( const bool canBeNull = false ) const = 0;
virtual QString iconFileName( const bool canBeNull = false ) const = 0;
virtual QString descriptiveName() const = 0;
virtual const char* actionName() const = 0;
virtual int shortcut() const = 0;
......@@ -63,7 +63,7 @@ public:
int shortcut = 0 );
~ConstructibleAction();
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
int shortcut() const override;
......@@ -80,7 +80,7 @@ public:
~ConstructPointAction();
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
int shortcut() const override;
......@@ -95,7 +95,7 @@ public:
explicit ConstructTextLabelAction( const char* actionname );
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
int shortcut() const override;
......@@ -110,7 +110,7 @@ public:
explicit AddFixedPointAction( const char* actionname );
~AddFixedPointAction();
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
int shortcut() const override;
......@@ -125,7 +125,7 @@ public:
explicit ConstructNumericLabelAction( const char* actionname );
~ConstructNumericLabelAction();
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
int shortcut() const override;
......@@ -141,7 +141,7 @@ public:
TestAction( const char* actionname );
~TestAction();
QString description() const;
QByteArray iconFileName( const bool canBeNull = false ) const;
QString iconFileName( const bool canBeNull = false ) const;
QString descriptiveName() const;
const char* actionName() const;
void act( KigPart& );
......@@ -164,7 +164,7 @@ public:
const char* icon = "" );
~NewScriptAction();
QString description() const override;
QByteArray iconFileName( const bool canBeNull = false ) const override;
QString iconFileName( const bool canBeNull = false ) const override;
QString descriptiveName() const override;
const char* actionName() const override;
void act( KigPart& ) override;
......
......@@ -256,7 +256,7 @@ bool MacroList::save( const std::vector<Macro*>& ms, const QString& f )
macroelem.appendChild( descelem );
// icon
QByteArray icon = ctor->iconFileName( true );
QString icon = ctor->iconFileName( true );
if ( !icon.isNull() )
{
QDomElement descelem = doc.createElement( QStringLiteral("IconFileName") );
......
......@@ -31,15 +31,15 @@
const QString StandardConstructorBase::descriptiveName() const
{
return i18n( mdescname );
return mdescname;
}
const QString StandardConstructorBase::description() const
{
return i18n( mdesc );
return mdesc;
}
const QByteArray StandardConstructorBase::iconFileName( const bool ) const
const QString StandardConstructorBase::iconFileName( const bool ) const
{
return miconfile;
}
......@@ -49,9 +49,8 @@ bool StandardConstructorBase::isAlreadySelectedOK( const std::vector<ObjectCalce
return false;
}
StandardConstructorBase::StandardConstructorBase(
const char* descname, const char* desc,
const char* iconfile, const ArgsParser& parser )
StandardConstructorBase::StandardConstructorBase(const QString &descname, const QString &desc,
const QString &iconfile, const ArgsParser& parser )
: mdescname( descname ),
mdesc( desc ),
miconfile( iconfile ),
......@@ -97,9 +96,8 @@ void StandardConstructorBase::handlePrelim(
drawprelim( drawer, p, args, d );
}
SimpleObjectTypeConstructor::SimpleObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile )
SimpleObjectTypeConstructor::SimpleObjectTypeConstructor(const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile )
: StandardConstructorBase( descname, desc, iconfile,
t->argsParser() ),
mtype( t )
......@@ -136,9 +134,8 @@ StandardConstructorBase::~StandardConstructorBase()
{
}
MultiObjectTypeConstructor::MultiObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile,
MultiObjectTypeConstructor::MultiObjectTypeConstructor(const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile,
const std::vector<int>& params )
: StandardConstructorBase( descname, desc, iconfile, mparser ),
mtype( t ), mparams( params ),
......@@ -146,9 +143,8 @@ MultiObjectTypeConstructor::MultiObjectTypeConstructor(
{
}
MultiObjectTypeConstructor::MultiObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile,
MultiObjectTypeConstructor::MultiObjectTypeConstructor(const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile,
int a, int b, int c, int d )
: StandardConstructorBase( descname, desc, iconfile, mparser ),
mtype( t ), mparams(),
......@@ -206,8 +202,7 @@ MergeObjectConstructor::~MergeObjectConstructor()
delete *i;
}
MergeObjectConstructor::MergeObjectConstructor(
const char* descname, const char* desc, const char* iconfilename )
MergeObjectConstructor::MergeObjectConstructor(const QString &descname, const QString &desc, const QString &iconfilename )
: ObjectConstructor(), mdescname( descname ), mdesc( desc ),
miconfilename( iconfilename ), mctors()
{
......@@ -224,15 +219,15 @@ void MergeObjectConstructor::merge( ObjectConstructor* e )
const QString MergeObjectConstructor::descriptiveName() const
{
return i18n( mdescname );
return mdescname;
}
const QString MergeObjectConstructor::description() const
{
return i18n( mdesc );
return mdesc;
}
const QByteArray MergeObjectConstructor::iconFileName( const bool ) const
const QString MergeObjectConstructor::iconFileName( const bool ) const
{
return miconfilename;
}
......@@ -366,9 +361,9 @@ const QString MacroConstructor::description() const
return mdesc;
}
const QByteArray MacroConstructor::iconFileName( const bool canBeNull ) const
const QString MacroConstructor::iconFileName( const bool canBeNull ) const
{
return ( miconfile.isNull() && !canBeNull ) ? QByteArray( "system-run" ) : miconfile;
return ( miconfile.isNull() && !canBeNull ) ? QStringLiteral( "system-run" ) : miconfile;
}
bool MacroConstructor::isAlreadySelectedOK( const std::vector<ObjectCalcer*>&, const uint& ) const
......
......@@ -35,7 +35,7 @@ public:
virtual const QString descriptiveName() const = 0;
virtual const QString description() const = 0;
virtual const QByteArray iconFileName( const bool canBeNull = false ) const = 0;
virtual const QString iconFileName( const bool canBeNull = false ) const = 0;
/**
* the following function is called in case of duplication of arguments
......@@ -120,21 +120,21 @@ public:
class StandardConstructorBase
: public ObjectConstructor
{
const char* mdescname; // TODO Use KLazyLocalizedString
const char* mdesc; // TODO Use KLazyLocalizedString
const char* miconfile; //TODO use QStringLiteral
QString mdescname;
QString mdesc; // TODO Use KLazyLocalizedString
QString miconfile;
const ArgsParser& margsparser;
public:
StandardConstructorBase( const char* descname,
const char* desc,
const char* iconfile,
StandardConstructorBase( const QString &descname,
const QString &desc,
const QString &iconfile,
const ArgsParser& parser );
virtual ~StandardConstructorBase();
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os,
const uint& ) const override;
......@@ -178,8 +178,8 @@ class SimpleObjectTypeConstructor
const ArgsParserObjectType* mtype;
public:
explicit SimpleObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile );
const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile );
~SimpleObjectTypeConstructor();
......@@ -243,12 +243,12 @@ class MultiObjectTypeConstructor
ArgsParser mparser;
public:
explicit MultiObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile,
const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile,
const std::vector<int>& params );
explicit MultiObjectTypeConstructor(
const ArgsParserObjectType* t, const char* descname,
const char* desc, const char* iconfile,
const ArgsParserObjectType* t, const QString &descname,
const QString &desc, const QString &iconfile,
int a, int b, int c = -999, int d = -999 );
~MultiObjectTypeConstructor();
......@@ -272,21 +272,21 @@ public:
class MergeObjectConstructor
: public ObjectConstructor
{
const char* mdescname;
const char* mdesc;
const char* miconfilename;
const QString mdescname;
const QString mdesc;
const QString miconfilename;
typedef std::vector<ObjectConstructor*> vectype;
vectype mctors;
public:
MergeObjectConstructor( const char* descname, const char* desc,
const char* iconfilename );
MergeObjectConstructor( const QString &descname, const QString &desc,
const QString &iconfilename );
~MergeObjectConstructor();
void merge( ObjectConstructor* e );
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os, const uint& ) const override;
......@@ -342,7 +342,7 @@ public:
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os,
const uint& ) const override;
......
......@@ -487,9 +487,9 @@ bool LocusConstructor::isTransform() const
*/
PointSequenceConstructor::PointSequenceConstructor(
const char* descname,
const char* desc,
const char* iconfile,
const QString &descname,
const QString &desc,
const QString &iconfile,
const ObjectType* type )
: mdescname( descname ),
mdesc( desc ),
......@@ -500,15 +500,15 @@ PointSequenceConstructor::PointSequenceConstructor(
const QString PointSequenceConstructor::descriptiveName() const
{
return i18n( mdescname );
return mdescname;
}
const QString PointSequenceConstructor::description() const
{
return i18n( mdesc );
return mdesc;
}
const QByteArray PointSequenceConstructor::iconFileName( const bool ) const
const QString PointSequenceConstructor::iconFileName( const bool ) const
{
return miconfile;
}
......@@ -888,9 +888,9 @@ const QString PolygonBCVConstructor::description() const
return i18n("Construct a regular polygon with a given center and vertex");
}
const QByteArray PolygonBCVConstructor::iconFileName( const bool ) const
const QString PolygonBCVConstructor::iconFileName( const bool ) const
{
return "hexagonbcv";
return QStringLiteral("hexagonbcv");
}
bool PolygonBCVConstructor::isAlreadySelectedOK(
......@@ -1260,9 +1260,9 @@ const QString RationalBezierCurveTypeConstructor::description() const
return i18n( "Construct a Bézier curve by giving its control points and positive weights" );
}
const QByteArray RationalBezierCurveTypeConstructor::iconFileName( const bool ) const
const QString RationalBezierCurveTypeConstructor::iconFileName( const bool ) const
{
return "rbezierN";
return QStringLiteral("rbezierN");
}
bool RationalBezierCurveTypeConstructor::isAlreadySelectedOK(
......@@ -1681,9 +1681,9 @@ const QString MeasureTransportConstructor::description() const
return i18n("Transport the measure of a segment or arc over a line or circle.");
}
const QByteArray MeasureTransportConstructor::iconFileName( const bool ) const
const QString MeasureTransportConstructor::iconFileName( const bool ) const
{
return "measuretransport";
return QStringLiteral("measuretransport");
}
bool MeasureTransportConstructor::isAlreadySelectedOK(
......@@ -2157,8 +2157,8 @@ bool GoldenPointOfTwoPointsConstructor::isTransform() const
return false;
}
TestConstructor::TestConstructor( const ArgsParserObjectType* type, const char* descname,
const char* desc, const char* iconfile )
TestConstructor::TestConstructor(const ArgsParserObjectType* type, const QString &descname,
const QString &desc, const QString &iconfile )
: StandardConstructorBase( descname, desc, iconfile, type->argsParser() ),
mtype( type )
{
......
......@@ -82,19 +82,19 @@ public:
class PointSequenceConstructor
: public ObjectConstructor
{
const char* mdescname;
const char* mdesc;
const char* miconfile;
const QString mdescname;
const QString mdesc;
const QString miconfile;
const ObjectType* mtype;
public:
PointSequenceConstructor( const char* descname,
const char* desc,
const char* iconfile,
const ObjectType* type );
PointSequenceConstructor(const QString &descname,
const QString &desc,
const QString &iconfile,
const ObjectType* type );
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
void handleArgs( const std::vector<ObjectCalcer*>& os,
KigPart& d,
KigWidget& v
......@@ -167,7 +167,7 @@ public:
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os, const uint& ) const override;
int wantArgs( const std::vector<ObjectCalcer*>& os,
const KigDocument& d,
......@@ -225,7 +225,7 @@ public:
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os, const uint& ) const override;
......@@ -267,7 +267,7 @@ public:
const QString descriptiveName() const override;
const QString description() const override;
const QByteArray iconFileName( const bool canBeNull = false ) const override;
const QString iconFileName( const bool canBeNull = false ) const override;
bool isAlreadySelectedOK( const std::vector<ObjectCalcer*>& os,
const uint& ) const override;
int wantArgs( const std::vector<ObjectCalcer*>& os,
......@@ -416,8 +416,8 @@ class TestConstructor
{
const ArgsParserObjectType* mtype;
public:
TestConstructor( const ArgsParserObjectType* type, const char* descname,
const char* desc, const char* iconfile );
TestConstructor( const ArgsParserObjectType* type, const QString &descname,
const QString &desc, const QString &iconfile );
~TestConstructor();
void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
const KigDocument& ) const override;
......
......@@ -44,7 +44,7 @@ void ObjectConstructorActionsProvider::fillUpMenu( NormalModePopupObjects& popup
};
if ( add )
{
QByteArray iconfile = (*i)->iconFileName();
QString iconfile = (*i)->iconFileName();
if ( !iconfile.isEmpty() && !iconfile.isNull() )
{
popup.addInternalAction( menu, QIcon( new KIconEngine( iconfile, popup.part().iconLoader() ) ), (*i)->descriptiveName(), nextfree++ );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment