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

Method loadIgnorePatterns

syncthingwidgets/misc/syncthingmodels.cpp:211–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211bool SyncthingModels::loadIgnorePatterns(const QString &dirId, QObject *textArea)
212{
213 auto res = m_connection.ignores(dirId, [this, textArea](Data::SyncthingIgnores &&ignores, QString &&error) {
214 if (!error.isEmpty()) {
215 emit this->error(tr("Unable to load ignore patterns: ") + error);
216 }
217 textArea->setProperty("text", ignores.ignore.join(QChar('\n')));
218 textArea->setProperty("enabled", true);
219 });
220 connect(textArea, &QObject::destroyed, res.reply, &QNetworkReply::deleteLater);
221 connect(this, &QObject::destroyed, [connection = res.connection] { disconnect(connection); });
222 return true;
223}
224
225bool SyncthingModels::saveIgnorePatterns(const QString &dirId, QObject *textArea)
226{

Callers

nothing calls this directly

Calls 1

ignoresMethod · 0.80

Tested by

no test coverage detected