Fixes: - Give method combo box the current item as tool tip as well

This commit is contained in:
con
2008-12-04 17:06:44 +01:00
parent 31d8116f32
commit 79f244c2ea
2 changed files with 8 additions and 1 deletions

View File

@@ -206,6 +206,7 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable)
connect(m_methodCombo, SIGNAL(activated(int)), this, SLOT(jumpToMethod(int)));
connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(updateMethodBoxIndex()));
connect(m_methodCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMethodBoxToolTip()));
connect(file(), SIGNAL(changed()), this, SLOT(updateFileName()));
@@ -355,10 +356,16 @@ void CPPEditor::updateMethodBoxIndex()
if (lastIndex.isValid()) {
bool blocked = m_methodCombo->blockSignals(true);
m_methodCombo->setCurrentIndex(lastIndex.row());
updateMethodBoxToolTip();
(void) m_methodCombo->blockSignals(blocked);
}
}
void CPPEditor::updateMethodBoxToolTip()
{
m_methodCombo->setToolTip(m_methodCombo->currentText());
}
static bool isCompatible(Name *name, Name *otherName)
{
if (NameId *nameId = name->asNameId()) {