Commit 23ea6830 authored by hjk's avatar hjk
Browse files

TextEditor: Remove some TextEditor:: qualification



Change-Id: I7e47ff13adefe70087207c4f59d6d19a55dcf9f8
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 57d9d864
......@@ -83,7 +83,7 @@ enum CompletionOrder {
TypeOrder = -30
};
static void addCompletion(QList<TextEditor::BasicProposalItem *> *completions,
static void addCompletion(QList<BasicProposalItem *> *completions,
const QString &text,
const QIcon &icon,
int order,
......@@ -100,7 +100,7 @@ static void addCompletion(QList<TextEditor::BasicProposalItem *> *completions,
completions->append(item);
}
static void addCompletions(QList<TextEditor::BasicProposalItem *> *completions,
static void addCompletions(QList<BasicProposalItem *> *completions,
const QStringList &newCompletions,
const QIcon &icon,
int order)
......@@ -125,10 +125,10 @@ public:
class CompletionAdder : public PropertyProcessor
{
protected:
QList<TextEditor::BasicProposalItem *> *completions;
QList<BasicProposalItem *> *completions;
public:
CompletionAdder(QList<TextEditor::BasicProposalItem *> *completions,
CompletionAdder(QList<BasicProposalItem *> *completions,
const QIcon &icon, int order)
: completions(completions)
, icon(icon)
......@@ -155,7 +155,7 @@ public:
class LhsCompletionAdder : public CompletionAdder
{
public:
LhsCompletionAdder(QList<TextEditor::BasicProposalItem *> *completions,
LhsCompletionAdder(QList<BasicProposalItem *> *completions,
const QIcon &icon,
int order,
bool afterOn)
......@@ -353,7 +353,7 @@ bool QmlJSAssistProposalItem::prematurelyApplies(const QChar &c) const
|| (text().endsWith(QLatin1Char('.')) && c == QLatin1Char('.'));
}
void QmlJSAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor *editor,
void QmlJSAssistProposalItem::applyContextualContent(BaseTextEditor *editor,
int basePosition) const
{
const int currentPosition = editor->position();
......@@ -392,7 +392,7 @@ void QmlJSAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor
// -------------------------
// FunctionHintProposalModel
// -------------------------
class FunctionHintProposalModel : public TextEditor::IFunctionHintProposalModel
class FunctionHintProposalModel : public IFunctionHintProposalModel
{
public:
FunctionHintProposalModel(const QString &functionName, const QStringList &namedArguments,
......@@ -968,7 +968,7 @@ bool QmlJSCompletionAssistProcessor::completeUrl(const QString &relativeBasePath
QmlJSCompletionAssistInterface::QmlJSCompletionAssistInterface(QTextDocument *textDocument,
int position,
const QString &fileName,
TextEditor::AssistReason reason,
AssistReason reason,
const SemanticInfo &info)
: DefaultAssistInterface(textDocument, position, fileName, reason)
, m_semanticInfo(info)
......@@ -1036,7 +1036,7 @@ void QmlJSAssistProposalModel::sort(const QString &prefix)
std::sort(currentItems().first, currentItems().second, QmlJSLessThan(prefix));
}
bool QmlJSAssistProposalModel::keepPerfectMatch(TextEditor::AssistReason reason) const
bool QmlJSAssistProposalModel::keepPerfectMatch(AssistReason reason) const
{
return reason == ExplicitlyInvoked;
}
......
......@@ -37,14 +37,13 @@
#include <texteditor/texteditorsettings.h>
#include <texteditor/basetexteditor.h>
using namespace TextEditor;
namespace TextEditor {
// --------------------------
// Keywords
// --------------------------
Keywords::Keywords()
{
}
// Note: variables and functions must be sorted
......@@ -99,7 +98,7 @@ bool KeywordsAssistProposalItem::prematurelyApplies(const QChar &c) const
return false;
}
void KeywordsAssistProposalItem::applyContextualContent(TextEditor::BaseTextEditor *editor,
void KeywordsAssistProposalItem::applyContextualContent(BaseTextEditor *editor,
int basePosition) const
{
const CompletionSettings &settings = TextEditorSettings::completionSettings();
......@@ -271,4 +270,4 @@ void KeywordsCompletionAssistProcessor::addWordsToProposalList(QList<BasicPropos
}
}
} // namespace TextEditor
......@@ -56,20 +56,19 @@ private:
QMap<QString, QStringList> m_functionArgs;
};
class TEXTEDITOR_EXPORT KeywordsAssistProposalItem : public TextEditor::BasicProposalItem
class TEXTEDITOR_EXPORT KeywordsAssistProposalItem : public BasicProposalItem
{
public:
KeywordsAssistProposalItem(Keywords keywords);
~KeywordsAssistProposalItem();
bool prematurelyApplies(const QChar &c) const QTC_OVERRIDE;
void applyContextualContent(TextEditor::BaseTextEditor *editor,
int basePosition) const QTC_OVERRIDE;
void applyContextualContent(BaseTextEditor *editor, int basePosition) const QTC_OVERRIDE;
private:
Keywords m_keywords;
};
class TEXTEDITOR_EXPORT KeywordsFunctionHintModel : public TextEditor::IFunctionHintProposalModel
class TEXTEDITOR_EXPORT KeywordsFunctionHintModel : public IFunctionHintProposalModel
{
public:
KeywordsFunctionHintModel(const QStringList &functionSymbols);
......@@ -84,13 +83,13 @@ private:
QStringList m_functionSymbols;
};
class TEXTEDITOR_EXPORT KeywordsCompletionAssistProcessor : public TextEditor::IAssistProcessor
class TEXTEDITOR_EXPORT KeywordsCompletionAssistProcessor : public IAssistProcessor
{
public:
KeywordsCompletionAssistProcessor(Keywords keywords);
~KeywordsCompletionAssistProcessor();
TextEditor::IAssistProposal *perform(const TextEditor::IAssistInterface *interface) QTC_OVERRIDE;
IAssistProposal *perform(const IAssistInterface *interface) QTC_OVERRIDE;
QChar startOfCommentChar() const;
private:
......@@ -101,7 +100,7 @@ private:
int m_startPosition;
QString m_word;
QScopedPointer<const TextEditor::IAssistInterface> m_interface;
QScopedPointer<const IAssistInterface> m_interface;
const QIcon m_variableIcon;
const QIcon m_functionIcon;
Keywords m_keywords;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment