Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
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
Environments
Packages & Registries
Packages & Registries
Container Registry
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
Marco Bubke
flatpak-qt-creator
Commits
f56dacc7
Commit
f56dacc7
authored
Jun 28, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core::Context: remove special handling of C_GLOBAL_ID/C_GLOBAL
parent
060385b4
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
59 additions
and
63 deletions
+59
-63
src/plugins/bookmarks/bookmarksplugin.cpp
src/plugins/bookmarks/bookmarksplugin.cpp
+1
-1
src/plugins/coreplugin/actionmanager/actionmanager.cpp
src/plugins/coreplugin/actionmanager/actionmanager.cpp
+1
-1
src/plugins/coreplugin/coreconstants.h
src/plugins/coreplugin/coreconstants.h
+0
-1
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
+4
-2
src/plugins/coreplugin/icontext.h
src/plugins/coreplugin/icontext.h
+0
-1
src/plugins/coreplugin/mainwindow.cpp
src/plugins/coreplugin/mainwindow.cpp
+34
-33
src/plugins/coreplugin/mainwindow.h
src/plugins/coreplugin/mainwindow.h
+0
-1
src/plugins/coreplugin/modemanager.cpp
src/plugins/coreplugin/modemanager.cpp
+1
-1
src/plugins/coreplugin/outputpane.cpp
src/plugins/coreplugin/outputpane.cpp
+2
-2
src/plugins/coreplugin/uniqueidmanager.cpp
src/plugins/coreplugin/uniqueidmanager.cpp
+0
-1
src/plugins/cppeditor/cppplugin.cpp
src/plugins/cppeditor/cppplugin.cpp
+1
-1
src/plugins/debugger/debuggerplugin.cpp
src/plugins/debugger/debuggerplugin.cpp
+1
-1
src/plugins/debugger/debuggeruiswitcher.cpp
src/plugins/debugger/debuggeruiswitcher.cpp
+4
-7
src/plugins/fakevim/fakevimplugin.cpp
src/plugins/fakevim/fakevimplugin.cpp
+1
-1
src/plugins/find/findplugin.cpp
src/plugins/find/findplugin.cpp
+2
-2
src/plugins/find/findtoolbar.cpp
src/plugins/find/findtoolbar.cpp
+1
-1
src/plugins/help/helpplugin.cpp
src/plugins/help/helpplugin.cpp
+1
-1
src/plugins/locator/locatorplugin.cpp
src/plugins/locator/locatorplugin.cpp
+1
-1
src/plugins/perforce/perforceplugin.cpp
src/plugins/perforce/perforceplugin.cpp
+1
-1
src/plugins/projectexplorer/outputwindow.cpp
src/plugins/projectexplorer/outputwindow.cpp
+1
-1
src/plugins/projectexplorer/projectexplorer.cpp
src/plugins/projectexplorer/projectexplorer.cpp
+1
-1
src/plugins/qt4projectmanager/qt-maemo/qemuruntimemanager.cpp
...plugins/qt4projectmanager/qt-maemo/qemuruntimemanager.cpp
+1
-1
No files found.
src/plugins/bookmarks/bookmarksplugin.cpp
View file @
f56dacc7
...
...
@@ -69,7 +69,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
ActionManager
*
am
=
core
->
actionManager
();
Core
::
Context
textcontext
(
TextEditor
::
Constants
::
C_TEXTEDITOR
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
ActionContainer
*
mtools
=
am
->
actionContainer
(
Core
::
Constants
::
M_TOOLS
);
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
f56dacc7
...
...
@@ -97,7 +97,7 @@ namespace {
QAction *myAction = new QAction(tr("My Action"), this);
Core::Command *cmd = am->registerAction(myAction,
"myplugin.myaction",
QList<int>() << C_GLOBAL_ID
);
Core::Context(C_GLOBAL)
);
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+u")));
connect(myAction, SIGNAL(triggered()), this, SLOT(performMyAction()));
\endcode
...
...
src/plugins/coreplugin/coreconstants.h
View file @
f56dacc7
...
...
@@ -93,7 +93,6 @@ const char * const M_HELP = "QtCreator.Menu.Help";
//contexts
const
char
*
const
C_GLOBAL
=
"Global Context"
;
const
int
C_GLOBAL_ID
=
0
;
const
char
*
const
C_WELCOME_MODE
=
"Core.WelcomeMode"
;
const
char
*
const
C_EDIT_MODE
=
"Core.EditMode"
;
const
char
*
const
C_DESIGN_MODE
=
"Core.DesignMode"
;
...
...
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
View file @
f56dacc7
...
...
@@ -386,6 +386,8 @@ void ShortcutSettings::markPossibleCollisions(ShortcutItem *item)
if
(
item
->
m_key
.
isEmpty
())
return
;
int
globalId
=
Context
(
Constants
::
C_GLOBAL
).
at
(
0
);
foreach
(
ShortcutItem
*
currentItem
,
m_scitems
)
{
if
(
currentItem
->
m_key
.
isEmpty
()
||
item
==
currentItem
||
...
...
@@ -398,9 +400,9 @@ void ShortcutSettings::markPossibleCollisions(ShortcutItem *item)
// conflict if context is identical, OR if one
// of the contexts is the global context
if
(
item
->
m_cmd
->
context
().
contains
(
context
)
||
(
item
->
m_cmd
->
context
().
contains
(
Constants
::
C_GLOBAL_ID
)
&&
(
item
->
m_cmd
->
context
().
contains
(
globalId
)
&&
!
currentItem
->
m_cmd
->
context
().
isEmpty
())
||
(
currentItem
->
m_cmd
->
context
().
contains
(
Constants
::
C_GLOBAL_ID
)
&&
(
currentItem
->
m_cmd
->
context
().
contains
(
globalId
)
&&
!
item
->
m_cmd
->
context
().
isEmpty
()))
{
currentItem
->
m_item
->
setForeground
(
2
,
Qt
::
red
);
item
->
m_item
->
setForeground
(
2
,
Qt
::
red
);
...
...
src/plugins/coreplugin/icontext.h
View file @
f56dacc7
...
...
@@ -46,7 +46,6 @@ class CORE_EXPORT Context
public:
Context
()
{}
explicit
Context
(
int
c1
)
{
d
.
append
(
c1
);
}
// For C_GLOBAL_ID. FIXME: Sanitize.
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
);
}
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
f56dacc7
This diff is collapsed.
Click to expand it.
src/plugins/coreplugin/mainwindow.h
View file @
f56dacc7
...
...
@@ -179,7 +179,6 @@ private:
CoreImpl
*
m_coreImpl
;
UniqueIDManager
*
m_uniqueIDManager
;
Context
m_globalContext
;
Context
m_additionalContexts
;
QSettings
*
m_settings
;
QSettings
*
m_globalSettings
;
...
...
src/plugins/coreplugin/modemanager.cpp
View file @
f56dacc7
...
...
@@ -179,7 +179,7 @@ void ModeManager::objectAdded(QObject *obj)
const
QString
shortcutId
=
QLatin1String
(
"QtCreator.Mode."
)
+
mode
->
id
();
QShortcut
*
shortcut
=
new
QShortcut
(
d
->
m_mainWindow
);
shortcut
->
setWhatsThis
(
tr
(
"Switch to <b>%1</b> mode"
).
arg
(
mode
->
displayName
()));
Command
*
cmd
=
am
->
registerShortcut
(
shortcut
,
shortcutId
,
Context
(
Constants
::
C_GLOBAL
_ID
));
Command
*
cmd
=
am
->
registerShortcut
(
shortcut
,
shortcutId
,
Context
(
Constants
::
C_GLOBAL
));
d
->
m_modeShortcuts
.
insert
(
index
,
cmd
);
connect
(
cmd
,
SIGNAL
(
keySequenceChanged
()),
this
,
SLOT
(
updateModeToolTip
()));
...
...
src/plugins/coreplugin/outputpane.cpp
View file @
f56dacc7
...
...
@@ -282,7 +282,7 @@ void OutputPaneManager::init()
{
ActionManager
*
am
=
Core
::
ICore
::
instance
()
->
actionManager
();
ActionContainer
*
mwindow
=
am
->
actionContainer
(
Constants
::
M_WINDOW
);
Context
globalcontext
=
Context
(
Core
::
Constants
::
C_GLOBAL_ID
);
const
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
// Window->Output Panes
ActionContainer
*
mpanes
=
am
->
createMenu
(
Constants
::
M_WINDOW_PANES
);
...
...
@@ -356,7 +356,7 @@ void OutputPaneManager::init()
actionId
.
remove
(
QLatin1Char
(
' '
));
QAction
*
action
=
new
QAction
(
outPane
->
displayName
(),
this
);
Command
*
cmd
=
am
->
registerAction
(
action
,
actionId
,
Context
(
Constants
::
C_GLOBAL
_ID
));
Command
*
cmd
=
am
->
registerAction
(
action
,
actionId
,
Context
(
Constants
::
C_GLOBAL
));
mpanes
->
addAction
(
cmd
,
"Coreplugin.OutputPane.PanesGroup"
);
m_actions
.
insert
(
cmd
->
action
(),
idx
);
...
...
src/plugins/coreplugin/uniqueidmanager.cpp
View file @
f56dacc7
...
...
@@ -37,7 +37,6 @@ UniqueIDManager *UniqueIDManager::m_instance = 0;
UniqueIDManager
::
UniqueIDManager
()
{
m_instance
=
this
;
m_uniqueIdentifiers
.
insert
(
Constants
::
C_GLOBAL
,
Constants
::
C_GLOBAL_ID
);
}
UniqueIDManager
::~
UniqueIDManager
()
...
...
src/plugins/cppeditor/cppplugin.cpp
View file @
f56dacc7
...
...
@@ -272,7 +272,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
cppToolsMenu
->
addAction
(
cmd
);
// Update context in global context
Core
::
Context
globalContext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalContext
(
Core
::
Constants
::
C_GLOBAL
);
cppToolsMenu
->
addAction
(
createSeparator
(
am
,
this
,
globalContext
,
CppEditor
::
Constants
::
SEPARATOR2
));
m_updateCodeModelAction
=
new
QAction
(
tr
(
"Update Code Model"
),
this
);
cmd
=
am
->
registerAction
(
m_updateCodeModelAction
,
QLatin1String
(
Constants
::
UPDATE_CODEMODEL
),
globalContext
);
...
...
src/plugins/debugger/debuggerplugin.cpp
View file @
f56dacc7
...
...
@@ -982,7 +982,7 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
Core
::
ActionManager
*
am
=
core
->
actionManager
();
QTC_ASSERT
(
am
,
return
false
);
const
Core
::
Context
globalcontext
(
CC
::
C_GLOBAL
_ID
);
const
Core
::
Context
globalcontext
(
CC
::
C_GLOBAL
);
const
Core
::
Context
cppDebuggercontext
(
C_CPPDEBUGGER
);
const
Core
::
Context
cppeditorcontext
(
CppEditor
::
Constants
::
C_CPPEDITOR
);
...
...
src/plugins/debugger/debuggeruiswitcher.cpp
View file @
f56dacc7
...
...
@@ -85,9 +85,6 @@ struct DebuggerUISwitcherPrivate
QStackedWidget
*
m_toolbarStack
;
Internal
::
DebuggerMainWindow
*
m_mainWindow
;
// global context
Core
::
Context
m_globalContext
;
QHash
<
int
,
Core
::
Context
>
m_contextsForLanguage
;
QActionGroup
*
m_languageActionGroup
;
...
...
@@ -139,8 +136,6 @@ DebuggerUISwitcher::DebuggerUISwitcher(Core::BaseMode *mode, QObject* parent) :
d
->
m_languageActionGroup
->
setExclusive
(
true
);
d
->
m_globalContext
.
add
(
Core
::
Constants
::
C_GLOBAL_ID
);
DebuggerUISwitcherPrivate
::
m_instance
=
this
;
}
...
...
@@ -212,7 +207,7 @@ void DebuggerUISwitcher::createViewsMenuItems()
{
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
ActionManager
*
am
=
core
->
actionManager
();
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
QMenu
*
mLang
=
d
->
m_languageMenu
->
menu
();
mLang
->
setTitle
(
tr
(
"&Languages"
));
...
...
@@ -248,10 +243,12 @@ void DebuggerUISwitcher::addLanguage(const QString &langName, const Core::Contex
d
->
m_languageActionGroup
->
addAction
(
langChange
);
QString
prefix
=
tr
(
"Alt+L"
);
connect
(
langChange
,
SIGNAL
(
triggered
()),
SLOT
(
langChangeTriggered
()));
Core
::
Command
*
cmd
=
am
->
registerAction
(
langChange
,
"Debugger.Language."
+
langName
,
d
->
m_globalContext
);
"Debugger.Language."
+
langName
,
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
));
cmd
->
setDefaultKeySequence
(
QKeySequence
(
QString
(
"%1,%2"
).
arg
(
prefix
).
arg
(
d
->
m_languages
.
count
())));
...
...
src/plugins/fakevim/fakevimplugin.cpp
View file @
f56dacc7
...
...
@@ -587,7 +587,7 @@ bool FakeVimPluginPrivate::initialize()
Core
::
ActionManager
*
actionManager
=
Core
::
ICore
::
instance
()
->
actionManager
();
QTC_ASSERT
(
actionManager
,
return
false
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
m_fakeVimOptionsPage
=
new
FakeVimOptionPage
;
q
->
addObject
(
m_fakeVimOptionsPage
);
...
...
src/plugins/find/findplugin.cpp
View file @
f56dacc7
...
...
@@ -192,7 +192,7 @@ void FindPlugin::setupMenu()
mfind
->
appendGroup
(
Constants
::
G_FIND_FILTERS
);
mfind
->
appendGroup
(
Constants
::
G_FIND_FLAGS
);
mfind
->
appendGroup
(
Constants
::
G_FIND_ACTIONS
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
Command
*
cmd
;
QAction
*
separator
;
separator
=
new
QAction
(
this
);
...
...
@@ -220,7 +220,7 @@ void FindPlugin::setupFilterMenuItems()
QList
<
IFindFilter
*>
findInterfaces
=
ExtensionSystem
::
PluginManager
::
instance
()
->
getObjects
<
IFindFilter
>
();
Core
::
Command
*
cmd
;
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
ActionContainer
*
mfindadvanced
=
am
->
actionContainer
(
Constants
::
M_FIND_ADVANCED
);
d
->
m_filterActions
.
clear
();
...
...
src/plugins/find/findtoolbar.cpp
View file @
f56dacc7
...
...
@@ -131,7 +131,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
QMetaTypeId
<
QStringList
>::
qt_metatype_id
();
// register actions
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
ActionManager
*
am
=
Core
::
ICore
::
instance
()
->
actionManager
();
Core
::
ActionContainer
*
mfind
=
am
->
actionContainer
(
Constants
::
M_FIND
);
Core
::
Command
*
cmd
;
...
...
src/plugins/help/helpplugin.cpp
View file @
f56dacc7
...
...
@@ -119,7 +119,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
Q_UNUSED
(
arguments
)
Q_UNUSED
(
error
)
m_core
=
Core
::
ICore
::
instance
();
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
Context
modecontext
(
Constants
::
C_MODE_HELP
);
const
QString
&
locale
=
qApp
->
property
(
"qtc_locale"
).
toString
();
...
...
src/plugins/locator/locatorplugin.cpp
View file @
f56dacc7
...
...
@@ -111,7 +111,7 @@ bool LocatorPlugin::initialize(const QStringList &, QString *)
const
QString
actionId
=
QLatin1String
(
"QtCreator.Locate"
);
QAction
*
action
=
new
QAction
(
m_locatorWidget
->
windowIcon
(),
m_locatorWidget
->
windowTitle
(),
this
);
Core
::
Command
*
cmd
=
core
->
actionManager
()
->
registerAction
(
action
,
actionId
,
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
_ID
));
Core
::
Command
*
cmd
=
core
->
actionManager
()
->
registerAction
(
action
,
actionId
,
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
));
cmd
->
setDefaultKeySequence
(
QKeySequence
(
"Ctrl+K"
));
connect
(
action
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
openLocator
()));
...
...
src/plugins/perforce/perforceplugin.cpp
View file @
f56dacc7
...
...
@@ -266,7 +266,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
mtools
->
addMenu
(
mperforce
);
m_menuAction
=
mperforce
->
menu
()
->
menuAction
();
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
Context
perforcesubmitcontext
(
Constants
::
PERFORCESUBMITEDITOR_CONTEXT
);
Core
::
Command
*
command
;
...
...
src/plugins/projectexplorer/outputwindow.cpp
View file @
f56dacc7
...
...
@@ -82,7 +82,7 @@ OutputPane::OutputPane()
// Stop
Core
::
ActionManager
*
am
=
Core
::
ICore
::
instance
()
->
actionManager
();
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
m_stopAction
=
new
QAction
(
QIcon
(
Constants
::
ICON_STOP
),
tr
(
"Stop"
),
this
);
m_stopAction
->
setToolTip
(
tr
(
"Stop"
));
...
...
src/plugins/projectexplorer/projectexplorer.cpp
View file @
f56dacc7
...
...
@@ -263,7 +263,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d
->
m_proWindow
=
new
ProjectWindow
;
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
_ID
);
Core
::
Context
globalcontext
(
Core
::
Constants
::
C_GLOBAL
);
Core
::
Context
pecontext
(
Constants
::
C_PROJECTEXPLORER
);
d
->
m_projectsMode
=
new
Core
::
BaseMode
;
...
...
src/plugins/qt4projectmanager/qt-maemo/qemuruntimemanager.cpp
View file @
f56dacc7
...
...
@@ -85,7 +85,7 @@ QemuRuntimeManager::QemuRuntimeManager(QObject *parent)
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
Core
::
ActionManager
*
actionManager
=
core
->
actionManager
();
Core
::
Command
*
qemuCommand
=
actionManager
->
registerAction
(
m_qemuAction
,
"MaemoEmulator"
,
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
_ID
));
"MaemoEmulator"
,
Core
::
Context
(
Core
::
Constants
::
C_GLOBAL
));
qemuCommand
->
setAttribute
(
Core
::
Command
::
CA_UpdateText
);
qemuCommand
->
setAttribute
(
Core
::
Command
::
CA_UpdateIcon
);
...
...
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