Share internal copy-paste buffer between different table views

Use a shared internal copy-paste buffer for all table views in the
application instead of having one buffer per view. This is not only less
confusing because it more closely resembles the behaviour of the system
clipboard but it also allows copying BLOB data from a Execute SQL result
view to a Browse Data table.
This commit is contained in:
Martin Kleusberg
2017-12-04 12:47:37 +01:00
parent 9db70e0750
commit 47b07490de
2 changed files with 3 additions and 1 deletions

View File

@@ -15,6 +15,8 @@
#include <QBuffer>
#include <QMenu>
QList<QByteArrayList> ExtendedTableWidget::m_buffer;
namespace
{

View File

@@ -39,7 +39,7 @@ private:
void useAsFilter();
typedef QList<QByteArray> QByteArrayList;
QList<QByteArrayList> m_buffer; // TODO: Shouldn't this be static?
static QList<QByteArrayList> m_buffer;
private slots:
void vscrollbarChanged(int value);