Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
[string freeze exception] Recover "Clean Up" button in the Recordings Manager
Dmitry Kazakove1deda8a9d10
diff --git a/plugins/dockers/recorder/recorder_snapshots_manager.cpp b/plugins/dockers/recorder/recorder_snapshots_manager.cppindex 382cf40471..f538735f53 100644--- a/plugins/dockers/recorder/recorder_snapshots_manager.cpp+++ b/plugins/dockers/recorder/recorder_snapshots_manager.cpp@@ -98,13 +98,15 @@ RecorderSnapshotsManager::RecorderSnapshotsManager(QWidget *parent), cleaner(nullptr){ui->setupUi(this);+ cleanUpButton = new QPushButton(i18n("Clean Up"), ui->buttonBox);+ ui->buttonBox->addButton(cleanUpButton, QDialogButtonBox::ActionRole);ui->stackedWidget->setCurrentIndex(PageProgress);connect(scanner, SIGNAL(scanningFinished(SnapshotDirInfoList)),this, SLOT(onScanningFinished(SnapshotDirInfoList)));connect(ui->buttonSelectAll, SIGNAL(clicked()), this, SLOT(onButtonSelectAllClicked()));- connect(ui->buttonBox->button(QDialogButtonBox::Discard), SIGNAL(clicked()), this, SLOT(onButtonCleanUpClicked()));+ connect(cleanUpButton, SIGNAL(clicked()), this, SLOT(onButtonCleanUpClicked()));connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);}@@ -172,7 +174,7 @@ void RecorderSnapshotsManager::onScanningFinished(SnapshotDirInfoList snapshots)if (oldSelectionModel != nullptr)oldSelectionModel->deleteLater();- ui->buttonBox->button(QDialogButtonBox::Discard)->setEnabled(false);+ cleanUpButton->setEnabled(false);ui->stackedWidget->setCurrentIndex(PageSelection);for(int col = 0; col < (ColumnCount - 1); ++col) {@@ -193,7 +195,7 @@ void RecorderSnapshotsManager::onSelectionChanged(const QItemSelection &selectedfor (const QModelIndex &index : deselected.indexes())model->setData(index.sibling(index.row(), ColumnCheck), Qt::Unchecked, Qt::CheckStateRole);- ui->buttonBox->button(QDialogButtonBox::Discard)->setEnabled(!ui->treeDirectories->selectionModel()->selectedIndexes().isEmpty());+ cleanUpButton->setEnabled(!ui->treeDirectories->selectionModel()->selectedIndexes().isEmpty());updateSpaceToBeFreed();}diff --git a/plugins/dockers/recorder/recorder_snapshots_manager.h b/plugins/dockers/recorder/recorder_snapshots_manager.hindex 0a8c8e0d85..14333adbf3 100644--- a/plugins/dockers/recorder/recorder_snapshots_manager.h+++ b/plugins/dockers/recorder/recorder_snapshots_manager.h@@ -50,6 +50,7 @@ private:Ui::RecorderSnapshotsManager *ui;RecorderSnapshotsScanner *scanner;RecorderDirectoryCleaner* cleaner;+ QPushButton* cleanUpButton;};#endif // WIDGET_Hdiff --git a/plugins/dockers/recorder/recorder_snapshots_manager.ui b/plugins/dockers/recorder/recorder_snapshots_manager.uiindex ed399830ae..1c6d9d5386 100644--- a/plugins/dockers/recorder/recorder_snapshots_manager.ui+++ b/plugins/dockers/recorder/recorder_snapshots_manager.ui@@ -276,7 +276,7 @@<item><widget class="QDialogButtonBox" name="buttonBox"><property name="standardButtons">- <set>QDialogButtonBox::Close|QDialogButtonBox::Discard</set>+ <set>QDialogButtonBox::Close</set></property></widget></item>