Commit [r37] Maximize Restore History

Convert no longer supported Qt3 .ui files and merge ui.h contents. This makes it easier to debug in QtCreator, but we loose Designer support

tabuleiro 2009-09-17

1 2 3 > >> (Page 1 of 3)
added /trunk/sqlitebrowser/sqlitebrowser/createtableform.h
added /trunk/sqlitebrowser/sqlitebrowser/findform.h
added /trunk/sqlitebrowser/sqlitebrowser/importcsvform.cpp
added /trunk/sqlitebrowser/sqlitebrowser/editform.h
added /trunk/sqlitebrowser/sqlitebrowser/choosetableform.h
added /trunk/sqlitebrowser/sqlitebrowser/createindexform.h
added /trunk/sqlitebrowser/sqlitebrowser/addfieldform.h
added /trunk/sqlitebrowser/sqlitebrowser/addfieldtypeform.h
added /trunk/sqlitebrowser/sqlitebrowser/form1.h
added /trunk/sqlitebrowser/sqlitebrowser/createtableform.cpp
added /trunk/sqlitebrowser/sqlitebrowser/deletetableform.h
added /trunk/sqlitebrowser/sqlitebrowser/aboutform.h
changed /trunk/sqlitebrowser/sqlitebrowser/sqlitebrowser.pro
copied /trunk/sqlitebrowser/sqlitebrowser/renametableform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/exporttablecsvform.cpp
copied /trunk/sqlitebrowser/sqlitebrowser/findform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/editfieldform.cpp
copied /trunk/sqlitebrowser/sqlitebrowser/choosetableform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/sqllogform.cpp
copied /trunk/sqlitebrowser/sqlitebrowser/editfieldform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/deleteindexform.cpp
copied /trunk/sqlitebrowser/sqlitebrowser/addfieldform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/renametableform.cpp
copied /trunk/sqlitebrowser/sqlitebrowser/edittableform.ui.h -> /trunk/sqlitebrowser/sqlitebrowser/edittableform.cpp
/trunk/sqlitebrowser/sqlitebrowser/createtableform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/findform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/importcsvform.cpp Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/editform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/choosetableform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/createindexform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/addfieldform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/addfieldtypeform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/form1.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/createtableform.cpp Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/deletetableform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/aboutform.h Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/sqlitebrowser.pro Diff Switch to side-by-side view
Loading...
/trunk/sqlitebrowser/sqlitebrowser/renametableform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/exporttablecsvform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/renametableform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/exporttablecsvform.cpp
@@ -1,33 +1,50 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
+#include "exporttablecsvform.h"
 
+#include <qvariant.h>
+#include <qimage.h>
+#include <qpixmap.h>
 
-void renameTableForm::renameClicked()
+/*
+ *  Constructs a exportTableCSVForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+exportTableCSVForm::exportTableCSVForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
 {
-    QString tabname = tablenameLineEdit->text();
-    if (tabname.isEmpty()) {
-	QMessageBox::information( this, applicationName, "Table name can not be empty" );
-	return;
-    }
-    if (tabname.contains(" ")>0) {
-	QMessageBox::warning( this, applicationName, "Spaces are not allowed in the table name" );
-	return;
-    }
-    accept();
+    setupUi(this);
+
 }
 
-QString renameTableForm::getTableName()
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+exportTableCSVForm::~exportTableCSVForm()
 {
-    return tablenameLineEdit->text();
+    // no need to delete child widgets, Qt does it all for us
 }
 
-void renameTableForm::setTableName(QString name)
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void exportTableCSVForm::languageChange()
 {
-    tablenameLineEdit->setText(name);
+    retranslateUi(this);
 }
+
+void exportTableCSVForm::exportPressed()
+{
+     option = comboOptions->currentText();
+     accept();
+}
+
+void exportTableCSVForm::populateOptions(QStringList entries)
+{
+    comboOptions->clear();
+    for ( QStringList::Iterator ct = entries.begin(); ct != entries.end(); ++ct ) {
+        comboOptions->insertItem(*ct,-1);
+    }
+}
/trunk/sqlitebrowser/sqlitebrowser/findform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/editfieldform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/findform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/editfieldform.cpp
@@ -1,68 +1,89 @@
-//Added by qt3to4:
-#include <QCloseEvent>
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
+#include "editfieldform.h"
 
-void findForm::showResults(resultMap rmap)
+#include <qvariant.h>
+#include <qmessagebox.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "sqlitedb.h"
+#include "addfieldtypeform.h"
+/*
+ *  Constructs a editFieldForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+editFieldForm::editFieldForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
 {
-    findListView->clear();
-    findListView->setSorting(-1);
-    resultMap::Iterator it;
-    Q3ListViewItem * lasttbitem = 0;
-        for ( it = rmap.begin(); it != rmap.end(); ++it ) {
-	    Q3ListViewItem * tbitem = new Q3ListViewItem( findListView, lasttbitem );
-	    //tbitem->setOpen( TRUE );
-	    tbitem->setText( 0, QString::number(it.key() + 1,10) ); //increase from index 0
-	    QString firstline = it.data().section( '\n', 0,0 );
-		  if (firstline.length()>MAX_DISPLAY_LENGTH)
-		{
-		    firstline.truncate(MAX_DISPLAY_LENGTH);
-		   firstline.append("...");
-		}
-	     tbitem->setText( 1, firstline );
-	    lasttbitem = tbitem;
-        }
-	QString results = "Found: ";
-	results.append(QString::number(findListView->childCount()));
-	resultsLabel->setText(results);
+    setupUi(this);
+
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+editFieldForm::~editFieldForm()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void editFieldForm::languageChange()
+{
+    retranslateUi(this);
 }
 
 
-void findForm::find()
+void editFieldForm::setInitialValues(QString name, QString type)
 {
-   emit lookfor( findFieldCombobox->currentText(), findOperatorComboBox->currentText(),searchLine->text() );
+    nameLineEdit->setText(name);
+    typeBox->clear();
+    typeBox->insertItem(type);
+    QString tString = "";
+    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    tString = "TEXT";
+    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    tString = "NUMERIC";
+    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    tString = "BLOB";
+    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    tString = "INTEGER PRIMARY KEY";
+    if (type.compare(tString)!=0) typeBox->insertItem(tString);
 }
 
-void findForm::resetFields(QStringList fieldlist)
+void editFieldForm::confirmEdit()
 {
-    findFieldCombobox->clear();
-    for ( QStringList::Iterator ct = fieldlist.begin(); ct != fieldlist.end(); ++ct ) {
-	findFieldCombobox->insertItem(*ct,-1);
+    QString fieldname = nameLineEdit->text();
+    if (fieldname.isEmpty()) {
+ QMessageBox::information( this, applicationName, "Field name can not be empty" );
+        return;
     }
+    if (fieldname.contains(" ")>0) {
+        QMessageBox::warning( this, applicationName, "Spaces are not allowed in the field name" );
+        return;
+    }
+    name = fieldname;
+    type = typeBox->currentText();
+    accept();
 }
 
-void findForm::resetResults()
+void editFieldForm::enableSave()
 {
-    findListView->clear();
-    resultsLabel->setText("Found: 0");
+    saveButton->setEnabled(true);
 }
 
-
-void findForm::recordSelected( Q3ListViewItem * witem)
+void editFieldForm::getCustomType()
 {
-    if (witem) {
-    int recNum = (witem->text(0)).toInt() ;
-    emit showrecord(recNum);
+    addFieldTypeForm * addForm = new addFieldTypeForm( this, "addfieldtype", TRUE );
+    if (addForm->exec())
+   {
+        QString nospaces = addForm->typeNameEdit->text().remove(" ");
+        setInitialValues(nameLineEdit->text(),nospaces );
+        enableSave();
+   }
 }
-}
-
-void findForm::closeEvent( QCloseEvent * )
-{
-        emit goingAway();
-}
/trunk/sqlitebrowser/sqlitebrowser/choosetableform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/sqllogform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/choosetableform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/sqllogform.cpp
@@ -1,21 +1,69 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-void chooseTableForm::editPressed()
+#include "sqllogform.h"
+
+#include <qvariant.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "sqlitedb.h"
+/*
+ *  Constructs a sqlLogForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+sqlLogForm::sqlLogForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
 {
-	option = comboOptions->currentText();
-	accept();
+    setupUi(this);
+
 }
 
-void chooseTableForm::populateOptions(QStringList entries)
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+sqlLogForm::~sqlLogForm()
 {
-    comboOptions->clear();
-    for ( QStringList::Iterator ct = entries.begin(); ct != entries.end(); ++ct ) {
-	comboOptions->insertItem(*ct,-1);
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void sqlLogForm::languageChange()
+{
+    retranslateUi(this);
+}
+
+void sqlLogForm::closeEvent( QCloseEvent * )
+{
+        emit goingAway();
+}
+
+void sqlLogForm::log( QString & statement, int msgtype)
+{
+    if (msgtype==kLogMsg_User)
+    {
+        userLogText->setText(userLogText->text()+statement+"\n");
+    } else {
+        appLogText->setText(appLogText->text()+statement+"\n");
     }
 }
+
+void sqlLogForm::msgDBDirtyState( bool dirty)
+{
+    emit dbState(dirty);
+}
+
+
+void sqlLogForm::clearLog()
+{
+    if (logStack->id(logStack->visibleWidget())==kLogMsg_User)
+    {
+        userLogText->clear();
+    } else {
+    appLogText->clear();
+}
+}
+
/trunk/sqlitebrowser/sqlitebrowser/editfieldform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/deleteindexform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/editfieldform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/deleteindexform.cpp
@@ -1,56 +1,63 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-void editFieldForm::setInitialValues(QString name, QString type)
+#include "deleteindexform.h"
+
+#include <qvariant.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "qmessagebox.h"
+/*
+ *  Constructs a deleteIndexForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+deleteIndexForm::deleteIndexForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
 {
-    nameLineEdit->setText(name);
-    typeBox->clear();
-    typeBox->insertItem(type);
-    QString tString = "";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "TEXT";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "NUMERIC";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "BLOB";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "INTEGER PRIMARY KEY";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    setupUi(this);
+
 }
 
-void editFieldForm::confirmEdit()
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+deleteIndexForm::~deleteIndexForm()
 {
-    QString fieldname = nameLineEdit->text();
-    if (fieldname.isEmpty()) {
- QMessageBox::information( this, applicationName, "Field name can not be empty" );
-	return;
-    }
-    if (fieldname.contains(" ")>0) {
-	QMessageBox::warning( this, applicationName, "Spaces are not allowed in the field name" );
-	return;
-    }
-    name = fieldname;
-    type = typeBox->currentText();
-    accept();
+    // no need to delete child widgets, Qt does it all for us
 }
 
-void editFieldForm::enableSave()
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void deleteIndexForm::languageChange()
 {
-    saveButton->setEnabled(true);
+    retranslateUi(this);
 }
 
-void editFieldForm::getCustomType()
+void deleteIndexForm::confirmDelete()
 {
-    addFieldTypeForm * addForm = new addFieldTypeForm( this, "addfieldtype", TRUE );
-    if (addForm->exec())
-   {
-	QString nospaces = addForm->typeNameEdit->text().remove(" ");
-	setInitialValues(nameLineEdit->text(),nospaces );
-	enableSave();
-   }
+    QString msg = "Are you sure you want to delete index ";
+    msg.append(comboOptions->currentText());
+    msg.append("?");
+
+     if (QMessageBox::warning( this, applicationName,
+       msg,
+        QMessageBox::Yes | QMessageBox::Default,
+        QMessageBox::No | QMessageBox::Escape )
+     == QMessageBox::Yes ){
+        option = comboOptions->currentText();
+        accept();
+    }
 }
+
+void deleteIndexForm::populateOptions(QStringList entries)
+{
+    comboOptions->clear();
+    for ( QStringList::Iterator ct = entries.begin(); ct != entries.end(); ++ct ) {
+        comboOptions->insertItem(*ct,-1);
+    }
+}
+
+
/trunk/sqlitebrowser/sqlitebrowser/addfieldform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/renametableform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/addfieldform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/renametableform.cpp
@@ -1,50 +1,62 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
-void addFieldForm::setInitialValues(QString name, QString type)
+#include "renametableform.h"
+
+#include <qvariant.h>
+#include <qmessagebox.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "sqlitedb.h"
+/*
+ *  Constructs a renameTableForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+renameTableForm::renameTableForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
 {
-    nameLineEdit->setText(name);
-    typeBox->clear();
-    typeBox->insertItem(type);
-    QString tString = "";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "TEXT";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "NUMERIC";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "BLOB";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
-    tString = "INTEGER PRIMARY KEY";
-    if (type.compare(tString)!=0) typeBox->insertItem(tString);
+    setupUi(this);
+
 }
 
-void addFieldForm::confirmAddField()
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+renameTableForm::~renameTableForm()
 {
-    QString fieldname = nameLineEdit->text();
-    if (fieldname.isEmpty()) {
- QMessageBox::information( this, applicationName, "Field name can not be empty" );
- return;
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void renameTableForm::languageChange()
+{
+    retranslateUi(this);
+}
+
+void renameTableForm::renameClicked()
+{
+    QString tabname = tablenameLineEdit->text();
+    if (tabname.isEmpty()) {
+        QMessageBox::information( this, applicationName, "Table name can not be empty" );
+        return;
     }
-    if (fieldname.contains(" ")>0) {
- QMessageBox::warning( this, applicationName, "Spaces are not allowed in the field name" );
- return;
+    if (tabname.contains(" ")>0) {
+        QMessageBox::warning( this, applicationName, "Spaces are not allowed in the table name" );
+        return;
     }
-    fname = fieldname;
-    ftype = typeBox->currentText();
     accept();
 }
 
-void addFieldForm::getCustomType()
+QString renameTableForm::getTableName()
 {
-    addFieldTypeForm * addForm = new addFieldTypeForm( this, "addfieldtype", TRUE );
-    if (addForm->exec())
-   {
- QString nospaces = addForm->typeNameEdit->text().remove(" ");
- setInitialValues(nameLineEdit->text(),nospaces );
-   }
+    return tablenameLineEdit->text();
 }
+
+void renameTableForm::setTableName(QString name)
+{
+    tablenameLineEdit->setText(name);
+}
/trunk/sqlitebrowser/sqlitebrowser/edittableform.ui.h to /trunk/sqlitebrowser/sqlitebrowser/edittableform.cpp
--- a/trunk/sqlitebrowser/sqlitebrowser/edittableform.ui.h
+++ b/trunk/sqlitebrowser/sqlitebrowser/edittableform.cpp
@@ -1,11 +1,46 @@
-/****************************************************************************
-** ui.h extension file, included from the uic-generated form implementation.
-**
-** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
-** init() function in place of a constructor, and a destroy() function in
-** place of a destructor.
-*****************************************************************************/
+#include "edittableform.h"
+
+#include <qvariant.h>
+#include <qmessagebox.h>
+#include <qapplication.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "renametableform.h"
+#include "addfieldform.h"
+#include "editfieldform.h"
+/*
+ *  Constructs a editTableForm as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  true to construct a modal dialog.
+ */
+editTableForm::editTableForm(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl)
+    : QDialog(parent, name, modal, fl)
+{
+    setupUi(this);
+
+    init();
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+editTableForm::~editTableForm()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void editTableForm::languageChange()
+{
+    retranslateUi(this);
+}
+
 void editTableForm::init()
 {
     pdb = NULL;
@@ -23,12 +58,12 @@
 void editTableForm::populateFields()
 {
     if (!pdb) return;
-    
+
     //make sure we are not using cached information
     pdb->updateSchema();
-    
-    
-    
+
+
+
     fields= pdb->getTableFields(curTable);
     types= pdb->getTableTypes(curTable);
     fieldListView->clear();
@@ -36,11 +71,11 @@
     Q3ListViewItem * lasttbitem = 0;
     QStringList::Iterator tt = types.begin();
     for ( QStringList::Iterator ct = fields.begin(); ct != fields.end(); ++ct ) {
-	Q3ListViewItem * tbitem = new Q3ListViewItem( fieldListView, lasttbitem);
-	tbitem->setText( 0, *ct  );
-	tbitem->setText( 1, *tt );
-	lasttbitem = tbitem;
-	++tt;
+        Q3ListViewItem * tbitem = new Q3ListViewItem( fieldListView, lasttbitem);
+        tbitem->setText( 0, *ct  );
+        tbitem->setText( 1, *tt );
+        lasttbitem = tbitem;
+        ++tt;
     }
 }
 
@@ -57,89 +92,89 @@
        QString sql;
        //do the sql rename here
        //if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
-       
+
        sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
        Q3ListViewItemIterator it( fieldListView );
        Q3ListViewItem * item;
        while ( it.current() ) {
-	   item = it.current();
-	   sql.append(item->text(0));
-	   sql.append(" ");
-	   sql.append(item->text(1));
-	   if (item->nextSibling() != 0)
-	   {
-	       sql.append(", ");
-	    }
-	    ++it;
-	}
+           item = it.current();
+           sql.append(item->text(0));
+           sql.append(" ");
+           sql.append(item->text(1));
+           if (item->nextSibling() != 0)
+           {
+               sql.append(", ");
+            }
+            ++it;
+        }
        sql.append(");");
        if (!pdb->executeSQL(sql)) goto rollback;
-       
+
        sql = "INSERT INTO TEMP_TABLE SELECT ";
        it = Q3ListViewItemIterator( fieldListView );
        while ( it.current() ) {
-	   item = it.current();
-	   sql.append(item->text(0));
-	   if (item->nextSibling() != 0)
-	   {
-	       sql.append(", ");
-	    }
-	    ++it;
-	}
+           item = it.current();
+           sql.append(item->text(0));
+           if (item->nextSibling() != 0)
+           {
+               sql.append(", ");
+            }
+            ++it;
+        }
        sql.append(" FROM ");
        sql.append(curTable);
        sql.append(";");
        if (!pdb->executeSQL(sql)) goto rollback;
-       
+
        sql = "DROP TABLE ";
        sql.append(curTable);
        sql.append(";");
        if (!pdb->executeSQL(sql)) goto rollback;
-       
+
        sql = "CREATE TABLE ";
        sql.append(newName);
        sql.append(" (");
        it = Q3ListViewItemIterator( fieldListView );
        while ( it.current() ) {
-	   item = it.current();
-	   sql.append(item->text(0));
-	   sql.append(" ");
-	   sql.append(item->text(1));
-	   if (item->nextSibling() != 0)
-	   {
-	       sql.append(", ");
-	    }
-	    ++it;
-	}
+           item = it.current();
+           sql.append(item->text(0));
+           sql.append(" ");
+           sql.append(item->text(1));
+           if (item->nextSibling() != 0)
+           {
+               sql.append(", ");
+            }
+            ++it;
+        }
        sql.append(");");
        if (!pdb->executeSQL(sql)) goto rollback;
-       
+
        sql = "INSERT INTO ";
        sql.append(newName);
        sql.append(" SELECT ");
        it = Q3ListViewItemIterator( fieldListView );
        while ( it.current() ) {
-	   item = it.current();
-	   sql.append(item->text(0));
-	   if (item->nextSibling() != 0)
-	   {
-	       sql.append(", ");
-	    }
-	    ++it;
-	}
+           item = it.current();
+           sql.append(item->text(0));
+           if (item->nextSibling() != 0)
+           {
+               sql.append(", ");
+            }
+            ++it;
+        }
        sql.append(" FROM TEMP_TABLE;");
        if (!pdb->executeSQL(sql)) goto rollback;
 
        if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
        //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
-       
+
        setActiveTable(pdb, newName);
    }
-   
+
    //everything ok, just return
    QApplication::restoreOverrideCursor();  // restore original cursor
    return;
-   
+
    rollback:
        QApplication::restoreOverrideCursor();  // restore original cursor
        QString error = "Error renaming table. Message from database engine:  ";
@@ -155,110 +190,110 @@
 {
     Q3ListViewItem * item = fieldListView->selectedItem();
     if (item==0) {
-	//should never happen, the button would not be active, but...
-	return;
+        //should never happen, the button would not be active, but...
+        return;
     } else {
-	editFieldForm * fieldForm = new editFieldForm( this, "editfield", TRUE );
-	fieldForm->setInitialValues(item->text(0),item->text(1));
-	if (fieldForm->exec())
-	{
-	    modified = true;
-	    //do the sql rename here
-	    //qDebug(fieldForm->name + fieldForm->type);
-	    item->setText(0,fieldForm->name);
-	    item->setText(1,fieldForm->type);
-	    
-	    //not until nested transaction are supported
-	   //if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
-       
-	     QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
-	     Q3ListViewItemIterator it( fieldListView );
-	     Q3ListViewItem * item;
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 sql.append(" ");
-		 sql.append(item->text(1));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "INSERT INTO TEMP_TABLE SELECT ";
-	     for ( QStringList::Iterator ct = fields.begin(); ct != fields.end(); ++ct )		    {
-		 sql.append( *ct );
-		 if (*ct != fields.last())
-		 {
-		     sql.append(", ");
-		 }
-	     }
-		 
-	     sql.append(" FROM ");
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "DROP TABLE ";
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "CREATE TABLE ";
-	     sql.append(curTable);
-	     sql.append(" (");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 sql.append(" ");
-		 sql.append(item->text(1));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "INSERT INTO ";
-	     sql.append(curTable);
-	     sql.append(" SELECT ");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(" FROM TEMP_TABLE;");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
-	     //not until nested transaction are supported
-	     //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
-	     
-	     setActiveTable(pdb, curTable);
-	}
-	//everything ok, just return
-	QApplication::restoreOverrideCursor();  // restore original cursor
-	return;
-   
-	rollback:
-	    QApplication::restoreOverrideCursor();  // restore original cursor
-	    QString error = "Error editing field. Message from database engine:  ";
-	    error.append(pdb->lastErrorMessage);
-	    QMessageBox::warning( this, applicationName, error );
-	    //not until nested transaction are supported
-	    //pdb->executeSQL(QString("ROLLBACK;"));
-	    setActiveTable(pdb, curTable);
+        editFieldForm * fieldForm = new editFieldForm( this, "editfield", TRUE );
+        fieldForm->setInitialValues(item->text(0),item->text(1));
+        if (fieldForm->exec())
+        {
+            modified = true;
+            //do the sql rename here
+            //qDebug(fieldForm->name + fieldForm->type);
+            item->setText(0,fieldForm->name);
+            item->setText(1,fieldForm->type);
+
+            //not until nested transaction are supported
+           //if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
+
+             QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
+             Q3ListViewItemIterator it( fieldListView );
+             Q3ListViewItem * item;
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 sql.append(" ");
+                 sql.append(item->text(1));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "INSERT INTO TEMP_TABLE SELECT ";
+             for ( QStringList::Iterator ct = fields.begin(); ct != fields.end(); ++ct )		    {
+                 sql.append( *ct );
+                 if (*ct != fields.last())
+                 {
+                     sql.append(", ");
+                 }
+             }
+
+             sql.append(" FROM ");
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "DROP TABLE ";
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "CREATE TABLE ";
+             sql.append(curTable);
+             sql.append(" (");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 sql.append(" ");
+                 sql.append(item->text(1));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "INSERT INTO ";
+             sql.append(curTable);
+             sql.append(" SELECT ");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(" FROM TEMP_TABLE;");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
+             //not until nested transaction are supported
+             //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
+
+             setActiveTable(pdb, curTable);
+        }
+        //everything ok, just return
+        QApplication::restoreOverrideCursor();  // restore original cursor
+        return;
+
+        rollback:
+            QApplication::restoreOverrideCursor();  // restore original cursor
+            QString error = "Error editing field. Message from database engine:  ";
+            error.append(pdb->lastErrorMessage);
+            QMessageBox::warning( this, applicationName, error );
+            //not until nested transaction are supported
+            //pdb->executeSQL(QString("ROLLBACK;"));
+            setActiveTable(pdb, curTable);
     }
 }
 
