Rename QuickOpen namespace.

This commit is contained in:
con
2009-10-16 11:30:46 +02:00
parent 89d75814dd
commit 17d9bd6b0a
41 changed files with 155 additions and 155 deletions

View File

@@ -54,7 +54,7 @@
\o Support for searching text in arbitrary widgets, and arbitrary other things.
\row
\o \l{QuickOpen}
\o \l{Locator}
\o Hooks for providing content for Locator.
\endtable
@@ -162,7 +162,7 @@
\row
\o Add a new filter to Locator.
\o For a text typed in by the user you provide a list of things to show in the popup. When the user selects an entry you are requested to do whatever you want.
\o \l{QuickOpen::ILocatorFilter}, \l{QuickOpen::FilterEntry}, \l{QuickOpen::BaseFileFilter}
\o \l{Locator::ILocatorFilter}, \l{Locator::FilterEntry}, \l{Locator::BaseFileFilter}
\row
\o

View File

@@ -58,11 +58,11 @@ CppCurrentDocumentFilter::CppCurrentDocumentFilter(CppModelManager *manager, Cor
this, SLOT(onEditorAboutToClose(Core::IEditor*)));
}
QList<QuickOpen::FilterEntry> CppCurrentDocumentFilter::matchesFor(const QString & origEntry)
QList<Locator::FilterEntry> CppCurrentDocumentFilter::matchesFor(const QString & origEntry)
{
QString entry = trimWildcards(origEntry);
QList<QuickOpen::FilterEntry> goodEntries;
QList<QuickOpen::FilterEntry> betterEntries;
QList<Locator::FilterEntry> goodEntries;
QList<Locator::FilterEntry> betterEntries;
QStringMatcher matcher(entry, Qt::CaseInsensitive);
const QRegExp regexp("*"+entry+"*", Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
@@ -86,7 +86,7 @@ QList<QuickOpen::FilterEntry> CppCurrentDocumentFilter::matchesFor(const QString
{
QString symbolName = info.symbolName;// + (info.type == ModelItemInfo::Declaration ? ";" : " {...}");
QVariant id = qVariantFromValue(info);
QuickOpen::FilterEntry filterEntry(this, symbolName, id, info.icon);
Locator::FilterEntry filterEntry(this, symbolName, id, info.icon);
filterEntry.extraInfo = info.symbolType;
if (info.symbolName.startsWith(entry))
@@ -102,7 +102,7 @@ QList<QuickOpen::FilterEntry> CppCurrentDocumentFilter::matchesFor(const QString
return betterEntries;
}
void CppCurrentDocumentFilter::accept(QuickOpen::FilterEntry selection) const
void CppCurrentDocumentFilter::accept(Locator::FilterEntry selection) const
{
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line);

View File

@@ -42,7 +42,7 @@ namespace Internal {
class CppModelManager;
class CppCurrentDocumentFilter : public QuickOpen::ILocatorFilter
class CppCurrentDocumentFilter : public Locator::ILocatorFilter
{
Q_OBJECT
@@ -53,8 +53,8 @@ public:
QString trName() const { return tr("Methods in current Document"); }
QString name() const { return QLatin1String("Methods in current Document"); }
Priority priority() const { return Medium; }
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
private slots:

View File

@@ -73,17 +73,17 @@ void CppLocatorFilter::refresh(QFutureInterface<void> &future)
Q_UNUSED(future)
}
static bool compareLexigraphically(const QuickOpen::FilterEntry &a,
const QuickOpen::FilterEntry &b)
static bool compareLexigraphically(const Locator::FilterEntry &a,
const Locator::FilterEntry &b)
{
return a.displayName < b.displayName;
}
QList<QuickOpen::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEntry)
QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEntry)
{
QString entry = trimWildcards(origEntry);
QList<QuickOpen::FilterEntry> goodEntries;
QList<QuickOpen::FilterEntry> betterEntries;
QList<Locator::FilterEntry> goodEntries;
QList<Locator::FilterEntry> betterEntries;
QStringMatcher matcher(entry, Qt::CaseInsensitive);
const QRegExp regexp("*"+entry+"*", Qt::CaseInsensitive, QRegExp::Wildcard);
if (!regexp.isValid())
@@ -108,7 +108,7 @@ QList<QuickOpen::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEn
|| (!hasWildcard && matcher.indexIn(info.symbolName) != -1)) {
QVariant id = qVariantFromValue(info);
QuickOpen::FilterEntry filterEntry(this, info.symbolName, id, info.icon);
Locator::FilterEntry filterEntry(this, info.symbolName, id, info.icon);
if (! info.symbolType.isEmpty())
filterEntry.extraInfo = info.symbolType;
else
@@ -131,7 +131,7 @@ QList<QuickOpen::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEn
return betterEntries;
}
void CppLocatorFilter::accept(QuickOpen::FilterEntry selection) const
void CppLocatorFilter::accept(Locator::FilterEntry selection) const
{
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line);

View File

@@ -43,7 +43,7 @@ namespace Internal {
class CppModelManager;
class CppLocatorFilter : public QuickOpen::ILocatorFilter
class CppLocatorFilter : public Locator::ILocatorFilter
{
Q_OBJECT
public:
@@ -53,8 +53,8 @@ public:
QString trName() const { return tr("Classes and Methods"); }
QString name() const { return QLatin1String("Classes and Methods"); }
Priority priority() const { return Medium; }
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
protected:

View File

@@ -104,9 +104,9 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new CppQuickFixCollector(m_modelManager));
CppLocatorFilter *quickOpenFilter = new CppLocatorFilter(m_modelManager,
CppLocatorFilter *locatorFilter = new CppLocatorFilter(m_modelManager,
core->editorManager());
addAutoReleasedObject(quickOpenFilter);
addAutoReleasedObject(locatorFilter);
addAutoReleasedObject(new CppClassesFilter(m_modelManager, core->editorManager()));
addAutoReleasedObject(new CppFunctionsFilter(m_modelManager, core->editorManager()));
addAutoReleasedObject(new CppCurrentDocumentFilter(m_modelManager, core->editorManager()));

View File

@@ -63,6 +63,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Designer
#endif // DESIGNER_SETTINGSPAGE_H

View File

@@ -518,7 +518,7 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
// We are interested in overriding most Ctrl key combinations
if (mods == Qt::ControlModifier && key >= Key_A && key <= Key_Z && key != Key_K) {
// Ctrl-K is special as it is the Core's default notion of QuickOpen
// Ctrl-K is special as it is the Core's default notion of Locator
if (m_passing) {
KEY_DEBUG(" PASSING CTRL KEY");
// We get called twice on the same key
@@ -913,9 +913,9 @@ void FakeVimHandler::Private::updateMiniBuffer()
const QString pos = QString::fromLatin1("%1,%2").arg(l + 1).arg(cursorColumnInDocument() + 1);
// FIXME: physical "-" logical
if (linesInDoc != 0) {
status = FakeVimHandler::tr("%1%2%").arg(pos, -10).arg(l * 100 / linesInDoc, 4);
status = FakeVimHandler::tr("%1%2%").arg(pos, -10).arg(l * 100 / linesInDoc, 4);
} else {
status = FakeVimHandler::tr("%1All").arg(pos, -10);
status = FakeVimHandler::tr("%1All").arg(pos, -10);
}
emit q->statusDataChanged(status);
}

View File

@@ -37,7 +37,7 @@
#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpIndexModel>
using namespace QuickOpen;
using namespace Locator;
using namespace Help;
using namespace Help::Internal;

View File

@@ -44,7 +44,7 @@ namespace Internal {
class HelpPlugin;
class HelpIndexFilter : public QuickOpen::ILocatorFilter
class HelpIndexFilter : public Locator::ILocatorFilter
{
Q_OBJECT
@@ -55,8 +55,8 @@ public:
QString trName() const;
QString name() const;
Priority priority() const;
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
signals:

View File

@@ -35,7 +35,7 @@
#include <QtCore/QVariant>
using namespace Core;
using namespace QuickOpen;
using namespace Locator;
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;

View File

@@ -42,7 +42,7 @@ class ProjectExplorerPlugin;
namespace Internal {
class AllProjectsFilter : public QuickOpen::BaseFileFilter
class AllProjectsFilter : public Locator::BaseFileFilter
{
Q_OBJECT
@@ -50,7 +50,7 @@ public:
explicit AllProjectsFilter(ProjectExplorerPlugin *pe);
QString trName() const { return tr("Files in any project"); }
QString name() const { return "Files in any project"; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::Low; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Low; }
void refresh(QFutureInterface<void> &future);
protected:

View File

@@ -38,7 +38,7 @@
#include <QtCore/QVariant>
using namespace Core;
using namespace QuickOpen;
using namespace Locator;
using namespace ProjectExplorer;
using namespace ProjectExplorer::Internal;

View File

@@ -45,7 +45,7 @@ class Project;
namespace Internal {
class CurrentProjectFilter : public QuickOpen::BaseFileFilter
class CurrentProjectFilter : public Locator::BaseFileFilter
{
Q_OBJECT
@@ -53,7 +53,7 @@ public:
CurrentProjectFilter(ProjectExplorerPlugin *pe);
QString trName() const { return tr("Files in current project"); }
QString name() const { return "Files in current project"; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::Low; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Low; }
void refresh(QFutureInterface<void> &future);
protected:

View File

@@ -35,7 +35,7 @@
#include <QtCore/QStringMatcher>
using namespace Core;
using namespace QuickOpen;
using namespace Locator;
BaseFileFilter::BaseFileFilter()
: m_forceNewSearchList(false)
@@ -90,7 +90,7 @@ QList<FilterEntry> BaseFileFilter::matchesFor(const QString &origEntry)
return matches;
}
void BaseFileFilter::accept(QuickOpen::FilterEntry selection) const
void BaseFileFilter::accept(Locator::FilterEntry selection) const
{
Core::EditorManager *em = Core::EditorManager::instance();
em->openEditor(selection.internalData.toString());

View File

@@ -36,16 +36,16 @@
#include <QtCore/QString>
#include <QtCore/QList>
namespace QuickOpen {
namespace Locator {
class LOCATOR_EXPORT BaseFileFilter : public QuickOpen::ILocatorFilter
class LOCATOR_EXPORT BaseFileFilter : public Locator::ILocatorFilter
{
Q_OBJECT
public:
BaseFileFilter();
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
protected:
virtual void updateFiles();
@@ -59,6 +59,6 @@ protected:
QString m_previousEntry;
};
} // namespace QuickOpen
} // namespace Locator
#endif // BASEFILEFILTER_H

View File

@@ -37,8 +37,8 @@
#include <qtconcurrent/QtConcurrentTools>
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
DirectoryFilter::DirectoryFilter()
: m_name(tr("Generic Directory Filter")),

View File

@@ -41,7 +41,7 @@
#include <QtGui/QWidget>
#include <QtGui/QDialog>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class DirectoryFilter : public BaseFileFilter
@@ -52,7 +52,7 @@ public:
DirectoryFilter();
QString trName() const { return m_name; }
QString name() const { return m_name; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::Medium; }
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QByteArray saveState() const;
bool restoreState(const QByteArray &state);
bool openConfigDialog(QWidget *parent, bool &needsRefresh);
@@ -76,6 +76,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // DIRECTORYFILTER_H

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuickOpen::Internal::DirectoryFilterOptions</class>
<widget class="QDialog" name="QuickOpen::Internal::DirectoryFilterOptions">
<class>Locator::Internal::DirectoryFilterOptions</class>
<widget class="QDialog" name="Locator::Internal::DirectoryFilterOptions">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>393</width>
<height>271</height>
<height>275</height>
</rect>
</property>
<layout class="QGridLayout">
@@ -72,12 +72,12 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="text">
<string>Limit to prefix</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="3">
@@ -161,7 +161,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>QuickOpen::Internal::DirectoryFilterOptions</receiver>
<receiver>Locator::Internal::DirectoryFilterOptions</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -177,7 +177,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>QuickOpen::Internal::DirectoryFilterOptions</receiver>
<receiver>Locator::Internal::DirectoryFilterOptions</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">

View File

@@ -34,8 +34,8 @@
#include <QtCore/QDir>
using namespace Core;
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
FileSystemFilter::FileSystemFilter(EditorManager *editorManager, LocatorWidget *locatorWidget)
: m_editorManager(editorManager), m_locatorWidget(locatorWidget), m_includeHidden(true)

View File

@@ -40,12 +40,12 @@
#include <QtCore/QByteArray>
#include <QtCore/QFutureInterface>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class LocatorWidget;
class FileSystemFilter : public QuickOpen::ILocatorFilter
class FileSystemFilter : public Locator::ILocatorFilter
{
Q_OBJECT
@@ -53,9 +53,9 @@ public:
FileSystemFilter(Core::EditorManager *editorManager, LocatorWidget *locatorWidget);
QString trName() const { return tr("Files in file system"); }
QString name() const { return "Files in file system"; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::Medium; }
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
QByteArray saveState() const;
bool restoreState(const QByteArray &state);
bool openConfigDialog(QWidget *parent, bool &needsRefresh);
@@ -68,6 +68,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // FILESYSTEMFILTER_H

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuickOpen::Internal::FileSystemFilterOptions</class>
<widget class="QDialog" name="QuickOpen::Internal::FileSystemFilterOptions">
<class>Locator::Internal::FileSystemFilterOptions</class>
<widget class="QDialog" name="Locator::Internal::FileSystemFilterOptions">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>327</width>
<width>335</width>
<height>131</height>
</rect>
</property>
@@ -78,7 +78,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>QuickOpen::Internal::FileSystemFilterOptions</receiver>
<receiver>Locator::Internal::FileSystemFilterOptions</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -94,7 +94,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>QuickOpen::Internal::FileSystemFilterOptions</receiver>
<receiver>Locator::Internal::FileSystemFilterOptions</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">

View File

@@ -36,7 +36,7 @@
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
using namespace QuickOpen;
using namespace Locator;
ILocatorFilter::ILocatorFilter(QObject *parent):
QObject(parent),

View File

@@ -37,7 +37,7 @@
#include <QtCore/QFutureInterface>
#include <QtGui/QIcon>
namespace QuickOpen {
namespace Locator {
class ILocatorFilter;
@@ -151,6 +151,6 @@ private:
bool m_hidden;
};
} // namespace QuickOpen
} // namespace Locator
#endif // ILOCATORFILTER_H

View File

@@ -33,8 +33,8 @@
#include <coreplugin/coreconstants.h>
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
Q_DECLARE_METATYPE(ILocatorFilter*);

View File

@@ -34,14 +34,14 @@
#include <QtGui/QIcon>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class LocatorPlugin;
class LocatorWidget;
/*!
This filter provides the user with the list of available QuickOpen filters.
This filter provides the user with the list of available Locator filters.
The list is only shown when nothing has been typed yet.
*/
class LocatorFiltersFilter : public ILocatorFilter
@@ -68,6 +68,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // LOCATORFILTERSFILTER_H

View File

@@ -33,8 +33,8 @@
#include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h>
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
LocatorManager *LocatorManager::m_instance = 0;

View File

@@ -34,7 +34,7 @@
#include <QtCore/QObject>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class LocatorWidget;
@@ -57,6 +57,6 @@ private:
static LocatorManager *m_instance;
};
} // namespace QuickOpen
} // namespace Locator
#endif // LOCATORMANAGER_H

View File

@@ -52,16 +52,16 @@
#include <qtconcurrent/QtConcurrentTools>
/*!
\namespace QuickOpen
The QuickOpen namespace provides the hooks for Locator content.
\namespace Locator
The Locator namespace provides the hooks for Locator content.
*/
/*!
\namespace QuickOpen::Internal
\namespace Locator::Internal
\internal
*/
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
namespace {
static bool filterLessThan(const ILocatorFilter *first, const ILocatorFilter *second)
@@ -245,7 +245,7 @@ void LocatorPlugin::refresh(QList<ILocatorFilter*> filters)
QFuture<void> task = QtConcurrent::run(&ILocatorFilter::refresh, filters);
Core::FutureProgress *progress = Core::ICore::instance()
->progressManager()->addTask(task, tr("Indexing"),
QuickOpen::Constants::TASK_INDEX,
Locator::Constants::TASK_INDEX,
Core::ProgressManager::CloseOnSuccess);
connect(progress, SIGNAL(finished()), this, SLOT(saveSettings()));
}

View File

@@ -39,7 +39,7 @@
#include <QtCore/QTimer>
#include <QtCore/QFutureWatcher>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class LocatorWidget;
@@ -121,6 +121,6 @@ void LocatorPlugin::loadSettingsHelper(S *settings)
}
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // LOCATORPLUGIN_H

View File

@@ -29,12 +29,12 @@
#include <qglobal.h>
namespace QuickOpen {
namespace Locator {
struct FilterEntry;
}
QT_BEGIN_NAMESPACE
unsigned int qHash(const QuickOpen::FilterEntry &entry);
unsigned int qHash(const Locator::FilterEntry &entry);
QT_END_NAMESPACE
#include "locatorwidget.h"
@@ -67,13 +67,13 @@ QT_END_NAMESPACE
#include <QtGui/QScrollBar>
#include <QtGui/QTreeView>
Q_DECLARE_METATYPE(QuickOpen::ILocatorFilter*);
Q_DECLARE_METATYPE(QuickOpen::FilterEntry);
Q_DECLARE_METATYPE(Locator::ILocatorFilter*);
Q_DECLARE_METATYPE(Locator::FilterEntry);
namespace QuickOpen {
namespace Locator {
namespace Internal {
/*! A model to represent the QuickOpen results. */
/*! A model to represent the Locator results. */
class LocatorModel : public QAbstractListModel
{
public:
@@ -107,10 +107,10 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
QT_BEGIN_NAMESPACE
uint qHash(const FilterEntry &entry)
@@ -122,7 +122,7 @@ uint qHash(const FilterEntry &entry)
QT_END_NAMESPACE
// =========== QuickOpenModel ===========
// =========== LocatorModel ===========
int LocatorModel::rowCount(const QModelIndex & /* parent */) const
{
@@ -135,7 +135,7 @@ int LocatorModel::columnCount(const QModelIndex &parent) const
}
/*!
* When asked for the icon via Qt::DecorationRole, the QuickOpenModel lazily
* When asked for the icon via Qt::DecorationRole, the LocatorModel lazily
* resolves and caches the Greehouse-specific file icon when
* FilterEntry::resolveFileIcon is true. FilterEntry::internalData is assumed
* to be the filename.
@@ -174,7 +174,7 @@ void LocatorModel::setEntries(const QList<FilterEntry> &entries)
reset();
}
#if 0
void QuickOpenModel::setDisplayCount(int count)
void LocatorModel::setDisplayCount(int count)
{
// TODO: This method is meant to be used for increasing the number of items displayed at the
// user's request. There is however no way yet for the user to request this.
@@ -484,6 +484,6 @@ void LocatorWidget::showEvent(QShowEvent *event)
void LocatorWidget::showConfigureDialog()
{
Core::ICore::instance()->showOptionsDialog(Constants::QUICKOPEN_CATEGORY,
Core::ICore::instance()->showOptionsDialog(Constants::LOCATOR_CATEGORY,
Constants::FILTER_OPTIONS_PAGE);
}

View File

@@ -47,7 +47,7 @@ namespace Utils {
class FancyLineEdit;
}
namespace QuickOpen {
namespace Locator {
namespace Internal {
class LocatorModel;
@@ -92,6 +92,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // LOCATORWIDGET_H

View File

@@ -32,8 +32,8 @@
Q_DECLARE_METATYPE(Core::IEditor*);
using namespace Core;
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
OpenDocumentsFilter::OpenDocumentsFilter(EditorManager *editorManager) :
m_editorManager(editorManager)

View File

@@ -41,10 +41,10 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h>
namespace QuickOpen {
namespace Locator {
namespace Internal {
class OpenDocumentsFilter : public QuickOpen::ILocatorFilter
class OpenDocumentsFilter : public Locator::ILocatorFilter
{
Q_OBJECT
@@ -52,9 +52,9 @@ public:
OpenDocumentsFilter(Core::EditorManager *editorManager);
QString trName() const { return tr("Open documents"); }
QString name() const { return "Open documents"; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::Medium; }
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::Medium; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
void refresh(QFutureInterface<void> &future);
public slots:
@@ -67,6 +67,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // OPENDOCUMENTSFILTER_H

View File

@@ -27,19 +27,19 @@
**
**************************************************************************/
#ifndef QUICKOPENCONSTANTS_H
#define QUICKOPENCONSTANTS_H
#ifndef LOCATORCONSTANTS_H
#define LOCATORCONSTANTS_H
#include <QtCore/QtGlobal>
namespace QuickOpen {
namespace Locator {
namespace Constants {
const char * const FILTER_OPTIONS_PAGE = QT_TRANSLATE_NOOP("Locator", "Filters");
const char * const QUICKOPEN_CATEGORY = QT_TRANSLATE_NOOP("Locator", "Locator");
const char * const TASK_INDEX = "QuickOpen.Task.Index";
const char * const LOCATOR_CATEGORY = QT_TRANSLATE_NOOP("Locator", "Locator");
const char * const TASK_INDEX = "Locator.Task.Index";
} // namespace Constants
} // namespace QuickOpen
} // namespace Locator
#endif // QUICKOPENCONSTANTS_H
#endif // LOCATORCONSTANTS_H

View File

@@ -39,10 +39,10 @@
#include <QtCore/QCoreApplication>
Q_DECLARE_METATYPE(QuickOpen::ILocatorFilter*)
Q_DECLARE_METATYPE(Locator::ILocatorFilter*)
using namespace QuickOpen;
using namespace QuickOpen::Internal;
using namespace Locator;
using namespace Locator::Internal;
SettingsPage::SettingsPage(LocatorPlugin *plugin)
: m_plugin(plugin), m_page(0)
@@ -56,17 +56,17 @@ QString SettingsPage::id() const
QString SettingsPage::trName() const
{
return QCoreApplication::translate("Locator", QuickOpen::Constants::FILTER_OPTIONS_PAGE);
return QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE);
}
QString SettingsPage::category() const
{
return Constants::QUICKOPEN_CATEGORY;
return Constants::LOCATOR_CATEGORY;
}
QString SettingsPage::trCategory() const
{
return QCoreApplication::translate("Locator", QuickOpen::Constants::QUICKOPEN_CATEGORY);
return QCoreApplication::translate("Locator", Locator::Constants::LOCATOR_CATEGORY);
}
QWidget *SettingsPage::createPage(QWidget *parent)

View File

@@ -41,7 +41,7 @@ QT_BEGIN_NAMESPACE
class QListWidgetItem;
QT_END_NAMESPACE
namespace QuickOpen {
namespace Locator {
class ILocatorFilter;
@@ -88,6 +88,6 @@ private:
};
} // namespace Internal
} // namespace QuickOpen
} // namespace Locator
#endif // SETTINGSPAGE_H

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QuickOpen::Internal::SettingsWidget</class>
<widget class="QWidget" name="QuickOpen::Internal::SettingsWidget">
<class>Locator::Internal::SettingsWidget</class>
<widget class="QWidget" name="Locator::Internal::SettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
@@ -91,9 +91,6 @@
<property name="buttonSymbols">
<enum>QAbstractSpinBox::PlusMinus</enum>
</property>
<property name="value">
<number>60</number>
</property>
<property name="suffix">
<string> min</string>
</property>
@@ -103,6 +100,9 @@
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>60</number>
</property>
</widget>
</item>
<item>

View File

@@ -35,7 +35,7 @@
#include <QtCore/QVariant>
using namespace Core;
using namespace QuickOpen;
using namespace Locator;
using namespace TextEditor;
using namespace TextEditor::Internal;

View File

@@ -42,7 +42,7 @@ class ITextEditor;
namespace Internal {
class LineNumberFilter : public QuickOpen::ILocatorFilter
class LineNumberFilter : public Locator::ILocatorFilter
{
Q_OBJECT
@@ -51,9 +51,9 @@ public:
QString trName() const { return tr("Line in current document"); }
QString name() const { return "Line in current document"; }
QuickOpen::ILocatorFilter::Priority priority() const { return QuickOpen::ILocatorFilter::High; }
QList<QuickOpen::FilterEntry> matchesFor(const QString &entry);
void accept(QuickOpen::FilterEntry selection) const;
Locator::ILocatorFilter::Priority priority() const { return Locator::ILocatorFilter::High; }
QList<Locator::FilterEntry> matchesFor(const QString &entry);
void accept(Locator::FilterEntry selection) const;
void refresh(QFutureInterface<void> &) {}
private:

View File

@@ -360,7 +360,7 @@ void TextEditorActionHandler::updateCopyAction()
void TextEditorActionHandler::gotoAction()
{
QuickOpen::LocatorManager *locatorManager = QuickOpen::LocatorManager::instance();
Locator::LocatorManager *locatorManager = Locator::LocatorManager::instance();
QTC_ASSERT(locatorManager, return);
const QString shortcut = TextEditorPlugin::instance()->lineNumberFilter()->shortcutString();
const QString text = tr(" <line number>");