From 58867aa181999711ffaac0eec248af07581e29a5 Mon Sep 17 00:00:00 2001 From: Peinthor Rene Date: Thu, 7 Aug 2014 23:17:42 +0200 Subject: [PATCH] edittable: update comment --- src/EditTableDialog.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/EditTableDialog.cpp b/src/EditTableDialog.cpp index 8ab882f4..c8163db5 100644 --- a/src/EditTableDialog.cpp +++ b/src/EditTableDialog.cpp @@ -294,9 +294,7 @@ void EditTableDialog::itemChanged(QTreeWidgetItem *item, int column) // When editing an existing table and trying to set a column to unique an extra check is needed if(!m_bNewTable && item->checkState(column) == Qt::Checked) { - // Because our renameColumn() function fails when setting a column to Not Null when it already contains some NULL values - // we need to check for this case and cancel here. Maybe we can think of some way to modify the INSERT INTO ... SELECT statement - // to at least replace all troublesome NULL values by the default value + // Because our renameColumn() function fails when setting a column to unique when it already contains the same values SqliteTableModel m(this, pdb); m.setQuery(QString("SELECT COUNT(`%2`) FROM `%1`;").arg(curTable).arg(field->name())); int rowcount = m.data(m.index(0, 0)).toInt();