Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
c2c7c98d
Commit
c2c7c98d
authored
Jan 28, 2009
by
hjk
Browse files
Fixes: coreplugin: less singleton pointer caching
parent
8ef4f166
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
c2c7c98d
...
...
@@ -361,7 +361,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
this
,
SLOT
(
updateActions
()));
connect
(
this
,
SIGNAL
(
currentEditorChanged
(
Core
::
IEditor
*
)),
this
,
SLOT
(
updateEditorHistory
()));
m_d
->
m_splitter
=
new
EditorSplitter
(
m_d
->
m_core
)
;
m_d
->
m_splitter
=
new
EditorSplitter
;
connect
(
m_d
->
m_splitter
,
SIGNAL
(
closeRequested
(
Core
::
IEditor
*
)),
this
,
SLOT
(
closeEditor
(
Core
::
IEditor
*
)));
connect
(
m_d
->
m_splitter
,
SIGNAL
(
editorGroupsChanged
()),
...
...
src/plugins/coreplugin/editormanager/editorsplitter.cpp
View file @
c2c7c98d
...
...
@@ -51,10 +51,9 @@
using
namespace
Core
;
using
namespace
Core
::
Internal
;
EditorSplitter
::
EditorSplitter
(
ICore
*
core
,
QWidget
*
parent
)
EditorSplitter
::
EditorSplitter
(
QWidget
*
parent
)
:
QWidget
(
parent
),
m_curGroup
(
0
),
m_core
(
core
)
m_curGroup
(
0
)
{
registerActions
();
createRootGroup
();
...
...
@@ -69,9 +68,9 @@ void EditorSplitter::registerActions()
{
QList
<
int
>
gc
=
QList
<
int
>
()
<<
Constants
::
C_GLOBAL_ID
;
const
QList
<
int
>
editorManagerContext
=
QList
<
int
>
()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
);
QList
<
int
>
()
<<
ICore
::
instance
()
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
);
ActionManager
*
am
=
m_core
->
actionManager
();
ActionManager
*
am
=
ICore
::
instance
()
->
actionManager
();
ActionContainer
*
mwindow
=
am
->
actionContainer
(
Constants
::
M_WINDOW
);
Command
*
cmd
;
...
...
@@ -538,13 +537,13 @@ QWidget *EditorSplitter::recreateGroupTree(QWidget *node)
void
EditorSplitter
::
saveCurrentLayout
()
{
QSettings
*
settings
=
m_core
->
settings
();
QSettings
*
settings
=
ICore
::
instance
()
->
settings
();
settings
->
setValue
(
"EditorManager/Splitting"
,
saveState
());
}
void
EditorSplitter
::
restoreDefaultLayout
()
{
QSettings
*
settings
=
m_core
->
settings
();
QSettings
*
settings
=
ICore
::
instance
()
->
settings
();
if
(
settings
->
contains
(
"EditorManager/Splitting"
))
restoreState
(
settings
->
value
(
"EditorManager/Splitting"
).
toByteArray
());
}
...
...
@@ -656,12 +655,12 @@ EditorGroup *EditorSplitter::createGroup()
this
,
SLOT
(
updateActions
()));
connect
(
group
,
SIGNAL
(
editorAdded
(
Core
::
IEditor
*
)),
this
,
SLOT
(
updateActions
()));
m_core
->
addContextObject
(
group
->
contextObject
());
ICore
::
instance
()
->
addContextObject
(
group
->
contextObject
());
return
group
;
}
void
EditorSplitter
::
deleteGroup
(
EditorGroup
*
group
)
{
m_core
->
removeContextObject
(
group
->
contextObject
());
ICore
::
instance
()
->
removeContextObject
(
group
->
contextObject
());
delete
group
;
}
src/plugins/coreplugin/editormanager/editorsplitter.h
View file @
c2c7c98d
...
...
@@ -45,7 +45,6 @@
namespace
Core
{
class
EditorGroup
;
class
ICore
;
class
IEditor
;
namespace
Internal
{
...
...
@@ -55,7 +54,7 @@ class EditorSplitter : public QWidget
Q_OBJECT
public:
EditorSplitter
(
ICore
*
core
,
QWidget
*
parent
=
0
);
explicit
EditorSplitter
(
QWidget
*
parent
=
0
);
~
EditorSplitter
();
void
setCurrentGroup
(
Core
::
EditorGroup
*
group
);
...
...
@@ -114,7 +113,6 @@ private:
QWidget
*
m_root
;
EditorGroup
*
m_curGroup
;
ICore
*
m_core
;
QAction
*
m_horizontalSplitAction
;
QAction
*
m_verticalSplitAction
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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