GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow space characters in table and index names, disallow ` chars · feiva/sqlitebrowser@0ae6f18

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • CreateIndexDialog.cpp
    • EditTableDialog.cpp
    • ImportCsvDialog.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/CreateIndexDialog.cpp‎

Copy file name to clipboardExpand all lines: src/CreateIndexDialog.cpp
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ void CreateIndexDialog::tableChanged(const QString& new_table)
5252

5353
void CreateIndexDialog::checkInput()
5454
{
55-
ui->editIndexName->setText(ui->editIndexName->text().trimmed());
56-
5755
bool valid = true;
58-
if(ui->editIndexName->text().isEmpty() || ui->editIndexName->text().contains(" "))
56+
if(ui->editIndexName->text().isEmpty() || ui->editIndexName->text().contains("`"))
5957
valid = false;
6058

6159
int num_columns = 0;
Collapse file

‎src/EditTableDialog.cpp‎

Copy file name to clipboardExpand all lines: src/EditTableDialog.cpp
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ void EditTableDialog::updateSqlText()
149149
void EditTableDialog::checkInput()
150150
{
151151
QString normTableName = ui->editTableName->text().trimmed();
152-
ui->editTableName->setText(normTableName);
153152
bool valid = true;
154-
if(normTableName.isEmpty() || normTableName.contains(" "))
153+
if(normTableName.isEmpty() || normTableName.contains("`"))
155154
valid = false;
156155
if(ui->treeWidget->topLevelItemCount() == 0)
157156
valid = false;
Collapse file

‎src/ImportCsvDialog.cpp‎

Copy file name to clipboardExpand all lines: src/ImportCsvDialog.cpp
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ void ImportCsvDialog::accept()
5757
{
5858
// Remove invalid characters
5959
QString thisfield = curList.front();
60+
thisfield.replace("`", "");
6061
thisfield.replace(" ", "");
6162
thisfield.replace('"', "");
6263
thisfield.replace("'","");
@@ -196,10 +197,8 @@ void ImportCsvDialog::updatePreview()
196197

197198
void ImportCsvDialog::checkInput()
198199
{
199-
ui->editName->setText(ui->editName->text().trimmed());
200-
201200
bool valid = true;
202-
if(ui->editName->text().isEmpty() || ui->editName->text().contains(" "))
201+
if(ui->editName->text().isEmpty() || ui->editName->text().contains("`"))
203202
valid = false;
204203

205204
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(valid);

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.