qcam: Drop Qt version checks
diff mbox series

Message ID 20240910234416.28374-1-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • qcam: Drop Qt version checks
Related show

Commit Message

Laurent Pinchart Sept. 10, 2024, 11:44 p.m. UTC
The Qt version checks to support different minor Qt5 versions are not
needed anymore, now that we switched to Qt6. Drop them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/apps/qcam/main_window.cpp   | 10 ----------
 src/apps/qcam/viewfinder_qt.cpp |  4 ----
 2 files changed, 14 deletions(-)


base-commit: f75b8dd26feaca86701704390dea18c71e2f0350

Comments

Umang Jain Sept. 11, 2024, 4:35 a.m. UTC | #1
Hi Laurent

Thanks for the patch

On 11/09/24 5:14 am, Laurent Pinchart wrote:
> The Qt version checks to support different minor Qt5 versions are not
> needed anymore, now that we switched to Qt6. Drop them.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/apps/qcam/main_window.cpp   | 10 ----------
>   src/apps/qcam/viewfinder_qt.cpp |  4 ----
>   2 files changed, 14 deletions(-)
>
> diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
> index d515beeda275..dd2aa19618a1 100644
> --- a/src/apps/qcam/main_window.cpp
> +++ b/src/apps/qcam/main_window.cpp
> @@ -37,16 +37,6 @@
>   
>   using namespace libcamera;
>   
> -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
> -/*
> - * Qt::fixed was introduced in v5.14, and ::fixed deprecated in v5.15. Allow
> - * usage of Qt::fixed unconditionally.
> - */
> -namespace Qt {
> -constexpr auto fixed = ::fixed;
> -} /* namespace Qt */
> -#endif
> -
>   /**
>    * \brief Custom QEvent to signal capture completion
>    */
> diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
> index b0d63f3fa5ea..e7bd8af941f3 100644
> --- a/src/apps/qcam/viewfinder_qt.cpp
> +++ b/src/apps/qcam/viewfinder_qt.cpp
> @@ -27,15 +27,11 @@
>   
>   static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
>   {
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
>   	{ libcamera::formats::ABGR8888, QImage::Format_RGBX8888 },
>   	{ libcamera::formats::XBGR8888, QImage::Format_RGBX8888 },
> -#endif
>   	{ libcamera::formats::ARGB8888, QImage::Format_RGB32 },
>   	{ libcamera::formats::XRGB8888, QImage::Format_RGB32 },
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
>   	{ libcamera::formats::RGB888, QImage::Format_BGR888 },
> -#endif
>   	{ libcamera::formats::BGR888, QImage::Format_RGB888 },
>   	{ libcamera::formats::RGB565, QImage::Format_RGB16 },
>   };
>
> base-commit: f75b8dd26feaca86701704390dea18c71e2f0350
Kieran Bingham Sept. 11, 2024, 7:54 a.m. UTC | #2
Quoting Laurent Pinchart (2024-09-11 00:44:16)
> The Qt version checks to support different minor Qt5 versions are not
> needed anymore, now that we switched to Qt6. Drop them.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/apps/qcam/main_window.cpp   | 10 ----------
>  src/apps/qcam/viewfinder_qt.cpp |  4 ----
>  2 files changed, 14 deletions(-)
> 
> diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
> index d515beeda275..dd2aa19618a1 100644
> --- a/src/apps/qcam/main_window.cpp
> +++ b/src/apps/qcam/main_window.cpp
> @@ -37,16 +37,6 @@
>  
>  using namespace libcamera;
>  
> -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
> -/*
> - * Qt::fixed was introduced in v5.14, and ::fixed deprecated in v5.15. Allow
> - * usage of Qt::fixed unconditionally.
> - */
> -namespace Qt {
> -constexpr auto fixed = ::fixed;
> -} /* namespace Qt */
> -#endif
> -
>  /**
>   * \brief Custom QEvent to signal capture completion
>   */
> diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
> index b0d63f3fa5ea..e7bd8af941f3 100644
> --- a/src/apps/qcam/viewfinder_qt.cpp
> +++ b/src/apps/qcam/viewfinder_qt.cpp
> @@ -27,15 +27,11 @@
>  
>  static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
>  {
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
>         { libcamera::formats::ABGR8888, QImage::Format_RGBX8888 },
>         { libcamera::formats::XBGR8888, QImage::Format_RGBX8888 },
> -#endif
>         { libcamera::formats::ARGB8888, QImage::Format_RGB32 },
>         { libcamera::formats::XRGB8888, QImage::Format_RGB32 },
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
>         { libcamera::formats::RGB888, QImage::Format_BGR888 },
> -#endif
>         { libcamera::formats::BGR888, QImage::Format_RGB888 },
>         { libcamera::formats::RGB565, QImage::Format_RGB16 },
>  };
> 
> base-commit: f75b8dd26feaca86701704390dea18c71e2f0350
> -- 
> Regards,
> 
> Laurent Pinchart
>
Neal Gompa Sept. 11, 2024, 1:47 p.m. UTC | #3
On Wed, Sep 11, 2024 at 1:44 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> The Qt version checks to support different minor Qt5 versions are not
> needed anymore, now that we switched to Qt6. Drop them.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/apps/qcam/main_window.cpp   | 10 ----------
>  src/apps/qcam/viewfinder_qt.cpp |  4 ----
>  2 files changed, 14 deletions(-)
>
> diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
> index d515beeda275..dd2aa19618a1 100644
> --- a/src/apps/qcam/main_window.cpp
> +++ b/src/apps/qcam/main_window.cpp
> @@ -37,16 +37,6 @@
>
>  using namespace libcamera;
>
> -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
> -/*
> - * Qt::fixed was introduced in v5.14, and ::fixed deprecated in v5.15. Allow
> - * usage of Qt::fixed unconditionally.
> - */
> -namespace Qt {
> -constexpr auto fixed = ::fixed;
> -} /* namespace Qt */
> -#endif
> -
>  /**
>   * \brief Custom QEvent to signal capture completion
>   */
> diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
> index b0d63f3fa5ea..e7bd8af941f3 100644
> --- a/src/apps/qcam/viewfinder_qt.cpp
> +++ b/src/apps/qcam/viewfinder_qt.cpp
> @@ -27,15 +27,11 @@
>
>  static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
>  {
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
>         { libcamera::formats::ABGR8888, QImage::Format_RGBX8888 },
>         { libcamera::formats::XBGR8888, QImage::Format_RGBX8888 },
> -#endif
>         { libcamera::formats::ARGB8888, QImage::Format_RGB32 },
>         { libcamera::formats::XRGB8888, QImage::Format_RGB32 },
> -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
>         { libcamera::formats::RGB888, QImage::Format_BGR888 },
> -#endif
>         { libcamera::formats::BGR888, QImage::Format_RGB888 },
>         { libcamera::formats::RGB565, QImage::Format_RGB16 },
>  };
>
> base-commit: f75b8dd26feaca86701704390dea18c71e2f0350

