EditTableDialog: Allow some more changes to existing tables

Allow setting the default value, the check values and under some
circumstances the not null flag when editing existing tables.

This required some changes to DBBrowserDB::renameColumn() which is now
using some more features of sqlitetypes.cpp but could still be improved.
This commit is contained in:
Martin Kleusberg
2013-05-31 16:13:58 +02:00
parent 82d78384e0
commit b9afbe2aea
4 changed files with 47 additions and 32 deletions

View File

@@ -47,7 +47,7 @@ void ImportCsvDialog::accept()
return;
// Generate field names. These are either taken from the first CSV row or are generated in the format of "fieldXY" depending on the user input
QList<DBBrowserField> fieldList;
QStringList fieldList;
if(ui->checkboxHeader->isChecked())
{
int cfieldnum = 0;
@@ -65,13 +65,13 @@ void ImportCsvDialog::accept()
if(thisfield.isEmpty())
thisfield = QString("field%1").arg(cfieldnum+1);
fieldList.push_back(DBBrowserField(thisfield, ""));
fieldList.push_back(thisfield);
cfieldnum++;
curList.pop_front();
}
} else {
for(int i=0;i<numfields;i++)
fieldList.push_back(DBBrowserField(QString("field%1").arg(i+1), ""));
fieldList.push_back(QString("field%1").arg(i+1));
}
// Show progress dialog