Commit d417a15b authored by Andreas Traczyk's avatar Andreas Traczyk

refacto: remove unused LRC models

Change-Id: Id5558187dd0f906dfd3565e204ea5c4d7490ef77
parent 2a2b901a
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <QDesktopServices> #include <QDesktopServices>
#include <QScrollBar> #include <QScrollBar>
#include <QWebEngineScript> #include <QWebEngineScript>
#include <QMimeData>
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
...@@ -50,7 +51,6 @@ ...@@ -50,7 +51,6 @@
#include "pixbufmanipulator.h" #include "pixbufmanipulator.h"
#include "ringthemeutils.h" #include "ringthemeutils.h"
#include "settingskey.h" #include "settingskey.h"
#include "windowscontactbackend.h"
CallWidget::CallWidget(QWidget* parent) : CallWidget::CallWidget(QWidget* parent) :
NavWidget(parent), NavWidget(parent),
......
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
#include "navwidget.h" #include "navwidget.h"
#include "smartlistmodel.h" #include "smartlistmodel.h"
// old LRC
#include "accountmodel.h"
#include "media/textrecording.h"
#include "video/previewmanager.h"
#include "video/renderer.h"
// new LRC // new LRC
#include "api/account.h" #include "api/account.h"
#include "api/contact.h" #include "api/contact.h"
......
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
#include "api/conversationmodel.h" #include "api/conversationmodel.h"
#include "api/peerdiscoverymodel.h" #include "api/peerdiscoverymodel.h"
#include "account.h"
using namespace lrc::api; using namespace lrc::api;
class LRCInstance : public QObject class LRCInstance : public QObject
...@@ -61,8 +59,6 @@ public: ...@@ -61,8 +59,6 @@ public:
}; };
static void init() { static void init() {
instance(); instance();
// TODO: remove when all platforms migrate to avModel
instance().avModel().deactivateOldVideoModels();
}; };
static Lrc& getAPI() { static Lrc& getAPI() {
return *(instance().lrc_); return *(instance().lrc_);
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#include <QTimer> #include <QTimer>
#include <QWindow> #include <QWindow>
#include "media/text.h"
#include "media/textrecording.h"
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <QWinThumbnailToolBar> #include <QWinThumbnailToolBar>
#include <QWinThumbnailToolButton> #include <QWinThumbnailToolButton>
...@@ -37,7 +34,6 @@ ...@@ -37,7 +34,6 @@
#endif #endif
#include "aboutdialog.h" #include "aboutdialog.h"
#include "callmodel.h"
#include "callwidget.h" #include "callwidget.h"
#include "settingskey.h" #include "settingskey.h"
#include "utils.h" #include "utils.h"
...@@ -140,10 +136,11 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -140,10 +136,11 @@ MainWindow::MainWindow(QWidget* parent)
connect(&GlobalSystemTray::instance(), SIGNAL(messageClicked()), this, SLOT(notificationClicked())); connect(&GlobalSystemTray::instance(), SIGNAL(messageClicked()), this, SLOT(notificationClicked()));
connect(&netManager_, &QNetworkConfigurationManager::onlineStateChanged, [=](bool online) { connect(&netManager_, &QNetworkConfigurationManager::onlineStateChanged,
Q_UNUSED(online) [=](bool online) {
AccountModel::instance().slotConnectivityChanged(); Q_UNUSED(online);
}); LRCInstance::connectivityChanged();
});
auto flags_ = windowFlags(); auto flags_ = windowFlags();
......
...@@ -306,7 +306,7 @@ NewWizardWidget::timeoutNameLookupTimer() ...@@ -306,7 +306,7 @@ NewWizardWidget::timeoutNameLookupTimer()
{ {
if (ui->signUpCheckbox->isChecked() && !ui->usernameEdit->text().isEmpty()) { if (ui->signUpCheckbox->isChecked() && !ui->usernameEdit->text().isEmpty()) {
updateNameRegistrationUi(NameRegistrationUIState::SEARCHING); updateNameRegistrationUi(NameRegistrationUIState::SEARCHING);
NameDirectory::instance().lookupName(nullptr, QString(), registeredName_); NameDirectory::instance().lookupName(QString(), registeredName_);
} }
} }
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "lrcinstance.h" #include "lrcinstance.h"
#include "navwidget.h" #include "navwidget.h"
#include "namedirectory.h"
namespace Ui { namespace Ui {
class NewWizardWidget; class NewWizardWidget;
} }
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
#include <QBuffer> #include <QBuffer>
#include <QPainter> #include <QPainter>
#include "person.h"
#include "call.h"
#include "contactmethod.h"
#include "globalinstances.h" #include "globalinstances.h"
// new LRC // new LRC
...@@ -44,40 +41,6 @@ ...@@ -44,40 +41,6 @@
#include "ringthemeutils.h" #include "ringthemeutils.h"
#undef interface #undef interface
QVariant
PixbufManipulator::callPhoto(Call* c, const QSize& size, bool displayPresence)
{
if (!c || c->type() == Call::Type::CONFERENCE){
return QVariant::fromValue(Utils::fallbackAvatar(size,
c->peerContactMethod()->uri().full(),
c->peerContactMethod()->bestName()));
}
return callPhoto(c->peerContactMethod(), size, displayPresence);
}
QVariant
PixbufManipulator::callPhoto(const ContactMethod* cm, const QSize& size, bool displayPresence)
{
if (cm && cm->contact()) {
return contactPhoto(cm->contact(), size, displayPresence);
} else {
return QVariant::fromValue(Utils::fallbackAvatar(size, cm));
}
}
QVariant
PixbufManipulator::contactPhoto(Person* p, const QSize& size, bool displayPresence)
{
Q_UNUSED(displayPresence);
QImage photo;
if (p->photo().isValid()) {
photo = p->photo().value<QImage>();
} else {
photo = Utils::fallbackAvatar(IMAGE_SIZE, p->phoneNumbers().at(0));
}
return QVariant::fromValue(Utils::scaleAndFrame(photo, size));
}
QVariant PixbufManipulator::personPhoto(const QByteArray& data, const QString& type) QVariant PixbufManipulator::personPhoto(const QByteArray& data, const QString& type)
{ {
QImage avatar; QImage avatar;
...@@ -99,13 +62,6 @@ PixbufManipulator::numberCategoryIcon(const QVariant& p, const QSize& size, bool ...@@ -99,13 +62,6 @@ PixbufManipulator::numberCategoryIcon(const QVariant& p, const QSize& size, bool
return QVariant(); return QVariant();
} }
QVariant
PixbufManipulator::securityIssueIcon(const QModelIndex& index)
{
Q_UNUSED(index)
return QVariant();
}
QByteArray QByteArray
PixbufManipulator::toByteArray(const QVariant& pxm) PixbufManipulator::toByteArray(const QVariant& pxm)
{ {
...@@ -114,19 +70,6 @@ PixbufManipulator::toByteArray(const QVariant& pxm) ...@@ -114,19 +70,6 @@ PixbufManipulator::toByteArray(const QVariant& pxm)
return ba; return ba;
} }
QVariant
PixbufManipulator::collectionIcon(const CollectionInterface* colItf, PixmapManipulatorI::CollectionIconHint hint) const
{
Q_UNUSED(colItf)
Q_UNUSED(hint)
return QVariant();
}
QVariant
PixbufManipulator::securityLevelIcon(const SecurityEvaluationModel::SecurityLevel level) const
{
Q_UNUSED(level)
return QVariant();
}
QVariant QVariant
PixbufManipulator::userActionIcon(const UserActionElement& state) const PixbufManipulator::userActionIcon(const UserActionElement& state) const
{ {
...@@ -140,48 +83,6 @@ QVariant PixbufManipulator::decorationRole(const QModelIndex& index) ...@@ -140,48 +83,6 @@ QVariant PixbufManipulator::decorationRole(const QModelIndex& index)
return QVariant(); return QVariant();
} }
QVariant PixbufManipulator::decorationRole(const Call* c)
{
QImage photo;
if (c && c->peerContactMethod()
&& c->peerContactMethod()->contact()
&& c->peerContactMethod()->contact()->photo().isValid()) {
photo = c->peerContactMethod()->contact()->photo().value<QImage>();
} else {
Utils::fallbackAvatar(IMAGE_SIZE, c->peerContactMethod());
}
return QVariant::fromValue(Utils::scaleAndFrame(photo, IMAGE_SIZE));
}
QVariant PixbufManipulator::decorationRole(const ContactMethod* cm)
{
QImage photo;
if (cm && cm->contact()
&& cm->contact()->photo().isValid()) {
photo = cm->contact()->photo().value<QImage>();
} else {
photo = Utils::fallbackAvatar(IMAGE_SIZE, cm);
}
return QVariant::fromValue(Utils::scaleAndFrame(photo, IMAGE_SIZE));
}
QVariant PixbufManipulator::decorationRole(const Person* p)
{
QImage photo;
if (p && p->photo().isValid()) {
photo = p->photo().value<QImage>();
} else {
photo = Utils::fallbackAvatar(IMAGE_SIZE, p->phoneNumbers().at(0));
}
return QVariant::fromValue(Utils::scaleAndFrame(photo, IMAGE_SIZE));
}
QVariant PixbufManipulator::decorationRole(const Account* acc)
{
Q_UNUSED(acc);
return QVariant();
}
QVariant QVariant
PixbufManipulator::decorationRole(const lrc::api::conversation::Info & conversationInfo, PixbufManipulator::decorationRole(const lrc::api::conversation::Info & conversationInfo,
const lrc::api::account::Info & accountInfo) const lrc::api::account::Info & accountInfo)
......
...@@ -31,25 +31,13 @@ QByteArray QImageToByteArray(QImage image); ...@@ -31,25 +31,13 @@ QByteArray QImageToByteArray(QImage image);
class PixbufManipulator : public Interfaces::PixmapManipulatorI { class PixbufManipulator : public Interfaces::PixmapManipulatorI {
public: public:
QVariant callPhoto(Call* c, const QSize& size, bool displayPresence = true) override;
QVariant callPhoto(const ContactMethod* n, const QSize& size, bool displayPresence = true) override;
QVariant contactPhoto(Person* c, const QSize& size, bool displayPresence = true) override;
QVariant personPhoto(const QByteArray& data, const QString& type = "PNG") override; QVariant personPhoto(const QByteArray& data, const QString& type = "PNG") override;
/* TODO: the following methods return an empty QVariant/QByteArray */ /* TODO: the following methods return an empty QVariant/QByteArray */
QVariant numberCategoryIcon(const QVariant& p, const QSize& size, bool displayPresence = false, bool isPresent = false) override; QVariant numberCategoryIcon(const QVariant& p, const QSize& size, bool displayPresence = false, bool isPresent = false) override;
QVariant securityIssueIcon(const QModelIndex& index) override;
QByteArray toByteArray(const QVariant& pxm) override; QByteArray toByteArray(const QVariant& pxm) override;
QVariant collectionIcon(const CollectionInterface* colItf,
Interfaces::PixmapManipulatorI::CollectionIconHint hint =
Interfaces::PixmapManipulatorI::CollectionIconHint::NONE) const override;
QVariant securityLevelIcon(const SecurityEvaluationModel::SecurityLevel level) const override;
QVariant userActionIcon(const UserActionElement& state) const override; QVariant userActionIcon(const UserActionElement& state) const override;
QVariant decorationRole(const QModelIndex& index) override; QVariant decorationRole(const QModelIndex& index) override;
QVariant decorationRole(const Call* c) override;
QVariant decorationRole(const ContactMethod* cm) override;
QVariant decorationRole(const Person* p) override;
QVariant decorationRole(const Account* acc) override;
QVariant decorationRole(const lrc::api::conversation::Info& conversation, QVariant decorationRole(const lrc::api::conversation::Info& conversation,
const lrc::api::account::Info& accountInfo) override; const lrc::api::account::Info& accountInfo) override;
}; };
...@@ -306,7 +306,6 @@ ...@@ -306,7 +306,6 @@
<ClCompile Include="updateconfirmdialog.cpp" /> <ClCompile Include="updateconfirmdialog.cpp" />
<ClCompile Include="videowidget.cpp" /> <ClCompile Include="videowidget.cpp" />
<ClCompile Include="webchathelpers.cpp" /> <ClCompile Include="webchathelpers.cpp" />
<ClCompile Include="windowscontactbackend.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<QtMoc Include="aboutdialog.h"> <QtMoc Include="aboutdialog.h">
...@@ -502,7 +501,6 @@ ...@@ -502,7 +501,6 @@
</QtMoc> </QtMoc>
<ClInclude Include="version.h" /> <ClInclude Include="version.h" />
<ClInclude Include="webchathelpers.h" /> <ClInclude Include="webchathelpers.h" />
<ClInclude Include="windowscontactbackend.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt"> <CustomBuild Include="debug\moc_predefs.h.cbt">
......
...@@ -108,9 +108,6 @@ ...@@ -108,9 +108,6 @@
<ClCompile Include="videowidget.cpp"> <ClCompile Include="videowidget.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="windowscontactbackend.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="smartlistview.cpp"> <ClCompile Include="smartlistview.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
...@@ -266,9 +263,6 @@ ...@@ -266,9 +263,6 @@
<QtMoc Include="videowidget.h"> <QtMoc Include="videowidget.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
<ClInclude Include="windowscontactbackend.h">
<Filter>Header Files</Filter>
</ClInclude>
<QtMoc Include="smartlistmodel.h"> <QtMoc Include="smartlistmodel.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</QtMoc> </QtMoc>
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include "banneditemwidget.h" #include "banneditemwidget.h"
#include "version.h" #include "version.h"
#include "namedirectory.h"
#include "api/newdevicemodel.h" #include "api/newdevicemodel.h"
#include "media/recordingmodel.h"
#include <QFileDialog> #include <QFileDialog>
#include <QInputDialog> #include <QInputDialog>
...@@ -389,7 +389,7 @@ void SettingsWidget::receiveRegNameSlot(const std::string& accountID, ...@@ -389,7 +389,7 @@ void SettingsWidget::receiveRegNameSlot(const std::string& accountID,
void SettingsWidget::beforeNameLookup() void SettingsWidget::beforeNameLookup()
{ {
NameDirectory::instance().lookupName(nullptr, QString(), registeredName_); NameDirectory::instance().lookupName(QString(), registeredName_);
} }
void SettingsWidget::afterNameLookup(lrc::api::account::LookupStatus status, const std::string& regName) void SettingsWidget::afterNameLookup(lrc::api::account::LookupStatus status, const std::string& regName)
...@@ -765,8 +765,6 @@ void SettingsWidget::setConnections() ...@@ -765,8 +765,6 @@ void SettingsWidget::setConnections()
connect(ui->downloadButton, &QAbstractButton::clicked, this, &SettingsWidget::openDownloadFolderSlot); connect(ui->downloadButton, &QAbstractButton::clicked, this, &SettingsWidget::openDownloadFolderSlot);
connect(ui->alwaysRecordingCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetAlwaysRecording);
connect(ui->checkUpdateButton, &QAbstractButton::clicked, this, &SettingsWidget::checkForUpdateSlot); connect(ui->checkUpdateButton, &QAbstractButton::clicked, this, &SettingsWidget::checkForUpdateSlot);
connect(ui->autoUpdateCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetUpdateAutomatic); connect(ui->autoUpdateCheckBox, &QAbstractButton::clicked, this, &SettingsWidget::slotSetUpdateAutomatic);
...@@ -797,14 +795,14 @@ void SettingsWidget::populateGeneralSettings() ...@@ -797,14 +795,14 @@ void SettingsWidget::populateGeneralSettings()
ui->notificationCheckBox->setChecked(notifs); ui->notificationCheckBox->setChecked(notifs);
//recordings //recordings
ui->alwaysRecordingCheckBox->setChecked(media::RecordingModel::instance().isAlwaysRecording()); if (LRCInstance::avModel().getRecordPath().empty()) {
QString recordPath = QDir::toNativeSeparators(
if (media::RecordingModel::instance().recordPath().isEmpty()) { QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
QString recordPath = QDir::toNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)); LRCInstance::avModel().setRecordPath(recordPath.toStdString());
media::RecordingModel::instance().setRecordPath(recordPath);
} }
Utils::setElidedText(ui->recordPathButton, media::RecordingModel::instance().recordPath()); Utils::setElidedText(ui->recordPathButton,
QString::fromStdString(LRCInstance::avModel().getRecordPath()));
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
ui->autoUpdateCheckBox->setChecked(settings.value(SettingsKey::autoUpdate).toBool()); ui->autoUpdateCheckBox->setChecked(settings.value(SettingsKey::autoUpdate).toBool());
...@@ -851,19 +849,20 @@ void SettingsWidget::openDownloadFolderSlot() ...@@ -851,19 +849,20 @@ void SettingsWidget::openDownloadFolderSlot()
} }
} }
void SettingsWidget::slotSetAlwaysRecording(bool state)
{
media::RecordingModel::instance().setAlwaysRecording(state);
}
void SettingsWidget::openRecordFolderSlot() void SettingsWidget::openRecordFolderSlot()
{ {
QString dir = QFileDialog::getExistingDirectory(this, tr("Select A Folder For Your Recordings"), QString dir = QFileDialog::getExistingDirectory(
media::RecordingModel::instance().recordPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); this,
tr("Select A Folder For Your Recordings"),
QString::fromStdString(LRCInstance::avModel().getRecordPath()),
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks
);
if (!dir.isEmpty()) { if (!dir.isEmpty()) {
media::RecordingModel::instance().setRecordPath(dir); LRCInstance::avModel().setRecordPath(dir.toStdString());
Utils::setElidedText(ui->recordPathButton, media::RecordingModel::instance().recordPath()); Utils::setElidedText(ui->recordPathButton,
QString::fromStdString(LRCInstance::avModel().getRecordPath())
);
} }
} }
......
...@@ -129,7 +129,6 @@ private slots: ...@@ -129,7 +129,6 @@ private slots:
void checkForUpdateSlot(); void checkForUpdateSlot();
void slotSetClosedOrMin(bool state); void slotSetClosedOrMin(bool state);
void openDownloadFolderSlot(); void openDownloadFolderSlot();
void slotSetAlwaysRecording(bool state);
void openRecordFolderSlot(); void openRecordFolderSlot();
void slotSetUpdateAutomatic(bool state); void slotSetUpdateAutomatic(bool state);
void outputDevIndexChangedSlot(int index); void outputDevIndexChangedSlot(int index);
......
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
</size> </size>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>3</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="generalSettings"> <widget class="QWidget" name="generalSettings">
<property name="sizePolicy"> <property name="sizePolicy">
...@@ -867,46 +867,6 @@ ...@@ -867,46 +867,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_30">
<property name="spacing">
<number>12</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="ToggleSwitch" name="alwaysRecordingCheckBox" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text" stdset="0">
<string>Always Recording</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
...@@ -1250,7 +1210,7 @@ ...@@ -1250,7 +1210,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>749</width> <width>705</width>
<height>1387</height> <height>1387</height>
</rect> </rect>
</property> </property>
...@@ -2573,7 +2533,7 @@ ...@@ -2573,7 +2533,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>749</width> <width>683</width>
<height>864</height> <height>864</height>
</rect> </rect>
</property> </property>
...@@ -3941,18 +3901,18 @@ ...@@ -3941,18 +3901,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item>
<widget class="ToggleSwitch" name="hardwareAccelCheckBox" native="false"> <widget class="ToggleSwitch" name="hardwareAccelCheckBox" native="true">
<property name="font"> <property name="font">
<font> <font>
<pointsize>11</pointsize> <pointsize>11</pointsize>
</font> </font>
</property> </property>
<property name="text" stdset="0"> <property name="text" stdset="0">
<string>Enable hardware acceleration</string> <string>Enable hardware acceleration</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_24"> <spacer name="verticalSpacer_24">
<property name="orientation"> <property name="orientation">
......
...@@ -623,23 +623,6 @@ Utils::fallbackAvatar(const QSize size, const QString& canonicalUriStr, const QS ...@@ -623,23 +623,6 @@ Utils::fallbackAvatar(const QSize size, const QString& canonicalUriStr, const QS
return avatar; return avatar;
} }
QImage
Utils::fallbackAvatar(const QSize size, const ContactMethod* cm)
{
if (cm == nullptr) {
return QImage();
}
QImage image;
auto letterStr = QString();
if (cm->uri().userinfo() != cm->bestName()) {
letterStr = cm->bestName();
}
image = fallbackAvatar(size,
cm->uri().full(),
letterStr);
return image;
}
QImage QImage
Utils::fallbackAvatar(const QSize size, const std::string& alias, const std::string& uri) Utils::fallbackAvatar(const QSize size, const std::string& alias, const std::string& uri)
{ {
......
...@@ -42,11 +42,10 @@ ...@@ -42,11 +42,10 @@
#define LPCWSTR char* #define LPCWSTR char*
#endif #endif
#include <api/conversationmodel.h> #include "api/conversationmodel.h"
#include <api/account.h> #include "api/account.h"
#include <api/contactmodel.h> #include "api/contactmodel.h"
#include <api/contact.h> #include "api/contact.h"
#include <contactmethod.h>
static const QSize IMAGE_SIZE{ 128, 128 }; static const QSize IMAGE_SIZE{ 128, 128 };
...@@ -96,7 +95,6 @@ QImage getCirclePhoto(const QImage original, int sizePhoto); ...@@ -96,7 +95,6 @@ QImage getCirclePhoto(const QImage original, int sizePhoto);
QImage conversationPhoto(const std::string& convUid, const lrc::api::account::Info& accountInfo); QImage conversationPhoto(const std::string& convUid, const lrc::api::account::Info& accountInfo);
QColor getAvatarColor(const QString& canonicalUri); QColor getAvatarColor(const QString& canonicalUri);
QImage fallbackAvatar(const QSize size, const QString& canonicalUriStr, const QString& letterStr = QString()); QImage fallbackAvatar(const QSize size, const QString& canonicalUriStr, const QString& letterStr = QString());
QImage fallbackAvatar(const QSize size, const ContactMethod* cm);
QImage fallbackAvatar(const QSize size, const std::string& alias, const std::string& uri); QImage fallbackAvatar(const QSize size, const std::string& alias, const std::string& uri);
QByteArray QImageToByteArray(QImage image); QByteArray QImageToByteArray(QImage image);
QByteArray QByteArrayFromFile(const QString& filename); QByteArray QByteArrayFromFile(const QString& filename);
......
...@@ -22,11 +22,6 @@ ...@@ -22,11 +22,6 @@
#include <QTime> #include <QTime>
// LRC
#include "callmodel.h"
#include "person.h"
#include "account.h"
#include "lrcinstance.h" #include "lrcinstance.h"
#include "utils.h" #include "utils.h"
...@@ -46,6 +41,8 @@ VideoOverlay::VideoOverlay(QWidget* parent) : ...@@ -46,6 +41,8 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
ui->noMicButton->setCheckable(true); ui->noMicButton->setCheckable(true);
ui->onHoldLabel->setVisible(false); ui->onHoldLabel->setVisible(false);
ui->recButton->setVisible(false);
} }
VideoOverlay::~VideoOverlay() VideoOverlay::~VideoOverlay()
......
...@@ -23,11 +23,6 @@ ...@@ -23,11 +23,6 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include "callmodel.h"
#include "video/devicemodel.h"
#include "video/sourcemodel.h"
#include "media/video.h"