Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crashed on palette destroyed #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented Aug 21, 2024

do not set value if control's window is null
Issue: linuxdeepin/dtk#193

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kegechen

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 21, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Aug 21, 2024

TAG Bot

New tag: 5.6.34
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #382

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Aug 21, 2024

Doc Check bot
🟢 Document Coverage Check Passed!

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 22, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 22, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 22, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@kegechen kegechen requested a review from zccrs August 22, 2024 03:13
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 26, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
src/private/dquickcontrolpalette.cpp Outdated Show resolved Hide resolved
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 27, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Aug 27, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@@ -937,7 +938,7 @@ void DQuickControlColorSelector::notifyColorPropertyChanged()

void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette)
{
if (QCoreApplication::closingDown())
if (QCoreApplication::closingDown() || DQMLGlobalObjectPrivate::g_appAboutToQuit)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

closingDown 太晚了,,aboutToQuit 时就应该停止了

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 QCoreApplicationPrivate::aboutToQuitEmitted 做判断行不行?

Copy link
Contributor Author

@kegechen kegechen Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 QCoreApplicationPrivate::aboutToQuitEmitted 做判断行不行?

可以,不过需要用 #define protected public 黑魔法

@kegechen kegechen requested a review from zccrs August 27, 2024 09:48
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Sep 9, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • DQMLGlobalObjectPrivate构造函数中,使用lambda表达式连接qAppaboutToQuit信号到全局变量g_appAboutToQuit,但没有处理可能出现的槽函数未连接的错误情况。
  • DQuickControlColorSelector::updatePropertyFromName函数中,增加了对DQMLGlobalObjectPrivate::g_appAboutToQuit的检查,但没有更新注释来反映这一变化。

是否建议立即修改:

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Sep 23, 2024

TAG Bot

New tag: 5.0.35
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #400

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Oct 16, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@@ -937,7 +938,7 @@ void DQuickControlColorSelector::notifyColorPropertyChanged()

void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette)
{
if (QCoreApplication::closingDown())
if (QCoreApplication::closingDown() || DQMLGlobalObjectPrivate::g_appAboutToQuit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 QCoreApplicationPrivate::aboutToQuitEmitted 做判断行不行?

deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Oct 22, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
do not set value if app is about to quit
Issue: linuxdeepin/dtk#193
deepin-ci-robot added a commit to linuxdeepin/dtk6declarative that referenced this pull request Oct 22, 2024
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
@kegechen kegechen requested a review from zccrs October 22, 2024 03:04
@@ -937,7 +941,9 @@ void DQuickControlColorSelector::notifyColorPropertyChanged()

void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette)
{
if (QCoreApplication::closingDown())
auto appriv = static_cast<QCoreApplicationPrivate*>(qApp->QCoreApplication::d_ptr.data());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto prv = dynamic_cast<QCoreApplicationPrivate *>(QObjectPrivate::get(qApp));
qDebug() << prv->aboutToQuitEmitted;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants