From 7a97e5fbbb606ee0e36caf2b6f22d81f77268e9b Mon Sep 17 00:00:00 2001 From: Paul Jewell Date: Wed, 16 Sep 2015 21:59:42 +0100 Subject: [PATCH] Moved definition of usagetracker url to top level Makefile --- Makefile | 2 ++ ground/gcs/gcs.pri | 7 +++++++ ground/gcs/src/plugins/usagetracker/usagetrackerplugin.cpp | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6982ac107..96a728f29 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,8 @@ GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME)) # Change this once the DNS is set to http://wiki.librepilot.org/ WIKI_URL_ROOT := https://librepilot.atlassian.net/wiki/display/LPDOC/ +USAGETRACKER_URL := https://usagetracker.librepilot.org/? + # Set up default build configurations (debug | release) GCS_BUILD_CONF := release GOOGLE_API_VERSION := 14 diff --git a/ground/gcs/gcs.pri b/ground/gcs/gcs.pri index 143b34daa..d21a5461e 100644 --- a/ground/gcs/gcs.pri +++ b/ground/gcs/gcs.pri @@ -146,6 +146,12 @@ isEmpty(WIKI_URL_ROOT) { WIKI_URL_ROOT = "$$WIKI_URL_ROOT" } +isEmpty(USAGETRACKER_URL) { + USAGETRACKER_URL = Unknown +} else { + USAGETRACKER_URL = "$$USAGETRACKER_URL" +} + isEmpty(GCS_LIBRARY_BASENAME):GCS_LIBRARY_BASENAME = lib macx { @@ -216,6 +222,7 @@ DEFINES += GCS_BIG_NAME=$$shell_quote(\"$$GCS_BIG_NAME\") DEFINES += ORG_SMALL_NAME=$$shell_quote(\"$$ORG_SMALL_NAME\") DEFINES += GCS_SMALL_NAME=$$shell_quote(\"$$GCS_SMALL_NAME\") DEFINES += WIKI_URL_ROOT=$$shell_quote(\"$$WIKI_URL_ROOT\") +DEFINES += USAGETRACKER_URL=$$shell_quote(\"$$USAGETRACKER_URL\") # DEFINES += QT_NO_CAST_FROM_ASCII DEFINES += QT_NO_CAST_TO_ASCII diff --git a/ground/gcs/src/plugins/usagetracker/usagetrackerplugin.cpp b/ground/gcs/src/plugins/usagetracker/usagetrackerplugin.cpp index 6179290e1..47707dccc 100644 --- a/ground/gcs/src/plugins/usagetracker/usagetrackerplugin.cpp +++ b/ground/gcs/src/plugins/usagetracker/usagetrackerplugin.cpp @@ -139,7 +139,7 @@ void UsageTrackerPlugin::trackUsage() if (shouldSend(hash)) { query.addQueryItem("hash", hash); - QUrl url("https://usagetracker.librepilot.org/?" + query.toString(QUrl::FullyEncoded)); + QUrl url(QString(USAGETRACKER_URL) + query.toString(QUrl::FullyEncoded)); QNetworkAccessManager *networkAccessManager = new QNetworkAccessManager();