|
|
@ -32,7 +32,6 @@ |
|
|
|
#include <limits> |
|
|
|
#include <limits> |
|
|
|
|
|
|
|
|
|
|
|
#include <QApplication> |
|
|
|
#include <QApplication> |
|
|
|
#include <QCloseEvent> |
|
|
|
|
|
|
|
#include <QDebug> |
|
|
|
#include <QDebug> |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QDesktopServices> |
|
|
|
#include <QDialogButtonBox> |
|
|
|
#include <QDialogButtonBox> |
|
|
@ -185,8 +184,6 @@ OptionsDialog::OptionsDialog(QWidget *parent) |
|
|
|
{ |
|
|
|
{ |
|
|
|
qDebug("-> Constructing Options"); |
|
|
|
qDebug("-> Constructing Options"); |
|
|
|
m_ui->setupUi(this); |
|
|
|
m_ui->setupUi(this); |
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
|
|
|
|
setModal(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (defined(Q_OS_UNIX)) |
|
|
|
#if (defined(Q_OS_UNIX)) |
|
|
|
setWindowTitle(tr("Preferences")); |
|
|
|
setWindowTitle(tr("Preferences")); |
|
|
@ -576,7 +573,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) |
|
|
|
m_ui->tabSelection->setCurrentRow(m_storeLastViewedPage); |
|
|
|
m_ui->tabSelection->setCurrentRow(m_storeLastViewedPage); |
|
|
|
|
|
|
|
|
|
|
|
resize(m_storeDialogSize); |
|
|
|
resize(m_storeDialogSize); |
|
|
|
show(); |
|
|
|
|
|
|
|
// Have to be called after show(), because splitter width needed
|
|
|
|
// Have to be called after show(), because splitter width needed
|
|
|
|
loadSplitterState(); |
|
|
|
loadSplitterState(); |
|
|
|
} |
|
|
|
} |
|
|
@ -1477,15 +1474,8 @@ void OptionsDialog::applySettings() |
|
|
|
saveOptions(); |
|
|
|
saveOptions(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void OptionsDialog::closeEvent(QCloseEvent *e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
|
|
|
|
e->accept(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OptionsDialog::on_buttonBox_rejected() |
|
|
|
void OptionsDialog::on_buttonBox_rejected() |
|
|
|
{ |
|
|
|
{ |
|
|
|
setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
|
|
|
|
reject(); |
|
|
|
reject(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1667,7 +1657,6 @@ void OptionsDialog::on_addWatchedFolderButton_clicked() |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
auto dialog = new WatchedFolderOptionsDialog({}, this); |
|
|
|
auto dialog = new WatchedFolderOptionsDialog({}, this); |
|
|
|
dialog->setModal(true); |
|
|
|
|
|
|
|
dialog->setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
dialog->setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
connect(dialog, &QDialog::accepted, this, [this, dialog, dir, pref]() |
|
|
|
connect(dialog, &QDialog::accepted, this, [this, dialog, dir, pref]() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1723,7 +1712,6 @@ void OptionsDialog::editWatchedFolderOptions(const QModelIndex &index) |
|
|
|
|
|
|
|
|
|
|
|
auto watchedFoldersModel = static_cast<WatchedFoldersModel *>(m_ui->scanFoldersView->model()); |
|
|
|
auto watchedFoldersModel = static_cast<WatchedFoldersModel *>(m_ui->scanFoldersView->model()); |
|
|
|
auto dialog = new WatchedFolderOptionsDialog(watchedFoldersModel->folderOptions(index.row()), this); |
|
|
|
auto dialog = new WatchedFolderOptionsDialog(watchedFoldersModel->folderOptions(index.row()), this); |
|
|
|
dialog->setModal(true); |
|
|
|
|
|
|
|
dialog->setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
dialog->setAttribute(Qt::WA_DeleteOnClose); |
|
|
|
connect(dialog, &QDialog::accepted, this, [this, dialog, index, watchedFoldersModel]() |
|
|
|
connect(dialog, &QDialog::accepted, this, [this, dialog, index, watchedFoldersModel]() |
|
|
|
{ |
|
|
|
{ |
|
|
|