Applied a bit of foutf's suggestions. Replace uploadQueue.size() with .empty() and swap if/else bodies, move non empty queue check outside of the timer on line 60, move getImageFileFormat to an anonymous namespace, rename pasteFromClipoard to upload(), removed usesless comment, shortened message on line 83, use QMimeData.hasUrls() and QMimeData.urls(), moved GIF format case in upload() more to the top, call original functions in canInsertFromMimeData and dragEnterEvent which are overriden
This commit is contained in:
@@ -209,8 +209,7 @@ Split::Split(QWidget *parent)
|
||||
[this] { this->focusLost.invoke(); });
|
||||
this->input_->ui_.textEdit->pastedImage.connect(
|
||||
[this](const QMimeData *source) {
|
||||
pasteFromClipboard(source, this->getChannel(),
|
||||
*this->input_->ui_.textEdit);
|
||||
upload(source, this->getChannel(), *this->input_->ui_.textEdit);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user