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
Network
KRDC
Commits
30bb2e04
Commit
30bb2e04
authored
Aug 31, 2021
by
Laurent Montel
😁
Browse files
Fix some clazy warning
parent
c015e820
Changes
7
Hide whitespace changes
Inline
Side-by-side
bookmarkmanager.cpp
View file @
30bb2e04
...
...
@@ -149,7 +149,7 @@ QList<KBookmarkOwner::FutureBookmark> BookmarkManager::currentBookmarkList() con
void
BookmarkManager
::
addManualBookmark
(
const
QUrl
&
url
,
const
QString
&
text
)
{
m_manager
->
root
().
addBookmark
(
text
,
url
,
QString
());
Q_EMIT
m_manager
->
emitChanged
();
m_manager
->
emitChanged
();
}
KBookmarkManager
*
BookmarkManager
::
getManager
()
...
...
@@ -174,12 +174,12 @@ const QStringList BookmarkManager::findBookmarkAddresses(const KBookmarkGroup &g
return
bookmarkAddresses
;
}
void
BookmarkManager
::
removeByUrl
(
KBookmarkManager
*
manager
,
const
QString
&
url
,
bool
ignoreHistory
,
const
QString
updateTitle
)
void
BookmarkManager
::
removeByUrl
(
KBookmarkManager
*
manager
,
const
QString
&
url
,
bool
ignoreHistory
,
const
QString
&
updateTitle
)
{
const
QStringList
addresses
=
findBookmarkAddresses
(
manager
->
root
(),
url
);
for
(
const
QString
&
address
:
addresses
)
{
KBookmark
bm
=
manager
->
findByAddress
(
address
);
if
(
ignoreHistory
&&
bm
.
parentGroup
().
metaDataItem
(
Q
Latin1
String
(
"krdc-history"
))
==
QLatin1String
(
"historyfolder"
))
{
if
(
ignoreHistory
&&
bm
.
parentGroup
().
metaDataItem
(
QString
Literal
(
"krdc-history"
))
==
QLatin1String
(
"historyfolder"
))
{
if
(
!
updateTitle
.
isEmpty
())
{
qCDebug
(
KRDC
)
<<
"Update"
<<
bm
.
fullText
();
bm
.
setFullText
(
updateTitle
);
...
...
bookmarkmanager.h
View file @
30bb2e04
...
...
@@ -35,7 +35,7 @@ public:
void
addManualBookmark
(
const
QUrl
&
url
,
const
QString
&
text
);
KBookmarkManager
*
getManager
();
// removes all bookmarks with url, possibly ignore the history folder and update it's title there if it's set
static
void
removeByUrl
(
KBookmarkManager
*
manager
,
const
QString
&
url
,
bool
ignoreHistory
=
false
,
const
QString
updateTitle
=
QString
());
static
void
removeByUrl
(
KBookmarkManager
*
manager
,
const
QString
&
url
,
bool
ignoreHistory
=
false
,
const
QString
&
updateTitle
=
QString
());
static
void
updateTitle
(
KBookmarkManager
*
manager
,
const
QString
&
url
,
const
QString
&
title
);
// returns a QStringList for all bookmarks that point to this url using KBookmark::address()
static
const
QStringList
findBookmarkAddresses
(
const
KBookmarkGroup
&
group
,
const
QString
&
url
);
...
...
config/preferencesdialog.cpp
View file @
30bb2e04
...
...
@@ -16,25 +16,25 @@
#include
<KPluginInfo>
PreferencesDialog
::
PreferencesDialog
(
QWidget
*
parent
,
KConfigSkeleton
*
skeleton
)
:
KConfigDialog
(
parent
,
Q
Latin1
String
(
"preferences"
),
skeleton
)
:
KConfigDialog
(
parent
,
QString
Literal
(
"preferences"
),
skeleton
)
,
m_settingsChanged
(
false
)
{
QWidget
*
generalPage
=
new
QWidget
(
this
);
Ui
::
General
generalUi
;
generalUi
.
setupUi
(
generalPage
);
addPage
(
generalPage
,
i18nc
(
"General Config"
,
"General"
),
Q
Latin1
String
(
"krdc"
),
i18n
(
"General Configuration"
));
addPage
(
generalPage
,
i18nc
(
"General Config"
,
"General"
),
QString
Literal
(
"krdc"
),
i18n
(
"General Configuration"
));
HostPreferencesList
*
hostPreferencesList
=
new
HostPreferencesList
(
this
,
qobject_cast
<
MainWindow
*>
(
parent
),
skeleton
->
config
()
->
group
(
"hostpreferences"
));
addPage
(
hostPreferencesList
,
i18n
(
"Hosts"
),
Q
Latin1
String
(
"computer"
),
i18n
(
"Host Configuration"
));
addPage
(
hostPreferencesList
,
i18n
(
"Hosts"
),
QString
Literal
(
"computer"
),
i18n
(
"Host Configuration"
));
m_pluginSelector
=
new
KPluginSelector
();
const
QList
<
KPluginInfo
>
offers
=
KPluginInfo
::
fromMetaData
(
KPluginLoader
::
findPlugins
(
QStringLiteral
(
"krdc"
)));
m_pluginSelector
->
addPlugins
(
offers
,
KPluginSelector
::
ReadConfigFile
,
i18n
(
"Plugins"
),
Q
Latin1
String
(
"Service"
),
KSharedConfig
::
openConfig
());
i18n
(
"Plugins"
),
QString
Literal
(
"Service"
),
KSharedConfig
::
openConfig
());
m_pluginSelector
->
load
();
addPage
(
m_pluginSelector
,
i18n
(
"Plugins"
),
Q
Latin1
String
(
"preferences-plugin"
),
i18n
(
"Plugin Configuration"
));
addPage
(
m_pluginSelector
,
i18n
(
"Plugins"
),
QString
Literal
(
"preferences-plugin"
),
i18n
(
"Plugin Configuration"
));
connect
(
this
,
SIGNAL
(
accepted
()),
SLOT
(
saveState
()));
QPushButton
*
defaultsButton
=
buttonBox
()
->
button
(
QDialogButtonBox
::
RestoreDefaults
);
...
...
connectiondelegate.cpp
View file @
30bb2e04
...
...
@@ -54,7 +54,7 @@ void ConnectionDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
QVariant
value
=
index
.
data
(
Qt
::
CheckStateRole
);
if
(
value
.
isValid
())
{
Qt
::
CheckState
checkState
=
static_cast
<
Qt
::
CheckState
>
(
value
.
toInt
());
QIcon
favIcon
=
QIcon
::
fromTheme
(
Q
Latin1
String
(
"bookmarks"
));
QIcon
favIcon
=
QIcon
::
fromTheme
(
QString
Literal
(
"bookmarks"
));
QIcon
::
Mode
mode
=
(
checkState
==
Qt
::
Checked
)
?
QIcon
::
Active
:
QIcon
::
Disabled
;
favIcon
.
paint
(
painter
,
option
.
rect
,
option
.
decorationAlignment
,
mode
);
...
...
mainwindow.cpp
View file @
30bb2e04
...
...
@@ -917,7 +917,7 @@ void MainWindow::updateConfiguration()
if
(
!
Settings
::
showStatusBar
())
statusBar
()
->
deleteLater
();
else
statusBar
()
->
showMessage
(
QStringLiteral
(
""
)
);
// force creation of statusbar
statusBar
()
->
showMessage
(
{}
);
// force creation of statusbar
m_tabWidget
->
tabBar
()
->
setHidden
((
m_tabWidget
->
count
()
<=
1
&&
!
Settings
::
showTabBar
())
||
m_fullscreenWindow
);
m_tabWidget
->
setTabPosition
((
QTabWidget
::
TabPosition
)
Settings
::
tabPosition
());
...
...
tabbedviewwidget.cpp
View file @
30bb2e04
...
...
@@ -225,7 +225,7 @@ void TabbedViewWidget::mouseDoubleClickEvent(QMouseEvent * event)
void
TabbedViewWidget
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
if
(
event
->
button
()
==
Qt
::
MidButton
)
{
if
(
event
->
button
()
==
Qt
::
Mid
dle
Button
)
{
if
(
isEmptyTabbarSpace
(
event
->
pos
()))
{
Q_EMIT
mouseMiddleClick
(
-
1
);
return
;
...
...
vnc/vncview.cpp
View file @
30bb2e04
...
...
@@ -603,14 +603,14 @@ void VncView::mouseEventHandler(QMouseEvent *e)
(
e
->
type
()
==
QEvent
::
MouseButtonDblClick
))
{
if
(
e
->
button
()
&
Qt
::
LeftButton
)
m_buttonMask
|=
0x01
;
if
(
e
->
button
()
&
Qt
::
MidButton
)
if
(
e
->
button
()
&
Qt
::
Mid
dle
Button
)
m_buttonMask
|=
0x02
;
if
(
e
->
button
()
&
Qt
::
RightButton
)
m_buttonMask
|=
0x04
;
}
else
if
(
e
->
type
()
==
QEvent
::
MouseButtonRelease
)
{
if
(
e
->
button
()
&
Qt
::
LeftButton
)
m_buttonMask
&=
0xfe
;
if
(
e
->
button
()
&
Qt
::
MidButton
)
if
(
e
->
button
()
&
Qt
::
Mid
dle
Button
)
m_buttonMask
&=
0xfd
;
if
(
e
->
button
()
&
Qt
::
RightButton
)
m_buttonMask
&=
0xfb
;
...
...
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