Improvements for drag and drop of items from the DB Schema dock to editor

Two new options editable from a new context menu of the dock:
- Drag & Drop Qualified Names: add table name to fields and schema name
to other objects (except for "main" schema)
- Drag & Drop Enquoted Names: whether to surround the identifiers by the
configured quoting characters for identifiers.

Support for dragging & dropping of attached databases names.

Add "." as separator for multiple dropped objects other than fields (since
they are not usually used in SQL as a list). This allows to compose
qualified names by dropping the parent and the child items together. This
is only generally useful when the "Qualified Names" option is disabled.

See related issue #1433
This commit is contained in:
mgrojo
2018-09-09 19:52:36 +02:00
parent 04bc7da6e7
commit f33943f4cf
6 changed files with 127 additions and 12 deletions

View File

@@ -145,6 +145,7 @@ private:
SqliteTableModel* m_currentTabTableModel;
QMenu* popupTableMenu;
QMenu* popupSchemaDockMenu;
QMenu* recentFilesMenu;
QMenu* popupOpenDbMenu;
QMenu* popupNewRecordMenu;
@@ -214,6 +215,7 @@ public slots:
private slots:
void createTreeContextMenu(const QPoint & qPoint);
void createSchemaDockContextMenu(const QPoint & qPoint);
void changeTreeSelection();
void fileNew();
void fileNewInMemoryDatabase();