19 #include <QNetworkAccessManager> 22 #include <QMessageBox> 23 #include <QDesktopServices> 24 #include <QPushButton> 27 #include "../version.h" 29 #include "transform/TransformFactory.h" 30 #include "plugin/PluginIdentifier.h" 36 m_nm(new QNetworkAccessManager)
39 settings.beginGroup(
"Survey");
55 QUrl url(QString(
"http://%1/%2")
57 SVDEBUG <<
"Surveyer: Test URL is " << url << endl;
59 connect(
m_reply, SIGNAL(
error(QNetworkReply::NetworkError)),
60 this, SLOT(
error(QNetworkReply::NetworkError)));
62 }
else if (countdown > 0) {
80 SVDEBUG <<
"Surveyer: error: " <<
m_reply->errorString() << endl;
89 QMessageBox mb(dynamic_cast<QWidget *>(parent()));
100 settings.beginGroup(
"Survey");
104 if (mb.clickedButton() == yes) {
105 QString svarg = SV_VERSION;
106 QString platformarg =
"unknown";
108 platformarg =
"win32";
113 platformarg =
"posix";
117 TransformFactory *tf = TransformFactory::getInstance();
119 TransformList tl = tf->getAllTransformDescriptions();
120 std::set<QString> packages;
121 for (
size_t i = 0; i < tl.size(); ++i) {
122 TransformId
id = tl[i].identifier;
125 QString plugid = t.getPluginIdentifier();
126 QString type, soname, label;
127 PluginIdentifier::parseIdentifier(plugid, type, soname, label);
128 if (type ==
"vamp") packages.insert(soname);
130 for (std::set<QString>::const_iterator i = packages.begin();
131 i != packages.end(); ++i) {
132 if (plugsarg !=
"") plugsarg = plugsarg +
",";
133 plugsarg = plugsarg + *i;
138 QDesktopServices::openUrl(QUrl(QString(
"http://%1/%2?sv=%3&plugs=%4&platform=%5").arg(
m_config.
hostname).arg(
m_config.
surveyPath).arg(svarg).arg(plugsarg).arg(platformarg)));
void error(QNetworkReply::NetworkError)
QNetworkAccessManager * m_nm