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

Fix some warnings

This commit is contained in:
tux3 2015-06-08 11:46:38 +02:00
parent dd6ef8f3c4
commit aeb9a7f62f
No known key found for this signature in database
GPG Key ID: 7E086DD661263264
5 changed files with 5 additions and 3 deletions

View File

@ -30,7 +30,9 @@ class AudioFilterer
{ {
public: public:
explicit AudioFilterer() = default; explicit AudioFilterer() = default;
explicit AudioFilterer(const AudioFilterer&) = delete;
~AudioFilterer(); ~AudioFilterer();
AudioFilterer operator=(const AudioFilterer) = delete;
void startFilter(unsigned int fs); void startFilter(unsigned int fs);
void closeFilter(); void closeFilter();

View File

@ -166,7 +166,6 @@ void CoreFile::cancelFileSend(Core* core, uint32_t friendId, uint32_t fileId)
file->status = ToxFile::STOPPED; file->status = ToxFile::STOPPED;
emit core->fileTransferCancelled(*file); emit core->fileTransferCancelled(*file);
tox_file_control(core->tox, file->friendId, file->fileNum, TOX_FILE_CONTROL_CANCEL, nullptr); 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); removeFile(friendId, fileId);
} }

View File

@ -9,7 +9,7 @@
ToxFile::ToxFile(uint32_t FileNum, uint32_t FriendId, QByteArray FileName, QString FilePath, FileDirection Direction) 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}, : fileKind{TOX_FILE_KIND_DATA}, fileNum(FileNum), friendId(FriendId), fileName{FileName},
filePath{FilePath}, file{new QFile(filePath)}, bytesSent{0}, filesize{0}, filePath{FilePath}, file{new QFile(filePath)}, bytesSent{0}, filesize{0},
status{STOPPED}, direction{Direction}, sendTimer{nullptr} status{STOPPED}, direction{Direction}
{ {
} }

View File

@ -55,7 +55,6 @@ struct ToxFile
quint64 filesize; quint64 filesize;
FileStatus status; FileStatus status;
FileDirection direction; FileDirection direction;
QTimer* sendTimer;
QByteArray avatarData; QByteArray avatarData;
QByteArray resumeFileId; QByteArray resumeFileId;
}; };

View File

@ -33,6 +33,8 @@ class AddFriendForm : public QObject
Q_OBJECT Q_OBJECT
public: public:
AddFriendForm(); AddFriendForm();
AddFriendForm(const AddFriendForm&) = delete;
AddFriendForm& operator=(const AddFriendForm&) = delete;
~AddFriendForm(); ~AddFriendForm();
void show(Ui::MainWindow &ui); void show(Ui::MainWindow &ui);