Skip to content

Commit b1a0f40

Browse files
FaraSysborgmanJeremyjustus-springerlhz07gglin001
authored
Sync from original repository (#10)
* Bumped minimum Cmake version to fix build issues on Cmake 4.0. (flameshot-org#3901) * Bumped minimum Cmake version to fix build issues on Cmake 4.0. 3.22 was chosen since that is the version on Ubuntu 22.04 * lowered cmake version to 3.18 for debian bullseye * Add last-region option to manpage and shell completions (flameshot-org#3893) * add --last-region to manpage * Add shell completions for --last-region * Improve the speed of calling grim (flameshot-org#3859) * enable PinWidget scrolling on macos with mouse (flameshot-org#3860) * fix: add missing appstream data for flatpak builder (flameshot-org#3911) Commit updates appstream data to pass strict validation, which is necessary to build new Flatpak versions. Flatpak builder added strict validation and requires "developer" information [1] to be provided. Build error: ``` Run docker run --rm --privileged \ + flatpak-builder-lint --exceptions repo repo { "errors": [ "appstream-missing-developer-name" ], "warnings": [ "appstream-screenshot-missing-caption" ], "info": [ "appstream-screenshot-missing-caption: One or more screenshots are missing captions in the Metainfo file", "appstream-missing-developer-name: No developer tag found in Metainfo file" ], "message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter" } error: Recipe `validate-build` failed with exit code 1 ``` For good measure, captions for the provided screenshots are added. After changes made, `appstreamcli validate` only mentions issue with uppercase cid component which should be kept as is: ```sh $ appstreamcli validate --pedantic data/appdata/org.flameshot.Flameshot.metainfo.xml P: org.flameshot.Flameshot:7: cid-contains-uppercase-letter org.flameshot.Flameshot ✔ Validation was successful: pedantic: 1 ``` [1]: https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#developer-name --------- Co-authored-by: borgmanJeremy <[email protected]> Co-authored-by: Justus Springer <[email protected]> Co-authored-by: lhz07 <[email protected]> Co-authored-by: Allen Guo <[email protected]> Co-authored-by: Matthias Adler <[email protected]>
1 parent fbd3005 commit b1a0f40

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

data/appdata/org.flameshot.Flameshot.metainfo.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ SPDX-License-Identifier: CC0-1.0
88
<metadata_license>CC0-1.0</metadata_license>
99
<project_license>GPL-3.0-or-later</project_license>
1010
<name>Flameshot</name>
11+
<developer id="org.flameshot">
12+
<name>Flameshot Developers</name>
13+
</developer>
1114
<releases>
1215
<release version="12.1.0" date="2022-07-03"/>
1316
<release version="12.0.0" date="2022-06-21"/>
@@ -33,9 +36,11 @@ SPDX-License-Identifier: CC0-1.0
3336
<screenshots>
3437
<screenshot type="default">
3538
<image>https://raw.githubusercontent.com/flameshot-org/flameshot/master/data/img/preview/usageStatic.png</image>
39+
<caption>Flameshot Usage</caption>
3640
</screenshot>
3741
<screenshot>
3842
<image>https://raw.githubusercontent.com/flameshot-org/flameshot/master/data/img/preview/animatedUsage.gif</image>
43+
<caption>Animated Flameshot Usage</caption>
3944
</screenshot>
4045
</screenshots>
4146
<url type="homepage">https://github.com/flameshot-org/flameshot</url>

src/utils/screengrabber.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,17 @@ void ScreenGrabber::generalGrimScreenshot(bool& ok, QPixmap& res)
3131
{
3232
#ifdef USE_WAYLAND_GRIM
3333
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
34+
QString runDir = QProcessEnvironment::systemEnvironment().value("XDG_RUNTIME_DIR");
35+
QString imgPath = runDir + "/flameshot.ppm";
3436
QProcess Process;
3537
QString program = "grim";
3638
QStringList arguments;
37-
arguments << "-";
39+
arguments << "-t" << "ppm" << imgPath;
3840
Process.start(program, arguments);
3941
if (Process.waitForFinished()) {
40-
res.loadFromData(Process.readAll());
42+
res.load(imgPath, "ppm");
43+
QFile imgFile(imgPath);
44+
imgFile.remove();
4145
ok = true;
4246
} else {
4347
ok = false;

0 commit comments

Comments
 (0)