Skip to content

Commit

Permalink
把delete调整为deletelater
Browse files Browse the repository at this point in the history
  • Loading branch information
czyt1988 committed Jun 3, 2024
1 parent d14e766 commit ecce4f7
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 47 deletions.
8 changes: 5 additions & 3 deletions src/SARibbonBar/SARibbonSystemButtonBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SARibbonSystemButtonBar::PrivateData
par->connect(buttonMinimize, &QAbstractButton::clicked, par, &SARibbonSystemButtonBar::minimizeWindow);
} else {
if (buttonMinimize) {
delete buttonMinimize;
buttonMinimize->deleteLater();
buttonMinimize = nullptr;
}
}
Expand All @@ -77,7 +77,8 @@ class SARibbonSystemButtonBar::PrivateData
par->connect(buttonMaximize, &QAbstractButton::clicked, par, &SARibbonSystemButtonBar::maximizeWindow);
} else {
if (buttonMaximize) {
delete buttonMaximize;
buttonMaximize->deleteLater();
;
buttonMaximize = nullptr;
}
}
Expand All @@ -102,7 +103,8 @@ class SARibbonSystemButtonBar::PrivateData
buttonClose->show();
} else {
if (buttonClose) {
delete buttonClose;
buttonClose->deleteLater();
;
buttonClose = nullptr;
}
}
Expand Down
Loading

0 comments on commit ecce4f7

Please sign in to comment.