Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Akregator
Commits
7e6ff7d7
Commit
7e6ff7d7
authored
Nov 02, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize code
parent
d1fee71d
Pipeline
#39287
passed with stage
in 13 minutes and 54 seconds
Changes
41
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
94 additions
and
94 deletions
+94
-94
configuration/akregator_config_advanced.cpp
configuration/akregator_config_advanced.cpp
+1
-1
configuration/akregator_config_appearance.cpp
configuration/akregator_config_appearance.cpp
+1
-1
configuration/akregator_config_archive.cpp
configuration/akregator_config_archive.cpp
+1
-1
configuration/akregator_config_browser.cpp
configuration/akregator_config_browser.cpp
+1
-1
configuration/akregator_config_general.cpp
configuration/akregator_config_general.cpp
+1
-1
configuration/akregator_config_plugins.cpp
configuration/akregator_config_plugins.cpp
+1
-1
configuration/akregator_config_userfeedback.cpp
configuration/akregator_config_userfeedback.cpp
+1
-1
kontactplugin/akregator_plugin.cpp
kontactplugin/akregator_plugin.cpp
+2
-2
src/actions/actionmanagerimpl.cpp
src/actions/actionmanagerimpl.cpp
+5
-5
src/addfeeddialog.cpp
src/addfeeddialog.cpp
+1
-1
src/akregator_part.cpp
src/akregator_part.cpp
+2
-2
src/articlelistview.cpp
src/articlelistview.cpp
+3
-3
src/articlematcher.cpp
src/articlematcher.cpp
+3
-3
src/articleviewer-ng/webengine/articleviewerwebenginewidgetng.cpp
...cleviewer-ng/webengine/articleviewerwebenginewidgetng.cpp
+2
-2
src/articleviewerwidget.cpp
src/articleviewerwidget.cpp
+1
-1
src/command/createfoldercommand.cpp
src/command/createfoldercommand.cpp
+2
-2
src/command/deletesubscriptioncommand.cpp
src/command/deletesubscriptioncommand.cpp
+1
-1
src/command/expireitemscommand.cpp
src/command/expireitemscommand.cpp
+1
-1
src/crashwidget/crashwidget.cpp
src/crashwidget/crashwidget.cpp
+3
-3
src/feed/feed.cpp
src/feed/feed.cpp
+2
-2
src/feed/feedlist.cpp
src/feed/feedlist.cpp
+1
-1
src/feed/feedpropertiesdialog.cpp
src/feed/feedpropertiesdialog.cpp
+1
-1
src/folder.cpp
src/folder.cpp
+3
-3
src/formatter/grantleeviewformatter.cpp
src/formatter/grantleeviewformatter.cpp
+1
-1
src/frame/mainframe.cpp
src/frame/mainframe.cpp
+1
-1
src/frame/webengine/webengineframe.cpp
src/frame/webengine/webengineframe.cpp
+3
-3
src/job/downloadarticlejob.cpp
src/job/downloadarticlejob.cpp
+1
-1
src/job/downloadfeediconjob.cpp
src/job/downloadfeediconjob.cpp
+1
-1
src/main.cpp
src/main.cpp
+1
-1
src/mainwidget.cpp
src/mainwidget.cpp
+23
-23
src/mainwindow.cpp
src/mainwindow.cpp
+1
-1
src/pluginmanager.cpp
src/pluginmanager.cpp
+1
-1
src/selectioncontroller.cpp
src/selectioncontroller.cpp
+4
-4
src/subscription/subscriptionlistdelegate.cpp
src/subscription/subscriptionlistdelegate.cpp
+2
-2
src/subscription/subscriptionlistjobs.cpp
src/subscription/subscriptionlistjobs.cpp
+1
-1
src/subscription/subscriptionlistmodel.cpp
src/subscription/subscriptionlistmodel.cpp
+7
-7
src/subscription/subscriptionlistview.cpp
src/subscription/subscriptionlistview.cpp
+1
-1
src/unityservicemanager.cpp
src/unityservicemanager.cpp
+1
-1
src/urlhandler/webengine/urlhandlerwebengine.cpp
src/urlhandler/webengine/urlhandlerwebengine.cpp
+1
-1
src/widgets/searchbar.cpp
src/widgets/searchbar.cpp
+1
-1
src/widgets/statussearchline.cpp
src/widgets/statussearchline.cpp
+3
-3
No files found.
configuration/akregator_config_advanced.cpp
View file @
7e6ff7d7
...
...
@@ -24,7 +24,7 @@ KCMAkregatorAdvancedConfig::KCMAkregatorAdvancedConfig(QWidget *parent, const QV
:
KCModule
(
parent
,
args
)
,
m_widget
(
new
SettingsAdvanced
(
this
))
{
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
m_widget
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcmakradvancedconfig"
),
i18n
(
"Advanced Feed Reader Settings"
),
...
...
configuration/akregator_config_appearance.cpp
View file @
7e6ff7d7
...
...
@@ -25,7 +25,7 @@ KCMAkregatorAppearanceConfig::KCMAkregatorAppearanceConfig(QWidget *parent, cons
{
m_ui
.
setupUi
(
m_widget
);
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
m_widget
);
connect
(
m_ui
.
kcfg_UseCustomColors
,
&
QAbstractButton
::
toggled
,
m_ui
.
kcfg_ColorUnreadArticles
,
&
QWidget
::
setEnabled
);
...
...
configuration/akregator_config_archive.cpp
View file @
7e6ff7d7
...
...
@@ -25,7 +25,7 @@ KCMAkregatorArchiveConfig::KCMAkregatorArchiveConfig(QWidget *parent, const QVar
{
Ui
::
SettingsArchive
m_ui
;
m_ui
.
setupUi
(
m_widget
);
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
m_widget
);
connect
(
m_ui
.
rb_LimitArticleNumber
,
&
QAbstractButton
::
toggled
,
...
...
configuration/akregator_config_browser.cpp
View file @
7e6ff7d7
...
...
@@ -27,7 +27,7 @@ KCMAkregatorBrowserConfig::KCMAkregatorBrowserConfig(QWidget *parent, const QVar
Ui
::
SettingsBrowser
ui
;
ui
.
setupUi
(
m_widget
);
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
m_widget
);
connect
(
ui
.
kcfg_ExternalBrowserUseCustomCommand
,
&
QAbstractButton
::
toggled
,
...
...
configuration/akregator_config_general.cpp
View file @
7e6ff7d7
...
...
@@ -28,7 +28,7 @@ KCMAkregatorGeneralConfig::KCMAkregatorGeneralConfig(QWidget *parent, const QVar
Ui
::
SettingsGeneral
ui
;
ui
.
setupUi
(
m_widget
);
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
addWidget
(
m_widget
);
ui
.
kcfg_AutoFetchInterval
->
setSuffix
(
ki18np
(
" minute"
,
" minutes"
));
...
...
configuration/akregator_config_plugins.cpp
View file @
7e6ff7d7
...
...
@@ -21,7 +21,7 @@ K_PLUGIN_FACTORY(KCMAkregatorPluginsConfigFactory, registerPlugin<KCMAkregatorPl
KCMAkregatorPluginsConfig
::
KCMAkregatorPluginsConfig
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
)
{
QHBoxLayo
ut
*
lay
=
new
QHBoxLayout
(
this
);
a
ut
o
*
lay
=
new
QHBoxLayout
(
this
);
lay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcmakrpluginsconfig"
),
...
...
configuration/akregator_config_userfeedback.cpp
View file @
7e6ff7d7
...
...
@@ -22,7 +22,7 @@ K_PLUGIN_FACTORY(KCMAkregatorUserFeedBackConfigFactory, registerPlugin<KCMAkrega
KCMAkregatorUserFeedBackConfig
::
KCMAkregatorUserFeedBackConfig
(
QWidget
*
parent
,
const
QVariantList
&
args
)
:
KCModule
(
parent
,
args
)
{
QHBoxLayo
ut
*
lay
=
new
QHBoxLayout
(
this
);
a
ut
o
*
lay
=
new
QHBoxLayout
(
this
);
lay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
KAboutData
*
about
=
new
KAboutData
(
QStringLiteral
(
"kcmaddressbookuserfeedbackconfig"
),
...
...
kontactplugin/akregator_plugin.cpp
View file @
7e6ff7d7
...
...
@@ -98,7 +98,7 @@ void AkregatorPlugin::addFeed()
void
AkregatorPlugin
::
readProperties
(
const
KConfigGroup
&
config
)
{
if
(
part
())
{
Akregator
::
Part
*
myPart
=
static_cast
<
Akregator
::
Part
*>
(
part
());
auto
*
myPart
=
static_cast
<
Akregator
::
Part
*>
(
part
());
myPart
->
readProperties
(
config
);
}
}
...
...
@@ -106,7 +106,7 @@ void AkregatorPlugin::readProperties(const KConfigGroup &config)
void
AkregatorPlugin
::
saveProperties
(
KConfigGroup
&
config
)
{
if
(
part
())
{
Akregator
::
Part
*
myPart
=
static_cast
<
Akregator
::
Part
*>
(
part
());
auto
*
myPart
=
static_cast
<
Akregator
::
Part
*>
(
part
());
myPart
->
saveProperties
(
config
);
}
}
...
...
src/actions/actionmanagerimpl.cpp
View file @
7e6ff7d7
...
...
@@ -244,8 +244,8 @@ void ActionManagerImpl::initMainWidget(MainWidget *mainWidget)
// toolbar / View
const
MainWidget
::
ViewMode
viewMode
=
static_cast
<
MainWidget
::
ViewMode
>
(
Settings
::
viewMode
());
QActionGroup
*
group
=
new
QActionGroup
(
this
);
const
auto
viewMode
=
static_cast
<
MainWidget
::
ViewMode
>
(
Settings
::
viewMode
());
auto
*
group
=
new
QActionGroup
(
this
);
action
=
coll
->
addAction
(
QStringLiteral
(
"normal_view"
));
action
->
setCheckable
(
true
);
action
->
setChecked
(
viewMode
==
MainWidget
::
NormalView
);
...
...
@@ -306,7 +306,7 @@ void ActionManagerImpl::initMainWidget(MainWidget *mainWidget)
coll
->
setDefaultShortcut
(
action
,
QKeySequence
(
Qt
::
CTRL
+
Qt
::
SHIFT
+
Qt
::
Key_R
));
// Settings menu
KToggleAction
*
sqf
=
coll
->
add
<
KToggleAction
>
(
QStringLiteral
(
"show_quick_filter"
));
auto
*
sqf
=
coll
->
add
<
KToggleAction
>
(
QStringLiteral
(
"show_quick_filter"
));
sqf
->
setText
(
i18n
(
"Show Quick Filter"
));
connect
(
sqf
,
&
QAction
::
triggered
,
d
->
mainWidget
,
&
MainWidget
::
slotToggleShowQuickFilter
);
sqf
->
setChecked
(
Settings
::
showQuickFilter
());
...
...
@@ -352,7 +352,7 @@ void ActionManagerImpl::initMainWidget(MainWidget *mainWidget)
connect
(
action
,
&
QAction
::
triggered
,
d
->
mainWidget
,
&
MainWidget
::
slotArticleDelete
);
coll
->
setDefaultShortcut
(
action
,
QKeySequence
(
Qt
::
Key_Delete
));
KActionMenu
*
statusMenu
=
coll
->
add
<
KActionMenu
>
(
QStringLiteral
(
"article_set_status"
));
auto
*
statusMenu
=
coll
->
add
<
KActionMenu
>
(
QStringLiteral
(
"article_set_status"
));
statusMenu
->
setText
(
i18n
(
"&Mark As"
));
statusMenu
->
setEnabled
(
false
);
...
...
@@ -380,7 +380,7 @@ void ActionManagerImpl::initMainWidget(MainWidget *mainWidget)
connect
(
action
,
&
QAction
::
triggered
,
d
->
mainWidget
,
&
MainWidget
::
slotSetSelectedArticleUnread
);
statusMenu
->
addAction
(
action
);
KToggleAction
*
importantAction
=
coll
->
add
<
KToggleAction
>
(
QStringLiteral
(
"article_set_status_important"
));
auto
*
importantAction
=
coll
->
add
<
KToggleAction
>
(
QStringLiteral
(
"article_set_status_important"
));
importantAction
->
setText
(
i18n
(
"&Mark as Important"
));
importantAction
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"mail-mark-important"
)));
const
QList
<
QKeySequence
>
importantSC
=
{
QKeySequence
(
Qt
::
CTRL
+
Qt
::
Key_I
),
QKeySequence
(
Qt
::
Key_I
)};
...
...
src/addfeeddialog.cpp
View file @
7e6ff7d7
...
...
@@ -50,7 +50,7 @@ AddFeedDialog::AddFeedDialog(QWidget *parent, const QString &name)
{
setObjectName
(
name
);
setWindowTitle
(
i18nc
(
"@title:window"
,
"Add Feed"
));
QVBoxLayo
ut
*
mainLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
mainLayout
=
new
QVBoxLayout
(
this
);
widget
=
new
AddFeedWidget
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
...
...
src/akregator_part.cpp
View file @
7e6ff7d7
...
...
@@ -157,7 +157,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &)
QDir
().
mkpath
(
path
);
m_standardFeedList
=
path
+
QStringLiteral
(
"/feeds.opml"
);
Backend
::
StorageFactoryDummyImpl
*
dummyFactory
=
new
Backend
::
StorageFactoryDummyImpl
();
auto
*
dummyFactory
=
new
Backend
::
StorageFactoryDummyImpl
();
if
(
!
Backend
::
StorageFactoryRegistry
::
self
()
->
registerFactory
(
dummyFactory
,
dummyFactory
->
key
()))
{
// There was already a dummy factory registered.
delete
dummyFactory
;
...
...
@@ -269,7 +269,7 @@ void Part::slotOnShutdown()
void
Part
::
initializeTrayIcon
()
{
TrayIcon
*
trayIcon
=
new
TrayIcon
(
m_mainWidget
->
window
());
auto
*
trayIcon
=
new
TrayIcon
(
m_mainWidget
->
window
());
TrayIcon
::
setInstance
(
trayIcon
);
m_actionManager
->
setTrayIcon
(
trayIcon
);
...
...
src/articlelistview.cpp
View file @
7e6ff7d7
...
...
@@ -128,14 +128,14 @@ void ArticleListView::setArticleModel(ArticleModel *model)
m_proxy
->
setSourceModel
(
model
);
m_proxy
->
setSortRole
(
ArticleModel
::
SortRole
);
m_proxy
->
setFilters
(
m_matchers
);
FilterDeletedProxyModel
*
const
proxy2
=
new
FilterDeletedProxyModel
(
model
);
auto
*
const
proxy2
=
new
FilterDeletedProxyModel
(
model
);
proxy2
->
setSortRole
(
ArticleModel
::
SortRole
);
proxy2
->
setSourceModel
(
m_proxy
);
connect
(
model
,
&
QAbstractItemModel
::
rowsInserted
,
m_proxy
.
data
(),
&
QSortFilterProxyModel
::
invalidate
);
FilterColumnsProxyModel
*
const
columnsProxy
=
new
FilterColumnsProxyModel
(
model
);
auto
*
const
columnsProxy
=
new
FilterColumnsProxyModel
(
model
);
columnsProxy
->
setSortRole
(
ArticleModel
::
SortRole
);
columnsProxy
->
setSourceModel
(
proxy2
);
columnsProxy
->
setColumnEnabled
(
ArticleModel
::
ItemTitleColumn
);
...
...
@@ -399,7 +399,7 @@ void ArticleListView::mousePressEvent(QMouseEvent *ev)
void
ArticleListView
::
contextMenuEvent
(
QContextMenuEvent
*
event
)
{
QWidget
*
w
=
ActionManager
::
getInstance
()
->
container
(
QStringLiteral
(
"article_popup"
));
QMenu
*
popup
=
qobject_cast
<
QMenu
*>
(
w
);
auto
*
popup
=
qobject_cast
<
QMenu
*>
(
w
);
if
(
popup
)
{
popup
->
exec
(
event
->
globalPos
());
}
...
...
src/articlematcher.cpp
View file @
7e6ff7d7
...
...
@@ -159,7 +159,7 @@ bool Criterion::satisfiedBy(const Article &article) const
bool
satisfied
=
false
;
const
Predicate
predicateType
=
static_cast
<
Predicate
>
(
m_predicate
&
~
Negation
);
const
auto
predicateType
=
static_cast
<
Predicate
>
(
m_predicate
&
~
Negation
);
QString
subjectType
=
QLatin1String
(
concreteSubject
.
typeName
());
switch
(
predicateType
)
{
...
...
@@ -265,8 +265,8 @@ void ArticleMatcher::readConfig(KConfigGroup *config)
bool
ArticleMatcher
::
operator
==
(
const
AbstractMatcher
&
other
)
const
{
AbstractMatcher
*
ptr
=
const_cast
<
AbstractMatcher
*>
(
&
other
);
ArticleMatcher
*
o
=
dynamic_cast
<
ArticleMatcher
*>
(
ptr
);
auto
*
ptr
=
const_cast
<
AbstractMatcher
*>
(
&
other
);
auto
*
o
=
dynamic_cast
<
ArticleMatcher
*>
(
ptr
);
if
(
!
o
)
{
return
false
;
}
else
{
...
...
src/articleviewer-ng/webengine/articleviewerwebenginewidgetng.cpp
View file @
7e6ff7d7
...
...
@@ -59,7 +59,7 @@ ArticleViewerWebEngineWidgetNg::ArticleViewerWebEngineWidgetNg(KActionCollection
void
ArticleViewerWebEngineWidgetNg
::
initializeLayout
(
KActionCollection
*
ac
)
{
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mTextToSpeechWidget
=
new
KPIMTextEdit
::
TextToSpeechWidget
(
this
);
...
...
@@ -163,7 +163,7 @@ void ArticleViewerWebEngineWidgetNg::slotOpenInBrowser()
{
const
QUrl
currentUrl
(
mArticleViewerNg
->
url
());
if
(
currentUrl
.
isLocalFile
())
{
WebEngineViewer
::
WebEngineExportHtmlPageJob
*
job
=
new
WebEngineViewer
::
WebEngineExportHtmlPageJob
;
auto
*
job
=
new
WebEngineViewer
::
WebEngineExportHtmlPageJob
;
job
->
setEngineView
(
mArticleViewerNg
);
connect
(
job
,
&
WebEngineViewer
::
WebEngineExportHtmlPageJob
::
failed
,
this
,
&
ArticleViewerWebEngineWidgetNg
::
slotExportHtmlPageFailed
);
connect
(
job
,
&
WebEngineViewer
::
WebEngineExportHtmlPageJob
::
success
,
this
,
&
ArticleViewerWebEngineWidgetNg
::
slotExportHtmlPageSuccess
);
...
...
src/articleviewerwidget.cpp
View file @
7e6ff7d7
...
...
@@ -46,7 +46,7 @@ ArticleViewerWidget::ArticleViewerWidget(const QString &grantleeDirectory, KActi
,
m_articleViewerWidgetNg
(
new
Akregator
::
ArticleViewerWebEngineWidgetNg
(
ac
,
this
))
,
m_grantleeDirectory
(
grantleeDirectory
)
{
QGridLayo
ut
*
layout
=
new
QGridLayout
(
this
);
a
ut
o
*
layout
=
new
QGridLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
addWidget
(
m_articleViewerWidgetNg
);
m_articleHtmlWriter
=
new
Akregator
::
ArticleHtmlWebEngineWriter
(
m_articleViewerWidgetNg
->
articleViewerNg
(),
this
);
...
...
src/command/createfoldercommand.cpp
View file @
7e6ff7d7
...
...
@@ -52,7 +52,7 @@ void CreateFolderCommand::Private::doCreate()
return
;
}
Folder
*
parentFolder
=
qobject_cast
<
Folder
*>
(
m_selectedSubscription
);
auto
*
parentFolder
=
qobject_cast
<
Folder
*>
(
m_selectedSubscription
);
if
(
!
parentFolder
)
{
parentFolder
=
m_selectedSubscription
?
m_selectedSubscription
->
parent
()
:
nullptr
;
}
...
...
@@ -62,7 +62,7 @@ void CreateFolderCommand::Private::doCreate()
TreeNode
*
const
after
=
(
m_selectedSubscription
&&
m_selectedSubscription
->
isGroup
())
?
m_selectedSubscription
:
nullptr
;
Folder
*
const
newFolder
=
new
Folder
(
name
);
auto
*
const
newFolder
=
new
Folder
(
name
);
parentFolder
->
insertChild
(
newFolder
,
after
);
m_subscriptionListView
->
ensureNodeVisible
(
newFolder
);
q
->
done
();
...
...
src/command/deletesubscriptioncommand.cpp
View file @
7e6ff7d7
...
...
@@ -86,7 +86,7 @@ public:
private:
static
DeleteSubscriptionJob
*
reallyCreateJob
(
TreeNode
*
node
)
{
DeleteSubscriptionJob
*
job
=
new
DeleteSubscriptionJob
;
auto
*
job
=
new
DeleteSubscriptionJob
;
job
->
setSubscriptionId
(
node
->
id
());
return
job
;
}
...
...
src/command/expireitemscommand.cpp
View file @
7e6ff7d7
...
...
@@ -46,7 +46,7 @@ ExpireItemsCommand::Private::Private(ExpireItemsCommand *qq) : q(qq)
void
ExpireItemsCommand
::
Private
::
addDeleteJobForFeed
(
Feed
*
feed
)
{
Q_ASSERT
(
feed
);
ArticleDeleteJob
*
job
=
new
ArticleDeleteJob
(
q
);
auto
*
job
=
new
ArticleDeleteJob
(
q
);
connect
(
job
,
&
ArticleDeleteJob
::
finished
,
q
,
[
this
](
KJob
*
job
)
{
jobFinished
(
job
);
});
...
...
src/crashwidget/crashwidget.cpp
View file @
7e6ff7d7
...
...
@@ -15,9 +15,9 @@ using namespace Akregator;
CrashWidget
::
CrashWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QVBoxLayo
ut
*
vbox
=
new
QVBoxLayout
(
this
);
a
ut
o
*
vbox
=
new
QVBoxLayout
(
this
);
QHBoxLayo
ut
*
labelLayout
=
new
QHBoxLayout
;
a
ut
o
*
labelLayout
=
new
QHBoxLayout
;
QLabel
*
label
=
new
QLabel
(
i18n
(
"Akregator did not close correctly. Would you like to restore the previous session?"
),
this
);
label
->
setObjectName
(
QStringLiteral
(
"restoresessionlabel"
));
label
->
setSizePolicy
(
QSizePolicy
::
Fixed
,
QSizePolicy
::
Fixed
);
...
...
@@ -30,7 +30,7 @@ CrashWidget::CrashWidget(QWidget *parent)
labelLayout
->
addWidget
(
label
);
labelLayout
->
addStretch
(
0
);
QHBoxLayo
ut
*
buttonLayout
=
new
QHBoxLayout
;
a
ut
o
*
buttonLayout
=
new
QHBoxLayout
;
vbox
->
addLayout
(
buttonLayout
);
buttonLayout
->
addStretch
(
0
);
...
...
src/feed/feed.cpp
View file @
7e6ff7d7
...
...
@@ -358,7 +358,7 @@ void Feed::loadFavicon(const QString &url, bool downloadFavicon)
if
(
u
.
isLocalFile
())
{
setFaviconLocalPath
(
u
.
toLocalFile
());
}
else
{
Akregator
::
DownloadFeedIconJob
*
job
=
new
Akregator
::
DownloadFeedIconJob
(
this
);
auto
*
job
=
new
Akregator
::
DownloadFeedIconJob
(
this
);
job
->
setFeedIconUrl
(
u
);
job
->
setDownloadFavicon
(
downloadFavicon
);
connect
(
job
,
&
DownloadFeedIconJob
::
result
,
this
,
[
this
](
const
QString
&
fileName
)
{
...
...
@@ -581,7 +581,7 @@ QDomElement Feed::toOPML(QDomElement parent, QDomDocument document) const
KJob
*
Feed
::
createMarkAsReadJob
()
{
ArticleModifyJob
*
job
=
new
ArticleModifyJob
;
auto
*
job
=
new
ArticleModifyJob
;
const
auto
arts
=
articles
();
for
(
const
Article
&
i
:
arts
)
{
const
ArticleId
aid
=
{
xmlUrl
(),
i
.
guid
()
};
...
...
src/feed/feedlist.cpp
View file @
7e6ff7d7
...
...
@@ -601,7 +601,7 @@ void FeedListManagementImpl::removeFeed(const QString &url, const QString &catId
if
(
lastcatid
==
i
->
parent
()
->
id
())
{
if
(
i
->
xmlUrl
().
compare
(
url
)
==
0
)
{
qCDebug
(
AKREGATOR_LOG
)
<<
"id:"
<<
i
->
id
();
DeleteSubscriptionJob
*
job
=
new
DeleteSubscriptionJob
;
auto
*
job
=
new
DeleteSubscriptionJob
;
job
->
setSubscriptionId
(
i
->
id
());
job
->
start
();
}
...
...
src/feed/feedpropertiesdialog.cpp
View file @
7e6ff7d7
...
...
@@ -60,7 +60,7 @@ FeedPropertiesDialog::FeedPropertiesDialog(QWidget *parent, const QString &name)
{
setObjectName
(
name
);
setWindowTitle
(
i18nc
(
"@title:window"
,
"Feed Properties"
));
QVBoxLayo
ut
*
mainLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
mainLayout
=
new
QVBoxLayout
(
this
);
widget
=
new
FeedPropertiesWidget
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
...
...
src/folder.cpp
View file @
7e6ff7d7
...
...
@@ -302,7 +302,7 @@ void Folder::updateUnreadCount() const
KJob
*
Folder
::
createMarkAsReadJob
()
{
CompositeJob
*
job
=
new
CompositeJob
;
auto
*
job
=
new
CompositeJob
;
const
auto
f
=
feeds
();
for
(
Feed
*
const
i
:
f
)
{
job
->
addSubjob
(
i
->
createMarkAsReadJob
());
...
...
@@ -440,7 +440,7 @@ QList<const TreeNode *> Folder::namedChildren(const QString &title) const
if
(
child
->
title
()
==
title
)
{
nodeList
.
append
(
child
);
}
const
Folder
*
fld
=
dynamic_cast
<
const
Folder
*>
(
child
);
const
auto
*
fld
=
dynamic_cast
<
const
Folder
*>
(
child
);
if
(
fld
)
{
nodeList
+=
fld
->
namedChildren
(
title
);
}
...
...
@@ -456,7 +456,7 @@ QList<TreeNode *> Folder::namedChildren(const QString &title)
if
(
child
->
title
()
==
title
)
{
nodeList
.
append
(
child
);
}
Folder
*
const
fld
=
qobject_cast
<
Folder
*>
(
child
);
auto
*
const
fld
=
qobject_cast
<
Folder
*>
(
child
);
if
(
fld
)
{
nodeList
+=
fld
->
namedChildren
(
title
);
}
...
...
src/formatter/grantleeviewformatter.cpp
View file @
7e6ff7d7
...
...
@@ -134,7 +134,7 @@ QString GrantleeViewFormatter::formatArticles(const QVector<Article> &article, A
QList
<
ArticleGrantleeObject
*>
lstObj
;
lstObj
.
reserve
(
nbArticles
);
for
(
int
i
=
0
;
i
<
nbArticles
;
++
i
)
{
ArticleGrantleeObject
*
articleObj
=
new
ArticleGrantleeObject
(
article
.
at
(
i
),
icon
);
auto
*
articleObj
=
new
ArticleGrantleeObject
(
article
.
at
(
i
),
icon
);
articlesList
<<
QVariant
::
fromValue
(
static_cast
<
QObject
*>
(
articleObj
));
lstObj
.
append
(
articleObj
);
}
...
...
src/frame/mainframe.cpp
View file @
7e6ff7d7
...
...
@@ -16,7 +16,7 @@ MainFrame::MainFrame(QWidget *parent, QWidget *visibleWidget)
:
Frame
(
parent
)
{
setRemovable
(
false
);
QGridLayo
ut
*
layout
=
new
QGridLayout
(
this
);
a
ut
o
*
layout
=
new
QGridLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
addWidget
(
visibleWidget
,
0
,
0
);
}
...
...
src/frame/webengine/webengineframe.cpp
View file @
7e6ff7d7
...
...
@@ -17,10 +17,10 @@ using namespace Akregator;
WebEngineFrame
::
WebEngineFrame
(
KActionCollection
*
ac
,
QWidget
*
parent
)
:
Frame
(
parent
)
{
QVBoxLayo
ut
*
layout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
setRemovable
(
true
);
Akregator
::
AkrWebEngineViewer
*
viewer
=
new
Akregator
::
AkrWebEngineViewer
(
ac
,
this
);
auto
*
viewer
=
new
Akregator
::
AkrWebEngineViewer
(
ac
,
this
);
mArticleViewerWidgetNg
=
new
Akregator
::
ArticleViewerWebEngineWidgetNg
(
viewer
,
ac
,
this
);
connect
(
mArticleViewerWidgetNg
->
articleViewerNg
(),
&
ArticleViewerWebEngine
::
titleChanged
,
...
...
@@ -83,7 +83,7 @@ QUrl WebEngineFrame::url() const
void
WebEngineFrame
::
loadUrl
(
const
QUrl
&
url
)
{
KIO
::
FavIconRequestJob
*
job
=
new
KIO
::
FavIconRequestJob
(
url
);
auto
*
job
=
new
KIO
::
FavIconRequestJob
(
url
);
connect
(
job
,
&
KIO
::
FavIconRequestJob
::
result
,
this
,
[
job
,
this
](
KJob
*
)
{
if
(
!
job
->
error
())
{
Q_EMIT
signalIconChanged
(
this
,
QIcon
(
job
->
iconFile
()));
...
...
src/job/downloadarticlejob.cpp
View file @
7e6ff7d7
...
...
@@ -65,7 +65,7 @@ void DownloadArticleJob::setArticleUrl(const QUrl &articleUrl)
void
DownloadArticleJob
::
slotUrlSaveResult
(
KJob
*
job
)
{
if
(
job
->
error
())
{
KIO
::
Job
*
kiojob
=
dynamic_cast
<
KIO
::
Job
*>
(
job
);
auto
*
kiojob
=
dynamic_cast
<
KIO
::
Job
*>
(
job
);
if
(
kiojob
&&
kiojob
->
uiDelegate
())
{
kiojob
->
uiDelegate
()
->
showErrorMessage
();
}
else
{
...
...
src/job/downloadfeediconjob.cpp
View file @
7e6ff7d7
...
...
@@ -25,7 +25,7 @@ bool DownloadFeedIconJob::start()
return
false
;
}
KIO
::
FavIconRequestJob
*
job
=
new
KIO
::
FavIconRequestJob
(
mFeedIconUrl
);
auto
*
job
=
new
KIO
::
FavIconRequestJob
(
mFeedIconUrl
);
if
(
!
mDownloadFavicon
)
{
job
->
setIconUrl
(
mFeedIconUrl
);
}
...
...
src/main.cpp
View file @
7e6ff7d7
...
...
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
#ifdef WITH_KUSERFEEDBACK
if
(
cmdArgs
->
isSet
(
QStringLiteral
(
"feedback"
)))
{
Akregator
::
AkregatorUserFeedbackProvider
*
userFeedBack
=
new
Akregator
::
AkregatorUserFeedbackProvider
(
nullptr
);
auto
*
userFeedBack
=
new
Akregator
::
AkregatorUserFeedbackProvider
(
nullptr
);
QTextStream
(
stdout
)
<<
userFeedBack
->
describeDataSources
()
<<
'\n'
;
delete
userFeedBack
;
return
0
;
...
...
src/mainwidget.cpp
View file @
7e6ff7d7
...
...
@@ -99,7 +99,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
connect
(
m_part
,
&
Part
::
signalSettingsChanged
,
m_actionManager
,
&
ActionManagerImpl
::
slotSettingsChanged
);
QVBoxLayo
ut
*
lt
=
new
QVBoxLayout
(
this
);
a
ut
o
*
lt
=
new
QVBoxLayout
(
this
);
lt
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_horizontalSplitter
=
new
QSplitter
(
Qt
::
Horizontal
,
this
);
...
...
@@ -161,7 +161,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_mainTab
->
setObjectName
(
QStringLiteral
(
"Article Tab"
));
m_mainTab
->
setWhatsThis
(
i18n
(
"Articles list."
));
QVBoxLayo
ut
*
mainTabLayout
=
new
QVBoxLayout
(
m_mainTab
);
a
ut
o
*
mainTabLayout
=
new
QVBoxLayout
(
m_mainTab
);
mainTabLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_searchBar
=
new
SearchBar
(
m_mainTab
);
...
...
@@ -174,7 +174,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
m_articleSplitter
->
setChildrenCollapsible
(
false
);
m_articleWidget
=
new
QWidget
(
m_articleSplitter
);
QVBoxLayo
ut
*
articleWidgetLayout
=
new
QVBoxLayout
;
a
ut
o
*
articleWidgetLayout
=
new
QVBoxLayout
;
m_articleWidget
->
setLayout
(
articleWidgetLayout
);
articleWidgetLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
articleWidgetLayout
->
setSpacing
(
0
);
...
...
@@ -195,7 +195,7 @@ MainWidget::MainWidget(Part *part, QWidget *parent, ActionManagerImpl *actionMan
connect
(
m_part
,
&
Part
::
signalSettingsChanged
,
m_selectionController
,
&
AbstractSelectionController
::
settingsChanged
);
FolderExpansionHandler
*
expansionHandler
=
new
FolderExpansionHandler
(
this
);
auto
*
expansionHandler
=
new
FolderExpansionHandler
(
this
);
connect
(
m_feedListView
,
&
QTreeView
::
expanded
,
expansionHandler
,
&
FolderExpansionHandler
::
itemExpanded
);
connect
(
m_feedListView
,
&
QTreeView
::
collapsed
,
expansionHandler
,
&
FolderExpansionHandler
::
itemCollapsed
);
...
...
@@ -368,7 +368,7 @@ void MainWidget::connectFrame(Akregator::WebEngineFrame *frame)
void
MainWidget
::
slotRequestNewFrame
(
int
&
frameId
)
{
WebEngineFrame
*
frame
=
new
WebEngineFrame
(
m_actionManager
->
actionCollection
(),
m_tabWidget
);
auto
*
frame
=
new
WebEngineFrame
(
m_actionManager
->
actionCollection
(),
m_tabWidget
);
connectFrame
(
frame
);
Kernel
::
self
()
->
frameManager
()
->
slotAddFrame
(
frame
);
...
...
@@ -431,7 +431,7 @@ void MainWidget::sendArticle(const QByteArray &text, const QString &title, bool
void
MainWidget
::
importFeedList
(
const
QDomDocument
&
doc
)
{
ImportFeedListCommand
*
cmd
=
new
ImportFeedListCommand
;
auto
*
cmd
=
new
ImportFeedListCommand
;
cmd
->
setParentWidget
(
this
);
cmd
->
setFeedListDocument
(
doc
);
cmd
->
setTargetList
(
m_feedList
);
...
...
@@ -470,7 +470,7 @@ void MainWidget::deleteExpiredArticles(const QSharedPointer<FeedList> &list)
if
(
!
list
)
{
return
;
}
ExpireItemsCommand
*
cmd
=
new
ExpireItemsCommand
(
this
);
auto
*
cmd
=
new
ExpireItemsCommand
(
this
);
cmd
->
setParentWidget
(
this
);
cmd
->
setFeedList
(
list
);
cmd
->
setFeeds
(
list
->
feedIds
());
...
...
@@ -504,7 +504,7 @@ void MainWidget::addFeedToGroup(const QString &url, const QString &groupName)
}
if
(
!
group
)
{
Folder
*
g
=
new
Folder
(
groupName
);
auto
*
g
=
new
Folder
(
groupName
);
m_feedList
->
allFeedsFolder
()
->
appendChild
(
g
);
group
=
g
;
}
...
...
@@ -634,7 +634,7 @@ void MainWidget::slotMoveCurrentNodeRight()
TreeNode
*
prev
=
current
->
prevSibling
();
if
(
prev
&&
prev
->
isGroup
())
{
Folder
*
fg
=
static_cast
<
Folder
*>
(
prev
);
auto
*
fg
=
static_cast
<
Folder
*>
(
prev
);
current
->
parent
()
->
removeChild
(
current
);
fg
->
appendChild
(
current
);
m_feedListView
->
ensureNodeVisible
(
current
);
...
...
@@ -704,7 +704,7 @@ void MainWidget::slotFeedAdd()
void
MainWidget
::
addFeed
(
const
QString
&
url
,
TreeNode
*
after
,
Folder
*
parent
,
bool
autoExec
)
{
CreateFeedCommand
*
cmd
(
new
CreateFeedCommand
(
this
));
auto
*
cmd
(
new
CreateFeedCommand
(
this
));
cmd
->
setParentWidget
(
this
);
cmd
->
setPosition
(
parent
,
after
);
cmd
->
setRootFolder
(
m_feedList
->
allFeedsFolder
());
...
...
@@ -716,7 +716,7 @@ void MainWidget::addFeed(const QString &url, TreeNode *after, Folder *parent, bo
void
MainWidget
::
slotFeedAddGroup
()
{
CreateFolderCommand
*
cmd
=
new
CreateFolderCommand
(
this
);
auto
*
cmd
=
new
CreateFolderCommand
(
this
);
cmd
->
setParentWidget
(
this
);
cmd
->
setSelectedSubscription
(
m_selectionController
->
selectedSubscription
());
cmd
->
setRootFolder
(
m_feedList
->
allFeedsFolder
());
...
...
@@ -733,7 +733,7 @@ void MainWidget::slotFeedRemove()
return
;
}
DeleteSubscriptionCommand
*
cmd
=
new
DeleteSubscriptionCommand
(
this
);
auto
*
cmd
=
new
DeleteSubscriptionCommand
(
this
);
cmd
->
setParentWidget
(
this
);
cmd
->
setSubscription
(
m_feedList
,
selectedNode
->
id
());
cmd
->
start
();
...
...
@@ -745,7 +745,7 @@ void MainWidget::slotFeedModify()
if
(
!
node
)
{
return
;
}
EditSubscriptionCommand
*
cmd
=
new
EditSubscriptionCommand
(
this
);
auto
*
cmd
=
new
EditSubscriptionCommand
(
this
);
cmd
->
setParentWidget
(
this
);
cmd
->
setSubscription
(
m_feedList
,
node
->
id
());
cmd
->
setSubscriptionListView
(
m_feedListView
);
...
...
@@ -868,7 +868,7 @@ void MainWidget::slotArticleSelected(const Akregator::Article &article)
QVector
<
Article
>
articles
=
m_selectionController
->
selectedArticles
();
Q_EMIT
signalArticlesSelected
(
articles
);
KToggleAction
*
const
maai
=
qobject_cast
<
KToggleAction
*>
(
m_actionManager
->
action
(
QStringLiteral
(
"article_set_status_important"
)));
auto
*
const
maai
=
qobject_cast
<
KToggleAction
*>
(
m_actionManager
->
action
(
QStringLiteral
(
"article_set_status_important"
)));
Q_ASSERT
(
maai
);
maai
->
setChecked
(
article
.
keep
());
...
...
@@ -890,7 +890,7 @@ void MainWidget::slotArticleSelected(const Akregator::Article &article)
if
(
delay
>
0
)
{
m_markReadTimer
->
start
(
delay
*
1000
);
}
else
{
Akregator
::
ArticleModifyJob
*
job
=
new
Akregator
::
ArticleModifyJob
;
auto
*
job
=
new
Akregator
::
ArticleModifyJob
;
const
Akregator
::
ArticleId
aid
=
{
article
.
feed
()
->
xmlUrl
(),
article
.
guid
()
};
job
->
setStatus
(
aid
,
Akregator
::
Read
);
job
->
start
();
...
...
@@ -1064,7 +1064,7 @@ void MainWidget::slotArticleDelete()
selected
->
setNotificationMode
(
false
);
}
Akregator
::
ArticleDeleteJob
*
job
=
new
Akregator
::
ArticleDeleteJob
;
auto
*
job
=
new
Akregator
::
ArticleDeleteJob
;
for
(
const
Akregator
::
Article
&
i
:
articles
)
{
Feed
*
const
feed
=
i
.
feed
();
if
(
!
feed
)
{
...
...
@@ -1103,7 +1103,7 @@ void MainWidget::slotArticleToggleKeepFlag(bool)
}
}
Akregator
::
ArticleModifyJob
*
job
=
new
Akregator
::
ArticleModifyJob
;
auto
*
job
=
new
Akregator
::
ArticleModifyJob
;
for
(
const
Akregator
::
Article
&
i
:
articles
)
{
const
Akregator
::
ArticleId
aid
=
{
i
.
feed
()
->
xmlUrl
(),
i
.
guid
()
};
job
->
setKeep
(
aid
,
!
allFlagsSet
);
...
...
@@ -1115,7 +1115,7 @@ namespace {
void
setArticleStatus
(
const
QString
&
feedUrl
,
const
QString
&
articleId
,
int
status
)
{
if
(
!
feedUrl
.
isEmpty
()
&&
!
articleId
.
isEmpty
())
{
Akregator
::
ArticleModifyJob
*
job
=
new
Akregator
::
ArticleModifyJob
;
auto
*
job
=
new
Akregator
::
ArticleModifyJob
;
const
Akregator
::
ArticleId
aid
=
{
feedUrl
,
articleId
};
job
->
setStatus
(
aid
,
status
);
job
->
start
();
...
...
@@ -1130,7 +1130,7 @@ void setSelectedArticleStatus(const Akregator::AbstractSelectionController *cont
return
;
}