forked from qt-creator/qt-creator
Unify pattern used for privates and constructors
In the 'managers' from ICore Change-Id: Iab98c9e0947b759843a62e3777ba46be3b304b06 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -141,15 +141,16 @@ using namespace Core::Internal;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static ActionManager *m_instance = 0;
|
static ActionManager *m_instance = 0;
|
||||||
|
static ActionManagerPrivate *d;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\internal
|
\internal
|
||||||
*/
|
*/
|
||||||
ActionManager::ActionManager(QObject *parent)
|
ActionManager::ActionManager(QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent)
|
||||||
d(new ActionManagerPrivate())
|
|
||||||
{
|
{
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
|
d = new ActionManagerPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -179,8 +180,8 @@ ActionManager *ActionManager::instance()
|
|||||||
*/
|
*/
|
||||||
ActionContainer *ActionManager::createMenu(Id id)
|
ActionContainer *ActionManager::createMenu(Id id)
|
||||||
{
|
{
|
||||||
const ActionManagerPrivate::IdContainerMap::const_iterator it = m_instance->d->m_idContainerMap.constFind(id);
|
const ActionManagerPrivate::IdContainerMap::const_iterator it = d->m_idContainerMap.constFind(id);
|
||||||
if (it != m_instance->d->m_idContainerMap.constEnd())
|
if (it != d->m_idContainerMap.constEnd())
|
||||||
return it.value();
|
return it.value();
|
||||||
|
|
||||||
QMenu *m = new QMenu(ICore::mainWindow());
|
QMenu *m = new QMenu(ICore::mainWindow());
|
||||||
@@ -189,8 +190,8 @@ ActionContainer *ActionManager::createMenu(Id id)
|
|||||||
MenuActionContainer *mc = new MenuActionContainer(id);
|
MenuActionContainer *mc = new MenuActionContainer(id);
|
||||||
mc->setMenu(m);
|
mc->setMenu(m);
|
||||||
|
|
||||||
m_instance->d->m_idContainerMap.insert(id, mc);
|
d->m_idContainerMap.insert(id, mc);
|
||||||
connect(mc, SIGNAL(destroyed()), m_instance->d, SLOT(containerDestroyed()));
|
connect(mc, SIGNAL(destroyed()), d, SLOT(containerDestroyed()));
|
||||||
|
|
||||||
return mc;
|
return mc;
|
||||||
}
|
}
|
||||||
@@ -204,8 +205,8 @@ ActionContainer *ActionManager::createMenu(Id id)
|
|||||||
*/
|
*/
|
||||||
ActionContainer *ActionManager::createMenuBar(Id id)
|
ActionContainer *ActionManager::createMenuBar(Id id)
|
||||||
{
|
{
|
||||||
const ActionManagerPrivate::IdContainerMap::const_iterator it = m_instance->d->m_idContainerMap.constFind(id);
|
const ActionManagerPrivate::IdContainerMap::const_iterator it = d->m_idContainerMap.constFind(id);
|
||||||
if (it != m_instance->d->m_idContainerMap.constEnd())
|
if (it != d->m_idContainerMap.constEnd())
|
||||||
return it.value();
|
return it.value();
|
||||||
|
|
||||||
QMenuBar *mb = new QMenuBar; // No parent (System menu bar on Mac OS X)
|
QMenuBar *mb = new QMenuBar; // No parent (System menu bar on Mac OS X)
|
||||||
@@ -214,8 +215,8 @@ ActionContainer *ActionManager::createMenuBar(Id id)
|
|||||||
MenuBarActionContainer *mbc = new MenuBarActionContainer(id);
|
MenuBarActionContainer *mbc = new MenuBarActionContainer(id);
|
||||||
mbc->setMenuBar(mb);
|
mbc->setMenuBar(mb);
|
||||||
|
|
||||||
m_instance->d->m_idContainerMap.insert(id, mbc);
|
d->m_idContainerMap.insert(id, mbc);
|
||||||
connect(mbc, SIGNAL(destroyed()), m_instance->d, SLOT(containerDestroyed()));
|
connect(mbc, SIGNAL(destroyed()), d, SLOT(containerDestroyed()));
|
||||||
|
|
||||||
return mbc;
|
return mbc;
|
||||||
}
|
}
|
||||||
@@ -233,7 +234,7 @@ ActionContainer *ActionManager::createMenuBar(Id id)
|
|||||||
*/
|
*/
|
||||||
Command *ActionManager::registerAction(QAction *action, Id id, const Context &context, bool scriptable)
|
Command *ActionManager::registerAction(QAction *action, Id id, const Context &context, bool scriptable)
|
||||||
{
|
{
|
||||||
Action *a = m_instance->d->overridableAction(id);
|
Action *a = d->overridableAction(id);
|
||||||
if (a) {
|
if (a) {
|
||||||
a->addOverrideAction(action, context, scriptable);
|
a->addOverrideAction(action, context, scriptable);
|
||||||
emit m_instance->commandListChanged();
|
emit m_instance->commandListChanged();
|
||||||
@@ -257,7 +258,7 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
{
|
{
|
||||||
QTC_CHECK(!context.isEmpty());
|
QTC_CHECK(!context.isEmpty());
|
||||||
Shortcut *sc = 0;
|
Shortcut *sc = 0;
|
||||||
if (CommandPrivate *c = m_instance->d->m_idCmdMap.value(id, 0)) {
|
if (CommandPrivate *c = d->m_idCmdMap.value(id, 0)) {
|
||||||
sc = qobject_cast<Shortcut *>(c);
|
sc = qobject_cast<Shortcut *>(c);
|
||||||
if (!sc) {
|
if (!sc) {
|
||||||
qWarning() << "registerShortcut: id" << id.name()
|
qWarning() << "registerShortcut: id" << id.name()
|
||||||
@@ -266,7 +267,7 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sc = new Shortcut(id);
|
sc = new Shortcut(id);
|
||||||
m_instance->d->m_idCmdMap.insert(id, sc);
|
d->m_idCmdMap.insert(id, sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sc->shortcut()) {
|
if (sc->shortcut()) {
|
||||||
@@ -274,7 +275,7 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_instance->d->hasContext(context))
|
if (!d->hasContext(context))
|
||||||
shortcut->setEnabled(false);
|
shortcut->setEnabled(false);
|
||||||
shortcut->setObjectName(id.toString());
|
shortcut->setObjectName(id.toString());
|
||||||
shortcut->setParent(ICore::mainWindow());
|
shortcut->setParent(ICore::mainWindow());
|
||||||
@@ -287,7 +288,7 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
emit m_instance->commandAdded(id.toString());
|
emit m_instance->commandAdded(id.toString());
|
||||||
|
|
||||||
if (isPresentationModeEnabled())
|
if (isPresentationModeEnabled())
|
||||||
connect(sc->shortcut(), SIGNAL(activated()), m_instance->d, SLOT(shortcutTriggered()));
|
connect(sc->shortcut(), SIGNAL(activated()), d, SLOT(shortcutTriggered()));
|
||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,8 +300,8 @@ Command *ActionManager::registerShortcut(QShortcut *shortcut, Id id, const Conte
|
|||||||
*/
|
*/
|
||||||
Command *ActionManager::command(Id id)
|
Command *ActionManager::command(Id id)
|
||||||
{
|
{
|
||||||
const ActionManagerPrivate::IdCmdMap::const_iterator it = m_instance->d->m_idCmdMap.constFind(id);
|
const ActionManagerPrivate::IdCmdMap::const_iterator it = d->m_idCmdMap.constFind(id);
|
||||||
if (it == m_instance->d->m_idCmdMap.constEnd()) {
|
if (it == d->m_idCmdMap.constEnd()) {
|
||||||
if (warnAboutFindFailures)
|
if (warnAboutFindFailures)
|
||||||
qWarning() << "ActionManagerPrivate::command(): failed to find :"
|
qWarning() << "ActionManagerPrivate::command(): failed to find :"
|
||||||
<< id.name();
|
<< id.name();
|
||||||
@@ -318,8 +319,8 @@ Command *ActionManager::command(Id id)
|
|||||||
*/
|
*/
|
||||||
ActionContainer *ActionManager::actionContainer(Id id)
|
ActionContainer *ActionManager::actionContainer(Id id)
|
||||||
{
|
{
|
||||||
const ActionManagerPrivate::IdContainerMap::const_iterator it = m_instance->d->m_idContainerMap.constFind(id);
|
const ActionManagerPrivate::IdContainerMap::const_iterator it = d->m_idContainerMap.constFind(id);
|
||||||
if (it == m_instance->d->m_idContainerMap.constEnd()) {
|
if (it == d->m_idContainerMap.constEnd()) {
|
||||||
if (warnAboutFindFailures)
|
if (warnAboutFindFailures)
|
||||||
qWarning() << "ActionManagerPrivate::actionContainer(): failed to find :"
|
qWarning() << "ActionManagerPrivate::actionContainer(): failed to find :"
|
||||||
<< id.name();
|
<< id.name();
|
||||||
@@ -335,7 +336,7 @@ QList<Command *> ActionManager::commands()
|
|||||||
{
|
{
|
||||||
// transform list of CommandPrivate into list of Command
|
// transform list of CommandPrivate into list of Command
|
||||||
QList<Command *> result;
|
QList<Command *> result;
|
||||||
foreach (Command *cmd, m_instance->d->m_idCmdMap.values())
|
foreach (Command *cmd, d->m_idCmdMap.values())
|
||||||
result << cmd;
|
result << cmd;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -351,7 +352,7 @@ QList<Command *> ActionManager::commands()
|
|||||||
void ActionManager::unregisterAction(QAction *action, Id id)
|
void ActionManager::unregisterAction(QAction *action, Id id)
|
||||||
{
|
{
|
||||||
Action *a = 0;
|
Action *a = 0;
|
||||||
CommandPrivate *c = m_instance->d->m_idCmdMap.value(id, 0);
|
CommandPrivate *c = d->m_idCmdMap.value(id, 0);
|
||||||
QTC_ASSERT(c, return);
|
QTC_ASSERT(c, return);
|
||||||
a = qobject_cast<Action *>(c);
|
a = qobject_cast<Action *>(c);
|
||||||
if (!a) {
|
if (!a) {
|
||||||
@@ -365,7 +366,7 @@ void ActionManager::unregisterAction(QAction *action, Id id)
|
|||||||
// ActionContainers listen to the commands' destroyed signals
|
// ActionContainers listen to the commands' destroyed signals
|
||||||
ICore::mainWindow()->removeAction(a->action());
|
ICore::mainWindow()->removeAction(a->action());
|
||||||
delete a->action();
|
delete a->action();
|
||||||
m_instance->d->m_idCmdMap.remove(id);
|
d->m_idCmdMap.remove(id);
|
||||||
delete a;
|
delete a;
|
||||||
}
|
}
|
||||||
emit m_instance->commandListChanged();
|
emit m_instance->commandListChanged();
|
||||||
@@ -382,7 +383,7 @@ void ActionManager::unregisterAction(QAction *action, Id id)
|
|||||||
void ActionManager::unregisterShortcut(Id id)
|
void ActionManager::unregisterShortcut(Id id)
|
||||||
{
|
{
|
||||||
Shortcut *sc = 0;
|
Shortcut *sc = 0;
|
||||||
CommandPrivate *c = m_instance->d->m_idCmdMap.value(id, 0);
|
CommandPrivate *c = d->m_idCmdMap.value(id, 0);
|
||||||
QTC_ASSERT(c, return);
|
QTC_ASSERT(c, return);
|
||||||
sc = qobject_cast<Shortcut *>(c);
|
sc = qobject_cast<Shortcut *>(c);
|
||||||
if (!sc) {
|
if (!sc) {
|
||||||
@@ -391,7 +392,7 @@ void ActionManager::unregisterShortcut(Id id)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete sc->shortcut();
|
delete sc->shortcut();
|
||||||
m_instance->d->m_idCmdMap.remove(id);
|
d->m_idCmdMap.remove(id);
|
||||||
delete sc;
|
delete sc;
|
||||||
emit m_instance->commandListChanged();
|
emit m_instance->commandListChanged();
|
||||||
}
|
}
|
||||||
@@ -406,38 +407,53 @@ void ActionManager::setPresentationModeEnabled(bool enabled)
|
|||||||
foreach (Command *c, commands()) {
|
foreach (Command *c, commands()) {
|
||||||
if (c->action()) {
|
if (c->action()) {
|
||||||
if (enabled)
|
if (enabled)
|
||||||
connect(c->action(), SIGNAL(triggered()), m_instance->d, SLOT(actionTriggered()));
|
connect(c->action(), SIGNAL(triggered()), d, SLOT(actionTriggered()));
|
||||||
else
|
else
|
||||||
disconnect(c->action(), SIGNAL(triggered()), m_instance->d, SLOT(actionTriggered()));
|
disconnect(c->action(), SIGNAL(triggered()), d, SLOT(actionTriggered()));
|
||||||
}
|
}
|
||||||
if (c->shortcut()) {
|
if (c->shortcut()) {
|
||||||
if (enabled)
|
if (enabled)
|
||||||
connect(c->shortcut(), SIGNAL(activated()), m_instance->d, SLOT(shortcutTriggered()));
|
connect(c->shortcut(), SIGNAL(activated()), d, SLOT(shortcutTriggered()));
|
||||||
else
|
else
|
||||||
disconnect(c->shortcut(), SIGNAL(activated()), m_instance->d, SLOT(shortcutTriggered()));
|
disconnect(c->shortcut(), SIGNAL(activated()), d, SLOT(shortcutTriggered()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The label for the shortcuts:
|
// The label for the shortcuts:
|
||||||
if (!m_instance->d->m_presentationLabel) {
|
if (!d->m_presentationLabel) {
|
||||||
m_instance->d->m_presentationLabel = new QLabel(0, Qt::ToolTip | Qt::WindowStaysOnTopHint);
|
d->m_presentationLabel = new QLabel(0, Qt::ToolTip | Qt::WindowStaysOnTopHint);
|
||||||
QFont font = m_instance->d->m_presentationLabel->font();
|
QFont font = d->m_presentationLabel->font();
|
||||||
font.setPixelSize(45);
|
font.setPixelSize(45);
|
||||||
m_instance->d->m_presentationLabel->setFont(font);
|
d->m_presentationLabel->setFont(font);
|
||||||
m_instance->d->m_presentationLabel->setAlignment(Qt::AlignCenter);
|
d->m_presentationLabel->setAlignment(Qt::AlignCenter);
|
||||||
m_instance->d->m_presentationLabel->setMargin(5);
|
d->m_presentationLabel->setMargin(5);
|
||||||
|
|
||||||
connect(&m_instance->d->m_presentationLabelTimer, SIGNAL(timeout()), m_instance->d->m_presentationLabel, SLOT(hide()));
|
connect(&d->m_presentationLabelTimer, SIGNAL(timeout()), d->m_presentationLabel, SLOT(hide()));
|
||||||
} else {
|
} else {
|
||||||
m_instance->d->m_presentationLabelTimer.stop();
|
d->m_presentationLabelTimer.stop();
|
||||||
delete m_instance->d->m_presentationLabel;
|
delete d->m_presentationLabel;
|
||||||
m_instance->d->m_presentationLabel = 0;
|
d->m_presentationLabel = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ActionManager::isPresentationModeEnabled()
|
bool ActionManager::isPresentationModeEnabled()
|
||||||
{
|
{
|
||||||
return m_instance->d->m_presentationLabel;
|
return d->m_presentationLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActionManager::initialize()
|
||||||
|
{
|
||||||
|
d->initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActionManager::saveSettings(QSettings *settings)
|
||||||
|
{
|
||||||
|
d->saveSettings(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActionManager::setContext(const Context &context)
|
||||||
|
{
|
||||||
|
d->setContext(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAction;
|
class QAction;
|
||||||
|
class QSettings;
|
||||||
class QShortcut;
|
class QShortcut;
|
||||||
class QString;
|
class QString;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
@@ -47,10 +48,7 @@ namespace Core {
|
|||||||
|
|
||||||
class ActionContainer;
|
class ActionContainer;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal { class MainWindow; }
|
||||||
class ActionManagerPrivate;
|
|
||||||
class MainWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CORE_EXPORT ActionManager : public QObject
|
class CORE_EXPORT ActionManager : public QObject
|
||||||
{
|
{
|
||||||
@@ -82,7 +80,9 @@ signals:
|
|||||||
private:
|
private:
|
||||||
ActionManager(QObject *parent = 0);
|
ActionManager(QObject *parent = 0);
|
||||||
~ActionManager();
|
~ActionManager();
|
||||||
Internal::ActionManagerPrivate *d;
|
void initialize();
|
||||||
|
void saveSettings(QSettings *settings);
|
||||||
|
void setContext(const Context &context);
|
||||||
|
|
||||||
friend class Core::Internal::MainWindow;
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ namespace Core {
|
|||||||
class IContext;
|
class IContext;
|
||||||
class IDocument;
|
class IDocument;
|
||||||
|
|
||||||
|
namespace Internal { class MainWindow; }
|
||||||
|
|
||||||
class CORE_EXPORT DocumentManager : public QObject
|
class CORE_EXPORT DocumentManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -58,9 +60,6 @@ public:
|
|||||||
|
|
||||||
typedef QPair<QString, Id> RecentFile;
|
typedef QPair<QString, Id> RecentFile;
|
||||||
|
|
||||||
explicit DocumentManager(QMainWindow *ew);
|
|
||||||
virtual ~DocumentManager();
|
|
||||||
|
|
||||||
static DocumentManager *instance();
|
static DocumentManager *instance();
|
||||||
|
|
||||||
// file pool to monitor
|
// file pool to monitor
|
||||||
@@ -152,6 +151,12 @@ private slots:
|
|||||||
void checkForReload();
|
void checkForReload();
|
||||||
void changedFile(const QString &file);
|
void changedFile(const QString &file);
|
||||||
void syncWithEditor(const QList<Core::IContext *> &context);
|
void syncWithEditor(const QList<Core::IContext *> &context);
|
||||||
|
|
||||||
|
private:
|
||||||
|
explicit DocumentManager(QMainWindow *ew);
|
||||||
|
virtual ~DocumentManager();
|
||||||
|
|
||||||
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! The FileChangeBlocker blocks all change notifications to all IDocument * that
|
/*! The FileChangeBlocker blocks all change notifications to all IDocument * that
|
||||||
|
|||||||
@@ -172,8 +172,9 @@ EditorManagerPlaceHolder* EditorManagerPlaceHolder::current()
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
|
|
||||||
struct EditorManagerPrivate
|
class EditorManagerPrivate
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
explicit EditorManagerPrivate(QWidget *parent);
|
explicit EditorManagerPrivate(QWidget *parent);
|
||||||
~EditorManagerPrivate();
|
~EditorManagerPrivate();
|
||||||
QList<EditLocation> m_globalHistory;
|
QList<EditLocation> m_globalHistory;
|
||||||
@@ -265,13 +266,14 @@ EditorManagerPrivate::~EditorManagerPrivate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
static EditorManager *m_instance = 0;
|
static EditorManager *m_instance = 0;
|
||||||
|
static EditorManagerPrivate *d;
|
||||||
|
|
||||||
EditorManager *EditorManager::instance() { return m_instance; }
|
EditorManager *EditorManager::instance() { return m_instance; }
|
||||||
|
|
||||||
EditorManager::EditorManager(QWidget *parent) :
|
EditorManager::EditorManager(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent)
|
||||||
d(new EditorManagerPrivate(parent))
|
|
||||||
{
|
{
|
||||||
|
d = new EditorManagerPrivate(parent);
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
|
|
||||||
connect(ICore::instance(), SIGNAL(contextAboutToChange(QList<Core::IContext*>)),
|
connect(ICore::instance(), SIGNAL(contextAboutToChange(QList<Core::IContext*>)),
|
||||||
@@ -612,7 +614,7 @@ SplitterOrView *EditorManager::findRoot(const EditorView *view, int *rootIndex)
|
|||||||
{
|
{
|
||||||
SplitterOrView *current = view->parentSplitterOrView();
|
SplitterOrView *current = view->parentSplitterOrView();
|
||||||
while (current) {
|
while (current) {
|
||||||
int index = m_instance->d->m_root.indexOf(current);
|
int index = d->m_root.indexOf(current);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
if (rootIndex)
|
if (rootIndex)
|
||||||
*rootIndex = index;
|
*rootIndex = index;
|
||||||
@@ -647,7 +649,7 @@ QList<IEditor *> EditorManager::editorsForDocument(IDocument *document) const
|
|||||||
|
|
||||||
IEditor *EditorManager::currentEditor()
|
IEditor *EditorManager::currentEditor()
|
||||||
{
|
{
|
||||||
return m_instance->d->m_currentEditor;
|
return d->m_currentEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorManager::emptyView(Core::Internal::EditorView *view)
|
void EditorManager::emptyView(Core::Internal::EditorView *view)
|
||||||
@@ -702,8 +704,8 @@ void EditorManager::splitNewWindow(Internal::EditorView *view)
|
|||||||
context->setContext(Context(Constants::C_EDITORMANAGER));
|
context->setContext(Context(Constants::C_EDITORMANAGER));
|
||||||
context->setWidget(splitter);
|
context->setWidget(splitter);
|
||||||
ICore::addContextObject(context);
|
ICore::addContextObject(context);
|
||||||
m_instance->d->m_root.append(splitter);
|
d->m_root.append(splitter);
|
||||||
m_instance->d->m_rootContext.append(context);
|
d->m_rootContext.append(context);
|
||||||
connect(splitter, SIGNAL(destroyed(QObject*)), m_instance, SLOT(rootDestroyed(QObject*)));
|
connect(splitter, SIGNAL(destroyed(QObject*)), m_instance, SLOT(rootDestroyed(QObject*)));
|
||||||
splitter->show();
|
splitter->show();
|
||||||
ICore::raiseWindow(splitter);
|
ICore::raiseWindow(splitter);
|
||||||
|
|||||||
@@ -63,18 +63,15 @@ enum MakeWritableResult {
|
|||||||
Failed
|
Failed
|
||||||
};
|
};
|
||||||
|
|
||||||
struct EditorManagerPrivate;
|
|
||||||
class OpenEditorsModel;
|
class OpenEditorsModel;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class OpenEditorsWindow;
|
|
||||||
class EditorView;
|
|
||||||
class SplitterOrView;
|
|
||||||
|
|
||||||
class EditorClosingCoreListener;
|
class EditorClosingCoreListener;
|
||||||
|
class EditorView;
|
||||||
|
class MainWindow;
|
||||||
class OpenEditorsViewFactory;
|
class OpenEditorsViewFactory;
|
||||||
|
class OpenEditorsWindow;
|
||||||
|
class SplitterOrView;
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
class CORE_EXPORT EditorManagerPlaceHolder : public QWidget
|
class CORE_EXPORT EditorManagerPlaceHolder : public QWidget
|
||||||
@@ -99,9 +96,6 @@ public:
|
|||||||
typedef QList<IEditorFactory *> EditorFactoryList;
|
typedef QList<IEditorFactory *> EditorFactoryList;
|
||||||
typedef QList<IExternalEditor *> ExternalEditorList;
|
typedef QList<IExternalEditor *> ExternalEditorList;
|
||||||
|
|
||||||
explicit EditorManager(QWidget *parent);
|
|
||||||
virtual ~EditorManager();
|
|
||||||
void init();
|
|
||||||
static EditorManager *instance();
|
static EditorManager *instance();
|
||||||
|
|
||||||
static EditorToolBar *createToolBar(QWidget *parent = 0);
|
static EditorToolBar *createToolBar(QWidget *parent = 0);
|
||||||
@@ -251,6 +245,10 @@ public slots:
|
|||||||
void gotoOtherSplit();
|
void gotoOtherSplit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
explicit EditorManager(QWidget *parent);
|
||||||
|
virtual ~EditorManager();
|
||||||
|
void init();
|
||||||
|
|
||||||
QList<IDocument *> documentsForEditors(QList<IEditor *> editors) const;
|
QList<IDocument *> documentsForEditors(QList<IEditor *> editors) const;
|
||||||
static IEditor *createEditor(const Id &id = Id(), const QString &fileName = QString());
|
static IEditor *createEditor(const Id &id = Id(), const QString &fileName = QString());
|
||||||
void addEditor(IEditor *editor, bool isDuplicate = false);
|
void addEditor(IEditor *editor, bool isDuplicate = false);
|
||||||
@@ -285,8 +283,7 @@ private:
|
|||||||
QString fileNameForEditor(IEditor *editor);
|
QString fileNameForEditor(IEditor *editor);
|
||||||
void setupSaveActions(IEditor *editor, QAction *saveAction, QAction *saveAsAction, QAction *revertToSavedAction);
|
void setupSaveActions(IEditor *editor, QAction *saveAction, QAction *saveAsAction, QAction *revertToSavedAction);
|
||||||
|
|
||||||
EditorManagerPrivate *d;
|
friend class Core::Internal::MainWindow;
|
||||||
|
|
||||||
friend class Core::Internal::SplitterOrView;
|
friend class Core::Internal::SplitterOrView;
|
||||||
friend class Core::Internal::EditorView;
|
friend class Core::Internal::EditorView;
|
||||||
friend class Core::EditorToolBar;
|
friend class Core::EditorToolBar;
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ struct HelpManagerPrivate
|
|||||||
};
|
};
|
||||||
|
|
||||||
static HelpManager *m_instance = 0;
|
static HelpManager *m_instance = 0;
|
||||||
|
static HelpManagerPrivate *d;
|
||||||
|
|
||||||
static const char linksForKeyQuery[] = "SELECT d.Title, f.Name, e.Name, "
|
static const char linksForKeyQuery[] = "SELECT d.Title, f.Name, e.Name, "
|
||||||
"d.Name, a.Anchor FROM IndexTable a, FileNameTable d, FolderTable e, "
|
"d.Name, a.Anchor FROM IndexTable a, FileNameTable d, FolderTable e, "
|
||||||
@@ -83,10 +84,11 @@ struct DbCleaner
|
|||||||
// -- HelpManager
|
// -- HelpManager
|
||||||
|
|
||||||
HelpManager::HelpManager(QObject *parent) :
|
HelpManager::HelpManager(QObject *parent) :
|
||||||
QObject(parent), d(new HelpManagerPrivate)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!m_instance);
|
Q_ASSERT(!m_instance);
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
|
d = new HelpManagerPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
HelpManager::~HelpManager()
|
HelpManager::~HelpManager()
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ struct HelpManagerPrivate;
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class CorePlugin;
|
class CorePlugin;
|
||||||
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CORE_EXPORT HelpManager : public QObject
|
class CORE_EXPORT HelpManager : public QObject
|
||||||
@@ -53,8 +54,6 @@ class CORE_EXPORT HelpManager : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
typedef QHash<QString, QStringList> Filters;
|
typedef QHash<QString, QStringList> Filters;
|
||||||
explicit HelpManager(QObject *parent = 0);
|
|
||||||
virtual ~HelpManager();
|
|
||||||
|
|
||||||
static HelpManager* instance();
|
static HelpManager* instance();
|
||||||
static QString collectionFilePath();
|
static QString collectionFilePath();
|
||||||
@@ -93,10 +92,13 @@ signals:
|
|||||||
void helpRequested(const QUrl &url);
|
void helpRequested(const QUrl &url);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
explicit HelpManager(QObject *parent = 0);
|
||||||
|
virtual ~HelpManager();
|
||||||
|
|
||||||
void setupHelpManager();
|
void setupHelpManager();
|
||||||
void verifyDocumenation();
|
void verifyDocumenation();
|
||||||
HelpManagerPrivate *d;
|
friend class Core::Internal::CorePlugin; // setupHelpManager
|
||||||
friend class Internal::CorePlugin; // setupHelpManager
|
friend class Core::Internal::MainWindow; // constructor/destructor
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Core
|
} // Core
|
||||||
|
|||||||
@@ -99,22 +99,21 @@
|
|||||||
\fn ActionManager *ICore::actionManager()
|
\fn ActionManager *ICore::actionManager()
|
||||||
\obsolete
|
\obsolete
|
||||||
|
|
||||||
Use \c ActionManager::actionManager() directly.
|
Use Core::ActionManager directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn DocumentManager *ICore::documentManager()
|
\fn DocumentManager *ICore::documentManager()
|
||||||
\obsolete
|
\obsolete
|
||||||
|
|
||||||
Use \c DocumentManager::documentManager() directly.
|
Use Core::DocumentManager directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn MessageManager *ICore::messageManager()
|
\fn MessageManager *ICore::messageManager()
|
||||||
\brief Returns the application's message manager.
|
\obsolete
|
||||||
|
|
||||||
The message manager is the interface to the "General" output pane for
|
Use Core::MessageManager directly.
|
||||||
general application debug messages.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -134,11 +133,6 @@
|
|||||||
show a progress bar the way Qt Creator does it.
|
show a progress bar the way Qt Creator does it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
\fn ScriptManager *ICore::scriptManager()
|
|
||||||
\internal
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn VariableManager *ICore::variableManager()
|
\fn VariableManager *ICore::variableManager()
|
||||||
\obsolete
|
\obsolete
|
||||||
@@ -171,6 +165,13 @@
|
|||||||
Use the mime database to manage mime types.
|
Use the mime database to manage mime types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\fn HelpManager *ICore::helpManager()
|
||||||
|
\brief Returns the application's help manager.
|
||||||
|
|
||||||
|
Use the help manager to register documentation sets.
|
||||||
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QSettings *ICore::settings(QSettings::Scope scope = QSettings::UserScope)
|
\fn QSettings *ICore::settings(QSettings::Scope scope = QSettings::UserScope)
|
||||||
\brief Returns the application's main settings object.
|
\brief Returns the application's main settings object.
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
|
|
||||||
static QT_DEPRECATED ActionManager *actionManager(); // Use Actionmanager::... directly.
|
static QT_DEPRECATED ActionManager *actionManager(); // Use Actionmanager::... directly.
|
||||||
static QT_DEPRECATED DocumentManager *documentManager(); // Use DocumentManager::... directly.
|
static QT_DEPRECATED DocumentManager *documentManager(); // Use DocumentManager::... directly.
|
||||||
static MessageManager *messageManager();
|
static QT_DEPRECATED MessageManager *messageManager(); // Use MessageManager::... directly.
|
||||||
static EditorManager *editorManager();
|
static EditorManager *editorManager();
|
||||||
static ProgressManager *progressManager();
|
static ProgressManager *progressManager();
|
||||||
static ScriptManager *scriptManager();
|
static ScriptManager *scriptManager();
|
||||||
|
|||||||
@@ -316,6 +316,8 @@ MainWindow::~MainWindow()
|
|||||||
|
|
||||||
delete m_helpManager;
|
delete m_helpManager;
|
||||||
m_helpManager = 0;
|
m_helpManager = 0;
|
||||||
|
delete m_variableManager;
|
||||||
|
m_variableManager = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::init(QString *errorMessage)
|
bool MainWindow::init(QString *errorMessage)
|
||||||
@@ -355,7 +357,7 @@ void MainWindow::extensionsInitialized()
|
|||||||
m_navigationWidget->setFactories(ExtensionSystem::PluginManager::getObjects<INavigationWidgetFactory>());
|
m_navigationWidget->setFactories(ExtensionSystem::PluginManager::getObjects<INavigationWidgetFactory>());
|
||||||
|
|
||||||
// reading the shortcut settings must be done after all shortcuts have been registered
|
// reading the shortcut settings must be done after all shortcuts have been registered
|
||||||
m_actionManager->d->initialize();
|
m_actionManager->initialize();
|
||||||
|
|
||||||
readSettings();
|
readSettings();
|
||||||
updateContext();
|
updateContext();
|
||||||
@@ -1004,7 +1006,7 @@ ScriptManager *MainWindow::scriptManager() const
|
|||||||
|
|
||||||
VariableManager *MainWindow::variableManager() const
|
VariableManager *MainWindow::variableManager() const
|
||||||
{
|
{
|
||||||
return m_variableManager.data();
|
return m_variableManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModeManager *MainWindow::modeManager() const
|
ModeManager *MainWindow::modeManager() const
|
||||||
@@ -1168,7 +1170,7 @@ void MainWindow::writeSettings()
|
|||||||
m_settings->endGroup();
|
m_settings->endGroup();
|
||||||
|
|
||||||
DocumentManager::saveSettings();
|
DocumentManager::saveSettings();
|
||||||
m_actionManager->d->saveSettings(m_settings);
|
m_actionManager->saveSettings(m_settings);
|
||||||
m_editorManager->saveSettings();
|
m_editorManager->saveSettings();
|
||||||
m_navigationWidget->saveSettings(m_settings);
|
m_navigationWidget->saveSettings(m_settings);
|
||||||
}
|
}
|
||||||
@@ -1211,7 +1213,7 @@ void MainWindow::updateContext()
|
|||||||
uniquecontexts.add(id);
|
uniquecontexts.add(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_actionManager->d->setContext(uniquecontexts);
|
m_actionManager->setContext(uniquecontexts);
|
||||||
emit m_coreImpl->contextChanged(m_activeContext, m_additionalContexts);
|
emit m_coreImpl->contextChanged(m_activeContext, m_additionalContexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ private:
|
|||||||
MessageManager *m_messageManager;
|
MessageManager *m_messageManager;
|
||||||
ProgressManagerPrivate *m_progressManager;
|
ProgressManagerPrivate *m_progressManager;
|
||||||
ScriptManager *m_scriptManager;
|
ScriptManager *m_scriptManager;
|
||||||
QScopedPointer<VariableManager> m_variableManager;
|
VariableManager *m_variableManager;
|
||||||
VcsManager *m_vcsManager;
|
VcsManager *m_vcsManager;
|
||||||
StatusBarManager *m_statusBarManager;
|
StatusBarManager *m_statusBarManager;
|
||||||
ModeManager *m_modeManager;
|
ModeManager *m_modeManager;
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
|
||||||
MessageManager *MessageManager::m_instance = 0;
|
static MessageManager *m_instance = 0;
|
||||||
|
MessageManager *MessageManager::instance() { return m_instance; }
|
||||||
|
|
||||||
MessageManager::MessageManager()
|
MessageManager::MessageManager()
|
||||||
: m_messageOutputWindow(0)
|
: m_messageOutputWindow(0)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ namespace Core {
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class MessageOutputWindow;
|
class MessageOutputWindow;
|
||||||
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CORE_EXPORT MessageManager : public QObject
|
class CORE_EXPORT MessageManager : public QObject
|
||||||
@@ -47,12 +48,7 @@ class CORE_EXPORT MessageManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MessageManager();
|
static MessageManager *instance();
|
||||||
~MessageManager();
|
|
||||||
|
|
||||||
void init();
|
|
||||||
|
|
||||||
static MessageManager *instance() { return m_instance; }
|
|
||||||
|
|
||||||
void showOutputPane();
|
void showOutputPane();
|
||||||
enum PrintToOutputPaneFlag {
|
enum PrintToOutputPaneFlag {
|
||||||
@@ -69,9 +65,13 @@ public slots:
|
|||||||
void printToOutputPane(const QString &text, Core::MessageManager::PrintToOutputPaneFlags flags);
|
void printToOutputPane(const QString &text, Core::MessageManager::PrintToOutputPaneFlags flags);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
MessageManager();
|
||||||
|
~MessageManager();
|
||||||
|
void init();
|
||||||
|
|
||||||
Internal::MessageOutputWindow *m_messageOutputWindow;
|
Internal::MessageOutputWindow *m_messageOutputWindow;
|
||||||
|
|
||||||
static MessageManager *m_instance;
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class MimeDatabasePrivate;
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
class BaseMimeTypeParser;
|
class BaseMimeTypeParser;
|
||||||
class FileMatchContext;
|
class FileMatchContext;
|
||||||
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class CORE_EXPORT IMagicMatcher
|
class CORE_EXPORT IMagicMatcher
|
||||||
@@ -260,9 +261,6 @@ public:
|
|||||||
typedef IMagicMatcher::IMagicMatcherList IMagicMatcherList;
|
typedef IMagicMatcher::IMagicMatcherList IMagicMatcherList;
|
||||||
typedef IMagicMatcher::IMagicMatcherSharedPointer IMagicMatcherSharedPointer;
|
typedef IMagicMatcher::IMagicMatcherSharedPointer IMagicMatcherSharedPointer;
|
||||||
|
|
||||||
MimeDatabase();
|
|
||||||
~MimeDatabase();
|
|
||||||
|
|
||||||
bool addMimeTypes(const QString &fileName, QString *errorMessage);
|
bool addMimeTypes(const QString &fileName, QString *errorMessage);
|
||||||
bool addMimeTypes(QIODevice *device, QString *errorMessage);
|
bool addMimeTypes(QIODevice *device, QString *errorMessage);
|
||||||
bool addMimeType(const MimeType &mt);
|
bool addMimeType(const MimeType &mt);
|
||||||
@@ -315,10 +313,15 @@ public:
|
|||||||
friend QDebug operator<<(QDebug d, const MimeDatabase &mt);
|
friend QDebug operator<<(QDebug d, const MimeDatabase &mt);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
MimeDatabase();
|
||||||
|
~MimeDatabase();
|
||||||
|
|
||||||
MimeType findByFileUnlocked(const QFileInfo &f) const;
|
MimeType findByFileUnlocked(const QFileInfo &f) const;
|
||||||
|
|
||||||
MimeDatabasePrivate *d;
|
MimeDatabasePrivate *d;
|
||||||
mutable QMutex m_mutex;
|
mutable QMutex m_mutex;
|
||||||
|
|
||||||
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Iterator, typename Function>
|
template <class Iterator, typename Function>
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ class CORE_EXPORT ModeManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
|
|
||||||
virtual ~ModeManager();
|
|
||||||
|
|
||||||
static void init();
|
|
||||||
static ModeManager *instance();
|
static ModeManager *instance();
|
||||||
|
|
||||||
static IMode *currentMode();
|
static IMode *currentMode();
|
||||||
@@ -88,6 +84,14 @@ private slots:
|
|||||||
void enabledStateChanged();
|
void enabledStateChanged();
|
||||||
void handleStartup();
|
void handleStartup();
|
||||||
void handleShutdown();
|
void handleShutdown();
|
||||||
|
|
||||||
|
private:
|
||||||
|
explicit ModeManager(Internal::MainWindow *mainWindow, Internal::FancyTabWidget *modeStack);
|
||||||
|
virtual ~ModeManager();
|
||||||
|
|
||||||
|
static void init();
|
||||||
|
|
||||||
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
class FutureProgress;
|
class FutureProgress;
|
||||||
|
|
||||||
|
namespace Internal { class ProgressManagerPrivate; }
|
||||||
|
|
||||||
class CORE_EXPORT ProgressManager : public QObject
|
class CORE_EXPORT ProgressManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -48,9 +50,6 @@ public:
|
|||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(ProgressFlags, ProgressFlag)
|
Q_DECLARE_FLAGS(ProgressFlags, ProgressFlag)
|
||||||
|
|
||||||
ProgressManager(QObject *parent = 0) : QObject(parent) {}
|
|
||||||
virtual ~ProgressManager() {}
|
|
||||||
|
|
||||||
virtual FutureProgress *addTask(const QFuture<void> &future, const QString &title,
|
virtual FutureProgress *addTask(const QFuture<void> &future, const QString &title,
|
||||||
const QString &type, ProgressFlags flags = 0) = 0;
|
const QString &type, ProgressFlags flags = 0) = 0;
|
||||||
virtual void setApplicationLabel(const QString &text) = 0;
|
virtual void setApplicationLabel(const QString &text) = 0;
|
||||||
@@ -61,6 +60,12 @@ public slots:
|
|||||||
signals:
|
signals:
|
||||||
void taskStarted(const QString &type);
|
void taskStarted(const QString &type);
|
||||||
void allTasksFinished(const QString &type);
|
void allTasksFinished(const QString &type);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ProgressManager(QObject *parent = 0) : QObject(parent) {}
|
||||||
|
virtual ~ProgressManager() {}
|
||||||
|
|
||||||
|
friend class Core::Internal::ProgressManagerPrivate;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -43,16 +43,13 @@ class AbstractMacroExpander;
|
|||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class VariableManagerPrivate;
|
namespace Internal { class MainWindow; }
|
||||||
|
|
||||||
class CORE_EXPORT VariableManager : public QObject
|
class CORE_EXPORT VariableManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VariableManager();
|
|
||||||
~VariableManager();
|
|
||||||
|
|
||||||
static VariableManager *instance();
|
static VariableManager *instance();
|
||||||
|
|
||||||
static void insert(const QByteArray &variable, const QString &value);
|
static void insert(const QByteArray &variable, const QString &value);
|
||||||
@@ -78,6 +75,12 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void variableUpdateRequested(const QByteArray &variable);
|
void variableUpdateRequested(const QByteArray &variable);
|
||||||
|
|
||||||
|
private:
|
||||||
|
VariableManager();
|
||||||
|
~VariableManager();
|
||||||
|
|
||||||
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
@@ -177,10 +177,12 @@ public:
|
|||||||
IVersionControl *m_unconfiguredVcs;
|
IVersionControl *m_unconfiguredVcs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static VcsManagerPrivate *d;
|
||||||
|
|
||||||
VcsManager::VcsManager(QObject *parent) :
|
VcsManager::VcsManager(QObject *parent) :
|
||||||
QObject(parent),
|
QObject(parent)
|
||||||
d(new VcsManagerPrivate)
|
|
||||||
{
|
{
|
||||||
|
d = new VcsManagerPrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- VCSManager:
|
// ---- VCSManager:
|
||||||
|
|||||||
@@ -37,9 +37,10 @@
|
|||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class VcsManagerPrivate;
|
|
||||||
class IVersionControl;
|
class IVersionControl;
|
||||||
|
|
||||||
|
namespace Internal { class MainWindow; }
|
||||||
|
|
||||||
/* VcsManager:
|
/* VcsManager:
|
||||||
* 1) Provides functionality for finding the IVersionControl * for a given
|
* 1) Provides functionality for finding the IVersionControl * for a given
|
||||||
* filename (findVersionControlForDirectory). Note that the VcsManager assumes
|
* filename (findVersionControlForDirectory). Note that the VcsManager assumes
|
||||||
@@ -57,9 +58,6 @@ class CORE_EXPORT VcsManager : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit VcsManager(QObject *parent = 0);
|
|
||||||
virtual ~VcsManager();
|
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
void resetVersionControlForDirectory(const QString &inputDirectory);
|
void resetVersionControlForDirectory(const QString &inputDirectory);
|
||||||
@@ -104,7 +102,10 @@ private slots:
|
|||||||
void configureVcs();
|
void configureVcs();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VcsManagerPrivate *d;
|
explicit VcsManager(QObject *parent = 0);
|
||||||
|
virtual ~VcsManager();
|
||||||
|
|
||||||
|
friend class Core::Internal::MainWindow;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|||||||
Reference in New Issue
Block a user