[poppler] .gitlab-ci.yml qt5/demos
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Mar 30 22:08:53 UTC 2022
.gitlab-ci.yml | 2 ++
qt5/demos/viewer.cpp | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit e60280ae8ff3ccfa4da434835e59b682af7ece6b
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Mar 30 23:45:23 2022 +0200
CI: make the libcpp build use C++23
Needs a small cast in the qt5 demo viewer to make the addition of two
different enums "ok"
It will help us make sure we don't do things like std::string s = nullptr; (since that is not possible on C++23)
And also helps us future proof in case something else comes up
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bf2acfa2..020a3bc6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,6 +47,8 @@ build:
build_clang13_libcpp:
stage: build
script:
+ - echo "We want to compile with C++23 here because it has some nice things like deleted std::string nullptr constructor"
+ - sed -i -e "s at CMAKE_CXX_STANDARD 17 at CMAKE_CXX_STANDARD 23 at g" CMakeLists.txt
- git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
- apt-get install --yes --no-install-recommends libclang-13-dev llvm-13-dev libc++-13-dev libc++abi-13-dev clang-tidy-13 clang-13 libunwind-13-dev gperf jq
- srcdir=`pwd` && mkdir -p /tmp/poppler_build && cd /tmp/poppler_build
diff --git a/qt5/demos/viewer.cpp b/qt5/demos/viewer.cpp
index eebd08d1..d21fc3c5 100644
--- a/qt5/demos/viewer.cpp
+++ b/qt5/demos/viewer.cpp
@@ -54,14 +54,14 @@ PdfViewer::PdfViewer(QWidget *parent) : QMainWindow(parent), m_currentPage(0), m
// setup the menus
QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
m_fileOpenAct = fileMenu->addAction(tr("&Open"), this, &PdfViewer::slotOpenFile);
- m_fileOpenAct->setShortcut(Qt::CTRL + Qt::Key_O);
+ m_fileOpenAct->setShortcut(static_cast<int>(Qt::CTRL) + Qt::Key_O);
fileMenu->addSeparator();
m_fileSaveCopyAct = fileMenu->addAction(tr("&Save a Copy..."), this, &PdfViewer::slotSaveCopy);
m_fileSaveCopyAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
m_fileSaveCopyAct->setEnabled(false);
fileMenu->addSeparator();
QAction *act = fileMenu->addAction(tr("&Quit"), qApp, &QApplication::closeAllWindows);
- act->setShortcut(Qt::CTRL + Qt::Key_Q);
+ act->setShortcut(static_cast<int>(Qt::CTRL) + Qt::Key_Q);
QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
More information about the poppler
mailing list