upgrade to qt 6 compliance
This commit is contained in:
@@ -44,10 +44,10 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent) :
|
||||
QFontMetrics fm = fontMetrics();
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
layout->setMargin(fm.height());
|
||||
layout->setContentsMargins(fm.height(), fm.height(), fm.height(), fm.height());
|
||||
|
||||
QHBoxLayout *horiz_layout = new QHBoxLayout();
|
||||
horiz_layout->setMargin(fm.height());
|
||||
horiz_layout->setContentsMargins(fm.height(), fm.height(), fm.height(), fm.height());
|
||||
horiz_layout->setSpacing(fm.height()*2);
|
||||
|
||||
QLabel* icon = new QLabel(QStringLiteral("<html><img src=':/graphics/olive-splash.png'></html>"));
|
||||
@@ -108,7 +108,7 @@ AboutDialog::AboutDialog(bool welcome_dialog, QWidget *parent) :
|
||||
layout->addWidget(new QLabel());
|
||||
|
||||
QHBoxLayout *btn_layout = new QHBoxLayout();
|
||||
btn_layout->setMargin(0);
|
||||
btn_layout->setContentsMargins(0, 0, 0, 0);
|
||||
btn_layout->setSpacing(0);
|
||||
|
||||
if (welcome_dialog) {
|
||||
|
||||
@@ -30,7 +30,7 @@ CineformSection::CineformSection(QWidget *parent) :
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ H264Section::H264Section(int default_crf, QWidget *parent) :
|
||||
CodecSection(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
layout->addWidget(new QLabel(tr("Encode Speed:")), row, 0);
|
||||
@@ -173,7 +173,7 @@ H264CRFSection::H264CRFSection(int default_crf, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
crf_slider_ = new QSlider(Qt::Horizontal);
|
||||
crf_slider_->setMinimum(kMinimumCRF);
|
||||
@@ -207,7 +207,7 @@ H264BitRateSection::H264BitRateSection(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
@@ -261,7 +261,7 @@ H264FileSizeSection::H264FileSizeSection(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ ImageSection::ImageSection(QWidget* parent) :
|
||||
CodecSection(parent)
|
||||
{
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
|
||||
preferences_area_ = new QWidget();
|
||||
QGridLayout* preferences_layout = new QGridLayout(preferences_area_);
|
||||
preferences_layout->setMargin(0);
|
||||
preferences_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
@@ -183,7 +183,7 @@ ExportDialog::ExportDialog(ViewerOutput *viewer_node, bool stills_only_mode, QWi
|
||||
row++;
|
||||
|
||||
QHBoxLayout *btn_layout = new QHBoxLayout();
|
||||
btn_layout->setMargin(0);
|
||||
btn_layout->setContentsMargins(0, 0, 0, 0);
|
||||
preferences_layout->addLayout(btn_layout, row, 0, 1, 4);
|
||||
|
||||
btn_layout->addStretch();
|
||||
@@ -437,7 +437,7 @@ void ExportDialog::PresetComboBoxChanged()
|
||||
if (loading_presets_) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
QComboBox *c = static_cast<QComboBox *>(sender());
|
||||
|
||||
int preset_number = c->currentData().toInt();
|
||||
|
||||
@@ -38,7 +38,7 @@ VideoStreamProperties::VideoStreamProperties(Footage *footage, int video_index)
|
||||
video_premultiply_alpha_(nullptr)
|
||||
{
|
||||
QGridLayout* video_layout = new QGridLayout(this);
|
||||
video_layout->setMargin(0);
|
||||
video_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ PreferencesAudioTab::PreferencesAudioTab()
|
||||
{
|
||||
// Backend Layout
|
||||
QGridLayout* main_layout = new QGridLayout();
|
||||
main_layout->setMargin(0);
|
||||
main_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
int row = 0;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ ProgressDialog::ProgressDialog(const QString& message, const QString& title, QWi
|
||||
|
||||
QHBoxLayout* cancel_layout = new QHBoxLayout();
|
||||
layout->addLayout(cancel_layout);
|
||||
cancel_layout->setMargin(0);
|
||||
cancel_layout->setContentsMargins(0, 0, 0, 0);
|
||||
cancel_layout->setSpacing(0);
|
||||
cancel_layout->addStretch();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ SequenceDialogPresetTab::SequenceDialogPresetTab(QWidget* parent) :
|
||||
PresetManager<SequencePreset>(this, QStringLiteral("sequencepresets"))
|
||||
{
|
||||
QVBoxLayout* outer_layout = new QVBoxLayout(this);
|
||||
outer_layout->setMargin(0);
|
||||
outer_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
preset_tree_ = new QTreeWidget();
|
||||
preset_tree_->setColumnCount(1);
|
||||
|
||||
@@ -56,7 +56,7 @@ void TaskDialog::showEvent(QShowEvent *e)
|
||||
this, &TaskDialog::TaskFinished, Qt::QueuedConnection);
|
||||
|
||||
// Run task in another thread with QtConcurrent
|
||||
task_watcher->setFuture(QtConcurrent::run(task_, &Task::Start));
|
||||
task_watcher->setFuture(QtConcurrent::run(&Task::Start, task_));
|
||||
|
||||
already_shown_ = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user