From 58cfae38abfc903b07f2364d2354f44623e22d25 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Mon, 30 Jun 2014 22:52:03 +0200 Subject: [PATCH] Fix warnings, typos --- core.cpp | 5 +++-- friend.h | 2 +- friendlist.h | 2 +- group.h | 2 +- widget/camera.cpp | 2 +- widget/filetransfertwidget.h | 2 +- widget/form/chatform.h | 2 +- widget/videosurface.cpp | 2 +- widget/widget.cpp | 1 - widget/widget.h | 4 ++-- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core.cpp b/core.cpp index 0999e211b..c322ce11f 100644 --- a/core.cpp +++ b/core.cpp @@ -37,6 +37,7 @@ ToxCall Core::calls[TOXAV_MAX_CALLS]; Core::Core(Camera* cam) : tox(nullptr), camera(cam) { + qDebug() << "A NEW CORE HAS STARTED !"; toxTimer = new QTimer(this); toxTimer->setSingleShot(true); saveTimer = new QTimer(this); @@ -934,7 +935,7 @@ void Core::onAvCancel(int32_t call_index, void* core) emit static_cast(core)->avCancel(friendId, call_index); } -void Core::onAvReject(int32_t call_index, void* core) +void Core::onAvReject(int32_t, void*) { qDebug() << "Core: AV reject"; } @@ -1013,7 +1014,7 @@ void Core::onAvEnding(int32_t call_index, void* core) emit static_cast(core)->avEnding(friendId, call_index); } -void Core::onAvError(int32_t call_index, void* core) +void Core::onAvError(int32_t, void*) { qDebug() << "Core: AV error"; } diff --git a/friend.h b/friend.h index a85f89368..812f5c853 100644 --- a/friend.h +++ b/friend.h @@ -5,7 +5,7 @@ #include "widget/form/chatform.h" #include "status.h" -class FriendWidget; +struct FriendWidget; struct Friend { diff --git a/friendlist.h b/friendlist.h index f053943d4..5af8175cf 100644 --- a/friendlist.h +++ b/friendlist.h @@ -4,7 +4,7 @@ #include #include -class Friend; +struct Friend; class FriendList { diff --git a/group.h b/group.h index 67f5a0e06..0fcf5f7e0 100644 --- a/group.h +++ b/group.h @@ -7,7 +7,7 @@ #define RETRY_PEER_INFO_INTERVAL 500 -class Friend; +struct Friend; class GroupWidget; class GroupChatForm; diff --git a/widget/camera.cpp b/widget/camera.cpp index 9fedc7cf3..892d39b26 100644 --- a/widget/camera.cpp +++ b/widget/camera.cpp @@ -179,7 +179,7 @@ vpx_image Camera::getLastVPXImage() { lastFrame.map(QAbstractVideoBuffer::ReadOnly); int w = lastFrame.width(), h = lastFrame.height(); - int bpl = lastFrame.bytesPerLine(), cxbpl = bpl/2; + int bpl = lastFrame.bytesPerLine(); vpx_image img; vpx_img_alloc(&img, VPX_IMG_FMT_I420, w, h, 1); // I420 == YUV420P, same as YV12 with U and V switched diff --git a/widget/filetransfertwidget.h b/widget/filetransfertwidget.h index a36470d58..1b0cf87c6 100644 --- a/widget/filetransfertwidget.h +++ b/widget/filetransfertwidget.h @@ -11,7 +11,7 @@ #include "core.h" -class ToxFile; +struct ToxFile; class FileTransfertWidget : public QWidget { diff --git a/widget/form/chatform.h b/widget/form/chatform.h index 549db1266..fa7d6f590 100644 --- a/widget/form/chatform.h +++ b/widget/form/chatform.h @@ -19,7 +19,7 @@ // Spacing in px inserted when the author of the last message changes #define AUTHOR_CHANGE_SPACING 5 -class Friend; +struct Friend; class ChatForm : public QObject { diff --git a/widget/videosurface.cpp b/widget/videosurface.cpp index 4803452c2..c0ce530d3 100644 --- a/widget/videosurface.cpp +++ b/widget/videosurface.cpp @@ -21,7 +21,7 @@ bool VideoSurface::start(const QVideoSurfaceFormat &format) } } -bool VideoSurface::present(const QVideoFrame &frame) +bool VideoSurface::present(const QVideoFrame&) { /* mFrame = frame; diff --git a/widget/widget.cpp b/widget/widget.cpp index 5ec471fdf..85f1ad58d 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -44,7 +44,6 @@ Widget::Widget(QWidget *parent) : qRegisterMetaType("ToxFile::FileDirection"); core = new Core(camera); - core = new Core(nullptr); coreThread = new QThread(this); core->moveToThread(coreThread); connect(coreThread, &QThread::started, core, &Core::start); diff --git a/widget/widget.h b/widget/widget.h index 279cf3480..6abdec89a 100644 --- a/widget/widget.h +++ b/widget/widget.h @@ -16,9 +16,9 @@ class Widget; class GroupWidget; class AddFriendForm; class SettingsForm; -class FriendWidget; +struct FriendWidget; class Group; -class Friend; +struct Friend; class Widget : public QWidget {