Comment stuff

This includes:
 - Adding two comments
 - Fixing one spelling mistake.
This commit is contained in:
Mm2PL 2019-10-19 11:41:23 +02:00
parent 77af5d54cf
commit e005fe806a
No known key found for this signature in database
GPG key ID: 1C400DA5602DE62E

View file

@ -42,6 +42,7 @@ boost::optional<QByteArray> convertToPng(QImage image)
} // namespace } // namespace
namespace chatterino { namespace chatterino {
// These variables are only used from the main thread.
bool isUploading = false; bool isUploading = false;
std::queue<TypedBytes> uploadQueue; std::queue<TypedBytes> uploadQueue;
@ -114,6 +115,7 @@ void uploadImageToNuuls(TypedBytes imageData, ChannelPtr channel,
void upload(const QMimeData *source, ChannelPtr channel, void upload(const QMimeData *source, ChannelPtr channel,
ResizingTextEdit &outputTextEdit) ResizingTextEdit &outputTextEdit)
{ {
// There's no need to thread proof this function. It is called only from the main thread.
if (isUploading) if (isUploading)
{ {
channel->addMessage(makeSystemMessage( channel->addMessage(makeSystemMessage(
@ -142,7 +144,7 @@ void upload(const QMimeData *source, ChannelPtr channel,
else if (source->hasUrls()) else if (source->hasUrls())
{ {
// This path gets chosen when files are copied from a file manager, like explorer.exe, caja. // 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()) for (const QUrl &path : source->urls())
{ {
if (!getImageFileFormat(path.toLocalFile()).isEmpty()) if (!getImageFileFormat(path.toLocalFile()).isEmpty())