mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Prevent the update of some widgets while debug task is in progress to avoid freezing
This commit is contained in:
parent
2fb59b26ad
commit
96baaeada6
@ -38,9 +38,10 @@ BacktraceWidget::~BacktraceWidget() {}
|
|||||||
|
|
||||||
void BacktraceWidget::updateContents()
|
void BacktraceWidget::updateContents()
|
||||||
{
|
{
|
||||||
if (!refreshDeferrer->attemptRefresh(nullptr)) {
|
if (!refreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setBacktraceGrid();
|
setBacktraceGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,16 +72,16 @@ void ProcessesWidget::updateContents()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core()->currentlyDebugging) {
|
if (!Core()->currentlyDebugging) {
|
||||||
setProcessesGrid();
|
|
||||||
} else {
|
|
||||||
// Remove rows from the previous debugging session
|
// Remove rows from the previous debugging session
|
||||||
modelProcesses->removeRows(0, modelProcesses->rowCount());
|
modelProcesses->removeRows(0, modelProcesses->rowCount());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core()->isDebugTaskInProgress() || !Core()->currentlyDebugging) {
|
if (Core()->isDebugTaskInProgress()) {
|
||||||
ui->viewProcesses->setDisabled(true);
|
ui->viewProcesses->setDisabled(true);
|
||||||
} else {
|
} else {
|
||||||
|
setProcessesGrid();
|
||||||
ui->viewProcesses->setDisabled(false);
|
ui->viewProcesses->setDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ void SectionsWidget::initConnects()
|
|||||||
|
|
||||||
void SectionsWidget::refreshSections()
|
void SectionsWidget::refreshSections()
|
||||||
{
|
{
|
||||||
if (!sectionsRefreshDeferrer->attemptRefresh(nullptr)) {
|
if (!sectionsRefreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sectionsModel->beginResetModel();
|
sectionsModel->beginResetModel();
|
||||||
|
@ -58,7 +58,7 @@ StackWidget::~StackWidget() = default;
|
|||||||
|
|
||||||
void StackWidget::updateContents()
|
void StackWidget::updateContents()
|
||||||
{
|
{
|
||||||
if (!refreshDeferrer->attemptRefresh(nullptr)) {
|
if (!refreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,16 +71,16 @@ void ThreadsWidget::updateContents()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core()->currentlyDebugging) {
|
if (!Core()->currentlyDebugging) {
|
||||||
setThreadsGrid();
|
|
||||||
} else {
|
|
||||||
// Remove rows from the previous debugging session
|
// Remove rows from the previous debugging session
|
||||||
modelThreads->removeRows(0, modelThreads->rowCount());
|
modelThreads->removeRows(0, modelThreads->rowCount());
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core()->isDebugTaskInProgress() || !Core()->currentlyDebugging) {
|
if (Core()->isDebugTaskInProgress()) {
|
||||||
ui->viewThreads->setDisabled(true);
|
ui->viewThreads->setDisabled(true);
|
||||||
} else {
|
} else {
|
||||||
|
setThreadsGrid();
|
||||||
ui->viewThreads->setDisabled(false);
|
ui->viewThreads->setDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,6 +291,12 @@ QList<QString> VisualNavbar::sectionsForAddress(RVA address)
|
|||||||
QString VisualNavbar::toolTipForAddress(RVA address)
|
QString VisualNavbar::toolTipForAddress(RVA address)
|
||||||
{
|
{
|
||||||
QString ret = "Address: " + RAddressString(address);
|
QString ret = "Address: " + RAddressString(address);
|
||||||
|
|
||||||
|
// Don't append sections when a debug task is in progress to avoid freezing the interface
|
||||||
|
if (Core()->isDebugTaskInProgress()) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
auto sections = sectionsForAddress(address);
|
auto sections = sectionsForAddress(address);
|
||||||
if (sections.count()) {
|
if (sections.count()) {
|
||||||
ret += "\nSections: \n";
|
ret += "\nSections: \n";
|
||||||
|
Loading…
Reference in New Issue
Block a user