Do not escape single cell data in clipboard copy

For single cell without-headers copy it is better to not escape the text
since there isn't any gain in trying to escape quotes, end-of-lines or
tabs. Escaping should only be done for table like data for compatibility
to spreadsheets applications.

See issue #1244.
This commit is contained in:
mgrojo
2018-02-14 23:19:53 +01:00
parent b8e96379a7
commit 65c670acc0

View File

@@ -265,8 +265,8 @@ void ExtendedTableWidget::copy(const bool withHeaders)
return;
}
// The field isn't empty. Quote data as needed and copy it to the clipboard
qApp->clipboard()->setText(escapeCopiedData(data.toByteArray()));
// The field isn't empty. Copy the text to the clipboard without quoting (for general plain text clipboard)
qApp->clipboard()->setText(data.toByteArray());
return;
}
}