Remove no longer used method SqlExecutionArea::saveAsView()

It was moved to MainWindow for reuse and this copy was no longer used.
This commit is contained in:
mgrojo
2017-11-30 22:44:16 +01:00
parent e5f7456863
commit c1f2306106
2 changed files with 0 additions and 23 deletions

View File

@@ -103,28 +103,6 @@ void SqlExecutionArea::saveAsCsv()
dialog.exec();
}
void SqlExecutionArea::saveAsView()
{
// Let the user select a name for the new view and make sure it doesn't already exist
QString name;
while(true)
{
name = QInputDialog::getText(this, qApp->applicationName(), tr("Please specify the view name")).trimmed();
if(name.isEmpty())
return;
if(db.getObjectByName(sqlb::ObjectIdentifier("main", name)) != nullptr)
QMessageBox::warning(this, qApp->applicationName(), tr("There is already an object with that name. Please choose a different name."));
else
break;
}
// Create the view
if(db.executeSQL(QString("CREATE VIEW %1 AS %2;").arg(sqlb::escapeIdentifier(name)).arg(model->query())))
QMessageBox::information(this, qApp->applicationName(), tr("View successfully created."));
else
QMessageBox::warning(this, qApp->applicationName(), tr("Error creating view: %1").arg(db.lastError()));
}
void SqlExecutionArea::reloadSettings()
{
// Reload editor and table settings