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
KMail
Commits
22d1bab9
Commit
22d1bab9
authored
Aug 26, 2021
by
Laurent Montel
😁
Browse files
not necessary to use a list here
parent
3e34c9f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kmmainwidget.cpp
View file @
22d1bab9
...
...
@@ -197,8 +197,7 @@ using KPIM::ProgressManager;
using
MessageViewer
::
AttachmentStrategy
;
using
PimCommon
::
BroadcastStatus
;
Q_GLOBAL_STATIC
(
KMMainWidget
::
PtrList
,
theMainWidgetList
)
static
KMMainWidget
*
myMainWidget
=
nullptr
;
//-----------------------------------------------------------------------------
KMMainWidget
::
KMMainWidget
(
QWidget
*
parent
,
KXMLGUIClient
*
aGUIClient
,
KActionCollection
*
actionCollection
,
const
KSharedConfig
::
Ptr
&
config
)
:
QWidget
(
parent
)
...
...
@@ -243,7 +242,7 @@ KMMainWidget::KMMainWidget(QWidget *parent, KXMLGUIClient *aGUIClient, KActionCo
mPluginCheckBeforeDeletingManagerInterface
->
setActionCollection
(
mActionCollection
);
mPluginCheckBeforeDeletingManagerInterface
->
initializePlugins
();
the
MainWidget
List
->
append
(
this
)
;
my
MainWidget
=
this
;
readPreConfig
();
createWidgets
();
...
...
@@ -375,7 +374,7 @@ void KMMainWidget::restoreCollectionFolderViewConfig()
// perform all cleanup that requires the kernel in destruct()
KMMainWidget
::~
KMMainWidget
()
{
the
MainWidget
List
->
removeAll
(
this
)
;
my
MainWidget
=
nullptr
;
qDeleteAll
(
mFilterCommands
);
destruct
();
}
...
...
@@ -4232,13 +4231,13 @@ void KMMainWidget::updateFileMenu()
}
//-----------------------------------------------------------------------------
const
KMMainWidget
::
PtrList
*
KMMainWidget
::
mainWidgetList
()
const
KMMainWidget
*
KMMainWidget
::
mainWidgetList
()
{
// better safe than sorry; check whether the global static has already been destroyed
if
(
the
MainWidget
List
.
isDestroyed
()
)
{
if
(
!
my
MainWidget
)
{
return
nullptr
;
}
return
the
MainWidget
List
;
return
my
MainWidget
;
}
QSharedPointer
<
FolderSettings
>
KMMainWidget
::
currentFolder
()
const
...
...
src/kmmainwidget.h
View file @
22d1bab9
...
...
@@ -96,8 +96,6 @@ class KMAIL_EXPORT KMMainWidget : public QWidget
Q_OBJECT
public:
using
PtrList
=
QList
<
KMMainWidget
*>
;
KMMainWidget
(
QWidget
*
parent
,
KXMLGUIClient
*
aGUIClient
,
KActionCollection
*
actionCollection
,
...
...
@@ -141,7 +139,7 @@ public:
Returns a list of all KMMainWidgets. Warning, the list itself can be 0.
@return the list of all main widgets, or 0 if it is not yet initialized
*/
static
const
PtrLis
t
*
mainWidgetList
();
static
const
KMMainWidge
t
*
mainWidgetList
();
QWidget
*
vacationScriptIndicator
()
const
;
QWidget
*
dkimWidgetInfo
()
const
;
...
...
Jonathan Marten
@marten
mentioned in merge request
!43 (merged)
·
Sep 19, 2021
mentioned in merge request
!43 (merged)
mentioned in merge request !43
Toggle commit list
Jonathan Marten
@marten
mentioned in commit
b16e0522
·
Sep 25, 2021
mentioned in commit
b16e0522
mentioned in commit b16e0522a4bbf7fec1d8a16a05cc2f954f183b65
Toggle commit list
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