added build signature reporting

This commit is contained in:
Vadim Kurland
2010-05-30 19:22:36 +00:00
parent 2233efa6e8
commit e2ac4479b1
5 changed files with 18 additions and 14 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 2938 #define BUILD_NUM 2939
+5
View File
@@ -70,6 +70,7 @@ unix {
QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter QMAKE_CFLAGS_RELEASE += -Wno-unused-parameter
QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter QMAKE_CXXFLAGS_DEBUG += -Wno-unused-parameter
QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter QMAKE_CXXFLAGS_RELEASE += -Wno-unused-parameter
} }
} }
@@ -77,6 +78,10 @@ win32 {
CONFIG -= debug CONFIG -= debug
} }
FWB_SIG = $$(FWB_SIG)
if (isEmpty(FWB_SIG)) { FWB_SIG=26932 }
DEFINES += FWB_SIG=$$FWB_SIG
exists(qmake2.inc) { exists(qmake2.inc) {
include(qmake2.inc) include(qmake2.inc)
} }
+10 -12
View File
@@ -102,26 +102,24 @@ bool HttpGet::get(const QUrl &_url)
QString locale = QLocale::system().name();//"en_US";// QString locale = QLocale::system().name();//"en_US";//
QString agent = QString("fwbuilder/%1 (").arg(VERSION); QString os;
#if defined(Q_WS_MAC) #if defined(Q_WS_MAC)
agent += "MacOSX; "; os = "MacOSX";
#else #else
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
agent += "Windows; "; os= "Windows";
#else #else
agent += QString("%1; %2; ").arg(OS).arg(DISTRO); os = QString("%1; %2").arg(OS).arg(DISTRO);
#endif #endif
#endif #endif
agent += locale;
agent += QString("; b:%1; ").arg(build_num); QString reg = "u";
#ifdef ELC #ifdef ELC
if (getRegistrationStatus()==2) agent += "r"; if (getRegistrationStatus()==2) reg = "r";
else agent += "u";
#else
agent += "u";
#endif #endif
agent += ")";
QString agent = QString("fwbuilder/%1 (%2; %3; b:%4; s:%5; %6)")
.arg(VERSION).arg(os).arg(locale).arg(build_num).arg(sig).arg(reg);
hdr.setValue("User-Agent", agent); hdr.setValue("User-Agent", agent);
request_id = http.request(hdr, NULL, &strm); request_id = http.request(hdr, NULL, &strm);
+1
View File
@@ -54,6 +54,7 @@ extern std::string ee;
extern int fwbdebug; extern int fwbdebug;
extern QString build_num; extern QString build_num;
extern QString user_name; extern QString user_name;
extern int sig;
#ifdef NDEBUG #ifdef NDEBUG
+1 -1
View File
@@ -97,7 +97,7 @@ int fwbdebug = 0;
bool safemode = false; bool safemode = false;
bool cli_print = false; bool cli_print = false;
QString cli_print_fwname = ""; QString cli_print_fwname = "";
int sig = FWB_SIG;
void usage() void usage()
{ {