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
Utilities
Kate
Commits
a3179e18
Commit
a3179e18
authored
Nov 01, 2022
by
Waqar Ahmed
Browse files
Remove documentTabIndexes
parent
f80cfc57
Pipeline
#259236
failed with stage
in 12 minutes and 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/katetabbar.cpp
View file @
a3179e18
...
...
@@ -110,18 +110,6 @@ void KateTabBar::readConfig()
m_middleClickCloseDocument
=
cgGeneral
.
readEntry
(
"Tab Middle Click Close Document"
,
true
);
}
std
::
vector
<
int
>
KateTabBar
::
documentTabIndexes
()
const
{
std
::
vector
<
int
>
docs
;
const
int
tabCount
=
count
();
for
(
int
i
=
0
;
i
<
tabCount
;
++
i
)
{
if
(
tabData
(
i
).
value
<
DocOrWidget
>
().
doc
())
{
docs
.
push_back
(
i
);
}
}
return
docs
;
}
void
KateTabBar
::
setActive
(
bool
active
)
{
if
(
active
==
m_isActive
)
{
...
...
@@ -367,7 +355,7 @@ void KateTabBar::setCurrentDocument(DocOrWidget docOrWidget)
// else: if we are still inside the allowed number of tabs or have no limit
// => create new tab and be done
if
((
m_tabCountLimit
==
0
)
||
documentTabIndexes
().
size
()
<
(
size_t
)
m_tabCountLimit
)
{
if
((
m_tabCountLimit
==
0
)
||
(
count
()
<
m_tabCountLimit
)
)
{
m_beingAdded
=
docOrWidget
;
insertTab
(
-
1
,
docOrWidget
.
doc
()
?
docOrWidget
.
doc
()
->
documentName
()
:
docOrWidget
.
widget
()
->
windowTitle
());
return
;
...
...
apps/lib/katetabbar.h
View file @
a3179e18
...
...
@@ -126,11 +126,6 @@ private:
using
QTabBar
::
addTab
;
using
QTabBar
::
insertTab
;
/**
* Indexes of tabs which are a normal KTextEditor::View
*/
std
::
vector
<
int
>
documentTabIndexes
()
const
;
bool
m_isActive
=
false
;
DocOrWidget
m_beingAdded
=
static_cast
<
QWidget
*>
(
nullptr
);
...
...
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