From 05c2878eec1cac7c266a4ca86d7fef9c6792543b Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Mon, 19 Jun 2017 23:08:42 +0200 Subject: [PATCH] src: Fixed old license partly shown and new placeholder in license dialog --- src/lib_gui/qt/window/QtLicense.cpp | 10 ++++++---- src/lib_license/License.cpp | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib_gui/qt/window/QtLicense.cpp b/src/lib_gui/qt/window/QtLicense.cpp index 4981b88a..91ca6a93 100644 --- a/src/lib_gui/qt/window/QtLicense.cpp +++ b/src/lib_gui/qt/window/QtLicense.cpp @@ -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" diff --git a/src/lib_license/License.cpp b/src/lib_license/License.cpp index 2433e670..dce8c191 100644 --- a/src/lib_license/License.cpp +++ b/src/lib_license/License.cpp @@ -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