Files
qt-creator/src/plugins/texteditor/codeassist/genericproposal.h
Erik Verbruggen 3aab8beaf4 Supply c++11 flags and per-project info to c++ code model.
A manual squash/merge of the changes below, plus a couple of subsequent
code fixes.

59085aa5fbb99e2d786cd2c1a06c24a111ccb49f:
    Modify CppModel::ProjectInfo

    Adding per project node information, to pass on the correct
    defines/includes for each file, instead of aggregating them incorrectly.

    Also split up SOURCES and OBJECTIVE_SOURCES.

    Also ask the toolchain to convert the compilerflags to flags the
    codemodel understands, for now only gcc and only c++11.

    Also make the toolchain aware of the flags used to compile, so that it
    can emit the correct defines.

    Note: No header files are passed on.

74028802314cd4e75b41b46407433e07090a304d:
    GCC: Evaluate cxxflags when checking for predefined macros

ebaaa4957e4c02cc9637a998eddae1d0acd74f83:
    MSVC: Take cxxflags into account when checking for predefined macros

9bfce7e889bcf7bcc47bf880e3ea25945ca7d0d7:
    Compile fixes

Change-Id: I9de94ad038dfc5dc1987732e84b13fb4419c96f5
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2012-02-16 15:17:17 +01:00

66 lines
2.0 KiB
C++

/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**************************************************************************/
#ifndef GENERICPROPOSAL_H
#define GENERICPROPOSAL_H
#include "iassistproposal.h"
namespace TextEditor {
class IGenericProposalModel;
class TEXTEDITOR_EXPORT GenericProposal : public IAssistProposal
{
public:
GenericProposal(int cursorPos, IGenericProposalModel *model);
virtual ~GenericProposal();
virtual bool isFragile() const;
virtual int basePosition() const;
virtual bool isCorrective() const;
virtual void makeCorrection(BaseTextEditor *editor);
virtual IAssistProposalModel *model() const;
virtual IAssistProposalWidget *createWidget() const;
protected:
void moveBasePosition(int length);
private:
int m_basePosition;
IGenericProposalModel *m_model;
};
} // TextEditor
#endif // GENERICPROPOSAL_H