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. \o Support for searching text in arbitrary widgets, and arbitrary other things.
\row \row
\o \l{QuickOpen} \o \l{Locator}
\o Hooks for providing content for Locator. \o Hooks for providing content for Locator.
\endtable \endtable
@@ -162,7 +162,7 @@
\row \row
\o Add a new filter to Locator. \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 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 \row
\o \o

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -63,6 +63,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace QuickOpen } // namespace Designer
#endif // DESIGNER_SETTINGSPAGE_H #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 // We are interested in overriding most Ctrl key combinations
if (mods == Qt::ControlModifier && key >= Key_A && key <= Key_Z && key != Key_K) { 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) { if (m_passing) {
KEY_DEBUG(" PASSING CTRL KEY"); KEY_DEBUG(" PASSING CTRL KEY");
// We get called twice on the same 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); const QString pos = QString::fromLatin1("%1,%2").arg(l + 1).arg(cursorColumnInDocument() + 1);
// FIXME: physical "-" logical // FIXME: physical "-" logical
if (linesInDoc != 0) { 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 { } else {
status = FakeVimHandler::tr("%1All").arg(pos, -10); status = FakeVimHandler::tr("%1All").arg(pos, -10);
} }
emit q->statusDataChanged(status); emit q->statusDataChanged(status);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>QuickOpen::Internal::DirectoryFilterOptions</class> <class>Locator::Internal::DirectoryFilterOptions</class>
<widget class="QDialog" name="QuickOpen::Internal::DirectoryFilterOptions"> <widget class="QDialog" name="Locator::Internal::DirectoryFilterOptions">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>393</width> <width>393</width>
<height>271</height> <height>275</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout"> <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> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="checked">
<bool>false</bool>
</property>
<property name="text"> <property name="text">
<string>Limit to prefix</string> <string>Limit to prefix</string>
</property> </property>
<property name="checked">
<bool>false</bool>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="3"> <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> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>QuickOpen::Internal::DirectoryFilterOptions</receiver> <receiver>Locator::Internal::DirectoryFilterOptions</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <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> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>QuickOpen::Internal::DirectoryFilterOptions</receiver> <receiver>Locator::Internal::DirectoryFilterOptions</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -34,14 +34,14 @@
#include <QtGui/QIcon> #include <QtGui/QIcon>
namespace QuickOpen { namespace Locator {
namespace Internal { namespace Internal {
class LocatorPlugin; class LocatorPlugin;
class LocatorWidget; 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. The list is only shown when nothing has been typed yet.
*/ */
class LocatorFiltersFilter : public ILocatorFilter class LocatorFiltersFilter : public ILocatorFilter
@@ -68,6 +68,6 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace QuickOpen } // namespace Locator
#endif // LOCATORFILTERSFILTER_H #endif // LOCATORFILTERSFILTER_H

View File

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

View File

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

View File

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

View File

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

View File

@@ -29,12 +29,12 @@
#include <qglobal.h> #include <qglobal.h>
namespace QuickOpen { namespace Locator {
struct FilterEntry; struct FilterEntry;
} }
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
unsigned int qHash(const QuickOpen::FilterEntry &entry); unsigned int qHash(const Locator::FilterEntry &entry);
QT_END_NAMESPACE QT_END_NAMESPACE
#include "locatorwidget.h" #include "locatorwidget.h"
@@ -67,13 +67,13 @@ QT_END_NAMESPACE
#include <QtGui/QScrollBar> #include <QtGui/QScrollBar>
#include <QtGui/QTreeView> #include <QtGui/QTreeView>
Q_DECLARE_METATYPE(QuickOpen::ILocatorFilter*); Q_DECLARE_METATYPE(Locator::ILocatorFilter*);
Q_DECLARE_METATYPE(QuickOpen::FilterEntry); Q_DECLARE_METATYPE(Locator::FilterEntry);
namespace QuickOpen { namespace Locator {
namespace Internal { namespace Internal {
/*! A model to represent the QuickOpen results. */ /*! A model to represent the Locator results. */
class LocatorModel : public QAbstractListModel class LocatorModel : public QAbstractListModel
{ {
public: public:
@@ -107,10 +107,10 @@ private:
}; };
} // namespace Internal } // namespace Internal
} // namespace QuickOpen } // namespace Locator
using namespace QuickOpen; using namespace Locator;
using namespace QuickOpen::Internal; using namespace Locator::Internal;
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
uint qHash(const FilterEntry &entry) uint qHash(const FilterEntry &entry)
@@ -122,7 +122,7 @@ uint qHash(const FilterEntry &entry)
QT_END_NAMESPACE QT_END_NAMESPACE
// =========== QuickOpenModel =========== // =========== LocatorModel ===========
int LocatorModel::rowCount(const QModelIndex & /* parent */) const 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 * resolves and caches the Greehouse-specific file icon when
* FilterEntry::resolveFileIcon is true. FilterEntry::internalData is assumed * FilterEntry::resolveFileIcon is true. FilterEntry::internalData is assumed
* to be the filename. * to be the filename.
@@ -174,7 +174,7 @@ void LocatorModel::setEntries(const QList<FilterEntry> &entries)
reset(); reset();
} }
#if 0 #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 // 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. // 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() void LocatorWidget::showConfigureDialog()
{ {
Core::ICore::instance()->showOptionsDialog(Constants::QUICKOPEN_CATEGORY, Core::ICore::instance()->showOptionsDialog(Constants::LOCATOR_CATEGORY,
Constants::FILTER_OPTIONS_PAGE); Constants::FILTER_OPTIONS_PAGE);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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