Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim
Commits
69217d85
Commit
69217d85
authored
May 23, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove KParts::ReadOnlyPart
parent
672373e9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
38 deletions
+9
-38
akregator/src/frame/frame.h
akregator/src/frame/frame.h
+0
-2
akregator/src/frame/framemanager.cpp
akregator/src/frame/framemanager.cpp
+5
-16
akregator/src/frame/mainframe.cpp
akregator/src/frame/mainframe.cpp
+1
-2
akregator/src/frame/mainframe.h
akregator/src/frame/mainframe.h
+1
-6
akregator/src/frame/webengine/webengineframe.cpp
akregator/src/frame/webengine/webengineframe.cpp
+0
-5
akregator/src/frame/webengine/webengineframe.h
akregator/src/frame/webengine/webengineframe.h
+0
-1
akregator/src/mainwidget.cpp
akregator/src/mainwidget.cpp
+1
-1
akregator/src/tabwidget.cpp
akregator/src/tabwidget.cpp
+1
-5
No files found.
akregator/src/frame/frame.h
View file @
69217d85
...
...
@@ -60,8 +60,6 @@ public:
enum
State
{
Idle
,
Started
,
Completed
,
Canceled
};
virtual
KParts
::
ReadOnlyPart
*
part
()
const
=
0
;
virtual
qreal
zoomFactor
()
const
=
0
;
/**
* Returns whether the frame can be removed from
...
...
akregator/src/frame/framemanager.cpp
View file @
69217d85
...
...
@@ -44,17 +44,6 @@
using
namespace
Akregator
;
static
void
setPartGuiActive
(
KParts
::
ReadOnlyPart
*
part
,
bool
active
)
{
if
(
!
part
)
{
return
;
}
// When this event is sent to a KPart, the KPart StatusBarExtension shows or
// hides its items
KParts
::
GUIActivateEvent
ev
(
active
);
QApplication
::
sendEvent
(
part
,
&
ev
);
}
FrameManager
::
FrameManager
(
QWidget
*
mainWin
,
QObject
*
parent
)
:
QObject
(
parent
),
m_mainWin
(
mainWin
),
m_currentFrame
(
0
)
{
}
...
...
@@ -87,7 +76,7 @@ void FrameManager::slotAddFrame(Frame *frame)
connect
(
frame
,
SIGNAL
(
signalOpenUrlRequest
(
Akregator
::
OpenUrlRequest
&
)),
this
,
SLOT
(
slotOpenUrlRequest
(
Akregator
::
OpenUrlRequest
&
)));
setPartGuiActive
(
frame
->
part
(),
false
);
//
setPartGuiActive(frame->part(), false);
Q_EMIT
signalFrameAdded
(
frame
);
...
...
@@ -134,12 +123,12 @@ void FrameManager::slotChangeFrame(int frameId)
Frame
*
oldFrame
=
m_currentFrame
;
m_currentFrame
=
frame
;
if
(
oldFrame
)
{
setPartGuiActive
(
oldFrame
->
part
(),
false
);
}
//
if (oldFrame) {
//
setPartGuiActive(oldFrame->part(), false);
//
}
if
(
frame
)
{
setPartGuiActive
(
frame
->
part
(),
true
);
//
setPartGuiActive(frame->part(), true);
// TODO: handle removable flag
...
...
akregator/src/frame/mainframe.cpp
View file @
69217d85
...
...
@@ -24,9 +24,8 @@
using
namespace
Akregator
;
MainFrame
::
MainFrame
(
QWidget
*
parent
,
KParts
::
ReadOnlyPart
*
part
,
QWidget
*
visibleWidget
)
MainFrame
::
MainFrame
(
QWidget
*
parent
,
QWidget
*
visibleWidget
)
:
Frame
(
parent
),
m_part
(
part
),
mArticleViewer
(
Q_NULLPTR
)
{
setRemovable
(
false
);
...
...
akregator/src/frame/mainframe.h
View file @
69217d85
...
...
@@ -29,7 +29,7 @@ class AKREGATOR_EXPORT MainFrame : public Frame
public:
MainFrame
(
QWidget
*
parent
,
KParts
::
ReadOnlyPart
*
part
,
QWidget
*
widget
);
MainFrame
(
QWidget
*
parent
,
QWidget
*
widget
);
virtual
~
MainFrame
();
QUrl
url
()
const
Q_DECL_OVERRIDE
;
...
...
@@ -38,10 +38,6 @@ public:
return
false
;
}
KParts
::
ReadOnlyPart
*
part
()
const
Q_DECL_OVERRIDE
{
return
m_part
;
}
void
setArticleViewer
(
Akregator
::
ArticleViewerWidget
*
articleViewer
);
qreal
zoomFactor
()
const
Q_DECL_OVERRIDE
;
...
...
@@ -59,7 +55,6 @@ public Q_SLOTS:
void
slotSaveImageOnDiskInFrame
(
int
frameId
);
void
slotMute
(
int
frameId
,
bool
mute
);
private:
KParts
::
ReadOnlyPart
*
m_part
;
Akregator
::
ArticleViewerWidget
*
mArticleViewer
;
};
...
...
akregator/src/frame/webengine/webengineframe.cpp
View file @
69217d85
...
...
@@ -72,11 +72,6 @@ void WebEngineFrame::slotTitleChanged(const QString &title)
slotSetTitle
(
title
);
}
KParts
::
ReadOnlyPart
*
WebEngineFrame
::
part
()
const
{
return
Q_NULLPTR
;
}
QUrl
WebEngineFrame
::
url
()
const
{
return
mArticleViewerWidgetNg
->
articleViewerNg
()
->
url
();
...
...
akregator/src/frame/webengine/webengineframe.h
View file @
69217d85
...
...
@@ -32,7 +32,6 @@ public:
explicit
WebEngineFrame
(
KActionCollection
*
ac
,
QWidget
*
parent
=
Q_NULLPTR
);
~
WebEngineFrame
();
KParts
::
ReadOnlyPart
*
part
()
const
Q_DECL_OVERRIDE
;
QUrl
url
()
const
Q_DECL_OVERRIDE
;
bool
openUrl
(
const
OpenUrlRequest
&
request
)
Q_DECL_OVERRIDE
;
void
loadConfig
(
const
KConfigGroup
&
,
const
QString
&
)
Q_DECL_OVERRIDE
;
...
...
akregator/src/mainwidget.cpp
View file @
69217d85
...
...
@@ -242,7 +242,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_articleViewer
,
&
ArticleViewerWidget
::
setFilters
);
mainTabLayout
->
addWidget
(
m_articleSplitter
);
m_mainFrame
=
new
MainFrame
(
this
,
m_
part
,
m_
mainTab
);
m_mainFrame
=
new
MainFrame
(
this
,
m_mainTab
);
m_mainFrame
->
slotSetTitle
(
i18n
(
"Articles"
));
m_mainFrame
->
setArticleViewer
(
m_articleViewer
);
connect
(
m_articleViewer
->
articleViewerWidgetNg
()
->
articleViewerNg
(),
&
ArticleViewerWebEngine
::
articleAction
,
this
,
&
MainWidget
::
slotArticleAction
);
...
...
akregator/src/tabwidget.cpp
View file @
69217d85
...
...
@@ -227,12 +227,8 @@ void TabWidget::slotSelectFrame(int frameId)
Frame
*
frame
=
d
->
framesById
.
value
(
frameId
);
if
(
frame
&&
frame
!=
d
->
currentFrame
())
{
setCurrentWidget
(
frame
);
if
(
frame
->
part
()
&&
frame
->
part
()
->
widget
())
{
frame
->
part
()
->
widget
()
->
setFocus
();
}
else
{
frame
->
setFocus
();
}
}
}
void
TabWidget
::
slotAddFrame
(
Frame
*
frame
)
...
...
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