src: Fixed old license partly shown and new placeholder in license dialog

This commit is contained in:
Eberhard Graether
2017-06-19 23:08:42 +02:00
parent 894beccb28
commit 05c2878eec
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -16,7 +16,7 @@ QtLicense::QtLicense(QWidget *parent)
QSize QtLicense::sizeHint() const
{
return QSize(780, 480);
return QSize(780, 520);
}
void QtLicense::clear()
@@ -76,9 +76,11 @@ void QtLicense::populateWindow(QWidget* widget)
m_licenseText->setAcceptRichText(false);
m_licenseText->setPlaceholderText(
"-----BEGIN LICENSE-----\n"
"Jane Doe\n"
"Single User License\n"
"Sourcetrail 0\n"
"Product: Sourcetrail\n"
"Licensed to:\n"
"License type:\n"
"Valid up to version:\n"
"-\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n"
+2 -2
View File
@@ -556,7 +556,7 @@ bool License::loadFromEncodedString(const std::string& encodedLicense, const std
crypbobxInput += "-----END BOTAN CRYPTOBOX MESSAGE-----";
//decrypt license
loadFromString(Botan::CryptoBox::decrypt(crypbobxInput, getEncodeKey(applicationLocation))); // does the result of this operation matter at all? Is it supposed to throw if the input is wrong? wtf?
return loadFromString(Botan::CryptoBox::decrypt(crypbobxInput, getEncodeKey(applicationLocation)));
}
catch(...)
{
@@ -564,7 +564,7 @@ bool License::loadFromEncodedString(const std::string& encodedLicense, const std
return false;
}
return true;
return false;
}
std::string License::getHashedLicense() const