Skip to content
GitLab
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
716b3008
Commit
716b3008
authored
Jun 07, 2010
by
Thorbjørn Lindeijer
Browse files
Removed no longer used code
Reviewed-by: mae
parent
4ae5d626
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
716b3008
...
...
@@ -710,50 +710,6 @@ void CPPEditor::createToolBar(CPPEditorEditable *editable)
static_cast
<
QHBoxLayout
*>
(
w
->
layout
())
->
insertWidget
(
0
,
m_methodCombo
,
1
);
}
void
CPPEditor
::
inAllRenameSelections
(
EditOperation
operation
,
const
QTextEdit
::
ExtraSelection
&
currentRenameSelection
,
QTextCursor
cursor
,
const
QString
&
text
)
{
cursor
.
beginEditBlock
();
const
int
startOffset
=
cursor
.
selectionStart
()
-
currentRenameSelection
.
cursor
.
anchor
();
const
int
endOffset
=
cursor
.
selectionEnd
()
-
currentRenameSelection
.
cursor
.
anchor
();
const
int
length
=
endOffset
-
startOffset
;
for
(
int
i
=
0
;
i
<
m_renameSelections
.
size
();
++
i
)
{
QTextEdit
::
ExtraSelection
&
s
=
m_renameSelections
[
i
];
int
pos
=
s
.
cursor
.
anchor
();
int
endPos
=
s
.
cursor
.
position
();
s
.
cursor
.
setPosition
(
pos
+
startOffset
);
s
.
cursor
.
setPosition
(
pos
+
endOffset
,
QTextCursor
::
KeepAnchor
);
switch
(
operation
)
{
case
DeletePreviousChar
:
s
.
cursor
.
deletePreviousChar
();
endPos
-=
qMax
(
1
,
length
);
break
;
case
DeleteChar
:
s
.
cursor
.
deleteChar
();
endPos
-=
qMax
(
1
,
length
);
break
;
case
InsertText
:
s
.
cursor
.
insertText
(
text
);
endPos
+=
text
.
length
()
-
length
;
break
;
}
s
.
cursor
.
setPosition
(
pos
);
s
.
cursor
.
setPosition
(
endPos
,
QTextCursor
::
KeepAnchor
);
}
cursor
.
endEditBlock
();
setExtraSelections
(
CodeSemanticsSelection
,
m_renameSelections
);
setTextCursor
(
cursor
);
}
void
CPPEditor
::
paste
()
{
if
(
m_currentRenameSelection
==
-
1
)
{
...
...
src/plugins/cppeditor/cppeditor.h
View file @
716b3008
...
...
@@ -266,15 +266,6 @@ private:
void
createToolBar
(
CPPEditorEditable
*
editable
);
enum
EditOperation
{
DeleteChar
,
DeletePreviousChar
,
InsertText
};
void
inAllRenameSelections
(
EditOperation
operation
,
const
QTextEdit
::
ExtraSelection
&
currentRenameSelection
,
QTextCursor
cursor
,
const
QString
&
text
=
QString
());
void
startRename
();
void
finishRename
();
void
abortRename
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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