forked from qt-creator/qt-creator
CppEditor: Add basic test for ExtractFunction
Change-Id: I44f2edb2905e202669630ab5da85066011491fae Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -34,11 +34,12 @@
|
||||
#include "cppquickfix.h"
|
||||
|
||||
#include <cpptools/cpprefactoringchanges.h>
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <functional>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QByteArray;
|
||||
template <class> class QList;
|
||||
@@ -435,7 +436,13 @@ public:
|
||||
class ExtractFunction : public CppQuickFixFactory
|
||||
{
|
||||
public:
|
||||
typedef std::function<QString ()> FunctionNameGetter;
|
||||
|
||||
ExtractFunction(FunctionNameGetter functionNameGetter = FunctionNameGetter());
|
||||
void match(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result);
|
||||
|
||||
private:
|
||||
FunctionNameGetter m_functionNameGetter; // For tests to avoid GUI pop-up.
|
||||
};
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user