[libcalamares] TZRegion is hard to copy
- delete the copy and move constructors - adjust tests (which were just interested in simple tr() behavior) to use TZZone instead
This commit is contained in:
parent
5fbd0169ca
commit
2dff2d9d70
@ -215,12 +215,12 @@ LocaleTests::testSimpleZones()
|
||||
QVERIFY( n.tr().isEmpty() );
|
||||
}
|
||||
{
|
||||
TZRegion r0( "xAmsterdam" );
|
||||
TZZone r0( "xAmsterdam" );
|
||||
QCOMPARE( r0.tr(), QStringLiteral( "xAmsterdam" ) );
|
||||
TZRegion r1( r0 );
|
||||
TZZone r1( r0 );
|
||||
QCOMPARE( r0.tr(), QStringLiteral( "xAmsterdam" ) );
|
||||
QCOMPARE( r1.tr(), QStringLiteral( "xAmsterdam" ) );
|
||||
TZRegion r2( std::move( r0 ) );
|
||||
TZZone r2( std::move( r0 ) );
|
||||
QCOMPARE( r2.tr(), QStringLiteral( "xAmsterdam" ) );
|
||||
QCOMPARE( r0.tr(), QString() );
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ class TZRegion : public CStringPair
|
||||
public:
|
||||
using CStringPair::CStringPair;
|
||||
virtual ~TZRegion() override;
|
||||
TZRegion( const TZRegion& ) = delete;
|
||||
QString tr() const override;
|
||||
|
||||
QString region() const { return key(); }
|
||||
|
Loading…
Reference in New Issue
Block a user