Reviewed-by: Neal Gompa <neal@gompa.dev>

Patch
diff mbox series

diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
index d515beeda275..dd2aa19618a1 100644
--- a/src/apps/qcam/main_window.cpp
+++ b/src/apps/qcam/main_window.cpp
@@ -37,16 +37,6 @@ 
 
 using namespace libcamera;
 
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
-/*
- * Qt::fixed was introduced in v5.14, and ::fixed deprecated in v5.15. Allow
- * usage of Qt::fixed unconditionally.
- */
-namespace Qt {
-constexpr auto fixed = ::fixed;
-} /* namespace Qt */
-#endif
-
 /**
  * \brief Custom QEvent to signal capture completion
  */
diff --git a/src/apps/qcam/viewfinder_qt.cpp b/src/apps/qcam/viewfinder_qt.cpp
index b0d63f3fa5ea..e7bd8af941f3 100644
--- a/src/apps/qcam/viewfinder_qt.cpp
+++ b/src/apps/qcam/viewfinder_qt.cpp
@@ -27,15 +27,11 @@ 
 
 static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
 {
-#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
 	{ libcamera::formats::ABGR8888, QImage::Format_RGBX8888 },
 	{ libcamera::formats::XBGR8888, QImage::Format_RGBX8888 },
-#endif
 	{ libcamera::formats::ARGB8888, QImage::Format_RGB32 },
 	{ libcamera::formats::XRGB8888, QImage::Format_RGB32 },
-#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
 	{ libcamera::formats::RGB888, QImage::Format_BGR888 },
-#endif
 	{ libcamera::formats::BGR888, QImage::Format_RGB888 },
 	{ libcamera::formats::RGB565, QImage::Format_RGB16 },
 };