| 88 | }; |
| 89 | |
| 90 | BreakpointModel::BreakpointModel(QObject* parent) |
| 91 | : QAbstractTableModel(parent), |
| 92 | d_ptr(new BreakpointModelPrivate) |
| 93 | { |
| 94 | auto* const documentController = ICore::self()->documentController(); |
| 95 | Q_ASSERT(documentController); // BreakpointModel is created after DocumentController. |
| 96 | |
| 97 | // This constructor is invoked before controllers are initialized, and thus before any documents can be opened. |
| 98 | // So our textDocumentCreated() slot will be invoked for all documents. |
| 99 | Q_ASSERT(documentController->openDocuments().empty()); |
| 100 | connect(documentController, &IDocumentController::textDocumentCreated, this, &BreakpointModel::textDocumentCreated); |
| 101 | |
| 102 | connect(documentController, &IDocumentController::documentUrlChanged, this, &BreakpointModel::documentUrlChanged); |
| 103 | connect(documentController, &IDocumentController::documentSaved, this, &BreakpointModel::documentSaved); |
| 104 | } |
| 105 | |
| 106 | BreakpointModel::~BreakpointModel() |
| 107 | { |
nothing calls this directly
no test coverage detected