| 176 | Q_GLOBAL_STATIC(QRecursiveMutex, s_lock) |
| 177 | |
| 178 | Probe::Probe(QObject *parent) |
| 179 | : QObject(parent) |
| 180 | , m_objectListModel(new ObjectListModel(this)) |
| 181 | , m_objectTreeModel(new ObjectTreeModel(this)) |
| 182 | , m_window(nullptr) |
| 183 | , m_metaObjectRegistry(new MetaObjectRegistry(this)) |
| 184 | , m_queueTimer(new QTimer(this)) |
| 185 | , m_server(nullptr) |
| 186 | { |
| 187 | qputenv("DEBUGINFOD_URLS", QByteArray()); |
| 188 | |
| 189 | Q_ASSERT(thread() == qApp->thread()); |
| 190 | IF_DEBUG(cout << "attaching GammaRay probe" << endl;) |
| 191 | |
| 192 | StreamOperators::registerOperators(); |
| 193 | ProbeSettings::receiveSettings(); |
| 194 | |
| 195 | m_server = new Server(this); |
| 196 | |
| 197 | ObjectBroker::setSelectionModelFactoryCallback(selectionModelFactory); |
| 198 | ObjectBroker::registerObject<ProbeControllerInterface *>(new ProbeController(this)); |
| 199 | m_toolManager = new ToolManager(this); |
| 200 | ObjectBroker::registerObject<ToolManagerInterface *>(m_toolManager); |
| 201 | ObjectBroker::registerObject<FavoriteObjectInterface *>(new FavoriteObject(this)); |
| 202 | |
| 203 | m_problemCollector = new ProblemCollector(this); |
| 204 | |
| 205 | ObjectBroker::registerObject<EnumRepository *>(EnumRepositoryServer::create(this)); |
| 206 | ClassesIconsRepositoryServer::create(this); |
| 207 | registerModel(QStringLiteral("com.kdab.GammaRay.ObjectTree"), m_objectTreeModel); |
| 208 | registerModel(QStringLiteral("com.kdab.GammaRay.ObjectList"), m_objectListModel); |
| 209 | |
| 210 | ToolPluginModel *toolPluginModel = new ToolPluginModel( |
| 211 | m_toolManager->toolPluginManager()->plugins(), this); |
| 212 | registerModel(QStringLiteral("com.kdab.GammaRay.ToolPluginModel"), toolPluginModel); |
| 213 | ToolPluginErrorModel *toolPluginErrorModel = new ToolPluginErrorModel(m_toolManager->toolPluginManager()->errors(), this); |
| 214 | registerModel(QStringLiteral("com.kdab.GammaRay.ToolPluginErrorModel"), toolPluginErrorModel); |
| 215 | |
| 216 | m_queueTimer->setSingleShot(true); |
| 217 | m_queueTimer->setInterval(0); |
| 218 | connect(m_queueTimer, &QTimer::timeout, |
| 219 | this, &Probe::processQueuedObjectChanges); |
| 220 | |
| 221 | m_previousSignalSpyCallbackSet = qt_signal_spy_callback_set.loadRelaxed(); |
| 222 | |
| 223 | connect(this, &Probe::objectCreated, m_metaObjectRegistry, &MetaObjectRegistry::objectAdded); |
| 224 | connect(this, &Probe::objectDestroyed, m_metaObjectRegistry, &MetaObjectRegistry::objectRemoved); |
| 225 | } |
| 226 | |
| 227 | Probe::~Probe() |
| 228 | { |
nothing calls this directly
no test coverage detected