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

Method initDirCompletion

cli/application.cpp:1188–1203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1186}
1187
1188void Application::initDirCompletion(Argument &arg, const ArgumentOccurrence &)
1189{
1190 // prevent this initialization if we're not in shell completion mode
1191 if (m_argsRead) {
1192 return;
1193 }
1194 // load config and wait for connected
1195 if (loadConfig()) {
1196 return;
1197 }
1198 m_settings.requestTimeout = 5000; // avoid blocking shell for too long
1199 waitForConfigAndStatus();
1200 // set directory IDs as completion values
1201 m_dirCompletion = m_connection.directoryIds().join(QChar(' ')).toUtf8();
1202 arg.setPreDefinedCompletionValues(m_dirCompletion.data());
1203}
1204
1205void Application::initDevCompletion(Argument &arg, const ArgumentOccurrence &)
1206{

Callers

nothing calls this directly

Calls 2

directoryIdsMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected