Changeset 5732 in vbox for trunk/src/VBox/Debugger
- Timestamp:
- Nov 13, 2007 11:15:57 PM (17 years ago)
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/VBoxDbgConsole.cpp
r4071 r5732 124 124 125 125 VBoxDbgConsoleInput::VBoxDbgConsoleInput(QWidget *pParent/* = NULL*/, const char *pszName/* = NULL*/) 126 : QComboBox(true, pParent, pszName) 127 { 128 insertItem("", 0); 129 setInsertionPolicy(AfterCurrent); 126 : QComboBox(true, pParent, pszName), m_iBlankItem(0) 127 { 128 insertItem("", m_iBlankItem); 129 //setInsertionPolicy(AfterCurrent); 130 setInsertionPolicy(NoInsertion); 130 131 setMaxCount(50); 131 132 const QLineEdit *pEdit = lineEdit(); … … 147 148 void VBoxDbgConsoleInput::returnPressed() 148 149 { 150 /* deal with the current command. */ 149 151 QString Str = currentText(); 150 152 emit commandSubmitted(Str); 153 154 /* update the history and clear the entry field */ 155 if (text(m_iBlankItem - 1) != Str) 156 { 157 changeItem(Str, m_iBlankItem); 158 removeItem(m_iBlankItem - maxCount() - 1); 159 insertItem("", ++m_iBlankItem); 160 } 161 151 162 clearEdit(); 152 setCurrentItem( 0);163 setCurrentItem(m_iBlankItem); 153 164 } 154 165 -
trunk/src/VBox/Debugger/VBoxDbgConsole.h
r4071 r5732 110 110 */ 111 111 void returnPressed(); 112 113 protected: 114 /** The current blank entry. */ 115 int m_iBlankItem; 112 116 }; 113 117
Note:
See TracChangeset
for help on using the changeset viewer.