summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladvoic@gmail.com>2011-04-29 18:13:05 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-30 08:35:40 (GMT)
commit09f61b624e99f69a9221ba46c15efa61892f475f (patch)
tree636be7dd1399a4cf97fda4343d6f849d9eac2e34 /Swift/QtUI/ChatSnippet.h
parentd4781a09b22013da45adf8e9e8b6484fd672a3ec (diff)
downloadswift-09f61b624e99f69a9221ba46c15efa61892f475f.zip
swift-09f61b624e99f69a9221ba46c15efa61892f475f.tar.bz2
Correct message feature using XEP-Correct
Uses Kev's not-yet-published protocol for correcting the last sent message. Release-Notes: You can now correct your previously sent message in a chat by pressing 'up' in the input field. License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swift/QtUI/ChatSnippet.h')
-rw-r--r--Swift/QtUI/ChatSnippet.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swift/QtUI/ChatSnippet.h b/Swift/QtUI/ChatSnippet.h
index 3aa5fcc..7cbb3b3 100644
--- a/Swift/QtUI/ChatSnippet.h
+++ b/Swift/QtUI/ChatSnippet.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
ChatSnippet(bool appendToPrevious);
virtual ~ChatSnippet();
-
+
virtual const QString& getContent() const = 0;
virtual QString getContinuationElementID() const { return ""; }
@@ -26,7 +26,7 @@ namespace Swift {
bool getAppendToPrevious() const {
return appendToPrevious_;
}
-
+
static QString escape(const QString& original) {
QString result(original);
result.replace("%message%", "&#37;message&#37;");
@@ -37,11 +37,12 @@ namespace Swift {
return result;
}
+ static QString timeToEscapedString(const QDateTime& time);
+
protected:
void setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet> continuationFallback) {
continuationFallback_ = continuationFallback;
}
- static QString timeToEscapedString(const QDateTime& time);
private:
bool appendToPrevious_;
boost::shared_ptr<ChatSnippet> continuationFallback_;