comparison main/MainWindow.cpp @ 2535:62b1a3a242ee

Towards reusing the survey logic for a request for info & guidance
author Chris Cannam
date Tue, 12 May 2020 17:41:54 +0100
parents 84ddd274fcc0
children 32718f05903d
comparison
equal deleted inserted replaced
2534:0dec5e47dd8f 2535:62b1a3a242ee
335 bool networkPermission = tester.havePermission(); 335 bool networkPermission = tester.havePermission();
336 if (networkPermission) { 336 if (networkPermission) {
337 SVDEBUG << "MainWindow: Starting transform population thread" << endl; 337 SVDEBUG << "MainWindow: Starting transform population thread" << endl;
338 TransformFactory::getInstance()->startPopulationThread(); 338 TransformFactory::getInstance()->startPopulationThread();
339 339
340 m_surveyer = nullptr;
341
342 //#define WITH_SURVEY 1
343 #ifdef WITH_SURVEY
340 SVDEBUG << "MainWindow: Creating surveyer" << endl; 344 SVDEBUG << "MainWindow: Creating surveyer" << endl;
341 m_surveyer = new Surveyer 345 Surveyer::Config config;
342 ("sonicvisualiser.org", "survey23-present.txt", "survey23.php"); 346 config.hostname = "sonicvisualiser.org";
347 config.testPath = "feedback41-present.txt";
348 config.surveyPath = "feedback41.php";
349 config.countdownKey = "countdown41";
350 config.countdownFrom = 1;
351 config.title = "Sonic Visualiser - Can you help?";
352 config.text = "<h3>Sonic Visualiser: Can you help?</h3><p>Are you using Sonic Visualiser for research or commercial purposes? Or do you intend to do so?</p><p>In the Centre for Digital Music, where Sonic Visualiser is made, we are gathering information about the impact of our work, to guide our future actions.</p><p>Would you be interested in giving us your contact details, and a description of the work you do that is related to Sonic Visualiser?</p><p>Anything you tell us will be used only to guide research and development at Queen Mary University of London.</p>";
353 config.acceptLabel = tr("Yes, I'd be happy to");
354 config.rejectLabel = tr("No, thank you");
355 config.includeSystemInfo = false;
356 m_surveyer = new Surveyer(config);
357 #endif
343 358
344 SVDEBUG << "MainWindow: Creating version tester" << endl; 359 SVDEBUG << "MainWindow: Creating version tester" << endl;
345 m_versionTester = new VersionTester 360 m_versionTester = new VersionTester
346 ("sonicvisualiser.org", "latest-version.txt", SV_VERSION); 361 ("sonicvisualiser.org", "latest-version.txt", SV_VERSION);
347 connect(m_versionTester, SIGNAL(newerVersionAvailable(QString)), 362 connect(m_versionTester, SIGNAL(newerVersionAvailable(QString)),