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:
Andre Hartmann
2017-07-30 21:39:50 +02:00
committed by André Hartmann
parent 71e9e3832a
commit 839f45faa9
9 changed files with 439 additions and 241 deletions

View File

@@ -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()