code clean up
This commit is contained in:
parent
ea03f788d1
commit
97f5420a27
|
@ -1580,11 +1580,6 @@ size_t UndoItem::changeNumber() const
|
||||||
return mChangeNumber;
|
return mChangeNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int UndoItem::memoryUsage() const
|
|
||||||
{
|
|
||||||
return mMemoryUsage;
|
|
||||||
}
|
|
||||||
|
|
||||||
UndoItem::UndoItem(ChangeReason reason, SelectionMode selMode,
|
UndoItem::UndoItem(ChangeReason reason, SelectionMode selMode,
|
||||||
BufferCoord startPos, BufferCoord endPos,
|
BufferCoord startPos, BufferCoord endPos,
|
||||||
const QStringList& text, int number)
|
const QStringList& text, int number)
|
||||||
|
@ -1599,9 +1594,6 @@ UndoItem::UndoItem(ChangeReason reason, SelectionMode selMode,
|
||||||
foreach (const QString& s, text) {
|
foreach (const QString& s, text) {
|
||||||
length+=s.length();
|
length+=s.length();
|
||||||
}
|
}
|
||||||
mMemoryUsage = length * sizeof(QChar) + text.length() * sizeof(QString)
|
|
||||||
+ sizeof(UndoItem);
|
|
||||||
// qDebug()<<mMemoryUsage;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeReason UndoItem::changeReason() const
|
ChangeReason UndoItem::changeReason() const
|
||||||
|
|
|
@ -656,7 +656,6 @@ private:
|
||||||
BufferCoord mChangeEndPos;
|
BufferCoord mChangeEndPos;
|
||||||
QStringList mChangeText;
|
QStringList mChangeText;
|
||||||
size_t mChangeNumber;
|
size_t mChangeNumber;
|
||||||
unsigned int mMemoryUsage;
|
|
||||||
public:
|
public:
|
||||||
UndoItem(ChangeReason reason,
|
UndoItem(ChangeReason reason,
|
||||||
SelectionMode selMode,
|
SelectionMode selMode,
|
||||||
|
@ -671,7 +670,6 @@ public:
|
||||||
BufferCoord changeEndPos() const;
|
BufferCoord changeEndPos() const;
|
||||||
QStringList changeText() const;
|
QStringList changeText() const;
|
||||||
size_t changeNumber() const;
|
size_t changeNumber() const;
|
||||||
unsigned int memoryUsage() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
using PUndoItem = std::shared_ptr<UndoItem>;
|
using PUndoItem = std::shared_ptr<UndoItem>;
|
||||||
|
|
Loading…
Reference in New Issue