Skip to content

Commit b3043ac

Browse files
committed
Revert "add new API: GuiGetFocusedCPUWindow"
1 parent 9ed12f0 commit b3043ac

File tree

6 files changed

+4
-41
lines changed

6 files changed

+4
-41
lines changed

src/bridge/bridgemain.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,9 +1235,4 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
12351235
{
12361236
hInst = hinstDLL;
12371237
return TRUE;
1238-
}
1239-
1240-
BRIDGE_IMPEXP int GuiGetFocusedCPUWindow()
1241-
{
1242-
return (int)(duint)_gui_sendmessage(GUI_GET_FOCUSED_CPUWINDOW, nullptr, nullptr);
1243-
}
1238+
}

src/bridge/bridgemain.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,7 @@ typedef enum
779779
GUI_SET_GLOBAL_NOTES, // param1=const char* text, param2=unused
780780
GUI_GET_GLOBAL_NOTES, // param1=char** text, param2=unused
781781
GUI_SET_DEBUGGEE_NOTES, // param1=const char* text, param2=unused
782-
GUI_GET_DEBUGGEE_NOTES, // param1=char** text, param2=unused
783-
GUI_GET_FOCUSED_CPUWINDOW // param1=unused, param2=unused
782+
GUI_GET_DEBUGGEE_NOTES // param1=char** text, param2=unused
784783
} GUIMSG;
785784

786785
//GUI Typedefs
@@ -878,7 +877,6 @@ BRIDGE_IMPEXP void GuiSetGlobalNotes(const char* text);
878877
BRIDGE_IMPEXP void GuiGetGlobalNotes(char** text);
879878
BRIDGE_IMPEXP void GuiSetDebuggeeNotes(const char* text);
880879
BRIDGE_IMPEXP void GuiGetDebuggeeNotes(char** text);
881-
BRIDGE_IMPEXP int GuiGetFocusedCPUWindow();
882880

883881
#ifdef __cplusplus
884882
}

src/gui/Src/Bridge/Bridge.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -518,15 +518,6 @@ void* Bridge::processMessage(GUIMSG type, void* param1, void* param2)
518518
result.Wait();
519519
}
520520
break;
521-
522-
case GUI_GET_FOCUSED_CPUWINDOW:
523-
{
524-
BridgeResult result;
525-
emit getFocusedCPUWindow();
526-
return (void*)result.Wait();
527-
}
528-
break;
529-
530521
}
531522
return nullptr;
532523
}

src/gui/Src/Bridge/Bridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class Bridge : public QObject
113113
void getGlobalNotes(void* text);
114114
void setDebuggeeNotes(const QString text);
115115
void getDebuggeeNotes(void* text);
116-
void getFocusedCPUWindow();
116+
117117
private:
118118
QMutex* mBridgeMutex;
119119
dsint bridgeResult;

src/gui/Src/Gui/CPUWidget.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget)
1313
connect(mDisas, SIGNAL(selectionChanged(dsint)), mSideBar, SLOT(setSelection(dsint)));
1414
connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE)));
1515
connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(repaint()));
16-
connect(Bridge::getBridge(), SIGNAL(getFocusedCPUWindow()), this, SLOT(getFocusedCPUWindow()));
1716

1817
QSplitter* splitter = new QSplitter(this);
1918
splitter->addWidget(mSideBar);
@@ -147,22 +146,3 @@ CPUStack* CPUWidget::getStackWidget()
147146
{
148147
return mStack;
149148
}
150-
151-
void CPUWidget::getFocusedCPUWindow()
152-
{
153-
QWidget* w = QApplication::focusWidget();
154-
int r = -1;
155-
if(w == mDisas)
156-
{
157-
r = GUI_DISASSEMBLY;
158-
}
159-
else if(w == mDump)
160-
{
161-
r = GUI_DUMP;
162-
}
163-
else if(w == mStack)
164-
{
165-
r = GUI_STACK;
166-
}
167-
Bridge::getBridge()->setResult(r);
168-
}

src/gui/Src/Gui/CPUWidget.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ class CPUWidget : public QWidget
4747
CPUStack* mStack;
4848
RegistersView* mGeneralRegs;
4949
CPUInfoBox* mInfo;
50-
private slots:
51-
void getFocusedCPUWindow();
50+
5251
private:
5352
Ui::CPUWidget* ui;
5453
};

0 commit comments

Comments
 (0)