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
System
KHelpCenter
Commits
f18038fa
Commit
f18038fa
authored
Oct 12, 2020
by
Laurent Montel
😁
Browse files
Const'ify + variables were initialized in header class
parent
91841c42
Changes
7
Hide whitespace changes
Inline
Side-by-side
mainwindow.cpp
View file @
f18038fa
...
...
@@ -105,8 +105,7 @@ class LogDialog : public QDialog
MainWindow
::
MainWindow
()
:
KXmlGuiWindow
(
nullptr
),
mLogDialog
(
nullptr
)
:
KXmlGuiWindow
(
nullptr
)
{
setObjectName
(
QStringLiteral
(
"MainWindow"
)
);
...
...
navigator.cpp
View file @
f18038fa
...
...
@@ -71,7 +71,7 @@ Navigator::Navigator( View *view, QWidget *parent )
QBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
mSearchEdit
=
new
KLineEdit
();
mSearchEdit
=
new
KLineEdit
(
this
);
mSearchEdit
->
setPlaceholderText
(
i18n
(
"Search..."
)
);
mSearchEdit
->
setClearButtonEnabled
(
true
);
topLayout
->
addWidget
(
mSearchEdit
);
...
...
navigatorappgroupitem.cpp
View file @
f18038fa
...
...
@@ -31,8 +31,7 @@ using namespace KHC;
NavigatorAppGroupItem
::
NavigatorAppGroupItem
(
DocEntry
*
entry
,
QTreeWidget
*
parent
,
const
QString
&
relPath
)
:
NavigatorItem
(
entry
,
parent
),
mRelpath
(
relPath
),
mPopulated
(
false
)
mRelpath
(
relPath
)
{
populate
();
}
...
...
@@ -40,24 +39,21 @@ NavigatorAppGroupItem::NavigatorAppGroupItem( DocEntry *entry, QTreeWidget *pare
NavigatorAppGroupItem
::
NavigatorAppGroupItem
(
DocEntry
*
entry
,
QTreeWidgetItem
*
parent
,
const
QString
&
relPath
)
:
NavigatorItem
(
entry
,
parent
),
mRelpath
(
relPath
),
mPopulated
(
false
)
mRelpath
(
relPath
)
{
populate
();
}
NavigatorAppGroupItem
::
NavigatorAppGroupItem
(
DocEntry
*
entry
,
QTreeWidget
*
parent
,
QTreeWidgetItem
*
after
)
:
NavigatorItem
(
entry
,
parent
,
after
),
mPopulated
(
false
)
:
NavigatorItem
(
entry
,
parent
,
after
)
{
populate
();
}
NavigatorAppGroupItem
::
NavigatorAppGroupItem
(
DocEntry
*
entry
,
QTreeWidgetItem
*
parent
,
QTreeWidgetItem
*
after
)
:
NavigatorItem
(
entry
,
parent
,
after
),
mPopulated
(
false
)
:
NavigatorItem
(
entry
,
parent
,
after
)
{
populate
();
}
...
...
navigatorappgroupitem.h
View file @
f18038fa
...
...
@@ -50,7 +50,7 @@ class NavigatorAppGroupItem : public NavigatorItem
private:
QString
mRelpath
;
bool
mPopulated
;
bool
mPopulated
=
false
;
};
}
...
...
navigatorappitem.cpp
View file @
f18038fa
...
...
@@ -32,8 +32,7 @@ using namespace KHC;
QMap
<
QString
,
NavigatorAppItem
*
>
NavigatorAppItem
::
s_menuItemsMap
;
NavigatorAppItem
::
NavigatorAppItem
(
DocEntry
*
entry
,
QTreeWidgetItem
*
parent
)
:
NavigatorItem
(
entry
,
parent
),
mToc
(
nullptr
)
:
NavigatorItem
(
entry
,
parent
)
{
auto
iter
=
s_menuItemsMap
.
find
(
entry
->
url
());
if
(
iter
==
s_menuItemsMap
.
end
())
...
...
@@ -44,8 +43,7 @@ NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QTreeWidgetItem *parent )
NavigatorAppItem
::
NavigatorAppItem
(
DocEntry
*
entry
,
QTreeWidget
*
parent
,
QTreeWidgetItem
*
after
)
:
NavigatorItem
(
entry
,
parent
,
after
),
mToc
(
nullptr
)
:
NavigatorItem
(
entry
,
parent
,
after
)
{
auto
iter
=
s_menuItemsMap
.
find
(
entry
->
url
());
if
(
iter
==
s_menuItemsMap
.
end
())
...
...
@@ -56,8 +54,7 @@ NavigatorAppItem::NavigatorAppItem( DocEntry *entry, QTreeWidget *parent,
NavigatorAppItem
::
NavigatorAppItem
(
DocEntry
*
entry
,
QTreeWidgetItem
*
parent
,
QTreeWidgetItem
*
after
)
:
NavigatorItem
(
entry
,
parent
,
after
),
mToc
(
nullptr
)
:
NavigatorItem
(
entry
,
parent
,
after
)
{
auto
iter
=
s_menuItemsMap
.
find
(
entry
->
url
());
if
(
iter
==
s_menuItemsMap
.
end
())
...
...
searchhandler.cpp
View file @
f18038fa
...
...
@@ -35,7 +35,7 @@
using
namespace
KHC
;
SearchJob
::
SearchJob
(
DocEntry
*
entry
)
:
mEntry
(
entry
)
,
mProcess
(
nullptr
),
mKioJob
(
nullptr
)
SearchJob
::
SearchJob
(
DocEntry
*
entry
)
:
mEntry
(
entry
)
{
}
...
...
view.cpp
View file @
f18038fa
...
...
@@ -65,7 +65,7 @@ View::View( QWidget *parentWidget, QObject *parent, KHTMLPart::GUIProfile prof,
connect
(
this
,
&
View
::
setWindowCaption
,
this
,
&
View
::
setTitle
);
connect
(
this
,
QOverload
<
const
QString
&
,
const
QPoint
&>::
of
(
&
View
::
popupMenu
),
this
,
&
View
::
showMenu
);
QString
css
=
langLookup
(
QStringLiteral
(
"kdoctools5-common/kde-default.css"
));
const
QString
css
=
langLookup
(
QStringLiteral
(
"kdoctools5-common/kde-default.css"
));
if
(
!
css
.
isEmpty
())
{
QFile
css_file
(
css
);
...
...
@@ -123,10 +123,11 @@ QString View::langLookup( const QString &fname )
// this is kind of compat hack as we install our docs in en/ but the
// default language is en_US
for
(
QStringList
::
Iterator
it
=
langs
.
begin
();
it
!=
langs
.
end
();
++
it
)
for
(
QStringList
::
Iterator
it
=
langs
.
begin
();
it
!=
langs
.
end
();
++
it
)
{
if
(
*
it
==
QLatin1String
(
"en_US"
))
{
*
it
=
QStringLiteral
(
"en"
);
}
}
// look up the different languages
int
ldCount
=
localDoc
.
count
();
...
...
@@ -177,7 +178,8 @@ void View::writeSearchResult( const QString &str )
void
View
::
endSearchResult
()
{
end
();
if
(
!
mSearchResult
.
isEmpty
()
)
Q_EMIT
searchResultCacheAvailable
();
if
(
!
mSearchResult
.
isEmpty
()
)
Q_EMIT
searchResultCacheAvailable
();
}
void
View
::
beginInternal
(
const
QUrl
&
url
)
...
...
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