mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
Fix right click action "Browse Table" for tables with whitespace
Fix a crash when using the "Browse Table" action in the right click menu in the Database Structure tab. It crashed whenever the table name or the schema name started or ended with a space character.
This commit is contained in:
@@ -3369,8 +3369,8 @@ void MainWindow::switchToBrowseDataTab(QString tableToBrowse)
|
||||
if(!ui->dbTreeWidget->selectionModel()->hasSelection())
|
||||
return;
|
||||
|
||||
sqlb::ObjectIdentifier obj(ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema)).toString().toStdString(),
|
||||
ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName)).toString().toStdString());
|
||||
sqlb::ObjectIdentifier obj(ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnSchema), Qt::EditRole).toString().toStdString(),
|
||||
ui->dbTreeWidget->model()->data(ui->dbTreeWidget->currentIndex().sibling(ui->dbTreeWidget->currentIndex().row(), DbStructureModel::ColumnName), Qt::EditRole).toString().toStdString());
|
||||
tableToBrowse = QString::fromStdString(obj.toDisplayString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user