From 1aeac957bdfe0f41f9ec83ace433db2acddc32a7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 13 Aug 2026 21:38:42 +0100 Subject: [PATCH] Compile fixes --- .../Code/pyrenderdoc/PythonInvokers.cpp | 12 ++++----- qrenderdoc/Windows/MainWindow.cpp | 4 +-- qrenderdoc/Windows/PythonShell.cpp | 26 +++++++++---------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/qrenderdoc/Code/pyrenderdoc/PythonInvokers.cpp b/qrenderdoc/Code/pyrenderdoc/PythonInvokers.cpp index 76c9eed28..48ba2b532 100644 --- a/qrenderdoc/Code/pyrenderdoc/PythonInvokers.cpp +++ b/qrenderdoc/Code/pyrenderdoc/PythonInvokers.cpp @@ -449,7 +449,7 @@ struct ReplayControllerInvoker : IReplayController if(scriptContext) scriptContext->PausePythonThreading(); m_Ctx.Replay().BlockInvoke( - [this, ptr, params...](IReplayController *replay) { (replay->*ptr)(params...); }); + [ptr, params...](IReplayController *replay) { (replay->*ptr)(params...); }); if(scriptContext) scriptContext->ResumePythonThreading(); } @@ -461,9 +461,8 @@ struct ReplayControllerInvoker : IReplayController PythonContext *scriptContext = m_Shell->GetScriptContext(); if(scriptContext) scriptContext->PausePythonThreading(); - m_Ctx.Replay().BlockInvoke([this, &ret, ptr, params...](IReplayController *replay) { - ret = (replay->*ptr)(params...); - }); + m_Ctx.Replay().BlockInvoke( + [&ret, ptr, params...](IReplayController *replay) { ret = (replay->*ptr)(params...); }); if(scriptContext) scriptContext->ResumePythonThreading(); return ret; @@ -476,9 +475,8 @@ struct ReplayControllerInvoker : IReplayController PythonContext *scriptContext = m_Shell->GetScriptContext(); if(scriptContext) scriptContext->PausePythonThreading(); - m_Ctx.Replay().BlockInvoke([this, &ret, ptr, params...](IReplayController *replay) { - ret = &(replay->*ptr)(params...); - }); + m_Ctx.Replay().BlockInvoke( + [&ret, ptr, params...](IReplayController *replay) { ret = &(replay->*ptr)(params...); }); if(scriptContext) scriptContext->ResumePythonThreading(); return *ret; diff --git a/qrenderdoc/Windows/MainWindow.cpp b/qrenderdoc/Windows/MainWindow.cpp index 25fddf352..aa21029b5 100644 --- a/qrenderdoc/Windows/MainWindow.cpp +++ b/qrenderdoc/Windows/MainWindow.cpp @@ -757,7 +757,7 @@ void MainWindow::OnCaptureTrigger(const QString &exe, const QString &workingDir, if(!PromptCloseCapture()) return; - ExecuteResult ret; + ExecuteResult ret = {}; LambdaThread *th = new LambdaThread([this, exe, workingDir, cmdLine, env, opts, callback, &ret]() { if(isUnshareableDeviceInUse()) @@ -825,7 +825,7 @@ void MainWindow::OnInjectTrigger(uint32_t PID, const rdcarraywidget(tabIndex); }); - QObject::connect(&closeRightTabs, &QAction::triggered, [this, editorTabs, tabIndex]() { + QObject::connect(&closeRightTabs, &QAction::triggered, [editorTabs, tabIndex]() { for(int i = editorTabs->count() - 1; i > tabIndex; i--) delete editorTabs->widget(i); }); - QObject::connect(&closeOtherTabs, &QAction::triggered, [this, editorTabs, tabIndex]() { + QObject::connect(&closeOtherTabs, &QAction::triggered, [editorTabs, tabIndex]() { for(int i = editorTabs->count() - 1; i >= 0; i--) if(i != tabIndex) delete editorTabs->widget(i); @@ -950,7 +950,7 @@ void PythonShell::makeEditor(rdcstr filename, rdcstr text) QObject::connect(sc, &ScintillaEdit::charAdded, [this, sc](int ch) { doAutocomplete(sc); }); QObject::connect(sc, &ScintillaEdit::buttonPressed, - [this, sc](QMouseEvent *ev) { hideFunccompleteTooltip(); }); + [this](QMouseEvent *ev) { hideFunccompleteTooltip(); }); QObject::connect(sc, &ScintillaEdit::keyPressed, [this, sc](QKeyEvent *ev) { if(ev->key() == Qt::Key_Space && (ev->modifiers() & Qt::ControlModifier)) @@ -1825,8 +1825,8 @@ void PythonShell::editor_contextMenu(const QPoint &pos) QAction undo(tr("Undo"), this); QAction redo(tr("Redo"), this); - QObject::connect(&undo, &QAction::triggered, [this, editor] { editor->undo(); }); - QObject::connect(&redo, &QAction::triggered, [this, editor] { editor->redo(); }); + QObject::connect(&undo, &QAction::triggered, [editor] { editor->undo(); }); + QObject::connect(&redo, &QAction::triggered, [editor] { editor->redo(); }); undo.setEnabled(editor->canUndo()); redo.setEnabled(editor->canRedo()); @@ -1840,15 +1840,15 @@ void PythonShell::editor_contextMenu(const QPoint &pos) QAction pasteText(tr("Paste"), this); QAction deleteText(tr("Delete"), this); - QObject::connect(&cutText, &QAction::triggered, [this, editor] { editor->cut(); }); + QObject::connect(&cutText, &QAction::triggered, [editor] { editor->cut(); }); - QObject::connect(©Text, &QAction::triggered, [this, editor] { + QObject::connect(©Text, &QAction::triggered, [editor] { editor->copyRange(editor->selectionStart(), editor->selectionEnd()); }); - QObject::connect(&pasteText, &QAction::triggered, [this, editor] { editor->paste(); }); + QObject::connect(&pasteText, &QAction::triggered, [editor] { editor->paste(); }); - QObject::connect(&deleteText, &QAction::triggered, [this, editor] { + QObject::connect(&deleteText, &QAction::triggered, [editor] { editor->deleteRange(editor->selectionStart(), editor->selectionEnd()); }); @@ -1868,7 +1868,7 @@ void PythonShell::editor_contextMenu(const QPoint &pos) pasteText.setEnabled(editor->canPaste()); QAction selectAll(tr("Select All"), this); - QObject::connect(&selectAll, &QAction::triggered, [this, editor] { editor->selectAll(); }); + QObject::connect(&selectAll, &QAction::triggered, [editor] { editor->selectAll(); }); contextMenu.addAction(&selectAll); RDDialog::show(&contextMenu, editor->viewport()->mapToGlobal(pos)); @@ -1963,7 +1963,7 @@ void PythonShell::projectExplorer_contextMenu(const QPoint &pos) } QObject::connect(&explorerOpen, &QAction::triggered, - [this, diskLocation]() { QDesktopServices::openUrl(diskLocation); }); + [diskLocation]() { QDesktopServices::openUrl(diskLocation); }); QObject::connect(&viewOutput, &QAction::triggered, [this, itemPath]() { ShowOutput(); @@ -1986,7 +1986,7 @@ void PythonShell::projectExplorer_contextMenu(const QPoint &pos) [this, item]() { on_projectExplorer_itemActivated(item, 0); }); QObject::connect(&explorerOpen, &QAction::triggered, - [this, diskLocation]() { QDesktopServices::openUrl(diskLocation); }); + [diskLocation]() { QDesktopServices::openUrl(diskLocation); }); } } else if(item == m_UIExtensions)