forked from qt-creator/qt-creator
C++: Add basic 'insert #include' quick fix.
Change-Id: I3a2fef56d6d1871ea4bbb139f9bdd2bc44dd0123 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "cppclassesfilter.h"
|
||||
|
||||
using namespace CppTools;
|
||||
using namespace CppTools::Internal;
|
||||
|
||||
CppClassesFilter::CppClassesFilter(CppModelManager *manager)
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
#ifndef CPPCLASSESFILTER_H
|
||||
#define CPPCLASSESFILTER_H
|
||||
|
||||
#include <cpplocatorfilter.h>
|
||||
#include "cpptools_global.h"
|
||||
#include "cpplocatorfilter.h"
|
||||
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
class CppClassesFilter : public CppLocatorFilter
|
||||
class CPPTOOLS_EXPORT CppClassesFilter : public Internal::CppLocatorFilter
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CppClassesFilter(CppModelManager *manager);
|
||||
CppClassesFilter(Internal::CppModelManager *manager);
|
||||
~CppClassesFilter();
|
||||
|
||||
QString displayName() const { return tr("Classes"); }
|
||||
@@ -51,7 +51,6 @@ public:
|
||||
Priority priority() const { return Medium; }
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CppTools
|
||||
|
||||
#endif // CPPCLASSESFILTER_H
|
||||
|
||||
@@ -111,7 +111,7 @@ QList<Locator::FilterEntry> CppCurrentDocumentFilter::matchesFor(QFutureInterfac
|
||||
|
||||
void CppCurrentDocumentFilter::accept(Locator::FilterEntry selection) const
|
||||
{
|
||||
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
|
||||
ModelItemInfo info = qvariant_cast<CppTools::ModelItemInfo>(selection.internalData);
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(info.fileName, info.line, info.column,
|
||||
Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locato
|
||||
|
||||
void CppLocatorFilter::accept(Locator::FilterEntry selection) const
|
||||
{
|
||||
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
|
||||
ModelItemInfo info = qvariant_cast<CppTools::ModelItemInfo>(selection.internalData);
|
||||
TextEditor::BaseTextEditorWidget::openEditorAt(info.fileName, info.line, info.column,
|
||||
Core::Id(), Core::EditorManager::ModeSwitch);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <QDebug>
|
||||
|
||||
using namespace CPlusPlus;
|
||||
using namespace CppTools::Internal;
|
||||
using namespace CppTools;
|
||||
|
||||
SearchSymbols::SymbolTypes SearchSymbols::AllTypes =
|
||||
SearchSymbols::Classes
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#ifndef SEARCHSYMBOLS_H
|
||||
#define SEARCHSYMBOLS_H
|
||||
|
||||
#include "cpptools_global.h"
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/Icons.h>
|
||||
#include <cplusplus/Overview.h>
|
||||
@@ -48,9 +50,8 @@
|
||||
#include <functional>
|
||||
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
struct ModelItemInfo
|
||||
struct CPPTOOLS_EXPORT ModelItemInfo
|
||||
{
|
||||
enum ItemType { Enum, Class, Method, Declaration };
|
||||
|
||||
@@ -180,10 +181,9 @@ private:
|
||||
bool separateScope;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace CppTools
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(CppTools::Internal::SearchSymbols::SymbolTypes)
|
||||
Q_DECLARE_METATYPE(CppTools::Internal::ModelItemInfo)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(CppTools::SearchSymbols::SymbolTypes)
|
||||
Q_DECLARE_METATYPE(CppTools::ModelItemInfo)
|
||||
|
||||
#endif // SEARCHSYMBOLS_H
|
||||
|
||||
Reference in New Issue
Block a user