Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2009-01-09 23:29:44 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2009-01-09 23:29:44 +0300
commit36c9d56d7959fbf5bc83ea746a143b57614f9a4d (patch)
treee69b74603e252751317f2790da3b1027aca9a512 /src/mumble/Usage.cpp
parente36d650118c1f08d688d70014d0978880218c537 (diff)
Mute loopback in wizard during welcome and finish pages.
Add question about statistics to the end of the audio wizard. git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1402 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/mumble/Usage.cpp')
-rw-r--r--src/mumble/Usage.cpp52
1 files changed, 42 insertions, 10 deletions
diff --git a/src/mumble/Usage.cpp b/src/mumble/Usage.cpp
index 582f39b85..f2fe3937f 100644
--- a/src/mumble/Usage.cpp
+++ b/src/mumble/Usage.cpp
@@ -40,7 +40,7 @@ Usage::Usage(QObject *parent) : QObject(parent) {
}
void Usage::registerUsage() {
- if (! g.s.bUsage)
+ if (! g.s.bUsage || g.s.bFirstTime)
return;
QDomDocument doc;
@@ -50,28 +50,51 @@ void Usage::registerUsage() {
QDomElement tag;
QDomText t;
- tag=doc.createElement(QLatin1String("version"));
+ QString machash;
+
+ foreach(const QNetworkInterface &qni, QNetworkInterface::allInterfaces()) {
+ if (! qni.isValid())
+ continue;
+ if (! (qni.flags() & (QNetworkInterface::IsUp | QNetworkInterface::IsRunning)))
+ continue;
+ if (qni.hardwareAddress().isEmpty())
+ continue;
+
+ bool found = false;
+ foreach(const QNetworkAddressEntry &qnae, qni.addressEntries()) {
+ const QHostAddress &qha = qnae.ip();
+ if (qha.protocol() == QAbstractSocket::IPv4Protocol) {
+ found = true;
+ }
+ }
+ if (found) {
+ machash = QString::fromAscii(QCryptographicHash::hash(qni.hardwareAddress().toAscii(), QCryptographicHash::Sha1).toHex());
+ }
+ }
+
+ tag=doc.createElement(QLatin1String("machash"));
root.appendChild(tag);
+ t=doc.createTextNode(machash);
+ tag.appendChild(t);
+ tag=doc.createElement(QLatin1String("version"));
+ root.appendChild(tag);
t=doc.createTextNode(QLatin1String(MUMTEXT(MUMBLE_VERSION_STRING)));
tag.appendChild(t);
tag=doc.createElement(QLatin1String("release"));
root.appendChild(tag);
-
t=doc.createTextNode(QLatin1String(MUMBLE_RELEASE));
tag.appendChild(t);
tag=doc.createElement(QLatin1String("os"));
root.appendChild(tag);
-
#if defined(Q_WS_WIN)
t=doc.createTextNode(QLatin1String("Win"));
tag.appendChild(t);
tag=doc.createElement(QLatin1String("osver"));
root.appendChild(tag);
-
t=doc.createTextNode(QString::number(QSysInfo::WindowsVersion, 16));
tag.appendChild(t);
#elif defined(Q_WS_MAC)
@@ -80,7 +103,6 @@ void Usage::registerUsage() {
tag=doc.createElement(QLatin1String("osver"));
root.appendChild(tag);
-
t=doc.createTextNode(QString::number(QSysInfo::MacintoshVersion, 16));
tag.appendChild(t);
#else
@@ -88,28 +110,38 @@ void Usage::registerUsage() {
tag.appendChild(t);
#endif
- tag=doc.createElement(QLatin1String("qt"));
+ bool bIs64;
+#if defined(Q_WS_WIN)
+ BOOL bIsWow64 = FALSE;
+ IsWow64Process(GetCurrentProcess(), &bIsWow64);
+ bIs64 = bIsWow64;
+#else
+ bIs64 = (QSysInfo::WordSize == 64);
+#endif
+
+ tag=doc.createElement(QLatin1String("is64bit"));
root.appendChild(tag);
+ t=doc.createTextNode(QString::number(bIs64 ? 1 : 0));
+ tag.appendChild(t);
+ tag=doc.createElement(QLatin1String("qt"));
+ root.appendChild(tag);
t=doc.createTextNode(QLatin1String(qVersion()));
tag.appendChild(t);
tag=doc.createElement(QLatin1String("in"));
root.appendChild(tag);
-
t=doc.createTextNode(g.s.qsAudioInput);
tag.appendChild(t);
tag=doc.createElement(QLatin1String("out"));
root.appendChild(tag);
-
t=doc.createTextNode(g.s.qsAudioOutput);
tag.appendChild(t);
qhHttp.setHost(QLatin1String("mumble.hive.no"), 80);
QHttpRequestHeader h(QLatin1String("POST"), QLatin1String("/usage.cgi"));
-// h.setValue(QLatin1String("Connection"), QLatin1String("Keep-Alive"));
h.setValue(QLatin1String("Host"), QLatin1String("mumble.hive.no"));
h.setContentType(QLatin1String("text/xml"));
qhHttp.request(h, doc.toString().toUtf8());