comparison main/NetworkPermissionTester.cpp @ 1639:3dbfe3ba0d1f

More debug output during startup
author Chris Cannam
date Sun, 05 Mar 2017 17:14:17 +0000
parents 3f6c18fcc075
children 893f556cd5c9
comparison
equal deleted inserted replaced
1637:c3380c78811f 1639:3dbfe3ba0d1f
13 */ 13 */
14 14
15 #include "NetworkPermissionTester.h" 15 #include "NetworkPermissionTester.h"
16 16
17 #include "../version.h" 17 #include "../version.h"
18
19 #include "base/Debug.h"
18 20
19 #include <QWidget> 21 #include <QWidget>
20 #include <QString> 22 #include <QString>
21 #include <QSettings> 23 #include <QSettings>
22 #include <QCoreApplication> 24 #include <QCoreApplication>
35 QString tag = QString("network-permission-%1").arg(SV_VERSION); 37 QString tag = QString("network-permission-%1").arg(SV_VERSION);
36 38
37 bool permish = false; 39 bool permish = false;
38 40
39 if (settings.contains(tag)) { 41 if (settings.contains(tag)) {
40 permish = settings.value(tag, false).toBool(); 42 permish = settings.value(tag, false).toBool();
43 SVDEBUG << "NetworkPermissionTester: Asked already, result was " << permish << endl;
41 } else { 44 } else {
45 SVDEBUG << "NetworkPermissionTester: Asking for permission" << endl;
42 46
43 QDialog d; 47 QDialog d;
44 d.setWindowTitle(QCoreApplication::translate("NetworkPermissionTester", "Welcome to Sonic Visualiser")); 48 d.setWindowTitle(QCoreApplication::translate("NetworkPermissionTester", "Welcome to Sonic Visualiser"));
45 49
46 QGridLayout *layout = new QGridLayout; 50 QGridLayout *layout = new QGridLayout;
47 d.setLayout(layout); 51 d.setLayout(layout);
48 52
95 99
96 d.exec(); 100 d.exec();
97 101
98 permish = cb->isChecked(); 102 permish = cb->isChecked();
99 settings.setValue(tag, permish); 103 settings.setValue(tag, permish);
104
105 SVDEBUG << "NetworkPermissionTester: asked, answer was " << permish << endl;
100 } 106 }
101 107
102 settings.endGroup(); 108 settings.endGroup();
103 109
104 return permish; 110 return permish;