diff options
-rw-r--r-- | Swift/QtUI/QtHistoryWindow.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/QtHistoryWindow.h | 8 | ||||
-rw-r--r-- | Swiften/History/SQLiteHistoryManager.cpp | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/Swift/QtUI/QtHistoryWindow.cpp b/Swift/QtUI/QtHistoryWindow.cpp index b3df29f..2577f4b 100644 --- a/Swift/QtUI/QtHistoryWindow.cpp +++ b/Swift/QtUI/QtHistoryWindow.cpp @@ -33,7 +33,7 @@ QtHistoryWindow::QtHistoryWindow(SettingsProvider* settings, UIEventStream* even ui_.bottomLayout_->addWidget(conversation_); delete ui_.conversationRoster_; - conversationRoster_ = new QtRosterWidget(eventStream, settings, this); + conversationRoster_ = new QtTreeWidget(eventStream, settings, this); QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Expanding); sizePolicy2.setVerticalStretch(80); conversationRoster_->setSizePolicy(sizePolicy2); diff --git a/Swift/QtUI/QtHistoryWindow.h b/Swift/QtUI/QtHistoryWindow.h index 1f0cdb7..1ddaf61 100644 --- a/Swift/QtUI/QtHistoryWindow.h +++ b/Swift/QtUI/QtHistoryWindow.h @@ -10,11 +10,7 @@ #include <Swift/QtUI/ui_QtHistoryWindow.h> #include <QtChatView.h> #include <QtTabbable.h> -#include <Swift/QtUI/Roster/QtRosterWidget.h> - -class QTextEdit; -class QCheckBox; -class QColor; +#include <Swift/QtUI/Roster/QtTreeWidget.h> namespace Swift { class QtHistoryWindow : public QtTabbable, public HistoryWindow { @@ -36,6 +32,6 @@ namespace Swift { Ui::QtHistoryWindow ui_; QtChatTheme* theme_; QtChatView* conversation_; - QtRosterWidget* conversationRoster_; + QtTreeWidget* conversationRoster_; }; } diff --git a/Swiften/History/SQLiteHistoryManager.cpp b/Swiften/History/SQLiteHistoryManager.cpp index 33d2c58..5a5c832 100644 --- a/Swiften/History/SQLiteHistoryManager.cpp +++ b/Swiften/History/SQLiteHistoryManager.cpp @@ -13,7 +13,12 @@ inline std::string getEscapedString(const std::string& s) { std::string result(s); - // result.replaceAll('\'', std::string("\\'")); + + size_t pos = result.find('\''); + while (pos != std::string::npos) { + result.insert(pos, "'"); + pos = result.find('\'', pos + 2); + } return result; } |