diff options
22 files changed, 109 insertions, 109 deletions
diff --git a/src/plugins/texteditor/autocompleter.cpp b/src/plugins/texteditor/autocompleter.cpp index 83cf4cb9ef..70b71e781b 100644 --- a/src/plugins/texteditor/autocompleter.cpp +++ b/src/plugins/texteditor/autocompleter.cpp @@ -90,10 +90,10 @@ void AutoCompleter::countBrackets(QTextCursor cursor, cursor.setPosition(from); QTextBlock block = cursor.block(); while (block.isValid() && block.position() < end) { - TextEditor::Parentheses parenList = TextEditor::TextDocumentLayout::parentheses(block); - if (!parenList.isEmpty() && !TextEditor::TextDocumentLayout::ifdefedOut(block)) { + Parentheses parenList = TextDocumentLayout::parentheses(block); + if (!parenList.isEmpty() && !TextDocumentLayout::ifdefedOut(block)) { for (int i = 0; i < parenList.count(); ++i) { - TextEditor::Parenthesis paren = parenList.at(i); + Parenthesis paren = parenList.at(i); int position = block.position() + paren.pos; if (position < from || position >= end) continue; @@ -151,10 +151,10 @@ QString AutoCompleter::autoComplete(QTextCursor &cursor, const QString &textToIn const QString brackets = QLatin1String("[]"); if (parentheses.contains(character) || brackets.contains(character)) { QTextCursor tmp= cursor; - bool foundBlockStart = TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp); + bool foundBlockStart = TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp); int blockStart = foundBlockStart ? tmp.position() : 0; tmp = cursor; - bool foundBlockEnd = TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp); + bool foundBlockEnd = TextBlockUserData::findNextBlockClosingParenthesis(&tmp); int blockEnd = foundBlockEnd ? tmp.position() : (cursor.document()->characterCount() - 1); const QChar openChar = parentheses.contains(character) ? QLatin1Char('(') : QLatin1Char('['); const QChar closeChar = parentheses.contains(character) ? QLatin1Char(')') : QLatin1Char(']'); @@ -218,10 +218,10 @@ bool AutoCompleter::autoBackspace(QTextCursor &cursor) const QChar character = lookBehind; if (character == QLatin1Char('(') || character == QLatin1Char('[')) { QTextCursor tmp = cursor; - TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp); + TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp); int blockStart = tmp.isNull() ? 0 : tmp.position(); tmp = cursor; - TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp); + TextBlockUserData::findNextBlockClosingParenthesis(&tmp); int blockEnd = tmp.isNull() ? (cursor.document()->characterCount()-1) : tmp.position(); QChar openChar = character; QChar closeChar = (character == QLatin1Char('(')) ? QLatin1Char(')') : QLatin1Char(']'); diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index e56b978ed7..6c5841ad88 100644 --- a/src/plugins/texteditor/basefilefind.cpp +++ b/src/plugins/texteditor/basefilefind.cpp @@ -55,6 +55,9 @@ #include <QLabel> #include <QLabel> +using namespace Utils; +using namespace Core; + namespace TextEditor { namespace Internal { @@ -63,8 +66,8 @@ class BaseFileFindPrivate public: BaseFileFindPrivate() : m_resultLabel(0), m_filterCombo(0) {} - QMap<QFutureWatcher<Utils::FileSearchResultList> *, QPointer<Core::SearchResult> > m_watchers; - QPointer<Core::IFindSupport> m_currentFindSupport; + QMap<QFutureWatcher<FileSearchResultList> *, QPointer<SearchResult> > m_watchers; + QPointer<IFindSupport> m_currentFindSupport; QLabel *m_resultLabel; QStringListModel m_filterStrings; @@ -75,8 +78,6 @@ public: } // namespace Internal using namespace Internal; -using namespace Utils; -using namespace Core; BaseFileFind::BaseFileFind() : d(new BaseFileFindPrivate) { @@ -125,15 +126,15 @@ QStringList BaseFileFind::fileNameFilters() const return filters; } -void BaseFileFind::runNewSearch(const QString &txt, Core::FindFlags findFlags, +void BaseFileFind::runNewSearch(const QString &txt, FindFlags findFlags, SearchResultWindow::SearchMode searchMode) { d->m_currentFindSupport = 0; if (d->m_filterCombo) updateComboEntries(d->m_filterCombo, true); - SearchResult *search = Core::SearchResultWindow::instance()->startNewSearch(label(), - toolTip().arg(Core::IFindFilter::descriptionForFindFlags(findFlags)), - txt, searchMode, Core::SearchResultWindow::PreserveCaseEnabled, + SearchResult *search = SearchResultWindow::instance()->startNewSearch(label(), + toolTip().arg(IFindFilter::descriptionForFindFlags(findFlags)), + txt, searchMode, SearchResultWindow::PreserveCaseEnabled, QString::fromLatin1("TextEditor")); search->setTextToReplace(txt); search->setSearchAgainSupported(true); @@ -158,14 +159,14 @@ void BaseFileFind::runNewSearch(const QString &txt, Core::FindFlags findFlags, runSearch(search); } -void BaseFileFind::runSearch(Core::SearchResult *search) +void BaseFileFind::runSearch(SearchResult *search) { FileFindParameters parameters = search->userData().value<FileFindParameters>(); CountingLabel *label = new CountingLabel; connect(search, SIGNAL(countChanged(int)), label, SLOT(updateCount(int))); CountingLabel *statusLabel = new CountingLabel; connect(search, SIGNAL(countChanged(int)), statusLabel, SLOT(updateCount(int))); - Core::SearchResultWindow::instance()->popup(IOutputPane::Flags(IOutputPane::ModeSwitch|IOutputPane::WithFocus)); + SearchResultWindow::instance()->popup(IOutputPane::Flags(IOutputPane::ModeSwitch|IOutputPane::WithFocus)); QFutureWatcher<FileSearchResultList> *watcher = new QFutureWatcher<FileSearchResultList>(); d->m_watchers.insert(watcher, search); watcher->setPendingResultsLimit(1); @@ -189,24 +190,24 @@ void BaseFileFind::runSearch(Core::SearchResult *search) connect(progress, SIGNAL(clicked()), search, SLOT(popup())); } -void BaseFileFind::findAll(const QString &txt, Core::FindFlags findFlags) +void BaseFileFind::findAll(const QString &txt, FindFlags findFlags) { runNewSearch(txt, findFlags, SearchResultWindow::SearchOnly); } -void BaseFileFind::replaceAll(const QString &txt, Core::FindFlags findFlags) +void BaseFileFind::replaceAll(const QString &txt, FindFlags findFlags) { runNewSearch(txt, findFlags, SearchResultWindow::SearchAndReplace); } void BaseFileFind::doReplace(const QString &text, - const QList<Core::SearchResultItem> &items, + const QList<SearchResultItem> &items, bool preserveCase) { QStringList files = replaceAll(text, items, preserveCase); if (!files.isEmpty()) { DocumentManager::notifyFilesChangedInternally(files); - Core::SearchResultWindow::instance()->hide(); + SearchResultWindow::instance()->hide(); } } @@ -219,10 +220,10 @@ void BaseFileFind::displayResult(int index) { watcher->cancel(); return; } - Utils::FileSearchResultList results = watcher->resultAt(index); - QList<Core::SearchResultItem> items; - foreach (const Utils::FileSearchResult &result, results) { - Core::SearchResultItem item; + FileSearchResultList results = watcher->resultAt(index); + QList<SearchResultItem> items; + foreach (const FileSearchResult &result, results) { + SearchResultItem item; item.path = QStringList() << QDir::toNativeSeparators(result.fileName); item.lineNumber = result.lineNumber; item.text = result.matchingLine; @@ -232,7 +233,7 @@ void BaseFileFind::displayResult(int index) { item.userData = result.regexpCapturedTexts; items << item; } - search->addResults(items, Core::SearchResult::AddOrdered); + search->addResults(items, SearchResult::AddOrdered); } void BaseFileFind::searchFinished() @@ -305,7 +306,7 @@ void BaseFileFind::updateComboEntries(QComboBox *combo, bool onTop) } } -void BaseFileFind::openEditor(const Core::SearchResultItem &item) +void BaseFileFind::openEditor(const SearchResultItem &item) { SearchResult *result = qobject_cast<SearchResult *>(sender()); IEditor *openedEditor = 0; @@ -354,7 +355,7 @@ void BaseFileFind::recheckEnabled() } QStringList BaseFileFind::replaceAll(const QString &text, - const QList<Core::SearchResultItem> &items, + const QList<SearchResultItem> &items, bool preserveCase) { if (items.isEmpty()) @@ -362,12 +363,12 @@ QStringList BaseFileFind::replaceAll(const QString &text, RefactoringChanges refactoring; - QHash<QString, QList<Core::SearchResultItem> > changes; - foreach (const Core::SearchResultItem &item, items) + QHash<QString, QList<SearchResultItem> > changes; + foreach (const SearchResultItem &item, items) changes[QDir::fromNativeSeparators(item.path.first())].append(item); // Checking for files without write permissions - QHashIterator<QString, QList<Core::SearchResultItem> > it(changes); + QHashIterator<QString, QList<SearchResultItem> > it(changes); QSet<QString> roFiles; while (it.hasNext()) { it.next(); @@ -388,12 +389,12 @@ QStringList BaseFileFind::replaceAll(const QString &text, while (it.hasNext()) { it.next(); const QString fileName = it.key(); - const QList<Core::SearchResultItem> changeItems = it.value(); + const QList<SearchResultItem> changeItems = it.value(); ChangeSet changeSet; RefactoringFilePtr file = refactoring.file(fileName); QSet<QPair<int, int> > processed; - foreach (const Core::SearchResultItem &item, changeItems) { + foreach (const SearchResultItem &item, changeItems) { const QPair<int, int> &p = qMakePair(item.lineNumber, item.textMarkPos); if (processed.contains(p)) continue; diff --git a/src/plugins/texteditor/behaviorsettingspage.cpp b/src/plugins/texteditor/behaviorsettingspage.cpp index eceec66638..39081c9e7d 100644 --- a/src/plugins/texteditor/behaviorsettingspage.cpp +++ b/src/plugins/texteditor/behaviorsettingspage.cpp @@ -267,11 +267,11 @@ const ExtraEncodingSettings &BehaviorSettingsPage::extraEncodingSettings() const void BehaviorSettingsPage::openCodingStylePreferences(TabSettingsWidget::CodingStyleLink link) { switch (link) { - case TextEditor::TabSettingsWidget::CppLink: + case TabSettingsWidget::CppLink: Core::ICore::showOptionsDialog(CppTools::Constants::CPP_SETTINGS_CATEGORY, CppTools::Constants::CPP_CODE_STYLE_SETTINGS_ID); break; - case TextEditor::TabSettingsWidget::QtQuickLink: + case TabSettingsWidget::QtQuickLink: Core::ICore::showOptionsDialog(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML, QmlJSTools::Constants::QML_JS_CODE_STYLE_SETTINGS_ID); break; diff --git a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp index 04492f8b08..0cd06812cb 100644 --- a/src/plugins/texteditor/codeassist/genericproposalmodel.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalmodel.cpp @@ -214,7 +214,7 @@ void GenericProposalModel::filter(const QString &prefix) * * It also implements the fully and first-letter-only case sensitivity. */ - const TextEditor::CaseSensitivity caseSensitivity = + const CaseSensitivity caseSensitivity = TextEditorSettings::completionSettings().m_caseSensitivity; QString keyRegExp; @@ -223,8 +223,8 @@ void GenericProposalModel::filter(const QString &prefix) const QLatin1String uppercaseWordContinuation("[a-z0-9_]*"); const QLatin1String lowercaseWordContinuation("(?:[a-zA-Z0-9]*_)?"); foreach (const QChar &c, prefix) { - if (caseSensitivity == TextEditor::CaseInsensitive || - (caseSensitivity == TextEditor::FirstLetterCaseSensitive && !first)) { + if (caseSensitivity == CaseInsensitive || + (caseSensitivity == FirstLetterCaseSensitive && !first)) { keyRegExp += QLatin1String("(?:"); if (!first) diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp index 3594feaced..45aa085a46 100644 --- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp @@ -145,11 +145,11 @@ QVariant ModelAdapter::data(const QModelIndex &index, int role) const // ------------------------ // GenericProposalInfoFrame // ------------------------ -class GenericProposalInfoFrame : public Utils::FakeToolTip +class GenericProposalInfoFrame : public FakeToolTip { public: GenericProposalInfoFrame(QWidget *parent = 0) - : Utils::FakeToolTip(parent), m_label(new QLabel(this)) + : FakeToolTip(parent), m_label(new QLabel(this)) { QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); diff --git a/src/plugins/texteditor/codestylepool.cpp b/src/plugins/texteditor/codestylepool.cpp index 6e297ed80d..3482494d58 100644 --- a/src/plugins/texteditor/codestylepool.cpp +++ b/src/plugins/texteditor/codestylepool.cpp @@ -158,7 +158,7 @@ ICodeStylePreferences *CodeStylePool::createCodeStyle(const QByteArray &id, cons if (!d->m_factory) return 0; - TextEditor::ICodeStylePreferences *codeStyle = d->m_factory->createCodeStyle(); + ICodeStylePreferences *codeStyle = d->m_factory->createCodeStyle(); codeStyle->setId(id); codeStyle->setTabSettings(tabSettings); codeStyle->setValue(codeStyleData); @@ -230,7 +230,7 @@ void CodeStylePool::loadCustomCodeStyles() ICodeStylePreferences *CodeStylePool::importCodeStyle(const Utils::FileName &fileName) { - TextEditor::ICodeStylePreferences *codeStyle = loadCodeStyle(fileName); + ICodeStylePreferences *codeStyle = loadCodeStyle(fileName); if (codeStyle) saveCodeStyle(codeStyle); return codeStyle; @@ -238,7 +238,7 @@ ICodeStylePreferences *CodeStylePool::importCodeStyle(const Utils::FileName &fil ICodeStylePreferences *CodeStylePool::loadCodeStyle(const Utils::FileName &fileName) { - TextEditor::ICodeStylePreferences *codeStyle = 0; + ICodeStylePreferences *codeStyle = 0; Utils::PersistentSettingsReader reader; reader.load(fileName); QVariantMap m = reader.restoreValues(); diff --git a/src/plugins/texteditor/codestyleselectorwidget.cpp b/src/plugins/texteditor/codestyleselectorwidget.cpp index 1c0005d1e4..e02741b6b2 100644 --- a/src/plugins/texteditor/codestyleselectorwidget.cpp +++ b/src/plugins/texteditor/codestyleselectorwidget.cpp @@ -190,7 +190,7 @@ CodeStyleSelectorWidget::~CodeStyleSelectorWidget() delete m_ui; } -void CodeStyleSelectorWidget::setCodeStyle(TextEditor::ICodeStylePreferences *codeStyle) +void CodeStyleSelectorWidget::setCodeStyle(ICodeStylePreferences *codeStyle) { if (m_codeStyle == codeStyle) return; // nothing changes @@ -244,15 +244,15 @@ void CodeStyleSelectorWidget::slotComboBoxActivated(int index) if (index < 0 || index >= m_ui->delegateComboBox->count()) return; - TextEditor::ICodeStylePreferences *delegate = - m_ui->delegateComboBox->itemData(index).value<TextEditor::ICodeStylePreferences *>(); + ICodeStylePreferences *delegate = + m_ui->delegateComboBox->itemData(index).value<ICodeStylePreferences *>(); const bool wasBlocked = blockSignals(true); m_codeStyle->setCurrentDelegate(delegate); blockSignals(wasBlocked); } -void CodeStyleSelectorWidget::slotCurrentDelegateChanged(TextEditor::ICodeStylePreferences *delegate) +void CodeStyleSelectorWidget::slotCurrentDelegateChanged(ICodeStylePreferences *delegate) { m_ignoreGuiSignals = true; m_ui->delegateComboBox->setCurrentIndex(m_ui->delegateComboBox->findData(QVariant::fromValue(delegate))); diff --git a/src/plugins/texteditor/findinfiles.cpp b/src/plugins/texteditor/findinfiles.cpp index ae31a361d0..92e5d3874d 100644 --- a/src/plugins/texteditor/findinfiles.cpp +++ b/src/plugins/texteditor/findinfiles.cpp @@ -56,7 +56,7 @@ FindInFiles::FindInFiles() m_directory(0) { m_instance = this; - connect(Core::EditorManager::instance(), SIGNAL(findOnFileSystemRequest(QString)), + connect(EditorManager::instance(), SIGNAL(findOnFileSystemRequest(QString)), this, SLOT(findOnFileSystem(QString))); } @@ -74,7 +74,7 @@ QString FindInFiles::displayName() const return tr("Files on File System"); } -void FindInFiles::findAll(const QString &txt, Core::FindFlags findFlags) +void FindInFiles::findAll(const QString &txt, FindFlags findFlags) { updateComboEntries(m_directory, true); BaseFileFind::findAll(txt, findFlags); @@ -85,7 +85,7 @@ Utils::FileIterator *FindInFiles::files(const QStringList &nameFilters, { return new Utils::SubDirFileIterator(QStringList() << additionalParameters.toString(), nameFilters, - Core::EditorManager::defaultTextCodec()); + EditorManager::defaultTextCodec()); } QVariant FindInFiles::additionalParameters() const diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index fd98f2f76f..6b57a99b8c 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -111,7 +111,7 @@ private: class FontSettingsPagePrivate { public: - FontSettingsPagePrivate(const TextEditor::FormatDescriptions &fd, + FontSettingsPagePrivate(const FormatDescriptions &fd, Core::Id id, const QString &displayName, const QString &category); @@ -122,7 +122,7 @@ public: const QString m_displayName; const QString m_settingsGroup; - TextEditor::FormatDescriptions m_descriptions; + FormatDescriptions m_descriptions; FontSettings m_value; FontSettings m_lastValue; QPointer<QWidget> m_widget; @@ -168,7 +168,7 @@ static QString createColorSchemeFileName(const QString &pattern) } // ------- FontSettingsPagePrivate -FontSettingsPagePrivate::FontSettingsPagePrivate(const TextEditor::FormatDescriptions &fd, +FontSettingsPagePrivate::FontSettingsPagePrivate(const FormatDescriptions &fd, Core::Id id, const QString &displayName, const QString &category) : diff --git a/src/plugins/texteditor/generichighlighter/context.cpp b/src/plugins/texteditor/generichighlighter/context.cpp index 3294528e44..775cd8daa6 100644 --- a/src/plugins/texteditor/generichighlighter/context.cpp +++ b/src/plugins/texteditor/generichighlighter/context.cpp @@ -129,7 +129,7 @@ bool Context::isDynamic() const void Context::updateDynamicRules(const QStringList &captures) const { - TextEditor::Internal::updateDynamicRules(m_rules, captures); + Internal::updateDynamicRules(m_rules, captures); } void Context::addRule(const QSharedPointer<Rule> &rule) diff --git a/src/plugins/texteditor/generichighlighter/highlighter.cpp b/src/plugins/texteditor/generichighlighter/highlighter.cpp index 07e26893ab..564108f27c 100644 --- a/src/plugins/texteditor/generichighlighter/highlighter.cpp +++ b/src/plugins/texteditor/generichighlighter/highlighter.cpp @@ -82,7 +82,7 @@ HighlighterCodeFormatterData *formatterData(const QTextBlock &block) } Highlighter::Highlighter(QTextDocument *parent) : - TextEditor::SyntaxHighlighter(parent), + SyntaxHighlighter(parent), m_regionDepth(0), m_indentationBasedFolding(false), m_tabSettings(0), @@ -90,24 +90,24 @@ Highlighter::Highlighter(QTextDocument *parent) : m_dynamicContextsCounter(0), m_isBroken(false) { - static QVector<TextEditor::TextStyle> categories; + static QVector<TextStyle> categories; if (categories.isEmpty()) { - categories << TextEditor::C_TEXT - << TextEditor::C_VISUAL_WHITESPACE - << TextEditor::C_KEYWORD - << TextEditor::C_TYPE - << TextEditor::C_COMMENT - << TextEditor::C_NUMBER - << TextEditor::C_NUMBER - << TextEditor::C_NUMBER - << TextEditor::C_STRING - << TextEditor::C_STRING - << TextEditor::C_TEXT // TODO : add style for alert (eg. yellow background) - << TextEditor::C_TEXT // TODO : add style for error (eg. red underline) - << TextEditor::C_FUNCTION - << TextEditor::C_TEXT - << TextEditor::C_TEXT - << TextEditor::C_LOCAL; + categories << C_TEXT + << C_VISUAL_WHITESPACE + << C_KEYWORD + << C_TYPE + << C_COMMENT + << C_NUMBER + << C_NUMBER + << C_NUMBER + << C_STRING + << C_STRING + << C_TEXT // TODO : add style for alert (eg. yellow background) + << C_TEXT // TODO : add style for error (eg. red underline) + << C_FUNCTION + << C_TEXT + << C_TEXT + << C_LOCAL; } setTextFormatCategories(categories); @@ -196,7 +196,7 @@ void Highlighter::highlightBlock(const QString &text) setCurrentBlockState(computeState(extractObservableState(currentBlockState()))); } - TextEditor::Parentheses parentheses; + Parentheses parentheses; for (int pos = 0; pos < length; ++pos) { const QChar c = text.at(pos); if (isOpeningParenthesis(c)) diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index a14260a743..6bdfd20bb3 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -176,10 +176,10 @@ QSharedPointer<HighlightDefinition> Manager::definition(const QString &id) try { reader.parse(source); } catch (const HighlighterException &e) { - Core::MessageManager::write( + MessageManager::write( QCoreApplication::translate("GenericHighlighter", "Generic highlighter error: ") + e.message(), - Core::MessageManager::WithFocus); + MessageManager::WithFocus); definition.clear(); } m_isBuildingDefinition.remove(id); diff --git a/src/plugins/texteditor/highlighterutils.cpp b/src/plugins/texteditor/highlighterutils.cpp index 12f2c59edd..c73f0c2332 100644 --- a/src/plugins/texteditor/highlighterutils.cpp +++ b/src/plugins/texteditor/highlighterutils.cpp @@ -70,7 +70,7 @@ void TextEditor::setMimeTypeForHighlighter(Highlighter *highlighter, const Core: SyntaxHighlighter *TextEditor::createGenericSyntaxHighlighter(const Core::MimeType &mimeType) { - TextEditor::Highlighter *highlighter = new TextEditor::Highlighter(); + Highlighter *highlighter = new Highlighter(); setMimeTypeForHighlighter(highlighter, mimeType); return highlighter; } diff --git a/src/plugins/texteditor/indenter.cpp b/src/plugins/texteditor/indenter.cpp index 03014ec46b..75bd1f3a6a 100644 --- a/src/plugins/texteditor/indenter.cpp +++ b/src/plugins/texteditor/indenter.cpp @@ -50,7 +50,7 @@ bool Indenter::isElectricCharacter(const QChar &) const void Indenter::indentBlock(QTextDocument *doc, const QTextBlock &block, const QChar &typedChar, - const TextEditor::TabSettings &tabSettings) + const TabSettings &tabSettings) { Q_UNUSED(doc); Q_UNUSED(block); @@ -61,7 +61,7 @@ void Indenter::indentBlock(QTextDocument *doc, void Indenter::indent(QTextDocument *doc, const QTextCursor &cursor, const QChar &typedChar, - const TextEditor::TabSettings &tabSettings) + const TabSettings &tabSettings) { if (cursor.hasSelection()) { QTextBlock block = doc->findBlock(cursor.selectionStart()); @@ -75,7 +75,7 @@ void Indenter::indent(QTextDocument *doc, } } -void Indenter::reindent(QTextDocument *doc, const QTextCursor &cursor, const TextEditor::TabSettings &tabSettings) +void Indenter::reindent(QTextDocument *doc, const QTextCursor &cursor, const TabSettings &tabSettings) { if (cursor.hasSelection()) { QTextBlock block = doc->findBlock(cursor.selectionStart()); diff --git a/src/plugins/texteditor/linenumberfilter.cpp b/src/plugins/texteditor/linenumberfilter.cpp index a6eebd2c81..1cc23a8275 100644 --- a/src/plugins/texteditor/linenumberfilter.cpp +++ b/src/plugins/texteditor/linenumberfilter.cpp @@ -63,7 +63,7 @@ void LineNumberFilter::prepareSearch(const QString &entry) m_hasCurrentEditor = EditorManager::currentEditor() != 0; } -QList<LocatorFilterEntry> LineNumberFilter::matchesFor(QFutureInterface<Core::LocatorFilterEntry> &, const QString &entry) +QList<LocatorFilterEntry> LineNumberFilter::matchesFor(QFutureInterface<LocatorFilterEntry> &, const QString &entry) { QList<LocatorFilterEntry> value; QStringList lineAndColumn = entry.split(QLatin1Char(':')); diff --git a/src/plugins/texteditor/normalindenter.cpp b/src/plugins/texteditor/normalindenter.cpp index b24a622475..5c539778e9 100644 --- a/src/plugins/texteditor/normalindenter.cpp +++ b/src/plugins/texteditor/normalindenter.cpp @@ -63,7 +63,7 @@ NormalIndenter::~NormalIndenter() void NormalIndenter::indentBlock(QTextDocument *doc, const QTextBlock &block, const QChar &typedChar, - const TextEditor::TabSettings &tabSettings) + const TabSettings &tabSettings) { Q_UNUSED(typedChar) diff --git a/src/plugins/texteditor/semantichighlighter.cpp b/src/plugins/texteditor/semantichighlighter.cpp index ec9a2246dd..56db6b547a 100644 --- a/src/plugins/texteditor/semantichighlighter.cpp +++ b/src/plugins/texteditor/semantichighlighter.cpp @@ -40,7 +40,7 @@ using namespace TextEditor; using namespace TextEditor::SemanticHighlighter; -void TextEditor::SemanticHighlighter::incrementalApplyExtraAdditionalFormats( +void SemanticHighlighter::incrementalApplyExtraAdditionalFormats( SyntaxHighlighter *highlighter, const QFuture<HighlightingResult> &future, int from, int to, @@ -110,7 +110,7 @@ void TextEditor::SemanticHighlighter::incrementalApplyExtraAdditionalFormats( } } -void TextEditor::SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd( +void SemanticHighlighter::clearExtraAdditionalFormatsUntilEnd( SyntaxHighlighter *highlighter, const QFuture<HighlightingResult> &future) { diff --git a/src/plugins/texteditor/snippets/plaintextsnippetprovider.cpp b/src/plugins/texteditor/snippets/plaintextsnippetprovider.cpp index 22a1ddd311..5437dc6e71 100644 --- a/src/plugins/texteditor/snippets/plaintextsnippetprovider.cpp +++ b/src/plugins/texteditor/snippets/plaintextsnippetprovider.cpp @@ -54,5 +54,5 @@ QString PlainTextSnippetProvider::displayName() const return QCoreApplication::translate("TextEditor::Internal::PlainTextSnippetProvider", "Text"); } -void PlainTextSnippetProvider::decorateEditor(TextEditor::SnippetEditorWidget *) const +void PlainTextSnippetProvider::decorateEditor(SnippetEditorWidget *) const {} diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index 6c6dfc3628..44f856b731 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -41,9 +41,9 @@ #include <math.h> -using namespace TextEditor; +namespace TextEditor { -class TextEditor::SyntaxHighlighterPrivate +class SyntaxHighlighterPrivate { SyntaxHighlighter *q_ptr; Q_DECLARE_PUBLIC(SyntaxHighlighter) @@ -74,7 +74,7 @@ public: } void applyFormatChanges(int from, int charsRemoved, int charsAdded); - void updateFormatsForCategories(const TextEditor::FontSettings &fontSettings); + void updateFormatsForCategories(const FontSettings &fontSettings); QVector<QTextCharFormat> formatChanges; QTextBlock currentBlock; @@ -82,7 +82,7 @@ public: bool inReformatBlocks; TextDocumentLayout::FoldValidator foldValidator; QVector<QTextCharFormat> formats; - QVector<TextEditor::TextStyle> formatCategories; + QVector<TextStyle> formatCategories; }; static bool adjustRange(QTextLayout::FormatRange &range, int from, int charsRemoved, int charsAdded) { @@ -735,13 +735,13 @@ QList<QColor> SyntaxHighlighter::generateColors(int n, const QColor &background) return result; } -void SyntaxHighlighter::setFontSettings(const TextEditor::FontSettings &fontSettings) +void SyntaxHighlighter::setFontSettings(const FontSettings &fontSettings) { Q_D(SyntaxHighlighter); d->updateFormatsForCategories(fontSettings); } -void SyntaxHighlighter::setTextFormatCategories(const QVector<TextEditor::TextStyle> &categories) +void SyntaxHighlighter::setTextFormatCategories(const QVector<TextStyle> &categories) { Q_D(SyntaxHighlighter); d->formatCategories = categories; @@ -756,10 +756,11 @@ QTextCharFormat SyntaxHighlighter::formatForCategory(int category) const return d->formats.at(category); } -void SyntaxHighlighterPrivate::updateFormatsForCategories(const TextEditor::FontSettings &fontSettings) +void SyntaxHighlighterPrivate::updateFormatsForCategories(const FontSettings &fontSettings) { formats = fontSettings.toTextCharFormats(formatCategories); } +} // namespace TextEditor #include "moc_syntaxhighlighter.cpp" diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 28a328ae3e..a7df77da60 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -286,8 +286,8 @@ public: void processTooltipRequest(const QTextCursor &c); - void transformSelection(Internal::TransformationMethod method); - void transformBlockSelection(Internal::TransformationMethod method); + void transformSelection(TransformationMethod method); + void transformBlockSelection(TransformationMethod method); bool inFindScope(const QTextCursor &cursor); bool inFindScope(int selectionStart, int selectionEnd); @@ -416,7 +416,7 @@ public: QTextCursor m_selectBlockAnchor; - Internal::TextBlockSelection m_blockSelection; + TextBlockSelection m_blockSelection; void moveCursorVisible(bool ensureVisible = true); @@ -435,7 +435,7 @@ public: QPoint m_markDragStart; bool m_markDragging; - QScopedPointer<Internal::ClipboardAssistProvider> m_clipboardAssistProvider; + QScopedPointer<ClipboardAssistProvider> m_clipboardAssistProvider; bool m_isMissingSyntaxDefinition; @@ -490,7 +490,7 @@ TextEditorWidgetPrivate::TextEditorWidgetPrivate(TextEditorWidget *parent) m_cursorBlockNumber(-1), m_blockCount(0), m_markDragging(false), - m_clipboardAssistProvider(new Internal::ClipboardAssistProvider), + m_clipboardAssistProvider(new ClipboardAssistProvider), m_isMissingSyntaxDefinition(false), m_autoCompleter(new AutoCompleter) { @@ -5871,14 +5871,14 @@ QList<QTextEdit::ExtraSelection> TextEditorWidget::extraSelections(ExtraSelectio return d->m_extraSelections[kind]; } -void TextEditorWidget::setExtraSelections(Core::Id kind, const QList<QTextEdit::ExtraSelection> &selections) +void TextEditorWidget::setExtraSelections(Id kind, const QList<QTextEdit::ExtraSelection> &selections) { // Private Core:Id identifiers from the 0-1000 range cannot be used here, they conflict with ExtraSelectionKind QTC_ASSERT(kind.uniqueIdentifier() >= NExtraSelectionKinds, return); d->setExtraSelections(kind.uniqueIdentifier(), selections); } -QList<QTextEdit::ExtraSelection> TextEditorWidget::extraSelections(Core::Id kind) const +QList<QTextEdit::ExtraSelection> TextEditorWidget::extraSelections(Id kind) const { // Private Core:Id identifiers from the 0-1000 range cannot be used here, they conflict with ExtraSelectionKind QTC_ASSERT(kind.uniqueIdentifier() >= NExtraSelectionKinds, return QList<QTextEdit::ExtraSelection>()); @@ -7262,7 +7262,7 @@ void TextEditorLinkLabel::mouseMoveEvent(QMouseEvent *event) if ((event->pos() - m_dragStartPosition).manhattanLength() < QApplication::startDragDistance()) return; - auto data = new Utils::FileDropMimeData; + auto data = new FileDropMimeData; data->addFile(m_link.targetFileName, m_link.targetLine, m_link.targetColumn); auto drag = new QDrag(this); drag->setMimeData(data); @@ -7275,9 +7275,7 @@ void TextEditorLinkLabel::mouseReleaseEvent(QMouseEvent *event) if (!m_link.hasValidTarget()) return; - Core::EditorManager::openEditorAt(m_link.targetFileName, - m_link.targetLine, - m_link.targetColumn); + EditorManager::openEditorAt(m_link.targetFileName, m_link.targetLine, m_link.targetColumn); } // @@ -7317,7 +7315,7 @@ public: TextEditorFactory::AutoCompleterCreator m_autoCompleterCreator; TextEditorFactory::IndenterCreator m_indenterCreator; TextEditorFactory::SyntaxHighLighterCreator m_syntaxHighlighterCreator; - Utils::CommentDefinition::Style m_commentStyle; + CommentDefinition::Style m_commentStyle; QList<BaseHoverHandler *> m_hoverHandlers; // owned CompletionAssistProvider * m_completionAssistProvider; // owned bool m_duplicatedSupported; @@ -7477,14 +7475,14 @@ BaseTextEditor *TextEditorFactoryPrivate::createEditorHelper(const TextDocumentP widget->d->m_commentDefinition.setStyle(m_commentStyle); QObject::connect(widget, &TextEditorWidget::activateEditor, - [editor]() { Core::EditorManager::activateEditor(editor); }); + [editor]() { EditorManager::activateEditor(editor); }); widget->finalizeInitialization(); editor->finalizeInitialization(); QObject::connect(widget->d->m_cursorPositionLabel, &LineColumnLabel::clicked, [editor] { EditorManager::activateEditor(editor, EditorManager::IgnoreNavigationHistory); - if (Core::Command *cmd = ActionManager::command(Core::Constants::GOTO)) { + if (Command *cmd = ActionManager::command(Core::Constants::GOTO)) { if (QAction *act = cmd->action()) act->trigger(); } diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index 89f8c84297..978d1dc614 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -273,14 +273,14 @@ TextEditorSettings::TextEditorSettings(QObject *parent) ExtensionSystem::PluginManager::addObject(d->m_fontSettingsPage); // Add the GUI used to configure the tab, storage and interaction settings - TextEditor::BehaviorSettingsPageParameters behaviorSettingsPageParameters; + BehaviorSettingsPageParameters behaviorSettingsPageParameters; behaviorSettingsPageParameters.id = Constants::TEXT_EDITOR_BEHAVIOR_SETTINGS; behaviorSettingsPageParameters.displayName = tr("Behavior"); behaviorSettingsPageParameters.settingsPrefix = QLatin1String("text"); d->m_behaviorSettingsPage = new BehaviorSettingsPage(behaviorSettingsPageParameters, this); ExtensionSystem::PluginManager::addObject(d->m_behaviorSettingsPage); - TextEditor::DisplaySettingsPageParameters displaySettingsPageParameters; + DisplaySettingsPageParameters displaySettingsPageParameters; displaySettingsPageParameters.id = Constants::TEXT_EDITOR_DISPLAY_SETTINGS; displaySettingsPageParameters.displayName = tr("Display"); displaySettingsPageParameters.settingsPrefix = QLatin1String("text"); @@ -377,7 +377,7 @@ const ExtraEncodingSettings &TextEditorSettings::extraEncodingSettings() return d->m_behaviorSettingsPage->extraEncodingSettings(); } -void TextEditorSettings::setCompletionSettings(const TextEditor::CompletionSettings &settings) +void TextEditorSettings::setCompletionSettings(const CompletionSettings &settings) { if (d->m_completionSettings == settings) return; diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index 9f8a729fa8..5454761c4c 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -209,7 +209,7 @@ bool TextMarkRegistry::remove(TextMark *mark) return m_marks[FileName::fromString(mark->fileName())].remove(mark); } -void TextMarkRegistry::editorOpened(Core::IEditor *editor) +void TextMarkRegistry::editorOpened(IEditor *editor) { auto document = qobject_cast<TextDocument *>(editor ? editor->document() : 0); if (!document) |