Commit 8d8887b5 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

url effect parameter : react on drop

parent 75ebcee9
Pipeline #9822 passed with stage
in 17 minutes and 3 seconds
...@@ -49,8 +49,12 @@ UrlParamWidget::UrlParamWidget(std::shared_ptr<AssetParameterModel> model, QMode ...@@ -49,8 +49,12 @@ UrlParamWidget::UrlParamWidget(std::shared_ptr<AssetParameterModel> model, QMode
slotRefresh(); slotRefresh();
// emit the signal of the base class when appropriate // emit the signal of the base class when appropriate
connect(this->urlwidget, &KUrlRequester::urlSelected, [this](QUrl url) { emit valueChanged(m_index, url.toLocalFile(), true); }); connect(this->urlwidget, &KUrlRequester::textChanged, [this]() {
connect(this->urlwidget, QOverload<>::of(&KUrlRequester::returnPressed), [this]() { emit valueChanged(m_index, this->urlwidget->url().toLocalFile(), true); }); QFileInfo info(urlwidget->url().toLocalFile());
if (info.exists() && info.isFile()) {
emit valueChanged(m_index, this->urlwidget->url().toLocalFile(), true);
}
});
} }
void UrlParamWidget::slotShowComment(bool show) void UrlParamWidget::slotShowComment(bool show)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment