From b121c6c72b44990992e71b432e8d995ae938308c Mon Sep 17 00:00:00 2001 From: Sonu Lohani Date: Fri, 29 Jan 2021 19:24:02 +0530 Subject: [PATCH] Fix clang format --- src/utils/screenshotsaver.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/utils/screenshotsaver.cpp b/src/utils/screenshotsaver.cpp index 8f26795f..35f1edbb 100644 --- a/src/utils/screenshotsaver.cpp +++ b/src/utils/screenshotsaver.cpp @@ -52,20 +52,19 @@ void ScreenshotSaver::saveToClipboard(const QPixmap& capture) // Otherwise only save to clipboard else { SystemNotification().sendMessage( - QObject::tr("Capture saved to clipboard")); + QObject::tr("Capture saved to clipboard")); QByteArray array; - QBuffer buffer{&array}; - QImageWriter imageWriter{&buffer, "JPG"}; + QBuffer buffer{ &array }; + QImageWriter imageWriter{ &buffer, "JPG" }; imageWriter.write(capture.toImage()); QPixmap jpgPixmap; bool isLoaded = jpgPixmap.loadFromData( - reinterpret_cast(array.data()), array.size(), "JPG"); - if(isLoaded) { + reinterpret_cast(array.data()), array.size(), "JPG"); + if (isLoaded) { QApplication::clipboard()->setPixmap(jpgPixmap); - } - else { + } else { QApplication::clipboard()->setPixmap(capture); } }