| 270 | } |
| 271 | |
| 272 | Data::SyncthingFileModel *SyncthingModels::createFileModel(const QString &dirId, QObject *parent) |
| 273 | { |
| 274 | auto row = int(); |
| 275 | auto dirInfo = m_connection.findDirInfo(dirId, row); |
| 276 | if (!dirInfo) { |
| 277 | return nullptr; |
| 278 | } |
| 279 | auto model = new Data::SyncthingFileModel(m_connection, *dirInfo, parent); |
| 280 | connect(model, &Data::SyncthingFileModel::notification, this, |
| 281 | [this](const QString &type, const QString &message, const QString &details = QString()) { |
| 282 | type == QStringLiteral("error") ? emit error(message, details) : emit info(message, details); |
| 283 | }); |
| 284 | return model; |
| 285 | } |
| 286 | |
| 287 | DiffHighlighter *SyncthingModels::createDiffHighlighter(QTextDocument *parent) |
| 288 | { |
nothing calls this directly
no test coverage detected