Skip to content

Commit dc79e45

Browse files
avoid program freeze in --test mode
1 parent 9dc523b commit dc79e45

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

.github/workflows/MSYS2.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ jobs:
6161
- name: '🚦 Test package'
6262
run: |
6363
which beamerpresenter
64+
beamerpresenter --version
6465
dos2unix tests/minimal.pdf
6566
dos2unix tests/minimal.xml
66-
beamerpresenter --test tests/minimal.pdf
67-
beamerpresenter --test tests/minimal.xml
67+
timeout 20 beamerpresenter --test --platform minimal tests/minimal.pdf
68+
timeout 20 beamerpresenter --test --platform minimal tests/minimal.xml

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ When compiling with Poppler:
8585
* `poppler-qt6`
8686

8787
When compiling with MuPDF:
88-
* `libmupdf` (tested versions: 1.16.1 – 1.24.10)
88+
* `libmupdf` (tested versions: 1.16.1 – 1.25.0-rc1)
8989
* `jbig2dec`
9090
* `openjpeg2`
9191
* `gumbo-parser`

packaging/io.github.stiglers_eponym.BeamerPresenter-qt5.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ modules:
3838
- "/bin"
3939
sources:
4040
- type: archive
41-
url: https://poppler.freedesktop.org/poppler-24.10.0.tar.xz
42-
sha256: 58ed1849810f04a10b37c7ff6f3e411845c8a57d731d599d0045acc7a7fff09d
41+
url: https://poppler.freedesktop.org/poppler-24.11.0.tar.xz
42+
sha256: 7723d880565211740c13649d24a300257b86ddd7fa2d208187ff7e5cc8dfbd58
4343
- name: beamerpresenter
4444
buildsystem: cmake-ninja
4545
config-opts:

packaging/io.github.stiglers_eponym.BeamerPresenter-qt6.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ modules:
3838
- "/bin"
3939
sources:
4040
- type: archive
41-
url: https://poppler.freedesktop.org/poppler-24.10.0.tar.xz
42-
sha256: 58ed1849810f04a10b37c7ff6f3e411845c8a57d731d599d0045acc7a7fff09d
41+
url: https://poppler.freedesktop.org/poppler-24.11.0.tar.xz
42+
sha256: 7723d880565211740c13649d24a300257b86ddd7fa2d208187ff7e5cc8dfbd58
4343
- name: beamerpresenter
4444
buildsystem: cmake-ninja
4545
config-opts:

src/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ int main(int argc, char *argv[])
169169
}
170170
}
171171
// Show all windows.
172-
master()->showAll();
172+
if (parser.isSet("test")) {
173+
qInfo() << "Running in test mode.";
174+
qInfo() << "Using GUI config file" << gui_config_file;
175+
qInfo() << "PDF file alias:" << preferences()->file_alias;
176+
} else {
177+
master()->showAll();
178+
}
173179
// Navigate to first page.
174180
master()->navigateToPage(0);
175181
// Distribute cache memory.
@@ -178,13 +184,7 @@ int main(int argc, char *argv[])
178184
&Master::distributeMemory);
179185
// Run the program.
180186
int status = 0;
181-
if (parser.isSet("test")) {
182-
qInfo() << "Test results:";
183-
qInfo() << "GUI config file was:" << gui_config_file;
184-
qInfo() << "PDF file alias:" << preferences()->file_alias;
185-
} else {
186-
status = app.exec();
187-
}
187+
if (!parser.isSet("test")) status = app.exec();
188188
// Clean up. preferences() must be deleted after everything else.
189189
// Deleting master may take some time since this requires the interruption
190190
// and deletion of multiple threads.

0 commit comments

Comments
 (0)