Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ed5f8004
Commit
ed5f8004
authored
Feb 21, 2011
by
hjk
Browse files
completion: call directly from base text editor
Reviewed-by: con
parent
008bd2c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppplugin.cpp
View file @
ed5f8004
...
...
@@ -178,12 +178,6 @@ void CppPlugin::initializeEditor(CPPEditor *editor)
TextEditor
::
TextEditorSettings
::
instance
()
->
initializeEditor
(
editor
);
// semantic auto completion and quick fix
connect
(
editor
,
SIGNAL
(
requestCompletion
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)),
TextEditor
::
CompletionSupport
::
instance
(),
SLOT
(
complete
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)));
// method combo box sorting
connect
(
this
,
SIGNAL
(
outlineSortingChanged
(
bool
)),
editor
,
SLOT
(
setSortedOutline
(
bool
)));
...
...
src/plugins/glsleditor/glsleditorplugin.cpp
View file @
ed5f8004
...
...
@@ -249,12 +249,6 @@ void GLSLEditorPlugin::initializeEditor(GLSLEditor::GLSLTextEditor *editor)
m_actionHandler
->
setupActions
(
editor
);
TextEditor
::
TextEditorSettings
::
instance
()
->
initializeEditor
(
editor
);
// auto completion and quick fix
connect
(
editor
,
SIGNAL
(
requestCompletion
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)),
TextEditor
::
CompletionSupport
::
instance
(),
SLOT
(
autoComplete
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)));
}
...
...
src/plugins/qmljseditor/qmljseditorplugin.cpp
View file @
ed5f8004
...
...
@@ -271,12 +271,6 @@ void QmlJSEditorPlugin::initializeEditor(QmlJSEditor::QmlJSTextEditor *editor)
m_actionHandler
->
setupActions
(
editor
);
TextEditor
::
TextEditorSettings
::
instance
()
->
initializeEditor
(
editor
);
// auto completion and quick fix
connect
(
editor
,
SIGNAL
(
requestCompletion
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)),
TextEditor
::
CompletionSupport
::
instance
(),
SLOT
(
complete
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)));
}
void
QmlJSEditorPlugin
::
followSymbolUnderCursor
()
...
...
src/plugins/qt4projectmanager/profileeditorfactory.cpp
View file @
ed5f8004
...
...
@@ -90,12 +90,6 @@ Core::IEditor *ProFileEditorFactory::createEditor(QWidget *parent)
{
ProFileEditor
*
editor
=
new
ProFileEditor
(
parent
,
this
,
m_actionHandler
);
TextEditor
::
TextEditorSettings
::
instance
()
->
initializeEditor
(
editor
);
// auto completion
connect
(
editor
,
SIGNAL
(
requestCompletion
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)),
TextEditor
::
CompletionSupport
::
instance
(),
SLOT
(
complete
(
TextEditor
::
ITextEditable
*
,
TextEditor
::
CompletionPolicy
,
bool
)));
return
editor
->
editableInterface
();
}
...
...
src/plugins/texteditor/basetexteditor.cpp
View file @
ed5f8004
...
...
@@ -540,12 +540,12 @@ void BaseTextEditor::selectEncoding()
void
BaseTextEditor
::
triggerCompletions
()
{
emit
requestC
omplet
ion
(
editableInterface
(),
TextEditor
::
SemanticCompletion
,
true
);
CompletionSupport
::
instance
()
->
c
omplet
e
(
editableInterface
(),
SemanticCompletion
,
true
);
}
void
BaseTextEditor
::
triggerQuickFix
()
{
emit
requestC
omplet
ion
(
editableInterface
(),
TextEditor
::
QuickFixCompletion
,
true
);
CompletionSupport
::
instance
()
->
c
omplet
e
(
editableInterface
(),
QuickFixCompletion
,
true
);
}
QString
BaseTextEditor
::
msgTextTooLarge
(
quint64
size
)
...
...
@@ -1851,7 +1851,7 @@ void BaseTextEditor::maybeRequestAutoCompletion(const QChar &ch)
}
}
else
{
d
->
m_requestAutoCompletionTimer
->
stop
();
emit
requestC
omplet
ion
(
editableInterface
(),
TextEditor
::
SemanticCompletion
,
false
);
CompletionSupport
::
instance
()
->
c
omplet
e
(
editableInterface
(),
SemanticCompletion
,
false
);
}
}
...
...
@@ -1862,9 +1862,9 @@ void BaseTextEditor::_q_requestAutoCompletion()
if
(
CompletionSupport
::
instance
()
->
isActive
())
return
;
if
(
d
->
m_requestAutoCompletionRevision
==
document
()
->
revision
()
&&
d
->
m_requestAutoCompletionPosition
==
position
())
emit
requestC
omplet
ion
(
editableInterface
(),
TextEditor
::
SemanticCompletion
,
false
);
if
(
d
->
m_requestAutoCompletionRevision
==
document
()
->
revision
()
&&
d
->
m_requestAutoCompletionPosition
==
position
())
CompletionSupport
::
instance
()
->
c
omplet
e
(
editableInterface
(),
SemanticCompletion
,
false
);
}
void
BaseTextEditor
::
insertCodeSnippet
(
const
QTextCursor
&
cursor_arg
,
const
QString
&
snippet
)
...
...
src/plugins/texteditor/basetexteditor.h
View file @
ed5f8004
...
...
@@ -484,8 +484,6 @@ signals:
void
requestFontZoom
(
int
zoom
);
void
requestZoomReset
();
void
requestBlockUpdate
(
const
QTextBlock
&
);
void
requestCompletion
(
TextEditor
::
ITextEditable
*
editor
,
TextEditor
::
CompletionPolicy
,
bool
forced
);
private:
void
maybeRequestAutoCompletion
(
const
QChar
&
ch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment