forked from qt-creator/qt-creator
FancyLineEdit: Add camel case navigation
Use it for search and replace functions as well as for Locator. The camel case navigation can be switched on / off with the existing menu Options > Text Editor > Behavior > Enable Build-in camel case navigation. Fixes: QTCREATORBUG-21140 Change-Id: I3f2dcafff231366b3c8f08c14514dd8940cca2a0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
71e9e3832a
commit
839f45faa9
@@ -48,6 +48,7 @@
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -399,6 +400,13 @@ TextEditorSettings::TextEditorSettings()
|
||||
this, &TextEditorSettings::completionSettingsChanged);
|
||||
connect(d->m_completionSettingsPage, &CompletionSettingsPage::commentsSettingsChanged,
|
||||
this, &TextEditorSettings::commentsSettingsChanged);
|
||||
|
||||
auto updateCamelCaseNavigation = [] {
|
||||
Utils::FancyLineEdit::setCamelCaseNavigationEnabled(behaviorSettings().m_camelCaseNavigation);
|
||||
};
|
||||
connect(d->m_behaviorSettingsPage, &BehaviorSettingsPage::behaviorSettingsChanged,
|
||||
this, updateCamelCaseNavigation);
|
||||
updateCamelCaseNavigation();
|
||||
}
|
||||
|
||||
TextEditorSettings::~TextEditorSettings()
|
||||
|
||||
Reference in New Issue
Block a user