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