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
Marco Bubke
flatpak-qt-creator
Commits
f73861d4
Commit
f73861d4
authored
Jan 21, 2009
by
hjk
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
47f4ccad
5b50ffc2
Changes
17
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/actionmanager/actioncontainer.cpp
View file @
f73861d4
...
...
@@ -35,7 +35,6 @@
#include "actionmanager_p.h"
#include "command_p.h"
#include "coreimpl.h"
#include "coreconstants.h"
#include "uniqueidmanager.h"
...
...
@@ -150,15 +149,13 @@ bool ActionContainerPrivate::hasState(ContainerState state) const
void
ActionContainerPrivate
::
appendGroup
(
const
QString
&
group
)
{
UniqueIDManager
*
idmanager
=
CoreImpl
::
instance
()
->
uniqueIDManager
();
int
gid
=
idmanager
->
uniqueIdentifier
(
group
);
int
gid
=
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
group
);
m_groups
<<
gid
;
}
QAction
*
ActionContainerPrivate
::
insertLocation
(
const
QString
&
group
)
const
{
UniqueIDManager
*
idmanager
=
CoreImpl
::
instance
()
->
uniqueIDManager
();
int
grpid
=
idmanager
->
uniqueIdentifier
(
group
);
int
grpid
=
UniqueIDManager
::
instance
()
->
uniqueIdentifier
(
group
);
int
prevKey
=
0
;
int
pos
=
((
grpid
<<
16
)
|
0xFFFF
);
return
beforeAction
(
pos
,
&
prevKey
);
...
...
@@ -181,7 +178,7 @@ void ActionContainerPrivate::addAction(Command *action, const QString &group)
}
a
->
setStateFlags
(
a
->
stateFlags
()
|
CommandPrivate
::
CS_Initialized
);
}
else
{
UniqueIDManager
*
idmanager
=
CoreImpl
::
instance
()
->
u
niqueIDManager
();
UniqueIDManager
*
idmanager
=
U
niqueIDManager
::
instance
();
int
grpid
=
idmanager
->
uniqueIdentifier
(
Constants
::
G_DEFAULT_TWO
);
if
(
!
group
.
isEmpty
())
grpid
=
idmanager
->
uniqueIdentifier
(
group
);
...
...
@@ -208,7 +205,7 @@ void ActionContainerPrivate::addMenu(ActionContainer *menu, const QString &group
}
mc
->
setState
(
ActionContainerPrivate
::
CS_Initialized
);
}
else
{
UniqueIDManager
*
idmanager
=
CoreImpl
::
instance
()
->
u
niqueIDManager
();
UniqueIDManager
*
idmanager
=
U
niqueIDManager
::
instance
();
int
grpid
=
idmanager
->
uniqueIdentifier
(
Constants
::
G_DEFAULT_TWO
);
if
(
!
group
.
isEmpty
())
grpid
=
idmanager
->
uniqueIdentifier
(
group
);
...
...
src/plugins/coreplugin/actionmanager/actionmanager.cpp
View file @
f73861d4
...
...
@@ -222,7 +222,7 @@ ActionManagerPrivate::~ActionManagerPrivate()
qDeleteAll
(
m_idContainerMap
.
values
());
}
ActionManagerPrivate
*
ActionManagerPrivate
::
instance
()
ActionManagerPrivate
*
ActionManagerPrivate
::
instance
()
{
return
m_instance
;
}
...
...
src/plugins/coreplugin/actionmanager/actionmanager_p.h
View file @
f73861d4
...
...
@@ -69,7 +69,7 @@ public:
~
ActionManagerPrivate
();
void
setContext
(
const
QList
<
int
>
&
context
);
static
ActionManagerPrivate
*
instance
();
static
ActionManagerPrivate
*
instance
();
void
saveSettings
(
QSettings
*
settings
);
QList
<
int
>
defaultGroups
()
const
;
...
...
src/plugins/coreplugin/actionmanager/commandsfile.cpp
View file @
f73861d4
...
...
@@ -31,7 +31,6 @@
**
***************************************************************************/
#include "coreimpl.h"
#include "commandsfile.h"
#include "shortcutsettings.h"
#include "command_p.h"
...
...
@@ -100,7 +99,7 @@ QMap<QString, QKeySequence> CommandsFile::importCommands() const
*/
bool
CommandsFile
::
exportCommands
(
const
QList
<
ShortcutItem
*>
&
items
)
{
UniqueIDManager
*
idmanager
=
CoreImpl
::
instance
()
->
u
niqueIDManager
();
UniqueIDManager
*
idmanager
=
U
niqueIDManager
::
instance
();
QFile
file
(
m_filename
);
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
))
...
...
@@ -110,7 +109,7 @@ bool CommandsFile::exportCommands(const QList<ShortcutItem *> &items)
QDomElement
root
=
doc
.
createElement
(
"mapping"
);
doc
.
appendChild
(
root
);
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
for
(
int
i
=
0
;
i
<
items
.
count
();
++
i
)
{
ShortcutItem
*
item
=
items
.
at
(
i
);
QDomElement
ctag
=
doc
.
createElement
(
"shortcut"
);
ctag
.
setAttribute
(
QLatin1String
(
"id"
),
idmanager
->
stringForUniqueIdentifier
(
item
->
m_cmd
->
id
()));
...
...
src/plugins/coreplugin/dialogs/settingsdialog.cpp
View file @
f73861d4
...
...
@@ -32,7 +32,6 @@
***************************************************************************/
#include "settingsdialog.h"
#include "coreimpl.h"
#include <extensionsystem/pluginmanager.h>
...
...
src/plugins/coreplugin/dialogs/shortcutsettings.cpp
View file @
f73861d4
...
...
@@ -34,14 +34,13 @@
#include "shortcutsettings.h"
#include "ui_shortcutsettings.h"
#include "actionmanager_p.h"
#include "actionmanager/command.h"
#include "command_p.h"
#include "coreconstants.h"
#include "coreimpl.h"
#include "commandsfile.h"
#include "coreconstants.h"
#include "filemanager.h"
#include <coreplugin/uniqueidmanager.h>
#include <coreplugin/actionmanager/command.h>
#include "icore.h"
#include "uniqueidmanager.h"
#include <QtGui/QKeyEvent>
#include <QtGui/QShortcut>
...
...
@@ -232,11 +231,10 @@ void ShortcutSettings::removeKeySequence()
void
ShortcutSettings
::
importAction
()
{
UniqueIDManager
*
uidm
=
CoreImpl
::
instance
()
->
uniqueIDManager
();
UniqueIDManager
*
uidm
=
UniqueIDManager
::
instance
();
QString
fileName
=
QFileDialog
::
getOpenFileName
(
0
,
tr
(
"Import Keyboard Mapping Scheme"
),
Core
Impl
::
instance
()
->
resourcePath
()
+
"/schemes/"
,
I
Core
::
instance
()
->
resourcePath
()
+
"/schemes/"
,
tr
(
"Keyboard Mapping Scheme (*.kms)"
));
if
(
!
fileName
.
isEmpty
())
{
CommandsFile
cf
(
fileName
);
...
...
@@ -266,9 +264,9 @@ void ShortcutSettings::defaultAction()
void
ShortcutSettings
::
exportAction
()
{
QString
fileName
=
Core
Impl
::
instance
()
->
fileManager
()
->
getSaveFileNameWithExtension
(
QString
fileName
=
I
Core
::
instance
()
->
fileManager
()
->
getSaveFileNameWithExtension
(
tr
(
"Export Keyboard Mapping Scheme"
),
Core
Impl
::
instance
()
->
resourcePath
()
+
"/schemes/"
,
I
Core
::
instance
()
->
resourcePath
()
+
"/schemes/"
,
tr
(
"Keyboard Mapping Scheme (*.kms)"
),
".kms"
);
if
(
!
fileName
.
isEmpty
())
{
...
...
@@ -279,16 +277,11 @@ void ShortcutSettings::exportAction()
void
ShortcutSettings
::
initialize
()
{
QMap
<
QString
,
QTreeWidgetItem
*>
categories
;
m_am
=
ActionManagerPrivate
::
instance
();
UniqueIDManager
*
uidm
=
CoreImpl
::
instance
()
->
uniqueIDManager
();
UniqueIDManager
*
uidm
=
UniqueIDManager
::
instance
();
QList
<
CommandPrivate
*>
cmds
=
m_am
->
commands
();
for
(
int
i
=
0
;
i
<
cmds
.
size
();
++
i
)
{
CommandPrivate
*
c
=
cmds
.
at
(
i
);
if
(
c
->
hasAttribute
(
CommandPrivate
::
CA_NonConfigureable
))
foreach
(
Command
*
c
,
m_am
->
commands
())
{
if
(
c
->
hasAttribute
(
Command
::
CA_NonConfigureable
))
continue
;
if
(
c
->
action
()
&&
c
->
action
()
->
isSeparator
())
continue
;
...
...
@@ -296,24 +289,15 @@ void ShortcutSettings::initialize()
QTreeWidgetItem
*
item
=
0
;
ShortcutItem
*
s
=
new
ShortcutItem
;
m_scitems
<<
s
;
if
(
c
->
category
().
isEmpty
())
{
item
=
new
QTreeWidgetItem
(
m_page
->
commandList
);
}
else
{
if
(
!
categories
.
contains
(
c
->
category
()))
{
QTreeWidgetItem
*
cat
=
new
QTreeWidgetItem
(
m_page
->
commandList
);
cat
->
setText
(
0
,
c
->
category
());
categories
.
insert
(
c
->
category
(),
cat
);
cat
->
setExpanded
(
true
);
}
item
=
new
QTreeWidgetItem
(
categories
.
value
(
c
->
category
()));
}
item
=
new
QTreeWidgetItem
(
m_page
->
commandList
);
s
->
m_cmd
=
c
;
s
->
m_item
=
item
;
item
->
setText
(
0
,
uidm
->
stringForUniqueIdentifier
(
c
->
id
()));
if
(
c
->
action
())
{
QString
text
=
c
->
hasAttribute
(
CommandPrivate
::
CA_UpdateText
)
&&
!
c
->
defaultText
().
isNull
()
?
c
->
defaultText
()
:
c
->
action
()
->
text
();
QString
text
=
c
->
hasAttribute
(
Command
::
CA_UpdateText
)
&&
!
c
->
defaultText
().
isNull
()
?
c
->
defaultText
()
:
c
->
action
()
->
text
();
text
.
remove
(
QRegExp
(
"&(?!&)"
));
s
->
m_key
=
c
->
action
()
->
shortcut
();
item
->
setText
(
1
,
text
);
}
else
{
...
...
src/plugins/coreplugin/dialogs/shortcutsettings.ui
View file @
f73861d4
...
...
@@ -36,6 +36,9 @@
</item>
<item>
<widget
class=
"QTreeWidget"
name=
"commandList"
>
<property
name=
"rootIsDecorated"
>
<bool>
false
</bool>
</property>
<property
name=
"uniformRowHeights"
>
<bool>
true
</bool>
</property>
...
...
src/plugins/coreplugin/editmode.cpp
View file @
f73861d4
...
...
@@ -34,7 +34,6 @@
#include "editmode.h"
#include "editormanager.h"
#include "coreconstants.h"
#include "coreimpl.h"
#include "modemanager.h"
#include "uniqueidmanager.h"
#include "minisplitter.h"
...
...
@@ -122,9 +121,9 @@ const char* EditMode::uniqueModeName() const
QList
<
int
>
EditMode
::
context
()
const
{
static
QList
<
int
>
contexts
=
QList
<
int
>
()
<<
CoreImpl
::
instance
()
->
u
niqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_EDIT_MODE
)
<<
CoreImpl
::
instance
()
->
u
niqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
)
<<
CoreImpl
::
instance
()
->
u
niqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_NAVIGATION_PANE
);
U
niqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_EDIT_MODE
)
<<
U
niqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_EDITORMANAGER
)
<<
U
niqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_NAVIGATION_PANE
);
return
contexts
;
}
...
...
src/plugins/coreplugin/editormanager/editormanager.cpp
View file @
f73861d4
...
...
@@ -32,19 +32,19 @@
***************************************************************************/
#include "editormanager.h"
#include "editorgroup.h"
#include "editorsplitter.h"
#include "openeditorsview.h"
#include "openeditorswindow.h"
#include "openwithdialog.h"
#include "filemanager.h"
#include "tabpositionindicator.h"
#include "saveitemsdialog.h"
#include "vcsmanager.h"
#include "icore.h"
#include "iversioncontrol.h"
#include "openeditorsview.h"
#include "editorgroup.h"
#include "mimedatabase.h"
#include "saveitemsdialog.h"
#include "tabpositionindicator.h"
#include "vcsmanager.h"
#include <coreplugin/coreimpl.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/modemanager.h>
#include <coreplugin/uniqueidmanager.h>
...
...
@@ -68,6 +68,7 @@
#include <QtGui/QApplication>
#include <QtGui/QFileDialog>
#include <QtGui/QLayout>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMessageBox>
#include <QtGui/QPushButton>
...
...
@@ -649,7 +650,7 @@ bool EditorManager::closeEditors(const QList<IEditor*> editorsToClose, bool askA
//ask whether to save modified files
if
(
askAboutModifiedEditors
)
{
bool
cancelled
=
false
;
QList
<
IFile
*>
list
=
Core
Impl
::
instance
()
->
fileManager
()
->
QList
<
IFile
*>
list
=
I
Core
::
instance
()
->
fileManager
()
->
saveModifiedFiles
(
filesForEditors
(
acceptedEditors
),
&
cancelled
);
if
(
cancelled
)
return
false
;
...
...
@@ -1549,7 +1550,7 @@ void EditorManager::openInExternalEditor()
return
;
if
(
editor
->
file
()
->
isModified
())
{
bool
cancelled
=
false
;
QList
<
IFile
*>
list
=
Core
Impl
::
instance
()
->
fileManager
()
->
QList
<
IFile
*>
list
=
I
Core
::
instance
()
->
fileManager
()
->
saveModifiedFiles
(
QList
<
IFile
*>
()
<<
editor
->
file
(),
&
cancelled
);
if
(
cancelled
)
return
;
...
...
src/plugins/coreplugin/editormanager/openeditorsview.cpp
View file @
f73861d4
...
...
@@ -34,7 +34,7 @@
#include "openeditorsview.h"
#include "editorgroup.h"
#include "editormanager.h"
#include "core
impl
.h"
#include "
i
core.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/filemanager.h>
...
...
@@ -218,7 +218,7 @@ void OpenEditorsWidget::closeEditors()
selectedEditors
.
append
(
item
->
data
(
0
,
Qt
::
UserRole
).
value
<
IEditor
*>
());
selectedFiles
.
append
(
item
->
data
(
0
,
Qt
::
UserRole
).
value
<
IEditor
*>
()
->
file
());
}
ICore
*
core
=
Core
Impl
::
instance
();
ICore
*
core
=
I
Core
::
instance
();
bool
cancelled
=
false
;
core
->
fileManager
()
->
saveModifiedFiles
(
selectedFiles
,
&
cancelled
);
if
(
cancelled
)
...
...
src/plugins/coreplugin/editormanager/stackededitorgroup.cpp
View file @
f73861d4
...
...
@@ -33,7 +33,6 @@
#include "stackededitorgroup.h"
#include "editormanager.h"
#include "coreimpl.h"
#include <utils/qtcassert.h>
...
...
@@ -355,7 +354,7 @@ QList<IEditor *> StackedEditorGroup::editorsInNaturalOrder() const
void
StackedEditorGroup
::
makeEditorWritable
()
{
CoreImpl
::
instance
()
->
editorManager
()
->
makeEditorWritable
(
currentEditor
());
EditorManager
::
instance
()
->
makeEditorWritable
(
currentEditor
());
}
void
StackedEditorGroup
::
listSelectionChanged
(
int
index
)
...
...
src/plugins/coreplugin/mainwindow.cpp
View file @
f73861d4
...
...
@@ -94,7 +94,7 @@
extern "C" void handleSigInt(int sig)
{
Q_UNUSED(sig);
Core::I
nternal::CoreImpl
::instance()->exit();
Core::I
Core
::instance()->exit();
qDebug() << "SIGINT caught. Shutting down.";
}
#endif
...
...
src/plugins/coreplugin/modemanager.cpp
View file @
f73861d4
...
...
@@ -42,7 +42,6 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/coreimpl.h>
#include <coreplugin/imode.h>
#include <coreplugin/uniqueidmanager.h>
...
...
src/plugins/coreplugin/progressmanager/progressmanager.cpp
View file @
f73861d4
...
...
@@ -33,10 +33,9 @@
#include "progressmanager_p.h"
#include "progressview.h"
#include "coreimpl.h"
#include "baseview.h"
#include "coreconstants.h"
#include "icore.h"
#include "uniqueidmanager.h"
#include <utils/qtcassert.h>
...
...
@@ -48,7 +47,7 @@ ProgressManagerPrivate::ProgressManagerPrivate(QObject *parent)
:
ProgressManager
(
parent
)
{
m_progressView
=
new
ProgressView
;
ICore
*
core
=
Core
Impl
::
instance
();
ICore
*
core
=
I
Core
::
instance
();
connect
(
core
,
SIGNAL
(
coreAboutToClose
()),
this
,
SLOT
(
cancelAllRunningTasks
()));
}
...
...
src/plugins/coreplugin/uniqueidmanager.h
View file @
f73861d4
...
...
@@ -47,7 +47,7 @@ public:
UniqueIDManager
();
~
UniqueIDManager
();
static
UniqueIDManager
*
instance
()
{
return
m_instance
;
}
static
UniqueIDManager
*
instance
()
{
return
m_instance
;
}
bool
hasUniqueIdentifier
(
const
QString
&
id
)
const
;
int
uniqueIdentifier
(
const
QString
&
id
);
...
...
src/plugins/coreplugin/versiondialog.cpp
View file @
f73861d4
...
...
@@ -34,7 +34,7 @@
#include "versiondialog.h"
#include "coreconstants.h"
#include "core
impl
.h"
#include "
i
core.h"
#include <utils/qtcassert.h>
...
...
@@ -121,7 +121,7 @@ void VersionDialog::popupLicense()
layout
->
addWidget
(
buttonBox
);
// Read file into string
ICore
*
core
=
Core
Impl
::
instance
();
ICore
*
core
=
I
Core
::
instance
();
QTC_ASSERT
(
core
,
return
);
QString
fileName
=
core
->
resourcePath
()
+
"/license.txt"
;
QFile
file
(
fileName
);
...
...
src/plugins/coreplugin/welcomemode.cpp
View file @
f73861d4
...
...
@@ -34,7 +34,6 @@
#include "welcomemode.h"
#include "coreconstants.h"
#include "uniqueidmanager.h"
#include "coreimpl.h"
#include "modemanager.h"
#if !defined(QT_NO_WEBKIT)
...
...
@@ -193,7 +192,7 @@ const char* WelcomeMode::uniqueModeName() const
QList
<
int
>
WelcomeMode
::
context
()
const
{
static
QList
<
int
>
contexts
=
QList
<
int
>
()
<<
CoreImpl
::
instance
()
->
u
niqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_WELCOME_MODE
);
<<
U
niqueIDManager
::
instance
()
->
uniqueIdentifier
(
Constants
::
C_WELCOME_MODE
);
return
contexts
;
}
...
...
@@ -250,7 +249,7 @@ void WelcomeMode::updateWelcomePage(const WelcomePageData &welcomePageData)
void
WelcomeMode
::
linkClicked
(
const
QUrl
&
url
)
{
QString
scheme
=
url
.
scheme
();
Core
::
ModeManager
*
modeManager
=
CoreImpl
::
instance
()
->
modeManager
();
Core
::
ModeManager
*
modeManager
=
ModeManager
::
instance
();
if
(
scheme
.
startsWith
(
QLatin1String
(
"gh"
)))
{
QString
s
=
url
.
toString
(
QUrl
::
RemoveScheme
);
if
(
scheme
==
QLatin1String
(
"gh"
))
{
...
...
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