MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / createFileModel

Method createFileModel

syncthingwidgets/misc/syncthingmodels.cpp:272–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272Data::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
287DiffHighlighter *SyncthingModels::createDiffHighlighter(QTextDocument *parent)
288{

Callers

nothing calls this directly

Calls 1

findDirInfoMethod · 0.60

Tested by

no test coverage detected