Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
borgmanJeremy committed Nov 13, 2021
1 parent 4e1766e commit 2bf8a92
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/utils/screengrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ void ScreenGrabber::freeDesktopPortal(bool& ok, QPixmap& res)
this);

QEventLoop loop;
const auto gotSignal =
[&res, &loop](uint status, const QVariantMap& map) {
if (status == 0) {
QString uri = map.value("uri").toString().remove(0, 7);
res = QPixmap(uri);
res.setDevicePixelRatio(qApp->devicePixelRatio());
QFile imgFile(uri);
imgFile.remove();
}
loop.quit();
};
const auto gotSignal = [&res, &loop](uint status, const QVariantMap& map) {
if (status == 0) {
QString uri = map.value("uri").toString().remove(0, 7);
res = QPixmap(uri);
res.setDevicePixelRatio(qApp->devicePixelRatio());
QFile imgFile(uri);
imgFile.remove();
}
loop.quit();
};

// prevent racy situations and listen before calling screenshot
QMetaObject::Connection conn = QObject::connect(
Expand Down

0 comments on commit 2bf8a92

Please sign in to comment.