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
b298f1cc
Commit
b298f1cc
authored
Apr 05, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Apr 05, 2021
Browse files
Fix some build warnings
Signed-off-by:
Waqar Ahmed
<
waqar.17a@gmail.com
>
parent
b9641c91
Changes
7
Hide whitespace changes
Inline
Side-by-side
addons/filebrowser/katebookmarkhandler.cpp
View file @
b298f1cc
...
...
@@ -10,6 +10,7 @@
#include "katebookmarkhandler.h"
#include "katefilebrowser.h"
#include <KActionCollection>
#include <KDirOperator>
#include <QMenu>
...
...
@@ -33,7 +34,18 @@ KateBookmarkHandler::KateBookmarkHandler(KateFileBrowser *parent, QMenu *kpopupm
KBookmarkManager
*
manager
=
KBookmarkManager
::
managerForFile
(
file
,
QStringLiteral
(
"kate"
));
manager
->
setUpdate
(
true
);
m_bookmarkMenu
=
new
KBookmarkMenu
(
manager
,
this
,
m_menu
,
parent
->
actionCollection
());
m_bookmarkMenu
=
new
KBookmarkMenu
(
manager
,
this
,
m_menu
);
KActionCollection
*
ac
=
parent
->
actionCollection
();
if
(
QAction
*
addBookmarkAction
=
m_bookmarkMenu
->
addBookmarkAction
())
{
ac
->
addAction
(
addBookmarkAction
->
objectName
(),
addBookmarkAction
);
}
if
(
QAction
*
newBookmarkFolderAction
=
m_bookmarkMenu
->
newBookmarkFolderAction
())
{
ac
->
addAction
(
newBookmarkFolderAction
->
objectName
(),
newBookmarkFolderAction
);
}
if
(
QAction
*
editBookmarksAction
=
m_bookmarkMenu
->
editBookmarksAction
())
{
ac
->
addAction
(
editBookmarksAction
->
objectName
(),
editBookmarksAction
);
}
}
KateBookmarkHandler
::~
KateBookmarkHandler
()
...
...
addons/filebrowser/katefilebrowserconfig.cpp
View file @
b298f1cc
...
...
@@ -55,7 +55,7 @@ KateFileBrowserConfigPage::KateFileBrowserConfigPage(QWidget *parent, KateFileBr
,
fileBrowser
(
kfb
)
{
QVBoxLayout
*
lo
=
new
QVBoxLayout
(
this
);
int
spacing
=
QApplication
::
style
()
->
pixelMetric
(
QStyle
::
PM_
DefaultLayout
Spacing
);
int
spacing
=
QApplication
::
style
()
->
pixelMetric
(
QStyle
::
PM_
LayoutVertical
Spacing
);
lo
->
setSpacing
(
spacing
);
lo
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
addons/konsole/kateconsole.cpp
View file @
b298f1cc
...
...
@@ -496,7 +496,7 @@ KateKonsoleConfigPage::KateKonsoleConfigPage(QWidget *parent, KateKonsolePlugin
,
mPlugin
(
plugin
)
{
QVBoxLayout
*
lo
=
new
QVBoxLayout
(
this
);
lo
->
setSpacing
(
QApplication
::
style
()
->
pixelMetric
(
QStyle
::
PM_
DefaultLayout
Spacing
));
lo
->
setSpacing
(
QApplication
::
style
()
->
pixelMetric
(
QStyle
::
PM_
LayoutHorizontal
Spacing
));
lo
->
setContentsMargins
(
0
,
0
,
0
,
0
);
cbAutoSyncronize
=
new
QCheckBox
(
i18n
(
"&Automatically synchronize the terminal with the current document when possible"
),
this
);
...
...
addons/lspclient/lspclientpluginview.cpp
View file @
b298f1cc
...
...
@@ -1893,7 +1893,7 @@ public:
auto
location
=
QStringLiteral
(
"%1:%2"
).
arg
(
basename
).
arg
(
related
.
location
.
range
.
start
().
line
());
relatedItemMessage
->
setText
(
QStringLiteral
(
"[%1] %2"
).
arg
(
location
).
arg
(
related
.
message
));
relatedItemMessage
->
setData
(
diagnosticsIcon
(
LSPDiagnosticSeverity
::
Information
),
Qt
::
DecorationRole
);
item
->
appendRow
(
{
relatedItemMessage
}
);
item
->
appendRow
(
relatedItemMessage
);
m_diagnosticsTree
->
setExpanded
(
item
->
index
(),
true
);
}
}
...
...
addons/lspclient/lspclientsymbolview.cpp
View file @
b298f1cc
...
...
@@ -49,6 +49,7 @@ public:
,
m_change
(
change_ms
)
,
m_motion
(
motion_ms
)
{
Q_UNUSED
(
m_plugin
);
// get updated
m_changeTimer
.
setSingleShot
(
true
);
auto
ch
=
[
this
]()
{
...
...
addons/project/filehistorywidget.cpp
View file @
b298f1cc
...
...
@@ -146,35 +146,6 @@ public:
QRect
prect
=
opt
.
rect
;
// const int ascent = (opt.fontMetrics.ascent() / 2);
// draw line
// prect.setX(prect.x() + ascent + 2);
// auto sp = painter->pen();
// auto p = painter->pen();
// p.setWidth(2);
// painter->setPen(p);
// auto p1 = prect.bottomLeft();
// int w = opt.fontMetrics.ascent();
// int h = opt.rect.height();
// int r = w / 3;
// p1.ry() -= (h / 2) - r;
// painter->setRenderHint(QPainter::Antialiasing, true);
// QPoint pp = p1;
// pp.ry() -= 3 + 1;
// painter->drawLine(prect.topLeft(), pp);
// painter->drawEllipse(p1, r, r);
// auto p2 = p1;
// p2.ry() += r + 1;
// painter->drawLine(p2, prect.bottomLeft());
// painter->setRenderHint(QPainter::Antialiasing, false);
// painter->setPen(sp);
// padding
prect
.
setX
(
prect
.
x
()
+
5
);
prect
.
setY
(
prect
.
y
()
+
lineHeight
);
...
...
@@ -188,8 +159,9 @@ public:
// draw author on right
auto
dt
=
QDateTime
::
fromSecsSinceEpoch
(
commit
.
authorDate
);
QString
timestamp
=
(
dt
.
date
()
==
QDate
::
currentDate
())
?
dt
.
time
().
toString
(
Qt
::
DefaultLocaleShortDate
)
:
dt
.
date
().
toString
(
Qt
::
DefaultLocaleShortDate
);
QLocale
l
;
const
bool
isToday
=
dt
.
date
()
==
QDate
::
currentDate
();
QString
timestamp
=
isToday
?
l
.
toString
(
dt
.
time
(),
QLocale
::
ShortFormat
)
:
l
.
toString
(
dt
.
date
(),
QLocale
::
ShortFormat
);
painter
->
drawText
(
prect
,
Qt
::
AlignRight
,
timestamp
);
// draw commit hash
...
...
addons/symbolviewer/ecma_parser.cpp
View file @
b298f1cc
...
...
@@ -116,7 +116,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
if
((
current
==
QLatin1Char
(
'c'
))
&&
(
stripped
.
indexOf
(
QLatin1String
(
"class"
),
c
)
==
c
))
{
identifier
.
clear
();
c
+=
6
;
for
(
c
=
c
;
c
<
stripped
.
length
();
c
++
)
{
for
(
/*
c = c
*/
;
c
<
stripped
.
length
();
c
++
)
{
current
=
stripped
.
at
(
c
);
// look for the beginning of the class itself
if
((
current
==
QLatin1Char
(
'('
))
||
(
current
==
QLatin1Char
(
'{'
)))
{
...
...
@@ -152,7 +152,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
c
+=
8
;
// look for the beginning of the parameters
identifier
.
clear
();
for
(
c
=
c
;
c
<
stripped
.
length
();
c
++
)
{
for
(
/*
c = c
*/
;
c
<
stripped
.
length
();
c
++
)
{
current
=
stripped
.
at
(
c
);
// look for the beginning of the function definition
if
((
current
==
QLatin1Char
(
'('
))
||
(
current
==
QLatin1Char
(
'{'
)))
{
...
...
@@ -241,7 +241,7 @@ void KatePluginSymbolViewerView::parseEcmaSymbols(void)
c
+=
3
;
identifier
.
clear
();
// parse the id name
for
(
c
=
c
;
c
<
stripped
.
length
();
c
++
)
{
for
(
/*
c = c
*/
;
c
<
stripped
.
length
();
c
++
)
{
current
=
stripped
.
at
(
c
);
// look for the beginning of the id
if
(
current
==
QLatin1Char
(
';'
))
{
...
...
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