diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-09-25 13:52:58 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-09-30 10:56:48 +0300 |
commit | 2e47324860bcbcc7b317efa66673201877583b3e (patch) | |
tree | 6686fd3d2e260c48845427f59f8275f62e8981af /src/apps/qcam | |
parent | 761545407c7666063f4c98d92a17af2a2c790b08 (diff) |
apps: Replace HAVE_DNG with HAVE_TIFF
Support for DNG capture is conditioned by the availability of libtiff,
which is indicated by the HAVE_TIFF macro set by meson. The dng_writer.h
header then defines HAVE_DNG, which is used in a couple of places to
conditionally compile DNG-related code. Most of the other locations
where conditional compilation is required use HAVE_TIFF.
Using both HAVE_TIFF and HAVE_DNG is confusing. HAVE_DNG would be a
better name, but as the macro is defined in dng_writer.h, it would
require all files that need to test for DNG support to include that
header. Failure to include it (directly or indirectly) would result in
the code covered by the macro to be silently disabled.
To avoid the confusion, standardize on using HAVE_TIFF everywhere and
drop HAVE_DNG.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src/apps/qcam')
-rw-r--r-- | src/apps/qcam/main_window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp index dd2aa196..5144c6b3 100644 --- a/src/apps/qcam/main_window.cpp +++ b/src/apps/qcam/main_window.cpp @@ -211,7 +211,7 @@ int MainWindow::createToolbars() action->setShortcut(QKeySequence::SaveAs); connect(action, &QAction::triggered, this, &MainWindow::saveImageAs); -#ifdef HAVE_DNG +#ifdef HAVE_TIFF /* Save Raw action. */ action = toolbar_->addAction(QIcon::fromTheme("camera-photo", QIcon(":aperture.svg")), @@ -646,7 +646,7 @@ void MainWindow::captureRaw() void MainWindow::processRaw(FrameBuffer *buffer, [[maybe_unused]] const ControlList &metadata) { -#ifdef HAVE_DNG +#ifdef HAVE_TIFF QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); QString filename = QFileDialog::getSaveFileName(this, "Save DNG", defaultPath, "DNG Files (*.dng)"); |