Add turbo license validation code

Signed up for and using keygen.sh licensing SAAS
This commit is contained in:
Srivats P 2021-03-28 12:42:53 +05:30
parent 9d42ed12cc
commit 898b56fc76
4 changed files with 11 additions and 2 deletions

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "../common/protocolmanager.h" #include "../common/protocolmanager.h"
#include "params.h" #include "params.h"
#include "settings.h" #include "settings.h"
#include "turbo.h"
#include <google/protobuf/stubs/common.h> #include <google/protobuf/stubs/common.h>
@ -80,6 +81,8 @@ int main(int argc, char *argv[])
app.applicationName().toLower()); app.applicationName().toLower());
qDebug("Settings: %s", qPrintable(appSettings->fileName())); qDebug("Settings: %s", qPrintable(appSettings->fileName()));
validateTurboLicense();
drone = new Drone(); drone = new Drone();
OstProtocolManager = new ProtocolManager(); OstProtocolManager = new ProtocolManager();

View File

@ -73,7 +73,7 @@ PortManager::PortManager()
for(device = deviceList, i = 0; device != NULL; device = device->next, i++) for(device = deviceList, i = 0; device != NULL; device = device->next, i++)
{ {
AbstractPort *port; AbstractPort *port = nullptr;
qDebug("%d. %s", i, device->name); qDebug("%d. %s", i, device->name);
if (device->description) if (device->description)
@ -96,7 +96,7 @@ PortManager::PortManager()
#elif defined(Q_OS_LINUX) #elif defined(Q_OS_LINUX)
if (isTurboPort(device->name)) if (isTurboPort(device->name))
port = createTurboPort(i, device->name); port = createTurboPort(i, device->name);
else if (!port)
port = new LinuxPort(i, device->name); port = new LinuxPort(i, device->name);
#elif defined(Q_OS_BSD4) #elif defined(Q_OS_BSD4)
port = new BsdPort(i, device->name); port = new BsdPort(i, device->name);

View File

@ -19,6 +19,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "turbo.h" #include "turbo.h"
void validateTurboLicense()
{
return;
}
bool isTurboPort(const char* device) bool isTurboPort(const char* device)
{ {
return false; return false;

View File

@ -22,6 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
class AbstractPort; class AbstractPort;
void validateTurboLicense();
bool isTurboPort(const char* device); bool isTurboPort(const char* device);
AbstractPort* createTurboPort(int id, const char* device); AbstractPort* createTurboPort(int id, const char* device);