mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
No commits in common. "748d18ce9a9bc257a35be075c3a510880f842507" and "61641209699b62bf2018dde15760d8e04bbb4476" have entirely different histories.
748d18ce9a
...
6164120969
|
@ -459,7 +459,7 @@ void DialogSaveManualLayout::PathChanged(const QString &text)
|
|||
if (not text.isEmpty() && dir.exists(text))
|
||||
{
|
||||
bOk->setEnabled(true);
|
||||
palette.setColor(ui->lineEditPath->foregroundRole(), palette.color(QPalette::Text));
|
||||
palette.setColor(ui->lineEditPath->foregroundRole(), Qt::black);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1794,7 +1794,6 @@ auto VPMainWindow::MaybeSave() -> bool
|
|||
}
|
||||
|
||||
messageBox->setWindowModality(Qt::ApplicationModal);
|
||||
messageBox->setFixedSize(300, 85);
|
||||
const auto ret = static_cast<QMessageBox::StandardButton>(messageBox->exec());
|
||||
|
||||
switch (ret)
|
||||
|
|
|
@ -829,10 +829,10 @@ void MApplication::RepopulateMeasurementsDatabase(const QString &path)
|
|||
Q_UNUSED(path)
|
||||
if (m_knownMeasurementsDatabase != nullptr)
|
||||
{
|
||||
QObject::connect(m_knownMeasurementsRepopulateWatcher, &QFutureWatcher<void>::finished, this,
|
||||
&MApplication::SyncKnownMeasurements);
|
||||
m_knownMeasurementsRepopulateWatcher->setFuture(
|
||||
QtConcurrent::run([this]() { m_knownMeasurementsDatabase->PopulateMeasurementsDatabase(); }));
|
||||
QObject::connect(m_knownMeasurementsRepopulateWatcher, &QFutureWatcher<void>::finished, this,
|
||||
&MApplication::SyncKnownMeasurements);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1942,7 +1942,6 @@ auto TKMMainWindow::MaybeSave() -> bool
|
|||
}
|
||||
|
||||
messageBox->setWindowModality(Qt::ApplicationModal);
|
||||
messageBox->setFixedSize(300, 85);
|
||||
const auto ret = static_cast<QMessageBox::StandardButton>(messageBox->exec());
|
||||
|
||||
switch (ret)
|
||||
|
|
|
@ -3474,7 +3474,6 @@ auto TMainWindow::MaybeSave() -> bool
|
|||
}
|
||||
|
||||
messageBox->setWindowModality(Qt::ApplicationModal);
|
||||
messageBox->setFixedSize(300, 85);
|
||||
const auto ret = static_cast<QMessageBox::StandardButton>(messageBox->exec());
|
||||
|
||||
switch (ret)
|
||||
|
|
|
@ -332,13 +332,11 @@ void DialogPatternProperties::ValidatePassmarkLength() const
|
|||
QRegularExpression rx(NameRegExp());
|
||||
if (not text.isEmpty())
|
||||
{
|
||||
palette.setColor(foregroundRole, rx.match(text).hasMatch() && m_variables.contains(text)
|
||||
? palette.color(QPalette::Text)
|
||||
: Qt::red);
|
||||
palette.setColor(foregroundRole, rx.match(text).hasMatch() && m_variables.contains(text) ? Qt::black : Qt::red);
|
||||
}
|
||||
else
|
||||
{
|
||||
palette.setColor(foregroundRole, palette.color(QPalette::Text));
|
||||
palette.setColor(foregroundRole, Qt::black);
|
||||
}
|
||||
|
||||
ui->lineEditPassmarkLength->setPalette(palette);
|
||||
|
@ -354,13 +352,11 @@ void DialogPatternProperties::ValidatePassmarkWidth() const
|
|||
QRegularExpression rx(NameRegExp());
|
||||
if (not text.isEmpty())
|
||||
{
|
||||
palette.setColor(foregroundRole, rx.match(text).hasMatch() && m_variables.contains(text)
|
||||
? palette.color(QPalette::Text)
|
||||
: Qt::red);
|
||||
palette.setColor(foregroundRole, rx.match(text).hasMatch() && m_variables.contains(text) ? Qt::black : Qt::red);
|
||||
}
|
||||
else
|
||||
{
|
||||
palette.setColor(foregroundRole, palette.color(QPalette::Text));
|
||||
palette.setColor(foregroundRole, Qt::black);
|
||||
}
|
||||
|
||||
ui->lineEditPassmarkWidth->setPalette(palette);
|
||||
|
@ -559,7 +555,7 @@ void DialogPatternProperties::LabelPathChanged(const QString &text)
|
|||
{
|
||||
QPalette palette = ui->lineEditPieceLabelPath->palette();
|
||||
palette.setColor(ui->lineEditPieceLabelPath->foregroundRole(),
|
||||
text.isEmpty() || QFileInfo::exists(text) ? palette.color(QPalette::Text) : Qt::red);
|
||||
text.isEmpty() || QFileInfo::exists(text) ? Qt::black : Qt::red);
|
||||
ui->lineEditPieceLabelPath->setPalette(palette);
|
||||
m_descriptionChanged = true;
|
||||
}
|
||||
|
|
|
@ -410,7 +410,7 @@ void DialogSaveLayout::PathChanged(const QString &text)
|
|||
if (not text.isEmpty() && dir.exists(text))
|
||||
{
|
||||
bOk->setEnabled(true);
|
||||
palette.setColor(ui->lineEditPath->foregroundRole(), palette.color(QPalette::Text));
|
||||
palette.setColor(ui->lineEditPath->foregroundRole(), Qt::black);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -5756,7 +5756,6 @@ auto MainWindow::MaybeSave() -> bool
|
|||
}
|
||||
|
||||
messageBox->setWindowModality(Qt::ApplicationModal);
|
||||
messageBox->setFixedSize(300, 85);
|
||||
const auto ret = static_cast<QMessageBox::StandardButton>(messageBox->exec());
|
||||
|
||||
switch (ret)
|
||||
|
|
|
@ -284,10 +284,10 @@ auto MainWindowsNoGUI::GenerateLayout(VLayoutGenerator &lGenerator) -> bool
|
|||
{
|
||||
QEventLoop wait;
|
||||
QFutureWatcher<void> fw;
|
||||
QObject::connect(&fw, &QFutureWatcher<void>::finished, &wait, &QEventLoop::quit);
|
||||
fw.setFuture(
|
||||
QtConcurrent::run([&lGenerator, timer, nestingState]()
|
||||
{ lGenerator.Generate(timer, lGenerator.GetNestingTimeMSecs(), nestingState); }));
|
||||
QObject::connect(&fw, &QFutureWatcher<void>::finished, &wait, &QEventLoop::quit);
|
||||
wait.exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -502,7 +502,6 @@ auto WatermarkWindow::MaybeSave() -> bool
|
|||
}
|
||||
|
||||
messageBox->setWindowModality(Qt::ApplicationModal);
|
||||
messageBox->setFixedSize(300, 85);
|
||||
const auto ret = static_cast<QMessageBox::StandardButton>(messageBox->exec());
|
||||
|
||||
switch (ret)
|
||||
|
|
|
@ -235,10 +235,10 @@ auto VPosition::ArrangeDetail(const VPositionData &data, std::atomic_bool *stop,
|
|||
return position.getBestResult();
|
||||
};
|
||||
|
||||
watcher.setFuture(QtConcurrent::mapped(jobs, Nest));
|
||||
|
||||
QEventLoop wait;
|
||||
QObject::connect(&watcher, &QFutureWatcher<VBestSquare>::finished, &wait, &QEventLoop::quit);
|
||||
|
||||
watcher.setFuture(QtConcurrent::mapped(jobs, Nest));
|
||||
wait.exec();
|
||||
|
||||
if (stop->load())
|
||||
|
|
Loading…
Reference in a new issue