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
PIM
KOrganizer
Commits
0ad74eb6
Commit
0ad74eb6
authored
Dec 17, 2020
by
Laurent Montel
😁
Browse files
Remove dead code
parent
1fba5ef5
Pipeline
#44385
passed with stage
in 20 minutes and 26 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
0ad74eb6
...
...
@@ -192,7 +192,6 @@ set(korganizerprivate_LIB_SRCS
datenavigatorcontainer.cpp
dialog/filtereditdialog.cpp
widgets/kdatenavigator.cpp
kocheckableproxymodel.cpp
kocorehelper.cpp
kodaymatrix.cpp
kodialogmanager.cpp
...
...
src/actionmanager.cpp
View file @
0ad74eb6
...
...
@@ -23,7 +23,6 @@
#include "prefs/koprefs.h"
#include "koviewmanager.h"
#include "kowindowlist.h"
#include "kocheckableproxymodel.h"
#include "korgacinterface.h"
#include <KAuthorized>
...
...
@@ -73,6 +72,7 @@
#include <QTimer>
#include <KSharedConfig>
#include <QStandardPaths>
#include <KCheckableProxyModel>
KOWindowList
*
ActionManager
::
mWindowList
=
nullptr
;
...
...
src/calendarview.cpp
View file @
0ad74eb6
...
...
@@ -20,7 +20,6 @@
#include "datechecker.h"
#include "datenavigator.h"
#include "datenavigatorcontainer.h"
#include "kocheckableproxymodel.h"
#include "kodaymatrix.h"
#include "kodialogmanager.h"
#include "koglobals.h"
...
...
@@ -2677,18 +2676,6 @@ void CalendarView::onCutFinished()
checkClipboard
();
}
void
CalendarView
::
setCheckableProxyModel
(
KOCheckableProxyModel
*
model
)
{
if
(
mCheckableProxyModel
)
{
mCheckableProxyModel
->
disconnect
(
this
);
}
mCheckableProxyModel
=
model
;
connect
(
model
,
&
KOCheckableProxyModel
::
aboutToToggle
,
this
,
&
CalendarView
::
onCheckableProxyAboutToToggle
);
connect
(
model
,
&
KOCheckableProxyModel
::
toggled
,
this
,
&
CalendarView
::
onCheckableProxyToggled
);
}
void
CalendarView
::
onCheckableProxyAboutToToggle
(
bool
newState
)
{
// Someone unchecked a collection, save the view state now.
...
...
src/calendarview.h
View file @
0ad74eb6
...
...
@@ -31,7 +31,6 @@ class KODialogManager;
class
KOTodoView
;
class
KOViewManager
;
class
NavigatorBar
;
class
KOCheckableProxyModel
;
class
AkonadiCollectionView
;
namespace
CalendarSupport
{
...
...
@@ -117,7 +116,6 @@ public:
void
showMessage
(
const
QString
&
message
,
KMessageWidget
::
MessageType
);
Akonadi
::
History
*
history
()
const
;
void
setCheckableProxyModel
(
KOCheckableProxyModel
*
);
KOViewManager
*
viewManager
()
const
{
...
...
@@ -704,7 +702,6 @@ private:
bool
mSplitterSizesValid
;
Akonadi
::
CalendarClipboard
*
mCalendarClipboard
=
nullptr
;
KOCheckableProxyModel
*
mCheckableProxyModel
=
nullptr
;
AkonadiCollectionView
*
mETMCollectionView
=
nullptr
;
SearchCollectionHelper
mSearchCollectionHelper
;
...
...
src/kocheckableproxymodel.cpp
deleted
100644 → 0
View file @
1fba5ef5
/*
This file is part of KOrganizer.
SPDX-FileCopyrightText: 2012 Sergio Martins <iamsergio@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
*/
#include "kocheckableproxymodel.h"
KOCheckableProxyModel
::
KOCheckableProxyModel
(
QObject
*
parent
)
:
KCheckableProxyModel
(
parent
)
{
}
bool
KOCheckableProxyModel
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
const
auto
newState
=
static_cast
<
Qt
::
CheckState
>
(
value
.
toInt
());
if
(
role
==
Qt
::
CheckStateRole
&&
index
.
column
()
==
0
)
{
Q_EMIT
aboutToToggle
(
newState
);
}
const
bool
result
=
KCheckableProxyModel
::
setData
(
index
,
value
,
role
);
if
(
result
)
{
Q_EMIT
toggled
(
newState
);
}
return
result
;
}
src/kocheckableproxymodel.h
deleted
100644 → 0
View file @
1fba5ef5
/*
This file is part of KOrganizer.
SPDX-FileCopyrightText: 2012 Sergio Martins <iamsergio@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
*/
#ifndef KORG_KOCHECKABLE_PROXYMODEL_H
#define KORG_KOCHECKABLE_PROXYMODEL_H
#include <KCheckableProxyModel>
// TODO: This functionality could be ported to the KCheckableProxyModel
/**
* A KCheckableProxyModel that emits a signal before and after toggling.
*
* Listeners, like to-do view, restore tree expand state before unchecking,
* and restore after checking.
*/
class
KOCheckableProxyModel
:
public
KCheckableProxyModel
{
Q_OBJECT
public:
explicit
KOCheckableProxyModel
(
QObject
*
parent
);
/**reimp*/
bool
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
=
Qt
::
EditRole
)
override
;
Q_SIGNALS:
void
aboutToToggle
(
bool
oldState
);
void
toggled
(
bool
newState
);
};
#endif
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