From 893b398d733921360356a750f270256d6920fe5e Mon Sep 17 00:00:00 2001 From: Owen Wang Date: Tue, 4 Oct 2022 20:40:18 -0400 Subject: [PATCH] Fix newlines when copying from DatabaseWidget --- src/gui/DatabaseWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 8932ffbb7..457dd4ec6 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -638,7 +639,7 @@ void DatabaseWidget::copyPassword() auto textEdit = qobject_cast(focusWidget()); if (textEdit && textEdit->textCursor().hasSelection()) { - clipboard()->setText(textEdit->textCursor().selectedText(), clearClipboard); + clipboard()->setText(textEdit->textCursor().selection().toPlainText(), clearClipboard); return; }