diff --git a/src/audio/audiofilterer.h b/src/audio/audiofilterer.h index 7054902a9..73c63f826 100644 --- a/src/audio/audiofilterer.h +++ b/src/audio/audiofilterer.h @@ -30,7 +30,9 @@ class AudioFilterer { public: explicit AudioFilterer() = default; + explicit AudioFilterer(const AudioFilterer&) = delete; ~AudioFilterer(); + AudioFilterer operator=(const AudioFilterer) = delete; void startFilter(unsigned int fs); void closeFilter(); diff --git a/src/core/corefile.cpp b/src/core/corefile.cpp index e104344a3..a25877306 100644 --- a/src/core/corefile.cpp +++ b/src/core/corefile.cpp @@ -166,7 +166,6 @@ void CoreFile::cancelFileSend(Core* core, uint32_t friendId, uint32_t fileId) file->status = ToxFile::STOPPED; emit core->fileTransferCancelled(*file); tox_file_control(core->tox, file->friendId, file->fileNum, TOX_FILE_CONTROL_CANCEL, nullptr); - while (file->sendTimer) QThread::msleep(1); // Wait until sendAllFileData returns before deleting removeFile(friendId, fileId); } diff --git a/src/core/corestructs.cpp b/src/core/corestructs.cpp index f70cc079a..abc5dc695 100644 --- a/src/core/corestructs.cpp +++ b/src/core/corestructs.cpp @@ -9,7 +9,7 @@ ToxFile::ToxFile(uint32_t FileNum, uint32_t FriendId, QByteArray FileName, QString FilePath, FileDirection Direction) : fileKind{TOX_FILE_KIND_DATA}, fileNum(FileNum), friendId(FriendId), fileName{FileName}, filePath{FilePath}, file{new QFile(filePath)}, bytesSent{0}, filesize{0}, - status{STOPPED}, direction{Direction}, sendTimer{nullptr} + status{STOPPED}, direction{Direction} { } diff --git a/src/core/corestructs.h b/src/core/corestructs.h index 644a9dd16..2f8cba0ca 100644 --- a/src/core/corestructs.h +++ b/src/core/corestructs.h @@ -55,7 +55,6 @@ struct ToxFile quint64 filesize; FileStatus status; FileDirection direction; - QTimer* sendTimer; QByteArray avatarData; QByteArray resumeFileId; }; diff --git a/src/widget/form/addfriendform.h b/src/widget/form/addfriendform.h index 22b631170..fb1441979 100644 --- a/src/widget/form/addfriendform.h +++ b/src/widget/form/addfriendform.h @@ -33,6 +33,8 @@ class AddFriendForm : public QObject Q_OBJECT public: AddFriendForm(); + AddFriendForm(const AddFriendForm&) = delete; + AddFriendForm& operator=(const AddFriendForm&) = delete; ~AddFriendForm(); void show(Ui::MainWindow &ui);