1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(chatform): change ChatForm's netcam to NetCamView

Unlike GenericChatForm, ChatForm knows that it always has a NetCam
This commit is contained in:
Anthony Bilinski 2020-01-25 23:12:54 -08:00
parent 600993b43a
commit 41d8f66e08
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 4 additions and 3 deletions

View File

@ -478,7 +478,7 @@ void ChatForm::onAvatarChanged(const ToxPk& friendPk, const QPixmap& pic)
headWidget->setAvatar(pic);
}
std::unique_ptr<GenericNetCamView> ChatForm::createNetcam()
std::unique_ptr<NetCamView> ChatForm::createNetcam()
{
qDebug() << "creating netcam";
uint32_t friendId = f->getId();

View File

@ -32,6 +32,7 @@
#include "src/model/status.h"
#include "src/persistence/history.h"
#include "src/widget/tool/screenshotgrabber.h"
#include "src/video/netcamview.h"
class CallConfirmWidget;
class FileTransferInstance;
@ -113,7 +114,7 @@ private:
void hideNetcam();
protected:
std::unique_ptr<GenericNetCamView> createNetcam();
std::unique_ptr<NetCamView> createNetcam();
void insertChatMessage(ChatMessage::Ptr msg) final;
void dragEnterEvent(QDragEnterEvent* ev) final;
void dropEvent(QDropEvent* ev) final;
@ -131,7 +132,7 @@ private:
QAction* copyStatusAction;
bool isTyping;
bool lastCallIsVideo;
std::unique_ptr<GenericNetCamView> netcam;
std::unique_ptr<NetCamView> netcam;
};
#endif // CHATFORM_H