From 67f97071e048336a0587ed34e6b3bf33b69ecd8f Mon Sep 17 00:00:00 2001 From: malte_langkabel Date: Mon, 27 Feb 2017 11:21:52 +0100 Subject: [PATCH] ui: fixed naming of 64 bit windows path detector * also removed LibLincense dependencies on Lib because they are linked the other way round --- .../cxx_header/CxxVsHeaderPathDetector.cpp | 2 +- src/lib_license/License.cpp | 12 ++++++------ src/lib_license/License.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp index 9f5d41fe..0d6f986f 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp @@ -9,7 +9,7 @@ #include "utility/logging/logging.h" CxxVsHeaderPathDetector::CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture) - : PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? "64 Bit" : "")) + : PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : "")) , m_version(version) , m_isExpress(isExpress) , m_architecture(architecture) diff --git a/src/lib_license/License.cpp b/src/lib_license/License.cpp index 398ef763..9b7e2174 100644 --- a/src/lib_license/License.cpp +++ b/src/lib_license/License.cpp @@ -124,7 +124,7 @@ std::string License::getLicenseTypeLine() const } } -uint License::getSeats() const +unsigned int License::getSeats() const { std::string licenseTypeLine = getLicenseTypeLine(); std::size_t found = licenseTypeLine.find(":"); @@ -171,7 +171,7 @@ int License::getTimeLeft() const void License::create( const std::string& user, const std::string& version, - Botan::RSA_PrivateKey* privateKey, const std::string& type, const uint seats) + Botan::RSA_PrivateKey* privateKey, const std::string& type, const unsigned int seats) { m_version = version; if (seats > 0) @@ -392,7 +392,7 @@ bool License::loadPublicKeyFromFile(const std::string& filename) if(boost::filesystem::exists(getPublicKeyFilename())) { Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast(Botan::X509::load_key(getPublicKeyFilename())); - + if (!rsaPublicKey) { std::cout << "The loaded key is not a RSA key" << std::endl; @@ -416,8 +416,8 @@ bool License::loadPublicKeyFromString(const std::string& publicKey) Botan::DataSource_Memory in(publicKey); Botan::RSA_PublicKey *rsaPublicKey = dynamic_cast(Botan::X509::load_key(in)); - - if (!rsaPublicKey) + + if (!rsaPublicKey) { std::cout << "The loaded key is not a RSA key" << std::endl; return false; @@ -486,7 +486,7 @@ std::string License::getLicenseEncodedString(const std::string& applicationLocat fileContents.insert(fileContents.end(), filebuffer, filebuffer + got); } - + if(fileContents.size() <= 0) { std::cout << "Failed to read licence string" << std::endl; diff --git a/src/lib_license/License.h b/src/lib_license/License.h index 4b6ae641..4076adba 100644 --- a/src/lib_license/License.h +++ b/src/lib_license/License.h @@ -27,7 +27,7 @@ public: std::string getPublicKeyFilename() const; std::string getVersion() const; - uint getSeats() const; + unsigned int getSeats() const; /// if Test License return >=0 or -1 if expired /// for non Test License -2 @@ -36,7 +36,7 @@ public: void create( const std::string& user, const std::string& version, Botan::RSA_PrivateKey* privateKey, const std::string& type="Private License", - const uint seats = 0 + const unsigned int seats = 0 ); std::string getLicenseString() const;