Support for maintenance licenses in China (#7193)
* Adds China maintenance licenses * Update ChangeLog * Requested changes
This commit is contained in:
parent
31f08604ce
commit
bcfeb251a9
5 changed files with 13 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ Bug fixes:
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #7183 Refactoring for Synergy 3 licenses
|
- #7183 Refactoring for Synergy 3 licenses
|
||||||
- #7190 Maintenance license serial key support
|
- #7190 Maintenance license serial key support
|
||||||
|
- #7193 Support for maintenance licenses in China
|
||||||
|
|
||||||
1.14.4
|
1.14.4
|
||||||
======
|
======
|
||||||
|
|
|
||||||
|
|
@ -80,13 +80,13 @@ SerialKey::isTrial() const
|
||||||
bool
|
bool
|
||||||
SerialKey::isTemporary() const
|
SerialKey::isTemporary() const
|
||||||
{
|
{
|
||||||
return m_data.keyType.isTemporary();
|
return (m_data.keyType.isTemporary() && !m_data.edition.isChina());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SerialKey::isMaintenance() const
|
SerialKey::isMaintenance() const
|
||||||
{
|
{
|
||||||
return m_data.keyType.isMaintenance();
|
return (m_data.keyType.isMaintenance() || m_data.edition.isChina());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -136,8 +136,14 @@ SerialKeyEdition::setType(const std::string& type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SerialKeyEdition::isValid() const
|
bool
|
||||||
|
SerialKeyEdition::isValid() const
|
||||||
{
|
{
|
||||||
auto types = getSerialTypes();
|
auto types = getSerialTypes();
|
||||||
return (types.find(getName()) != types.end());
|
return (types.find(getName()) != types.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
SerialKeyEdition::isChina() const {
|
||||||
|
return ((m_Type == kBasic_China) || (m_Type == kPro_China));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ public:
|
||||||
void setType(const std::string& type);
|
void setType(const std::string& type);
|
||||||
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
bool isChina() const;
|
||||||
|
|
||||||
static const std::string PRO;
|
static const std::string PRO;
|
||||||
static const std::string PRO_CHINA;
|
static const std::string PRO_CHINA;
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ TEST(SerialKeyEditionTests, SetEditionBasicChina)
|
||||||
EXPECT_EQ(kBasic_China, edition.getType());
|
EXPECT_EQ(kBasic_China, edition.getType());
|
||||||
EXPECT_EQ(SerialKeyEdition::BASIC_CHINA, edition.getName());
|
EXPECT_EQ(SerialKeyEdition::BASIC_CHINA, edition.getName());
|
||||||
EXPECT_EQ("Synergy 中文版", edition.getDisplayName());
|
EXPECT_EQ("Synergy 中文版", edition.getDisplayName());
|
||||||
|
EXPECT_TRUE(edition.isChina());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(SerialKeyEditionTests, SetEditionProChina)
|
TEST(SerialKeyEditionTests, SetEditionProChina)
|
||||||
|
|
@ -73,6 +74,7 @@ TEST(SerialKeyEditionTests, SetEditionProChina)
|
||||||
EXPECT_EQ(kPro_China, edition.getType());
|
EXPECT_EQ(kPro_China, edition.getType());
|
||||||
EXPECT_EQ(SerialKeyEdition::PRO_CHINA, edition.getName());
|
EXPECT_EQ(SerialKeyEdition::PRO_CHINA, edition.getName());
|
||||||
EXPECT_EQ("Synergy Pro 中文版", edition.getDisplayName());
|
EXPECT_EQ("Synergy Pro 中文版", edition.getDisplayName());
|
||||||
|
EXPECT_TRUE(edition.isChina());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(SerialKeyEditionTests, NameConstructor)
|
TEST(SerialKeyEditionTests, NameConstructor)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue