From e005fe806a320ce0aae417e08a160b1abacee3e8 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Sat, 19 Oct 2019 11:41:23 +0200 Subject: [PATCH] Comment stuff This includes: - Adding two comments - Fixing one spelling mistake. --- src/util/NuulsUploader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/NuulsUploader.cpp b/src/util/NuulsUploader.cpp index 8f201f54f..4f167201a 100644 --- a/src/util/NuulsUploader.cpp +++ b/src/util/NuulsUploader.cpp @@ -42,6 +42,7 @@ boost::optional convertToPng(QImage image) } // namespace namespace chatterino { +// These variables are only used from the main thread. bool isUploading = false; std::queue uploadQueue; @@ -114,6 +115,7 @@ void uploadImageToNuuls(TypedBytes imageData, ChannelPtr channel, void upload(const QMimeData *source, ChannelPtr channel, ResizingTextEdit &outputTextEdit) { + // There's no need to thread proof this function. It is called only from the main thread. if (isUploading) { channel->addMessage(makeSystemMessage( @@ -142,7 +144,7 @@ void upload(const QMimeData *source, ChannelPtr channel, else if (source->hasUrls()) { // This path gets chosen when files are copied from a file manager, like explorer.exe, caja. - // Each entry in source->urls() is a QUrl pointng to a file that was copied. + // Each entry in source->urls() is a QUrl pointing to a file that was copied. for (const QUrl &path : source->urls()) { if (!getImageFileFormat(path.toLocalFile()).isEmpty())