Skip to content

Commit

Permalink
Fix newlines when copying from DatabaseWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
supershoop authored and droidmonkey committed Oct 5, 2022
1 parent db98f11 commit 893b398
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/DatabaseWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <QPlainTextEdit>
#include <QProcess>
#include <QSplitter>
#include <QTextDocumentFragment>
#include <QTextEdit>
#include <core/Tools.h>

Expand Down Expand Up @@ -638,7 +639,7 @@ void DatabaseWidget::copyPassword()

auto textEdit = qobject_cast<QTextEdit*>(focusWidget());
if (textEdit && textEdit->textCursor().hasSelection()) {
clipboard()->setText(textEdit->textCursor().selectedText(), clearClipboard);
clipboard()->setText(textEdit->textCursor().selection().toPlainText(), clearClipboard);
return;
}

Expand Down

0 comments on commit 893b398

Please sign in to comment.