mirror of
https://github.com/deskflow/deskflow.git
synced 2026-07-01 21:02:39 +08:00
Support for maintenance licenses in China (#7193)
* Adds China maintenance licenses * Update ChangeLog * Requested changes
This commit is contained in:
parent
31f08604ce
commit
bcfeb251a9
@ -8,6 +8,7 @@ Bug fixes:
|
||||
Enhancements:
|
||||
- #7183 Refactoring for Synergy 3 licenses
|
||||
- #7190 Maintenance license serial key support
|
||||
- #7193 Support for maintenance licenses in China
|
||||
|
||||
1.14.4
|
||||
======
|
||||
|
||||
@ -80,13 +80,13 @@ SerialKey::isTrial() const
|
||||
bool
|
||||
SerialKey::isTemporary() const
|
||||
{
|
||||
return m_data.keyType.isTemporary();
|
||||
return (m_data.keyType.isTemporary() && !m_data.edition.isChina());
|
||||
}
|
||||
|
||||
bool
|
||||
SerialKey::isMaintenance() const
|
||||
{
|
||||
return m_data.keyType.isMaintenance();
|
||||
return (m_data.keyType.isMaintenance() || m_data.edition.isChina());
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@ -136,8 +136,14 @@ SerialKeyEdition::setType(const std::string& type)
|
||||
}
|
||||
}
|
||||
|
||||
bool SerialKeyEdition::isValid() const
|
||||
bool
|
||||
SerialKeyEdition::isValid() const
|
||||
{
|
||||
auto types = getSerialTypes();
|
||||
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);
|
||||
|
||||
bool isValid() const;
|
||||
bool isChina() const;
|
||||
|
||||
static const std::string PRO;
|
||||
static const std::string PRO_CHINA;
|
||||
|
||||
@ -64,6 +64,7 @@ TEST(SerialKeyEditionTests, SetEditionBasicChina)
|
||||
EXPECT_EQ(kBasic_China, edition.getType());
|
||||
EXPECT_EQ(SerialKeyEdition::BASIC_CHINA, edition.getName());
|
||||
EXPECT_EQ("Synergy 中文版", edition.getDisplayName());
|
||||
EXPECT_TRUE(edition.isChina());
|
||||
}
|
||||
|
||||
TEST(SerialKeyEditionTests, SetEditionProChina)
|
||||
@ -73,6 +74,7 @@ TEST(SerialKeyEditionTests, SetEditionProChina)
|
||||
EXPECT_EQ(kPro_China, edition.getType());
|
||||
EXPECT_EQ(SerialKeyEdition::PRO_CHINA, edition.getName());
|
||||
EXPECT_EQ("Synergy Pro 中文版", edition.getDisplayName());
|
||||
EXPECT_TRUE(edition.isChina());
|
||||
}
|
||||
|
||||
TEST(SerialKeyEditionTests, NameConstructor)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user