diff options
| -rw-r--r-- | src/plugins/cppeditor/cppeditor.cpp | 7 | ||||
| -rw-r--r-- | src/plugins/cppeditor/cppeditor.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 254e9341de..da52bb3d60 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -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()) { diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index e6c6d1aa86..2420bcf4e5 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -115,7 +115,7 @@ private slots: void updateFileName(); void jumpToMethod(int index); void updateMethodBoxIndex(); - + void updateMethodBoxToolTip(); void onDocumentUpdated(CPlusPlus::Document::Ptr doc); private: |
