Commit 2adb5d55 authored by con's avatar con
Browse files

QuickOpenManager --> LocatorManager

parent a42c3c49
......@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "quickopenmanager.h"
#include "locatormanager.h"
#include "locatorwidget.h"
#include <extensionsystem/pluginmanager.h>
......@@ -36,22 +36,22 @@
using namespace QuickOpen;
using namespace QuickOpen::Internal;
QuickOpenManager *QuickOpenManager::m_instance = 0;
LocatorManager *LocatorManager::m_instance = 0;
QuickOpenManager::QuickOpenManager(LocatorWidget *locatorWidget)
LocatorManager::LocatorManager(LocatorWidget *locatorWidget)
: QObject(locatorWidget),
m_locatorWidget(locatorWidget)
{
m_instance = this;
}
QuickOpenManager::~QuickOpenManager()
LocatorManager::~LocatorManager()
{
ExtensionSystem::PluginManager::instance()->removeObject(this);
m_instance = 0;
}
void QuickOpenManager::show(const QString &text,
void LocatorManager::show(const QString &text,
int selectionStart, int selectionLength)
{
QTC_ASSERT(m_locatorWidget, return);
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef QUICKOPENMANAGER_H
#define QUICKOPENMANAGER_H
#ifndef LOCATORMANAGER_H
#define LOCATORMANAGER_H
#include "quickopen_global.h"
......@@ -40,23 +40,23 @@ namespace Internal {
class LocatorWidget;
}
class QUICKOPEN_EXPORT QuickOpenManager : public QObject
class QUICKOPEN_EXPORT LocatorManager : public QObject
{
Q_OBJECT
public:
QuickOpenManager(Internal::LocatorWidget *locatorWidget);
~QuickOpenManager();
LocatorManager(Internal::LocatorWidget *locatorWidget);
~LocatorManager();
static QuickOpenManager* instance() { return m_instance; }
static LocatorManager* instance() { return m_instance; }
void show(const QString &text, int selectionStart = -1, int selectionLength = 0);
private:
Internal::LocatorWidget *m_locatorWidget;
static QuickOpenManager *m_instance;
static LocatorManager *m_instance;
};
} // namespace QuickOpen
#endif // QUICKOPENMANAGER_H
#endif // LOCATORMANAGER_H
......@@ -12,7 +12,7 @@ HEADERS += quickopenplugin.h \
filesystemfilter.h \
quickopenconstants.h \
directoryfilter.h \
quickopenmanager.h \
locatormanager.h \
basefilefilter.h \
quickopen_global.h
SOURCES += quickopenplugin.cpp \
......@@ -22,7 +22,7 @@ SOURCES += quickopenplugin.cpp \
filesystemfilter.cpp \
settingspage.cpp \
directoryfilter.cpp \
quickopenmanager.cpp \
locatormanager.cpp \
basefilefilter.cpp \
ilocatorfilter.cpp
FORMS += settingspage.ui \
......
......@@ -30,7 +30,7 @@
#include "quickopenplugin.h"
#include "quickopenconstants.h"
#include "quickopenfiltersfilter.h"
#include "quickopenmanager.h"
#include "locatormanager.h"
#include "locatorwidget.h"
#include "opendocumentsfilter.h"
#include "filesystemfilter.h"
......@@ -112,7 +112,7 @@ bool QuickOpenPlugin::initialize(const QStringList &, QString *)
Core::ActionContainer *mtools = core->actionManager()->actionContainer(Core::Constants::M_TOOLS);
mtools->addAction(cmd);
addObject(new QuickOpenManager(m_locatorWidget));
addObject(new LocatorManager(m_locatorWidget));
m_openDocumentsFilter = new OpenDocumentsFilter(core->editorManager());
addObject(m_openDocumentsFilter);
......
......@@ -33,7 +33,7 @@
#include "texteditorplugin.h"
#include "linenumberfilter.h"
#include <quickopen/quickopenmanager.h>
#include <quickopen/locatormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/uniqueidmanager.h>
......@@ -360,7 +360,7 @@ void TextEditorActionHandler::updateCopyAction()
void TextEditorActionHandler::gotoAction()
{
QuickOpen::QuickOpenManager *quickopen = QuickOpen::QuickOpenManager::instance();
QuickOpen::LocatorManager *quickopen = QuickOpen::LocatorManager::instance();
QTC_ASSERT(quickopen, return);
const QString shortcut = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString();
const QString text = tr(" <line number>");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment