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
2f5f358f
Commit
2f5f358f
authored
Jun 25, 2010
by
hjk
Browse files
Core::Context: compile hot fix for Windows.
parent
2bdf10ce
Changes
63
Hide whitespace changes
Inline
Side-by-side
src/plugins/bineditor/bineditorplugin.cpp
View file @
2f5f358f
...
...
@@ -47,7 +47,6 @@
#include
<coreplugin/icore.h>
#include
<coreplugin/ifile.h>
#include
<coreplugin/mimedatabase.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<extensionsystem/pluginmanager.h>
#include
<find/ifindsupport.h>
#include
<texteditor/fontsettings.h>
...
...
@@ -291,11 +290,10 @@ class BinEditorInterface : public Core::IEditor
public:
BinEditorInterface
(
BinEditor
*
editor
)
{
Core
::
UniqueIDManager
*
uidm
=
Core
::
UniqueIDManager
::
instance
();
m_editor
=
editor
;
m_file
=
new
BinEditorFile
(
m_editor
);
m_context
<<
uidm
->
uniqueIdentifier
(
Core
::
Constants
::
K_DEFAULT_BINARY_EDITOR_ID
);
m_context
<<
uidm
->
uniqueIdentifier
(
Constants
::
C_BINEDITOR
);
m_context
.
add
(
Core
::
Constants
::
K_DEFAULT_BINARY_EDITOR_ID
);
m_context
.
add
(
Constants
::
C_BINEDITOR
);
m_cursorPositionLabel
=
new
Utils
::
LineColumnLabel
;
QHBoxLayout
*
l
=
new
QHBoxLayout
;
...
...
@@ -436,8 +434,7 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
QObject
::
connect
(
editor
,
SIGNAL
(
modificationChanged
(
bool
)),
editorInterface
,
SIGNAL
(
changed
()));
editor
->
setEditorInterface
(
editorInterface
);
Core
::
UniqueIDManager
*
uidm
=
Core
::
UniqueIDManager
::
instance
();
m_context
<<
uidm
->
uniqueIdentifier
(
Constants
::
C_BINEDITOR
);
m_context
.
add
(
Constants
::
C_BINEDITOR
);
if
(
!
m_undoAction
)
{
m_undoAction
=
registerNewAction
(
QLatin1String
(
Core
::
Constants
::
UNDO
),
this
,
SLOT
(
undoAction
()),
...
...
src/plugins/bookmarks/bookmarkmanager.cpp
View file @
2f5f358f
...
...
@@ -36,7 +36,6 @@
#include
<coreplugin/editormanager/editormanager.h>
#include
<coreplugin/icore.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<projectexplorer/projectexplorer.h>
#include
<projectexplorer/session.h>
#include
<texteditor/basetexteditor.h>
...
...
@@ -298,9 +297,10 @@ void BookmarkView::gotoBookmark(const QModelIndex &index)
////
BookmarkContext
::
BookmarkContext
(
BookmarkView
*
widget
)
:
Core
::
IContext
(
widget
),
m_bookmarkView
(
widget
)
:
Core
::
IContext
(
widget
),
m_bookmarkView
(
widget
),
m_context
(
Constants
::
BOOKMARKS_CONTEXT
)
{
m_context
<<
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
BOOKMARKS_CONTEXT
);
}
Context
BookmarkContext
::
context
()
const
...
...
src/plugins/bookmarks/bookmarkmanager.h
View file @
2f5f358f
...
...
@@ -165,7 +165,7 @@ public:
virtual
QWidget
*
widget
();
private:
BookmarkView
*
m_bookmarkView
;
Core
::
Context
m_context
;
const
Core
::
Context
m_context
;
};
class
BookmarkViewFactory
:
public
Core
::
INavigationWidgetFactory
...
...
src/plugins/bookmarks/bookmarksplugin.cpp
View file @
2f5f358f
...
...
@@ -35,7 +35,6 @@
#include
<coreplugin/editormanager/ieditor.h>
#include
<coreplugin/editormanager/editormanager.h>
#include
<coreplugin/coreconstants.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/actionmanager/actioncontainer.h>
#include
<coreplugin/actionmanager/command.h>
...
...
@@ -69,8 +68,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
{
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
ActionManager
*
am
=
core
->
actionManager
();
Core
::
UniqueIDManager
*
uidm
=
core
->
uniqueIDManager
();
Core
::
Context
textcontext
(
uidm
->
uniqueIdentifier
(
TextEditor
::
Constants
::
C_TEXTEDITOR
));
Core
::
Context
textcontext
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL_ID
);
Core
::
ActionContainer
*
mtools
=
...
...
src/plugins/cmakeprojectmanager/cmakeeditor.cpp
View file @
2f5f358f
...
...
@@ -33,7 +33,6 @@
#include
"cmakeeditorfactory.h"
#include
"cmakeprojectconstants.h"
#include
<coreplugin/uniqueidmanager.h>
#include
<texteditor/fontsettings.h>
#include
<texteditor/texteditoractionhandler.h>
#include
<texteditor/texteditorconstants.h>
...
...
@@ -49,12 +48,10 @@ using namespace CMakeProjectManager::Internal;
//
CMakeEditorEditable
::
CMakeEditorEditable
(
CMakeEditor
*
editor
)
:
BaseTextEditorEditable
(
editor
)
{
Core
::
UniqueIDManager
*
uidm
=
Core
::
UniqueIDManager
::
instance
();
m_context
<<
uidm
->
uniqueIdentifier
(
CMakeProjectManager
::
Constants
::
C_CMAKEEDITOR
);
m_context
<<
uidm
->
uniqueIdentifier
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
}
:
BaseTextEditorEditable
(
editor
),
m_context
(
CMakeProjectManager
::
Constants
::
C_CMAKEEDITOR
,
TextEditor
::
Constants
::
C_TEXTEDITOR
)
{
}
Core
::
Context
CMakeEditorEditable
::
context
()
const
{
...
...
src/plugins/cmakeprojectmanager/cmakeeditor.h
View file @
2f5f358f
...
...
@@ -60,7 +60,7 @@ public:
QString
id
()
const
;
bool
isTemporary
()
const
{
return
false
;
}
private:
Core
::
Context
m_context
;
const
Core
::
Context
m_context
;
};
class
CMakeEditor
:
public
TextEditor
::
BaseTextEditor
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
2f5f358f
...
...
@@ -262,7 +262,7 @@ QList<ActionContainerPrivate *> ActionManagerPrivate::containers() const
bool
ActionManagerPrivate
::
hasContext
(
int
context
)
const
{
return
m_context
.
contains
(
context
);
return
m_context
.
d
.
contains
(
context
);
}
void
ActionManagerPrivate
::
setContext
(
const
Context
&
context
)
...
...
@@ -278,8 +278,8 @@ void ActionManagerPrivate::setContext(const Context &context)
bool
ActionManagerPrivate
::
hasContext
(
const
Context
&
context
)
const
{
for
(
int
i
=
0
;
i
<
m_context
.
count
();
++
i
)
{
if
(
context
.
contains
(
m_context
.
at
(
i
)))
for
(
int
i
=
0
;
i
<
m_context
.
d
.
count
();
++
i
)
{
if
(
context
.
d
.
contains
(
m_context
.
d
.
at
(
i
)))
return
true
;
}
return
false
;
...
...
@@ -403,7 +403,7 @@ Command *ActionManagerPrivate::registerShortcut(QShortcut *shortcut, const QStri
shortcut
->
setParent
(
m_mainWnd
);
sc
->
setShortcut
(
shortcut
);
if
(
context
.
isEmpty
())
if
(
context
.
d
.
isEmpty
())
sc
->
setContext
(
Context
(
0
));
else
sc
->
setContext
(
context
);
...
...
src/plugins/coreplugin/actionmanager/command.cpp
View file @
2f5f358f
...
...
@@ -336,8 +336,8 @@ QString Shortcut::defaultText() const
bool
Shortcut
::
setCurrentContext
(
const
Core
::
Context
&
context
)
{
foreach
(
int
ctxt
,
m_context
)
{
if
(
context
.
contains
(
ctxt
))
{
foreach
(
int
ctxt
,
m_context
.
d
)
{
if
(
context
.
d
.
contains
(
ctxt
))
{
if
(
!
m_shortcut
->
isEnabled
())
{
m_shortcut
->
setEnabled
(
true
);
emit
activeStateChanged
();
...
...
@@ -487,10 +487,10 @@ static inline QString msgActionWarning(QAction *newAction, int k, QAction *oldAc
void
Action
::
addOverrideAction
(
QAction
*
action
,
const
Core
::
Context
&
context
)
{
if
(
context
.
isEmpty
())
{
if
(
context
.
d
.
isEmpty
())
{
m_contextActionMap
.
insert
(
0
,
action
);
}
else
{
for
(
int
i
=
0
;
i
<
context
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
context
.
size
();
++
i
)
{
int
k
=
context
.
at
(
i
);
if
(
m_contextActionMap
.
contains
(
k
))
qWarning
(
"%s"
,
qPrintable
(
msgActionWarning
(
action
,
k
,
m_contextActionMap
.
value
(
k
,
0
))));
...
...
src/plugins/coreplugin/designmode.cpp
View file @
2f5f358f
...
...
@@ -31,7 +31,6 @@
#include
<coreplugin/icore.h>
#include
<coreplugin/modemanager.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<coreplugin/editormanager/editormanager.h>
#include
<coreplugin/editormanager/openeditorsmodel.h>
#include
<coreplugin/actionmanager/actionmanager.h>
...
...
@@ -136,8 +135,7 @@ DesignMode::~DesignMode()
Context
DesignMode
::
context
()
const
{
static
Context
contexts
(
Core
::
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_DESIGN_MODE
));
static
Context
contexts
(
Constants
::
C_DESIGN_MODE
);
return
contexts
;
}
...
...
@@ -269,7 +267,7 @@ void DesignMode::updateContext(Core::IMode *newMode, Core::IMode *oldMode)
void
DesignMode
::
setActiveContext
(
const
Context
&
context
)
{
if
(
d
->
m_activeContext
==
context
)
if
(
d
->
m_activeContext
.
d
==
context
.
d
)
return
;
if
(
ModeManager
::
instance
()
->
currentMode
()
==
this
)
...
...
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
View file @
2f5f358f
...
...
@@ -393,7 +393,7 @@ void ShortcutSettings::markPossibleCollisions(ShortcutItem *item)
continue
;
}
foreach
(
int
context
,
currentItem
->
m_cmd
->
context
())
{
foreach
(
int
context
,
currentItem
->
m_cmd
->
context
()
.
d
)
{
// conflict if context is identical, OR if one
// of the contexts is the global context
...
...
src/plugins/coreplugin/editmode.cpp
View file @
2f5f358f
...
...
@@ -117,10 +117,9 @@ QString EditMode::id() const
Context
EditMode
::
context
()
const
{
static
Context
contexts
(
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_EDIT_MODE
),
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
)
,
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_NAVIGATION_PANE
));
static
Context
contexts
(
Constants
::
C_EDIT_MODE
,
Constants
::
C_EDITORMANAGER
,
Constants
::
C_NAVIGATION_PANE
);
return
contexts
;
}
...
...
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
2f5f358f
...
...
@@ -43,7 +43,6 @@
#include
<coreplugin/editortoolbar.h>
#include
<coreplugin/coreconstants.h>
#include
<coreplugin/modemanager.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/actionmanager/actioncontainer.h>
#include
<coreplugin/actionmanager/command.h>
...
...
@@ -267,15 +266,9 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) :
connect
(
m_d
->
m_core
,
SIGNAL
(
contextAboutToChange
(
Core
::
IContext
*
)),
this
,
SLOT
(
handleContextChange
(
Core
::
IContext
*
)));
UniqueIDManager
*
uidm
=
m_d
->
m_core
->
uniqueIDManager
();
const
Context
gc
=
Context
(
Constants
::
C_GLOBAL_ID
);
const
Context
editManagerContext
=
Context
(
uidm
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
));
const
Context
editManagerContext
(
Constants
::
C_EDITORMANAGER
);
// combined context for edit & design modes
const
Context
editDesignContext
=
Context
(
uidm
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
),
uidm
->
uniqueIdentifier
(
Constants
::
C_DESIGN_MODE
));
const
Context
editDesignContext
(
Constants
::
C_EDITORMANAGER
,
Constants
::
C_DESIGN_MODE
);
ActionManager
*
am
=
m_d
->
m_core
->
actionManager
();
ActionContainer
*
mfile
=
am
->
actionContainer
(
Constants
::
M_FILE
);
...
...
@@ -478,11 +471,7 @@ EditorManager::~EditorManager()
void
EditorManager
::
init
()
{
QList
<
int
>
context
;
context
<<
m_d
->
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
"QtCreator.OpenDocumentsView"
);
m_d
->
m_coreListener
=
new
EditorClosingCoreListener
(
this
);
pluginManager
()
->
addObject
(
m_d
->
m_coreListener
);
m_d
->
m_openEditorsFactory
=
new
OpenEditorsViewFactory
();
...
...
src/plugins/coreplugin/icontext.h
View file @
2f5f358f
...
...
@@ -31,6 +31,8 @@
#define ICONTEXT_H
#include
<coreplugin/core_global.h>
#include
<QtCore/QList>
#include
<QtCore/QObject>
QT_BEGIN_NAMESPACE
...
...
@@ -39,13 +41,23 @@ QT_END_NAMESPACE
namespace
Core
{
class
CORE_EXPORT
Context
:
public
QList
<
int
>
class
CORE_EXPORT
Context
{
public:
Context
()
{}
explicit
Context
(
int
c1
)
{
append
(
c1
);
}
Context
(
int
c1
,
int
c2
)
{
append
(
c1
);
append
(
c2
);
}
Context
(
int
c1
,
int
c2
,
int
c3
)
{
append
(
c1
);
append
(
c2
);
append
(
c3
);
}
explicit
Context
(
const
char
*
c1
)
{
add
(
c1
);
}
Context
(
const
char
*
c1
,
const
char
*
c2
)
{
add
(
c1
);
add
(
c2
);
}
Context
(
const
char
*
c1
,
const
char
*
c2
,
const
char
*
c3
)
{
add
(
c1
);
add
(
c2
);
add
(
c3
);
}
Context
(
const
char
*
base
,
int
offset
);
void
add
(
const
char
*
c
);
bool
contains
(
const
char
*
c
)
const
;
bool
contains
(
int
c
)
const
{
return
d
.
contains
(
c
);
}
int
size
()
const
{
return
d
.
size
();
}
bool
isEmpty
()
const
{
return
d
.
isEmpty
();
}
int
at
(
int
i
)
const
{
return
d
.
at
(
i
);
}
public:
QList
<
int
>
d
;
};
class
CORE_EXPORT
IContext
:
public
QObject
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
2f5f358f
...
...
@@ -1198,21 +1198,21 @@ void MainWindow::writeSettings()
void
MainWindow
::
updateAdditionalContexts
(
const
Context
&
remove
,
const
Context
&
add
)
{
foreach
(
const
int
context
,
remove
)
{
foreach
(
const
int
context
,
remove
.
d
)
{
if
(
context
==
0
)
continue
;
int
index
=
m_additionalContexts
.
indexOf
(
context
);
int
index
=
m_additionalContexts
.
d
.
indexOf
(
context
);
if
(
index
!=
-
1
)
m_additionalContexts
.
removeAt
(
index
);
m_additionalContexts
.
d
.
removeAt
(
index
);
}
foreach
(
const
int
context
,
add
)
{
foreach
(
const
int
context
,
add
.
d
)
{
if
(
context
==
0
)
continue
;
if
(
!
m_additionalContexts
.
contains
(
context
))
m_additionalContexts
.
prepend
(
context
);
if
(
!
m_additionalContexts
.
d
.
contains
(
context
))
m_additionalContexts
.
d
.
prepend
(
context
);
}
updateContext
();
...
...
@@ -1228,15 +1228,15 @@ void MainWindow::updateContext()
Context
contexts
;
if
(
m_activeContext
)
contexts
+=
m_activeContext
->
context
();
contexts
.
d
+=
m_activeContext
->
context
()
.
d
;
contexts
+=
m_additionalContexts
;
contexts
.
d
+=
m_additionalContexts
.
d
;
Context
uniquecontexts
;
for
(
int
i
=
0
;
i
<
contexts
.
size
();
++
i
)
{
const
int
c
=
contexts
.
at
(
i
);
if
(
!
uniquecontexts
.
contains
(
c
))
uniquecontexts
<<
c
;
for
(
int
i
=
0
;
i
<
contexts
.
d
.
size
();
++
i
)
{
const
int
c
=
contexts
.
d
.
at
(
i
);
if
(
!
uniquecontexts
.
d
.
contains
(
c
))
uniquecontexts
.
d
<<
c
;
}
m_actionManager
->
setContext
(
uniquecontexts
);
...
...
src/plugins/coreplugin/navigationwidget.cpp
View file @
2f5f358f
...
...
@@ -34,7 +34,6 @@
#include
"coreconstants.h"
#include
"inavigationwidgetfactory.h"
#include
"modemanager.h"
#include
"uniqueidmanager.h"
#include
"actionmanager/actionmanager.h"
#include
"actionmanager/command.h"
...
...
@@ -348,8 +347,7 @@ void NavigationWidget::objectAdded(QObject * obj)
ICore
*
core
=
ICore
::
instance
();
ActionManager
*
am
=
core
->
actionManager
();
Context
navicontext
(
core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Core
::
Constants
::
C_NAVIGATION_PANE
));
Context
navicontext
(
Core
::
Constants
::
C_NAVIGATION_PANE
);
QString
id
=
factory
->
id
();
QShortcut
*
shortcut
=
new
QShortcut
(
this
);
...
...
src/plugins/coreplugin/uniqueidmanager.cpp
View file @
2f5f358f
...
...
@@ -32,7 +32,7 @@
using
namespace
Core
;
UniqueIDManager
*
UniqueIDManager
::
m_instance
=
0
;
UniqueIDManager
*
UniqueIDManager
::
m_instance
=
0
;
UniqueIDManager
::
UniqueIDManager
()
{
...
...
@@ -64,3 +64,27 @@ QString UniqueIDManager::stringForUniqueIdentifier(int uid)
{
return
m_uniqueIdentifiers
.
key
(
uid
);
}
// FIXME: Move to some better place.
#include
"icontext.h"
static
int
toId
(
const
char
*
id
)
{
return
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
QLatin1String
(
id
));
}
Context
::
Context
(
const
char
*
id
,
int
offset
)
{
d
.
append
(
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
QString
(
id
)
+
QString
::
number
(
offset
)));
}
void
Context
::
add
(
const
char
*
id
)
{
d
.
append
(
toId
(
id
));
}
bool
Context
::
contains
(
const
char
*
id
)
const
{
return
d
.
contains
(
toId
(
id
));
}
src/plugins/cpaster/cpasterplugin.cpp
View file @
2f5f358f
...
...
@@ -47,7 +47,6 @@
#include
<coreplugin/mimedatabase.h>
#include
<coreplugin/icore.h>
#include
<coreplugin/messagemanager.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<utils/qtcassert.h>
#include
<texteditor/basetexteditor.h>
...
...
@@ -83,7 +82,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
Q_UNUSED
(
error_message
)
// Create the globalcontext list to register actions accordingly
Core
::
Context
globalcontext
(
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
Core
::
Constants
::
C_GLOBAL
)
)
;
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
// Create the settings Page
m_settings
->
fromSettings
(
Core
::
ICore
::
instance
()
->
settings
());
...
...
src/plugins/cppeditor/cppeditor.cpp
View file @
2f5f358f
...
...
@@ -61,7 +61,6 @@
#include
<cpptools/cpptoolsconstants.h>
#include
<coreplugin/icore.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/actionmanager/actioncontainer.h>
#include
<coreplugin/editormanager/ieditor.h>
...
...
@@ -588,10 +587,9 @@ struct FindCanonicalSymbol
CPPEditorEditable
::
CPPEditorEditable
(
CPPEditor
*
editor
)
:
BaseTextEditorEditable
(
editor
)
{
Core
::
UniqueIDManager
*
uidm
=
Core
::
UniqueIDManager
::
instance
();
m_context
<<
uidm
->
uniqueIdentifier
(
CppEditor
::
Constants
::
C_CPPEDITOR
);
m_context
<<
uidm
->
uniqueIdentifier
(
ProjectExplorer
::
Constants
::
LANG_CXX
);
m_context
<<
uidm
->
uniqueIdentifier
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
m_context
.
add
(
CppEditor
::
Constants
::
C_CPPEDITOR
);
m_context
.
add
(
ProjectExplorer
::
Constants
::
LANG_CXX
);
m_context
.
add
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
}
CPPEditor
::
CPPEditor
(
QWidget
*
parent
)
...
...
src/plugins/cppeditor/cppplugin.cpp
View file @
2f5f358f
...
...
@@ -231,7 +231,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
wizardParameters
.
setId
(
QLatin1String
(
"C.Header"
));
addAutoReleasedObject
(
new
CppFileWizard
(
wizardParameters
,
Header
,
core
));
Core
::
Context
context
(
core
->
uniqueIDManager
()
->
uniqueIdentifier
(
CppEditor
::
Constants
::
C_CPPEDITOR
)
)
;
Core
::
Context
context
(
CppEditor
::
Constants
::
C_CPPEDITOR
);
Core
::
ActionManager
*
am
=
core
->
actionManager
();
Core
::
ActionContainer
*
contextMenu
=
am
->
createMenu
(
CppEditor
::
Constants
::
M_CONTEXT
);
...
...
src/plugins/cpptools/cppmodelmanager.cpp
View file @
2f5f358f
...
...
@@ -50,7 +50,6 @@
# include <projectexplorer/projectexplorerconstants.h>
# include <projectexplorer/session.h>
# include <coreplugin/icore.h>
# include <coreplugin/uniqueidmanager.h>
# include <coreplugin/mimedatabase.h>
# include <coreplugin/editormanager/editormanager.h>
# include <coreplugin/progressmanager/progressmanager.h>
...
...
@@ -957,16 +956,18 @@ void CppModelManager::editorAboutToClose(Core::IEditor *editor)
bool
CppModelManager
::
isCppEditor
(
Core
::
IEditor
*
editor
)
const
{
Core
::
UniqueIDManager
*
uidm
=
m_core
->
uniqueIDManager
();
const
int
uid
=
uidm
->
uniqueIdentifier
(
ProjectExplorer
::
Constants
::
LANG_CXX
);
return
editor
->
context
().
contains
(
uid
);
return
editor
->
context
().
contains
(
ProjectExplorer
::
Constants
::
LANG_CXX
);
}
TokenCache
*
CppModelManager
::
tokenCache
(
TextEditor
::
ITextEditor
*
editor
)
const
{
return
editorSupport
(
editor
)
->
tokenCache
();
}
{
return
editorSupport
(
editor
)
->
tokenCache
();
}
void
CppModelManager
::
emitDocumentUpdated
(
Document
::
Ptr
doc
)
{
emit
documentUpdated
(
doc
);
}
{
emit
documentUpdated
(
doc
);
}
void
CppModelManager
::
onDocumentUpdated
(
Document
::
Ptr
doc
)
{
...
...
Prev
1
2
3
4
Next
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