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/utils.cpp b/utils.cpp
index 56ffb9c..870da11 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -36,6 +36,7 @@
#include <QStackedWidget>
#include <QPropertyAnimation>
#include <QApplication>
+#include <QFile>
#include "globalinstances.h"
#include "pixbufmanipulator.h"
@@ -403,3 +404,15 @@
QVariant var = GlobalInstances::pixmapManipulator().decorationRole(*conversation, accountInfo);
return var.value<QImage>();
}
+
+QByteArray
+Utils::QByteArrayFromFile(const QString& filename)
+{
+ QFile file(filename);
+ if (file.open(QIODevice::ReadOnly)) {
+ return file.readAll();
+ } else {
+ qDebug() << "can't open file";
+ return QByteArray();
+ }
+}
\ No newline at end of file