Skip to content

Commit

Permalink
#3398 Fixed 'export data' checkbox in export dialog to not ignore it …
Browse files Browse the repository at this point in the history
…anymore.
  • Loading branch information
pawelsalawa committed Jul 26, 2018
1 parent cccb767 commit 6f36178
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
5 changes: 5 additions & 0 deletions SQLiteStudio3/coreSQLiteStudio/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[3.2.1]
* [BUGFIX]: #3399 Fixed start under Linux using the pre-compiled binary distributions (it used to fail due to missing xcb dependency).
* [BUGFIX]: #3398 Fixed 'export data' checkbox in export dialog to not ignore it anymore.
* [BUGFIX]: Binary packages now include the MultiEditorImage plugin, which introduces the picture preview for BLOB values. It was introduced in 3.2.0, but missing in binary distributions.

[3.2.0]
* [NEW]: #3188 New plugin to have images stored in database being visible as another tab in the Form View or cell's editor dialog window.
* [NEW]: #3207 #1444 #2547 Export, Import & Populate dialog settings are remembered, even after application restart.
Expand Down
2 changes: 1 addition & 1 deletion SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

DEFINE_SINGLETON(SQLiteStudio)

static const int sqlitestudioVersion = 30200;
static const int sqlitestudioVersion = 30201;

SQLiteStudio::SQLiteStudio()
{
Expand Down
31 changes: 20 additions & 11 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ void ExportDialog::formatPageDisplayed()

formatPageVisited = true;
}
readStdConfig();
readStdConfigForLastPage();
pluginSelected();

emit formatPageCompleteChanged();
Expand Down Expand Up @@ -574,6 +574,12 @@ void ExportDialog::accept()
doExport();
}

int ExportDialog::exec()
{
readStdConfigForFirstPage();
return QDialog::exec();
}

void ExportDialog::updatePluginOptions(ExportPlugin* plugin, int& optionsRow)
{
safe_delete(pluginOptionsWidget);
Expand Down Expand Up @@ -628,7 +634,19 @@ void ExportDialog::storeStdConfig(const ExportManager::StandardExportConfig &std
CFG->commit();
}

void ExportDialog::readStdConfig()
void ExportDialog::readStdConfigForFirstPage()
{
bool exportData = CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_DATA, true).toBool();
if (exportMode == ExportManager::DATABASE)
ui->exportDbDataCheck->setChecked(exportData);
else if (exportMode == ExportManager::TABLE)
ui->exportTableDataCheck->setChecked(exportData);

ui->exportTableIndexesCheck->setChecked(CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_IDX, true).toBool());
ui->exportTableTriggersCheck->setChecked(CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_TRIG, true).toBool());
}

void ExportDialog::readStdConfigForLastPage()
{
QString format = CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_FORMAT).toString();
int idx = ui->formatCombo->findText(format);
Expand All @@ -640,15 +658,6 @@ void ExportDialog::readStdConfig()
ui->exportClipboardRadio->setChecked(useClipboard);
ui->exportFileEdit->setText(CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_FILE, QString()).toString());

bool exportData = CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_DATA, true).toBool();
if (exportMode == ExportManager::DATABASE)
ui->exportDbDataCheck->setChecked(exportData);
else if (exportMode == ExportManager::TABLE)
ui->exportTableDataCheck->setChecked(exportData);

ui->exportTableIndexesCheck->setChecked(CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_IDX, true).toBool());
ui->exportTableTriggersCheck->setChecked(CFG->get(EXPORT_DIALOG_CFG_GROUP, EXPORT_DIALOG_CFG_TRIG, true).toBool());

// Codec is read within updateExportOutputOptions()
}

Expand Down
4 changes: 3 additions & 1 deletion SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class GUI_API_EXPORT ExportDialog : public QWizard
ExportPlugin* getSelectedPlugin() const;
void updatePluginOptions(ExportPlugin* plugin, int& optionsRow);
void storeStdConfig(const ExportManager::StandardExportConfig& stdConfig);
void readStdConfig();
void readStdConfigForFirstPage();
void readStdConfigForLastPage();
void doExport();
void exportDatabase(const ExportManager::StandardExportConfig& stdConfig, const QString& format);
void exportTable(const ExportManager::StandardExportConfig& stdConfig, const QString& format);
Expand Down Expand Up @@ -98,6 +99,7 @@ class GUI_API_EXPORT ExportDialog : public QWizard

public slots:
void accept();
int exec();

signals:
void formatPageCompleteChanged();
Expand Down

0 comments on commit 6f36178

Please sign in to comment.