From b384027378aa7d72ad420568543080cd6e15ea1e Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Wed, 16 May 2018 18:01:19 +0200 Subject: [PATCH] Only allow selection of tables in Export SQL dialog Only allow the user to select which tables to export in the Export SQL dialog instead of tables and views. The selection of views wasn't respected anyway, so the list including views is just confusing. --- src/ExportSqlDialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ExportSqlDialog.cpp b/src/ExportSqlDialog.cpp index a483d07e..46900ea3 100644 --- a/src/ExportSqlDialog.cpp +++ b/src/ExportSqlDialog.cpp @@ -28,9 +28,9 @@ ExportSqlDialog::ExportSqlDialog(DBBrowserDB* db, QWidget* parent, const QString ui->comboOldSchema->setCurrentIndex(Settings::getValue("exportsql", "oldschema").toInt()); // Get list of tables to export - objectMap objects = pdb->getBrowsableObjects("main"); - for(auto it=objects.constBegin();it!=objects.constEnd();++it) - ui->listTables->addItem(new QListWidgetItem(QIcon(QString(":icons/%1").arg(sqlb::Object::typeToString((*it)->type()))), (*it)->name())); + QList objects = pdb->schemata["main"].values("table"); + for(const sqlb::ObjectPtr& it : objects) + ui->listTables->addItem(new QListWidgetItem(QIcon(QString(":icons/%1").arg(sqlb::Object::typeToString(it->type()))), it->name())); // Sort list of tables and select the table specified in the // selection parameter or all tables if table not specified