forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -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()->uniqueIDManager();
|
||||
UniqueIDManager *idmanager = UniqueIDManager::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()->uniqueIDManager();
|
||||
UniqueIDManager *idmanager = UniqueIDManager::instance();
|
||||
int grpid = idmanager->uniqueIdentifier(Constants::G_DEFAULT_TWO);
|
||||
if (!group.isEmpty())
|
||||
grpid = idmanager->uniqueIdentifier(group);
|
||||
|
@@ -222,7 +222,7 @@ ActionManagerPrivate::~ActionManagerPrivate()
|
||||
qDeleteAll(m_idContainerMap.values());
|
||||
}
|
||||
|
||||
ActionManagerPrivate* ActionManagerPrivate::instance()
|
||||
ActionManagerPrivate *ActionManagerPrivate::instance()
|
||||
{
|
||||
return m_instance;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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()->uniqueIDManager();
|
||||
UniqueIDManager *idmanager = UniqueIDManager::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()));
|
||||
|
@@ -32,7 +32,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "settingsdialog.h"
|
||||
#include "coreimpl.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
|
@@ -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"),
|
||||
CoreImpl::instance()->resourcePath() + "/schemes/",
|
||||
ICore::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 = CoreImpl::instance()->fileManager()->getSaveFileNameWithExtension(
|
||||
QString fileName = ICore::instance()->fileManager()->getSaveFileNameWithExtension(
|
||||
tr("Export Keyboard Mapping Scheme"),
|
||||
CoreImpl::instance()->resourcePath() + "/schemes/",
|
||||
ICore::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 {
|
||||
|
@@ -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>
|
||||
|
@@ -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()->uniqueIDManager()->uniqueIdentifier(Constants::C_EDIT_MODE) <<
|
||||
CoreImpl::instance()->uniqueIDManager()->uniqueIdentifier(Constants::C_EDITORMANAGER) <<
|
||||
CoreImpl::instance()->uniqueIDManager()->uniqueIdentifier(Constants::C_NAVIGATION_PANE);
|
||||
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_EDIT_MODE) <<
|
||||
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_EDITORMANAGER) <<
|
||||
UniqueIDManager::instance()->uniqueIdentifier(Constants::C_NAVIGATION_PANE);
|
||||
return contexts;
|
||||
}
|
||||
|
||||
|
@@ -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 = CoreImpl::instance()->fileManager()->
|
||||
QList<IFile*> list = ICore::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 = CoreImpl::instance()->fileManager()->
|
||||
QList<IFile*> list = ICore::instance()->fileManager()->
|
||||
saveModifiedFiles(QList<IFile*>() << editor->file(), &cancelled);
|
||||
if (cancelled)
|
||||
return;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include "openeditorsview.h"
|
||||
#include "editorgroup.h"
|
||||
#include "editormanager.h"
|
||||
#include "coreimpl.h"
|
||||
#include "icore.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 = CoreImpl::instance();
|
||||
ICore *core = ICore::instance();
|
||||
bool cancelled = false;
|
||||
core->fileManager()->saveModifiedFiles(selectedFiles, &cancelled);
|
||||
if (cancelled)
|
||||
|
@@ -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)
|
||||
|
@@ -94,7 +94,7 @@
|
||||
extern "C" void handleSigInt(int sig)
|
||||
{
|
||||
Q_UNUSED(sig);
|
||||
Core::Internal::CoreImpl::instance()->exit();
|
||||
Core::ICore::instance()->exit();
|
||||
qDebug() << "SIGINT caught. Shutting down.";
|
||||
}
|
||||
#endif
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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 = CoreImpl::instance();
|
||||
ICore *core = ICore::instance();
|
||||
connect(core, SIGNAL(coreAboutToClose()), this, SLOT(cancelAllRunningTasks()));
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include "versiondialog.h"
|
||||
|
||||
#include "coreconstants.h"
|
||||
#include "coreimpl.h"
|
||||
#include "icore.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -121,7 +121,7 @@ void VersionDialog::popupLicense()
|
||||
layout->addWidget(buttonBox);
|
||||
|
||||
// Read file into string
|
||||
ICore * core = CoreImpl::instance();
|
||||
ICore *core = ICore::instance();
|
||||
QTC_ASSERT(core, return);
|
||||
QString fileName = core->resourcePath() + "/license.txt";
|
||||
QFile file(fileName);
|
||||
|
@@ -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()->uniqueIDManager()->uniqueIdentifier(Constants::C_WELCOME_MODE);
|
||||
<< UniqueIDManager::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")) {
|
||||
|
Reference in New Issue
Block a user