-
Notifications
You must be signed in to change notification settings - Fork 40
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
base: master
Are you sure you want to change the base?
Conversation
[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 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
TAG Bot New tag: 5.6.34 |
Doc Check bot |
594998f
to
b484632
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
b484632
to
5c7d6c5
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
5c7d6c5
to
c6f52aa
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
c6f52aa
to
9178e99
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
9178e99
to
d7db04f
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
d7db04f
to
ac94025
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
src/private/dquickcontrolpalette.cpp
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closingDown 太晚了,,aboutToQuit 时就应该停止了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 QCoreApplicationPrivate::aboutToQuitEmitted 做判断行不行?
There was a problem hiding this comment.
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
黑魔法
ac94025
to
7e4be18
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
deepin pr auto review关键摘要:
是否建议立即修改:
|
TAG Bot New tag: 5.0.35 |
7e4be18
to
9b8d669
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
src/private/dquickcontrolpalette.cpp
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 QCoreApplicationPrivate::aboutToQuitEmitted 做判断行不行?
9b8d669
to
3b53f8e
Compare
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
3b53f8e
to
a4a4640
Compare
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#385
@@ -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()); |
There was a problem hiding this comment.
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;
do not set value if control's window is null
Issue: linuxdeepin/dtk#193