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
Utilities
Kate
Commits
d62a490a
Commit
d62a490a
authored
Oct 18, 2021
by
Waqar Ahmed
Browse files
changes
parent
43702d31
Pipeline
#89545
passed with stage
in 3 minutes and 3 seconds
Changes
9
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
addons/colorpicker/colorpickerconfigpage.cpp
View file @
d62a490a
...
...
@@ -55,7 +55,7 @@ KateColorPickerConfigPage::KateColorPickerConfigPage(QWidget *parent, KateColorP
chkHexLengths
.
insert
(
6
,
new
QCheckBox
(
i18n
(
"6 digits (#RRGGBB)"
),
this
));
chkHexLengths
.
insert
(
3
,
new
QCheckBox
(
i18n
(
"3 digits (#RGB)"
),
this
));
for
(
QCheckBox
*
chk
:
qAsC
onst
(
chkHexLengths
))
{
for
(
QCheckBox
*
chk
:
std
::
as_c
onst
(
chkHexLengths
))
{
hexLayout
->
addWidget
(
chk
);
connect
(
chk
,
&
QCheckBox
::
stateChanged
,
this
,
&
KateColorPickerConfigPage
::
changed
);
}
...
...
@@ -118,8 +118,9 @@ void KateColorPickerConfigPage::reset()
chkPreviewAfterColor
->
setChecked
(
config
.
readEntry
(
"PreviewAfterColor"
,
true
));
const
QList
<
int
>
enabledHexLengths
=
config
.
readEntry
(
"HexLengths"
,
QList
<
int
>
{
12
,
9
,
6
,
3
});
const
auto
hexLengths
=
chkHexLengths
.
keys
();
for
(
const
int
hexLength
:
hexLengths
)
{
chkHexLengths
[
hexLength
]
->
setChecked
(
enabledHexLengths
.
contains
(
hexLength
));
for
(
auto
it
=
chkHexLengths
.
cbegin
();
it
!=
chkHexLengths
.
cend
();
++
it
)
{
int
hexLength
=
it
.
key
();
it
.
value
()
->
setChecked
(
enabledHexLengths
.
contains
(
hexLength
));
}
}
addons/compiler-explorer/ce_widget.cpp
View file @
d62a490a
...
...
@@ -396,11 +396,12 @@ bool CEWidget::compilationFailed(const QJsonObject &obj)
text
.
replace
(
re
,
QLatin1String
(
""
));
QStringList
lines
;
lines
.
reserve
(
text
.
size
()
/
maxChars
);
for
(
int
i
=
0
;
i
<
text
.
size
();
i
+=
maxChars
)
{
lines
<<
text
.
mid
(
i
,
maxChars
);
}
for
(
const
auto
&
line
:
qAsC
onst
(
lines
))
{
for
(
const
auto
&
line
:
std
::
as_c
onst
(
lines
))
{
AsmRow
r
;
r
.
text
=
line
;
rows
.
push_back
(
r
);
...
...
addons/lspclient/lspclientpluginview.cpp
View file @
d62a490a
...
...
@@ -2694,7 +2694,7 @@ public:
// collect active urls
QSet
<
QString
>
fpaths
;
const
auto
views
=
m_mainWindow
->
views
();
for
(
const
auto
&
view
:
views
)
{
for
(
const
auto
view
:
views
)
{
if
(
auto
doc
=
view
->
document
())
{
fpaths
.
insert
(
doc
->
url
().
toLocalFile
());
}
...
...
addons/project/kateprojectcompletion.cpp
View file @
d62a490a
...
...
@@ -183,7 +183,7 @@ void KateProjectCompletion::allMatches(QStandardItemModel &model, KTextEditor::V
/**
* let project index fill the completion for this document
*/
for
(
const
auto
&
project
:
qAsConst
(
projects
))
{
for
(
const
auto
project
:
qAsConst
(
projects
))
{
if
(
project
->
projectIndex
())
{
project
->
projectIndex
()
->
findMatches
(
model
,
view
->
document
()
->
text
(
range
),
KateProjectIndex
::
CompletionMatches
);
}
...
...
addons/project/kateprojectinfoviewindex.cpp
View file @
d62a490a
...
...
@@ -103,7 +103,7 @@ void KateProjectInfoViewIndex::slotTextChanged(const QString &text)
m_project
->
projectIndex
()
->
findMatches
(
*
m_model
,
text
,
KateProjectIndex
::
FindMatches
);
}
else
if
(
!
text
.
isEmpty
())
{
const
auto
projects
=
m_pluginView
->
plugin
()
->
projects
();
for
(
const
auto
&
project
:
projects
)
{
for
(
const
auto
project
:
projects
)
{
if
(
project
->
projectIndex
())
{
project
->
projectIndex
()
->
findMatches
(
*
m_model
,
text
,
KateProjectIndex
::
FindMatches
,
TAG_FULLMATCH
|
TAG_OBSERVECASE
);
}
...
...
addons/project/tools/kateprojectcodeanalysistoolclazy.cpp
View file @
d62a490a
...
...
@@ -64,7 +64,7 @@ QStringList KateProjectCodeAnalysisToolClazy::arguments()
args
=
QStringList
{
QStringLiteral
(
"-p"
),
compileCommandsDir
};
}
QStringList
fileList
=
filter
(
m_project
->
files
());
const
QStringList
fileList
=
filter
(
m_project
->
files
());
setActualFilesCount
(
fileList
.
size
());
return
args
<<
fileList
;
...
...
kate/kateapp.cpp
View file @
d62a490a
...
...
@@ -296,7 +296,7 @@ bool KateApp::openUrl(const QUrl &url, const QString &encoding, bool isTempFile)
bool
KateApp
::
isOnActivity
(
const
QString
&
activity
)
{
for
(
const
auto
&
window
:
qAsConst
(
m_mainWindows
))
{
for
(
const
auto
window
:
qAsConst
(
m_mainWindows
))
{
const
KWindowInfo
info
(
window
->
winId
(),
{},
NET
::
WM2Activities
);
const
auto
activities
=
info
.
activities
();
// handle special case of "on all activities"
...
...
kate/kateoutputview.cpp
View file @
d62a490a
...
...
@@ -74,8 +74,8 @@ private Q_SLOTS:
// collect the stuff
QString
clipboardText
;
int
row
=
-
1
;
const
auto
selectedI
ndexes
=
this
->
selectedIndexes
();
for
(
const
auto
selected
:
selectedI
ndexe
s
)
{
const
auto
selectedI
dxs
=
selectedIndexes
();
for
(
const
auto
&
selected
:
selectedI
dx
s
)
{
// we want to separate columns by " " and rows by "\n"
// first element: just append + remember row
...
...
kate/session/katesessionmanager.cpp
View file @
d62a490a
...
...
@@ -81,11 +81,11 @@ void KateSessionManager::updateSessionList()
changed
=
true
;
}
}
// Remove gone sessions from our list
const
auto
sessions
=
m_sessions
.
keys
();
for
(
const
QString
&
session
:
sessions
)
{
if
((
list
.
indexOf
(
session
)
<
0
)
&&
(
m_sessions
.
value
(
session
)
!=
activeSession
()))
{
m_sessions
.
remove
(
session
);
for
(
auto
it
=
m_sessions
.
cbegin
();
it
!=
m_sessions
.
cend
();
++
it
)
{
if
(
list
.
indexOf
(
it
.
key
())
<
0
&&
it
.
value
()
!=
activeSession
())
{
m_sessions
.
remove
(
it
.
key
());
changed
=
true
;
}
}
...
...
Write
Preview
Supports
Markdown
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