SYNERGY1-1545 Accept business licenses in basic/pro builds (#7188)
* SYNERGY1-1545 Accept business licenses in basic/pro builds * Update ChangeLog
This commit is contained in:
parent
0d7bc0dce9
commit
de48bb20b7
4 changed files with 8 additions and 8 deletions
|
|
@ -22,6 +22,7 @@ Bug fixes:
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #7143 Ability to stop Synergy on the login screen
|
- #7143 Ability to stop Synergy on the login screen
|
||||||
- #7157 Synergy Business accepts only business licenses
|
- #7157 Synergy Business accepts only business licenses
|
||||||
|
- #7188 Synergy Basic\Pro accepts business licenses
|
||||||
- #7166 Replace language notifications with warnings in logs
|
- #7166 Replace language notifications with warnings in logs
|
||||||
- #7181 Fedora 36 support to CI system
|
- #7181 Fedora 36 support to CI system
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,11 @@ LicenseManager::setSerialKey(SerialKey serialKey, bool acceptExpired)
|
||||||
throw std::runtime_error("Serial key expired");
|
throw std::runtime_error("Serial key expired");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SYNERGY_BUSINESS
|
||||||
if (!serialKey.isValid()) {
|
if (!serialKey.isValid()) {
|
||||||
#ifdef SYNERGY_BUSINESS
|
|
||||||
throw std::runtime_error("The serial key is not compatible with the business version of Synergy.");
|
throw std::runtime_error("The serial key is not compatible with the business version of Synergy.");
|
||||||
#else
|
|
||||||
throw std::runtime_error("The serial key is not compatible with the consumer version of Synergy.");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (serialKey != m_serialKey) {
|
if (serialKey != m_serialKey) {
|
||||||
using std::swap;
|
using std::swap;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ const std::map<std::string, Edition>& getSerialTypes()
|
||||||
{SerialKeyEdition::BASIC, kBasic},
|
{SerialKeyEdition::BASIC, kBasic},
|
||||||
{SerialKeyEdition::PRO, kPro},
|
{SerialKeyEdition::PRO, kPro},
|
||||||
{SerialKeyEdition::BASIC_CHINA, kBasic_China},
|
{SerialKeyEdition::BASIC_CHINA, kBasic_China},
|
||||||
{SerialKeyEdition::PRO_CHINA, kPro_China}
|
{SerialKeyEdition::PRO_CHINA, kPro_China},
|
||||||
|
{SerialKeyEdition::BUSINESS, kBusiness}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
return serialTypes;
|
return serialTypes;
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,8 @@ TEST(SerialKeyEditionTests, SetEditionProChina)
|
||||||
TEST(SerialKeyEditionTests, NameConstructor)
|
TEST(SerialKeyEditionTests, NameConstructor)
|
||||||
{
|
{
|
||||||
SerialKeyEdition edition(SerialKeyEdition::BUSINESS);
|
SerialKeyEdition edition(SerialKeyEdition::BUSINESS);
|
||||||
EXPECT_EQ(kUnregistered, edition.getType());
|
EXPECT_EQ(kBusiness, edition.getType());
|
||||||
EXPECT_FALSE(edition.isValid());
|
EXPECT_TRUE(edition.isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(SerialKeyEditionTests, isValid)
|
TEST(SerialKeyEditionTests, isValid)
|
||||||
|
|
@ -92,7 +92,7 @@ TEST(SerialKeyEditionTests, isValid)
|
||||||
EXPECT_TRUE(edition.isValid());
|
EXPECT_TRUE(edition.isValid());
|
||||||
|
|
||||||
edition.setType(Edition::kBusiness);
|
edition.setType(Edition::kBusiness);
|
||||||
EXPECT_FALSE(edition.isValid());
|
EXPECT_TRUE(edition.isValid());
|
||||||
|
|
||||||
edition.setType(Edition::kPro);
|
edition.setType(Edition::kPro);
|
||||||
EXPECT_TRUE(edition.isValid());
|
EXPECT_TRUE(edition.isValid());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue