message/call views: ui overhaul

This patch:
- implements QWebEngineView as the view for interactions
- reorganizes the main widget's layout in order to share views
  between in-call and out-of-call messaging views
- fixes behavioral bugs and crashes
- cannot be built with the mingw compiler due to lack of support for
  QWebEngine, and must be built natively with msvc and includes some
  build script modifications
- should be thought of as a new client

Change-Id: I59d8c68dc8384e85fb006f30d8313482c00d6c85
diff --git a/callwidget.h b/callwidget.h
index 7c37bcf..e6b1f13 100644
--- a/callwidget.h
+++ b/callwidget.h
@@ -30,7 +30,6 @@
 #include <QMovie>
 
 #include "navwidget.h"
-#include "instantmessagingwidget.h"
 #include "smartlistmodel.h"
 
 // old LRC
@@ -51,7 +50,6 @@
 #include "api/newcallmodel.h"
 
 class ConversationItemDelegate;
-class ImDelegate;
 class QPropertyAnimation;
 
 namespace Ui {
@@ -87,8 +85,6 @@
     void on_refuseButton_clicked();
     void on_cancelButton_clicked();
     void on_smartList_doubleClicked(const QModelIndex& index);
-    void on_sendIMButton_clicked();
-    void on_imMessageEdit_returnPressed();
     void on_ringContactLineEdit_textChanged(const QString& text);
     void on_imBackButton_clicked();
     void on_sendContactRequestButton_clicked();
@@ -101,15 +97,12 @@
 
 private slots:
     void smartListSelectionChanged(const QItemSelection  &selected, const QItemSelection  &deselected);
-    void contactReqListCurrentChanged(const QModelIndex &currentIdx, const QModelIndex &previousIdx);
-    void slotAccountMessageReceived(const QMap<QString,QString> message,ContactMethod* cm, media::Media::Direction dir);
     void onIncomingMessage(const std::string & convUid, uint64_t interactionId, const lrc::api::interaction::Info & interaction);
 
 private:
     void placeCall();
     void conversationsButtonClicked();
     void invitationsButtonClicked();
-    void setupOutOfCallIM();
     void setupSmartListContextMenu(const QPoint &pos);
     void setupQRCode(QString ringID);
     void backToWelcomePage();
@@ -136,14 +129,6 @@
     const std::string& selectedConvUid();
 
     QMenu* menu_;
-    ConversationItemDelegate* conversationItemDelegate_;
-    ImDelegate* imDelegate_;
-
-    QMetaObject::Connection imConnection_;
-    QMetaObject::Connection imVisibleConnection_;
-    QMetaObject::Connection callChangedConnection_;
-    QMetaObject::Connection imClickedConnection_;
-    QMetaObject::Connection crListSelectionConnection_;
 
     Ui::CallWidget* ui;
     QMovie* miniSpinner_;
@@ -154,9 +139,13 @@
     Video::Renderer* videoRenderer_;
     std::string lastConvUid_ {};
     lrc::api::profile::Type currentTypeFilter_{};
-
     std::unique_ptr<SmartListModel> smartListModel_;
-    std::unique_ptr<MessageModel> messageModel_;
+
+    QMetaObject::Connection imConnection_;
+    QMetaObject::Connection imVisibleConnection_;
+    QMetaObject::Connection callChangedConnection_;
+    QMetaObject::Connection imClickedConnection_;
+    QMetaObject::Connection crListSelectionConnection_;
     QMetaObject::Connection modelSortedConnection_;
     QMetaObject::Connection modelUpdatedConnection_;
     QMetaObject::Connection filterChangedConnection_;
@@ -167,4 +156,5 @@
     QMetaObject::Connection conversationClearedConnection;
     QMetaObject::Connection selectedCallChanged_;
     QMetaObject::Connection smartlistSelectionConnection_;
+    QMetaObject::Connection interactionRemovedConnection_;
 };