Initialize the members.

This commit is contained in:
Roberto Raggi
2009-11-24 12:20:01 +01:00
parent 4abd0aeff3
commit 8a73554d38
2 changed files with 49 additions and 25 deletions

View File

@@ -52,17 +52,18 @@ namespace Utils {
class QTCREATOR_UTILS_EXPORT ChangeSet
{
QString *string;
QTextCursor *cursor;
public:
struct Replace {
Replace(): pos(0), length(0) {}
int pos;
int length;
QString replacement;
};
struct Move {
Move(): pos(0), length(0), to(0) {}
int pos;
int length;
int to;
@@ -71,8 +72,12 @@ public:
public:
ChangeSet();
bool isEmpty() const;
QList<Replace> replaceList() const;
QList<Move> moveList() const;
QList<Move> moveList() const; // ### TODO: merge with replaceList
void clear();
void replace(int pos, int length, const QString &replacement);
void move(int pos, int length, int to);
@@ -89,6 +94,9 @@ private:
void write_helper();
private:
QString *m_string;
QTextCursor *m_cursor;
QList<Replace> m_replaceList;
QList<Move> m_moveList;
};