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

Method copyText

syncthingwidgets/misc/syncthingmodels.cpp:176–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176bool SyncthingModels::copyText(const QString &text)
177{
178 if (auto *const clipboard = QGuiApplication::clipboard()) {
179 clipboard->setText(text);
180#ifdef Q_OS_ANDROID
181 // do not emit info as Android will show a message about it automatically
182 emit hapticFeedbackRequested();
183#else
184 emit info(tr("Copied value"));
185#endif
186 return true;
187 }
188 emit info(tr("Unable to copy value"));
189 return false;
190}
191
192bool SyncthingModels::copyPath(const QString &dirId, const QString &relativePath)
193{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected