Rewrite the Import CSV Dialog using Qt Creator

Rewrite the dialog to import CSV files using a Qt Creator form file.

Simplify the CSV import a little bit.

A bit unrelated, but needed for this anyway:
Create the restorepoint right after opening a database file instead of
just doing so after the first change.
This commit is contained in:
Martin Kleusberg
2013-01-18 14:45:22 +01:00
parent ef197e29e3
commit 8115727e75
8 changed files with 469 additions and 481 deletions

View File

@@ -15,7 +15,7 @@
#include "AboutDialog.h"
#include "EditTableDialog.h"
#include "EditFieldDialog.h"
#include "ImportCSVForm.h"
#include "ImportCsvDialog.h"
#include "ExportCsvDialog.h"
#include "PreferencesDialog.h"
#include "EditDialog.h"
@@ -827,8 +827,7 @@ void MainWindow::importTableFromCSV()
if (QFile::exists(wFile) )
{
importCSVForm dialog(this);
dialog.initialize(wFile, &db);
ImportCsvDialog dialog(wFile, &db, this);
if(dialog.exec())
{
populateStructure();