mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-23 10:25:45 -05:00
[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
2 changed files with 4 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue