Skip to content

Commit 47b0749

Browse files
committed
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.
1 parent 9db70e0 commit 47b0749

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ExtendedTableWidget.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <QBuffer>
1616
#include <QMenu>
1717

18+
QList<QByteArrayList> ExtendedTableWidget::m_buffer;
19+
1820
namespace
1921
{
2022

src/ExtendedTableWidget.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public slots:
3939
void useAsFilter();
4040

4141
typedef QList<QByteArray> QByteArrayList;
42-
QList<QByteArrayList> m_buffer; // TODO: Shouldn't this be static?
42+
static QList<QByteArrayList> m_buffer;
4343

4444
private slots:
4545
void vscrollbarChanged(int value);

0 commit comments

Comments
 (0)