@@ -269,116 +304,116 @@
    addForm->setInitialValues(QString(""),QString(""));
     if (addForm->exec())
    {
-	modified = true;
-
-	Q3ListViewItem * tbitem = new Q3ListViewItem( fieldListView);
-	tbitem->setText( 0, addForm->fname);
-	tbitem->setText( 1, addForm->ftype);
+        modified = true;
+
+        Q3ListViewItem * tbitem = new Q3ListViewItem( fieldListView);
+        tbitem->setText( 0, addForm->fname);
+        tbitem->setText( 1, addForm->ftype);
        //do the sql creation here
-	modified = true;
-	    //do the sql rename here
-	    //qDebug(fieldForm->name + fieldForm->type);
-	QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
-	Q3ListViewItemIterator it( fieldListView );
-	Q3ListViewItem * item;
-	
-	//not until nested transaction are supported
-	     //if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
-       
-	{//nest for MSVC support
-	     for ( QStringList::Iterator ct = fields.begin(); ct != fields.end(); ++ct )		    {
-		 sql.append( *ct );
-		 if (*ct != fields.last())
-		 {
-		     sql.append(", ");
-		 }
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "INSERT INTO TEMP_TABLE SELECT ";
-	     for ( QStringList::Iterator ct1 = fields.begin(); ct1 != fields.end(); ++ct1 )		    {
-		 sql.append( *ct1 );
-		 if (*ct1 != fields.last())
-		 {
-		     sql.append(", ");
-		 }
-	     }
-	}
-		 
-	     sql.append(" FROM ");
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "DROP TABLE ";
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "CREATE TABLE ";
-	     sql.append(curTable);
-	     sql.append(" (");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 sql.append(" ");
-		 sql.append(item->text(1));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	{//nest for MSVC support
-	     
-	     sql = "INSERT INTO ";
-	     sql.append(curTable);
-	     sql.append("(");
-	     for ( QStringList::Iterator ct2 = fields.begin(); ct2 != fields.end(); ++ct2 )		    {
-		 sql.append( *ct2 );
-		 if (*ct2 != fields.last())
-		 {
-		     sql.append(", ");
-		 }
-	     }
-	}
-	{//nest for MSVC support
-
-	     sql.append(") SELECT ");
-	     for ( QStringList::Iterator ct3 = fields.begin(); ct3 != fields.end(); ++ct3 )		    {
-		 sql.append( *ct3 );
-		 if (*ct3 != fields.last())
-		 {
-		     sql.append(", ");
-		 }
-	     }
-	}
-		 
-	     sql.append(" FROM TEMP_TABLE;");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
-	     //not until nested transaction are supported
-	     //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
-	     
-	     setActiveTable(pdb, curTable);
-	     
-	     QApplication::restoreOverrideCursor();  // restore original cursor
-	return;
-   
-	rollback:
-	    QApplication::restoreOverrideCursor();  // restore original cursor
-	    QString error = "Error adding field. Message from database engine:  ";
-	    error.append(pdb->lastErrorMessage);
-	    QMessageBox::warning( this, applicationName, error );
-	    
-	    //not until nested transaction are supported
-	    //pdb->executeSQL(QString("ROLLBACK;"));
-	    setActiveTable(pdb, curTable);
+        modified = true;
+            //do the sql rename here
+            //qDebug(fieldForm->name + fieldForm->type);
+        QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
+        Q3ListViewItemIterator it( fieldListView );
+        Q3ListViewItem * item;
+
+        //not until nested transaction are supported
+             //if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
+
+        {//nest for MSVC support
+             for ( QStringList::Iterator ct = fields.begin(); ct != fields.end(); ++ct )		    {
+                 sql.append( *ct );
+                 if (*ct != fields.last())
+                 {
+                     sql.append(", ");
+                 }
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "INSERT INTO TEMP_TABLE SELECT ";
+             for ( QStringList::Iterator ct1 = fields.begin(); ct1 != fields.end(); ++ct1 )		    {
+                 sql.append( *ct1 );
+                 if (*ct1 != fields.last())
+                 {
+                     sql.append(", ");
+                 }
+             }
+        }
+
+             sql.append(" FROM ");
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "DROP TABLE ";
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "CREATE TABLE ";
+             sql.append(curTable);
+             sql.append(" (");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 sql.append(" ");
+                 sql.append(item->text(1));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+        {//nest for MSVC support
+
+             sql = "INSERT INTO ";
+             sql.append(curTable);
+             sql.append("(");
+             for ( QStringList::Iterator ct2 = fields.begin(); ct2 != fields.end(); ++ct2 )		    {
+                 sql.append( *ct2 );
+                 if (*ct2 != fields.last())
+                 {
+                     sql.append(", ");
+                 }
+             }
+        }
+        {//nest for MSVC support
+
+             sql.append(") SELECT ");
+             for ( QStringList::Iterator ct3 = fields.begin(); ct3 != fields.end(); ++ct3 )		    {
+                 sql.append( *ct3 );
+                 if (*ct3 != fields.last())
+                 {
+                     sql.append(", ");
+                 }
+             }
+        }
+
+             sql.append(" FROM TEMP_TABLE;");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
+             //not until nested transaction are supported
+             //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
+
+             setActiveTable(pdb, curTable);
+
+             QApplication::restoreOverrideCursor();  // restore original cursor
+        return;
+
+        rollback:
+            QApplication::restoreOverrideCursor();  // restore original cursor
+            QString error = "Error adding field. Message from database engine:  ";
+            error.append(pdb->lastErrorMessage);
+            QMessageBox::warning( this, applicationName, error );
+
+            //not until nested transaction are supported
+            //pdb->executeSQL(QString("ROLLBACK;"));
+            setActiveTable(pdb, curTable);
    }
 }
 
@@ -387,131 +422,131 @@
 {
     Q3ListViewItem * remitem = fieldListView->selectedItem();
     if (remitem==0) {
-	//should never happen, the button would not be active, but...
-	return;
+        //should never happen, the button would not be active, but...
+        return;
     } else {
-	QString msg = "Are you sure you want to delete field ";
-	msg.append(remitem->text(0));
-	msg.append("? \n All data currently stored in this field will be lost");
-    
-	if (QMessageBox::warning( this, applicationName,
-				  msg,
-				  QMessageBox::Yes | QMessageBox::Default,
-				  QMessageBox::No | QMessageBox::Escape )
-	    == QMessageBox::Yes ){
-	    //delete field here
-	    /*fields= pdb->getTableFields(curTable);
+        QString msg = "Are you sure you want to delete field ";
+        msg.append(remitem->text(0));
+        msg.append("? \n All data currently stored in this field will be lost");
+
+        if (QMessageBox::warning( this, applicationName,
+                                  msg,
+                                  QMessageBox::Yes | QMessageBox::Default,
+                                  QMessageBox::No | QMessageBox::Escape )
+            == QMessageBox::Yes ){
+            //delete field here
+            /*fields= pdb->getTableFields(curTable);
     types= pdb->getTableTypes(curTable);*/
-	    modified = true;
-	    delete remitem;
-    	QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
-	Q3ListViewItemIterator it( fieldListView );
-	Q3ListViewItem * item;
-	
-	//not until nested transaction are supported
-	//     if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
-       
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 sql.append(" ");
-		 sql.append(item->text(1));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "INSERT INTO TEMP_TABLE SELECT ";
-	    it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-		 
-	     sql.append(" FROM ");
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "DROP TABLE ";
-	     sql.append(curTable);
-	     sql.append(";");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "CREATE TABLE ";
-	     sql.append(curTable);
-	     sql.append(" (");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 sql.append(" ");
-		 sql.append(item->text(1));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(");");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     sql = "INSERT INTO ";
-	     sql.append(curTable);
-	     sql.append("(");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(") SELECT ");
-	     it = Q3ListViewItemIterator( fieldListView );
-	     while ( it.current() ) {
-		 item = it.current();
-		 sql.append(item->text(0));
-		 if (item->nextSibling() != 0)
-		 {
-		     sql.append(", ");
-		 }
-		 ++it;
-	     }
-	     sql.append(" FROM TEMP_TABLE;");
-	     if (!pdb->executeSQL(sql)) goto rollback;
-	     
-	     if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
-	     //not until nested transaction are supported
-	     //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
-	     
-	     setActiveTable(pdb, curTable);
-	     
-	     QApplication::restoreOverrideCursor();  // restore original cursor
-	return;
-   
-	rollback:
-	    QApplication::restoreOverrideCursor();  // restore original cursor
-	    QString error = "Error removing field. Message from database engine:  ";
-	    error.append(pdb->lastErrorMessage);
-	    QMessageBox::warning( this, applicationName, error );
-	    
-	    //not until nested transaction are supported
-	    //pdb->executeSQL(QString("ROLLBACK;"));
-	    setActiveTable(pdb, curTable);
-	}
+            modified = true;
+            delete remitem;
+        QString sql = "CREATE TEMPORARY TABLE TEMP_TABLE(";
+        Q3ListViewItemIterator it( fieldListView );
+        Q3ListViewItem * item;
+
+        //not until nested transaction are supported
+        //     if (!pdb->executeSQL(QString("BEGIN TRANSACTION;"))) goto rollback;
+
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 sql.append(" ");
+                 sql.append(item->text(1));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "INSERT INTO TEMP_TABLE SELECT ";
+            it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+
+             sql.append(" FROM ");
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "DROP TABLE ";
+             sql.append(curTable);
+             sql.append(";");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "CREATE TABLE ";
+             sql.append(curTable);
+             sql.append(" (");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 sql.append(" ");
+                 sql.append(item->text(1));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(");");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             sql = "INSERT INTO ";
+             sql.append(curTable);
+             sql.append("(");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(") SELECT ");
+             it = Q3ListViewItemIterator( fieldListView );
+             while ( it.current() ) {
+                 item = it.current();
+                 sql.append(item->text(0));
+                 if (item->nextSibling() != 0)
+                 {
+                     sql.append(", ");
+                 }
+                 ++it;
+             }
+             sql.append(" FROM TEMP_TABLE;");
+             if (!pdb->executeSQL(sql)) goto rollback;
+
+             if (!pdb->executeSQL(QString("DROP TABLE TEMP_TABLE;"))) goto rollback;
+             //not until nested transaction are supported
+             //if (!pdb->executeSQL(QString("COMMIT;"))) goto rollback;
+
+             setActiveTable(pdb, curTable);
+
+             QApplication::restoreOverrideCursor();  // restore original cursor
+        return;
+
+        rollback:
+            QApplication::restoreOverrideCursor();  // restore original cursor
+            QString error = "Error removing field. Message from database engine:  ";
+            error.append(pdb->lastErrorMessage);
+            QMessageBox::warning( this, applicationName, error );
+
+            //not until nested transaction are supported
+            //pdb->executeSQL(QString("ROLLBACK;"));
+            setActiveTable(pdb, curTable);
+        }
     }
 }
 
@@ -519,11 +554,11 @@
 {
     Q3ListViewItem * item = fieldListView->selectedItem();
     if (item==0) {
-	renameFieldButton->setEnabled(false);
-	removeFieldButton->setEnabled(false);
+        renameFieldButton->setEnabled(false);
+        removeFieldButton->setEnabled(false);
     } else {
-	renameFieldButton->setEnabled(true);
-	removeFieldButton->setEnabled(true);
+        renameFieldButton->setEnabled(true);
+        removeFieldButton->setEnabled(true);
     }
 }
 
1 2 3 > >> (Page 1 of 3)