Skip to content

Commit

Permalink
Improve feedback for copying text in Quick GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Oct 27, 2024
1 parent e791fbc commit ac425f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tray/gui/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ bool App::copyText(const QString &text)
{
if (auto *const clipboard = QGuiApplication::clipboard()) {
clipboard->setText(text);
#ifdef Q_OS_ANDROID
// do not emit info as Android will show a message about it automatically
performHapticFeedback();
#else
emit info(tr("Copied value"));
#endif
return true;
}
emit info(tr("Unable to copy value"));
Expand All @@ -217,7 +222,6 @@ bool App::copyPath(const QString &dirId, const QString &relativePath)
if (!dirInfo) {
emit error(tr("Unable to copy \"%1\"").arg(relativePath));
} else if (copyText(dirInfo->path % QChar('/') % relativePath)) {
emit info(tr("Copied path"));
return true;
}
return false;
Expand Down

0 comments on commit ac425f3

Please sign in to comment.