mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
fix: audit cleanup — themed close button, stale popup dismiss, bitfield clamp, scanner guard, process sort
This commit is contained in:
@@ -303,7 +303,7 @@ struct Node {
|
|||||||
QJsonObject bm = v.toObject();
|
QJsonObject bm = v.toObject();
|
||||||
BitfieldMember m;
|
BitfieldMember m;
|
||||||
m.name = bm["name"].toString();
|
m.name = bm["name"].toString();
|
||||||
m.bitOffset = (uint8_t)bm["bitOffset"].toInt(0);
|
m.bitOffset = (uint8_t)qBound(0, bm["bitOffset"].toInt(0), 255);
|
||||||
m.bitWidth = (uint8_t)qBound(1, bm["bitWidth"].toInt(1), 64);
|
m.bitWidth = (uint8_t)qBound(1, bm["bitWidth"].toInt(1), 64);
|
||||||
n.bitfieldMembers.append(m);
|
n.bitfieldMembers.append(m);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -966,12 +966,20 @@ void RcxEditor::applyDocument(const ComposeResult& result) {
|
|||||||
// Reset hint line - applySelectionOverlay will repaint indicators
|
// Reset hint line - applySelectionOverlay will repaint indicators
|
||||||
m_hintLine = -1;
|
m_hintLine = -1;
|
||||||
|
|
||||||
// Restore hover state
|
// Restore hover state — but clear if the node was deleted
|
||||||
m_hoveredNodeId = savedHoverId;
|
m_hoveredNodeId = savedHoverId;
|
||||||
m_hoveredLine = savedHoverLine;
|
m_hoveredLine = savedHoverLine;
|
||||||
m_hoverInside = savedHoverInside;
|
m_hoverInside = savedHoverInside;
|
||||||
m_applyingDocument = false;
|
m_applyingDocument = false;
|
||||||
|
|
||||||
|
if (m_hoveredNodeId != 0 && !m_nodeLineIndex.contains(m_hoveredNodeId)) {
|
||||||
|
m_hoveredNodeId = 0;
|
||||||
|
m_hoveredLine = -1;
|
||||||
|
dismissHistoryPopup();
|
||||||
|
if (m_disasmPopup) m_disasmPopup->hide();
|
||||||
|
if (m_structPreviewPopup) m_structPreviewPopup->hide();
|
||||||
|
}
|
||||||
|
|
||||||
// Re-apply hover markers (setText() clears all Scintilla markers).
|
// Re-apply hover markers (setText() clears all Scintilla markers).
|
||||||
// Reset m_prevHoveredNodeId so the incremental logic re-adds markers.
|
// Reset m_prevHoveredNodeId so the incremental logic re-adds markers.
|
||||||
// applyHoverCursor() is NOT called here — it evaluates hitTest() against
|
// applyHoverCursor() is NOT called here — it evaluates hitTest() against
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ void ProcessPicker::initUi()
|
|||||||
ui->processTable->setColumnWidth(0, 80); // PID column
|
ui->processTable->setColumnWidth(0, 80); // PID column
|
||||||
ui->processTable->setColumnWidth(1, 200); // Name column
|
ui->processTable->setColumnWidth(1, 200); // Name column
|
||||||
ui->processTable->horizontalHeader()->setStretchLastSection(true);
|
ui->processTable->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
ui->processTable->setSortingEnabled(true);
|
||||||
ui->processTable->setWordWrap(false);
|
ui->processTable->setWordWrap(false);
|
||||||
ui->processTable->setTextElideMode(Qt::ElideLeft);
|
ui->processTable->setTextElideMode(Qt::ElideLeft);
|
||||||
ui->processTable->setShowGrid(false);
|
ui->processTable->setShowGrid(false);
|
||||||
@@ -329,6 +330,9 @@ void ProcessPicker::populateTable(const QList<ProcessInfo>& processes)
|
|||||||
pathItem->setToolTip(proc.path); // Show full path on hover
|
pathItem->setToolTip(proc.path); // Show full path on hover
|
||||||
ui->processTable->setItem(i, 2, pathItem);
|
ui->processTable->setItem(i, 2, pathItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default sort: highest PID first (most recently launched processes on top)
|
||||||
|
ui->processTable->sortItems(0, Qt::DescendingOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessPicker::filterProcesses(const QString& text)
|
void ProcessPicker::filterProcesses(const QString& text)
|
||||||
|
|||||||
@@ -533,6 +533,7 @@ QVector<ScanResult> ScanEngine::runScan(std::shared_ptr<Provider> prov,
|
|||||||
regEnd = qMin(regEnd, req.endAddress);
|
regEnd = qMin(regEnd, req.endAddress);
|
||||||
}
|
}
|
||||||
uint64_t regSize = regEnd - regStart;
|
uint64_t regSize = regEnd - regStart;
|
||||||
|
if (regSize == 0) continue;
|
||||||
|
|
||||||
if ((uint64_t)patternLen > regSize) {
|
if ((uint64_t)patternLen > regSize) {
|
||||||
scannedBytes += regSize;
|
scannedBytes += regSize;
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ ThemeEditor::ThemeEditor(int themeIndex, QWidget* parent)
|
|||||||
|
|
||||||
// ── File info ──
|
// ── File info ──
|
||||||
m_fileInfoLabel = new QLabel;
|
m_fileInfoLabel = new QLabel;
|
||||||
m_fileInfoLabel->setStyleSheet(QStringLiteral("color: #666; font-size: 10px; padding: 0 0 4px 0;"));
|
m_fileInfoLabel->setStyleSheet(QStringLiteral("color: %1; font-size: 10px; padding: 0 0 4px 0;")
|
||||||
|
.arg(tm.current().textDim.name()));
|
||||||
QString path = tm.themeFilePath(themeIndex);
|
QString path = tm.themeFilePath(themeIndex);
|
||||||
m_fileInfoLabel->setText(path.isEmpty()
|
m_fileInfoLabel->setText(path.isEmpty()
|
||||||
? QStringLiteral("Built-in theme (edits save as user copy)")
|
? QStringLiteral("Built-in theme (edits save as user copy)")
|
||||||
@@ -109,7 +110,8 @@ ThemeEditor::ThemeEditor(int themeIndex, QWidget* parent)
|
|||||||
|
|
||||||
auto* hexLbl = new QLabel;
|
auto* hexLbl = new QLabel;
|
||||||
hexLbl->setFixedWidth(60);
|
hexLbl->setFixedWidth(60);
|
||||||
hexLbl->setStyleSheet(QStringLiteral("color: #aaa; font-size: 10px;"));
|
hexLbl->setStyleSheet(QStringLiteral("color: %1; font-size: 10px;")
|
||||||
|
.arg(tm.current().textMuted.name()));
|
||||||
row->addWidget(hexLbl);
|
row->addWidget(hexLbl);
|
||||||
|
|
||||||
row->addStretch();
|
row->addStretch();
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ void TitleBarWidget::applyTheme(const Theme& theme) {
|
|||||||
m_btnMin->setStyleSheet(btnStyle);
|
m_btnMin->setStyleSheet(btnStyle);
|
||||||
m_btnMax->setStyleSheet(btnStyle);
|
m_btnMax->setStyleSheet(btnStyle);
|
||||||
|
|
||||||
// Close button: red hover
|
// Close button: themed red hover
|
||||||
m_btnClose->setStyleSheet(QStringLiteral(
|
m_btnClose->setStyleSheet(QStringLiteral(
|
||||||
"QToolButton { background: transparent; border: none; }"
|
"QToolButton { background: transparent; border: none; }"
|
||||||
"QToolButton:hover { background: #c42b1c; }"));
|
"QToolButton:hover { background: %1; }").arg(theme.indHeatHot.name()));
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user