mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-01-04 08:07:00 +00:00
fixed segfault
This commit is contained in:
@@ -205,6 +205,13 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
|
|||||||
|
|
||||||
// Init color picker
|
// Init color picker
|
||||||
m_colorPicker = new ColorPicker(this);
|
m_colorPicker = new ColorPicker(this);
|
||||||
|
// Init notification widget
|
||||||
|
m_notifierBox = new NotifierBox(this);
|
||||||
|
initPanel();
|
||||||
|
|
||||||
|
// TODO: Make it more clear why this has moved. In Qt6 some timing related to
|
||||||
|
// constructors / connect signals has changed so if initPanel is called
|
||||||
|
// after the connect a SEGFAULT occurs
|
||||||
connect(m_colorPicker,
|
connect(m_colorPicker,
|
||||||
&ColorPicker::colorSelected,
|
&ColorPicker::colorSelected,
|
||||||
this,
|
this,
|
||||||
@@ -220,8 +227,7 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
|
|||||||
this,
|
this,
|
||||||
&CaptureWidget::onToolSizeChanged);
|
&CaptureWidget::onToolSizeChanged);
|
||||||
|
|
||||||
// Init notification widget
|
|
||||||
m_notifierBox = new NotifierBox(this);
|
|
||||||
m_notifierBox->hide();
|
m_notifierBox->hide();
|
||||||
connect(m_notifierBox, &NotifierBox::hidden, this, [this]() {
|
connect(m_notifierBox, &NotifierBox::hidden, this, [this]() {
|
||||||
// Show cursor if it was hidden while adjusting tool size
|
// Show cursor if it was hidden while adjusting tool size
|
||||||
@@ -231,7 +237,8 @@ CaptureWidget::CaptureWidget(const CaptureRequest& req,
|
|||||||
onToolSizeSettled(m_context.toolSize);
|
onToolSizeSettled(m_context.toolSize);
|
||||||
});
|
});
|
||||||
|
|
||||||
initPanel();
|
|
||||||
|
|
||||||
|
|
||||||
m_config.checkAndHandleError();
|
m_config.checkAndHandleError();
|
||||||
if (m_config.hasError()) {
|
if (m_config.hasError()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user