You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The provided src/CMakeLists.txt was setup for Qt5, with little adjustments it works perfectly with Qt6.
I set the minimum Qt version to 6.5 since it's the oldest still officially supported, and hence removed the support for Qt5. Anyway, the file could be configured to still support both versions.
Since Qt is also abandoning qmake in favor of cmake, it is crucial to have an updated CMakeLists.txt to build qzxing with cmake.
An upgrade to CMake 3.17 was necessary to solve the following warning:
CMake Warning (dev) in qzxing/src/CMakeLists.txt:
Policy CMP0100 is not set: Let AUTOMOC and AUTOUIC process .hh files. Run "cmake --help-policy CMP0100" for policy details. Use the cmake_policy command to set the policy and suppress this warning. For compatibility, CMake is excluding the header file(s):
"qzxing/src/zxing/bigint/BigInteger.hh"
"qzxing/src/zxing/bigint/BigIntegerAlgorithms.hh"
"qzxing/src/zxing/bigint/BigIntegerLibrary.hh"
"qzxing/src/zxing/bigint/BigIntegerUtils.hh"
"qzxing/src/zxing/bigint/BigUnsigned.hh"
"qzxing/src/zxing/bigint/BigUnsignedInABase.hh"
"qzxing/src/zxing/bigint/NumberlikeArray.hh"
"qzxing/src/zxing/bigint/BigInteger.hh"
"qzxing/src/zxing/bigint/BigIntegerUtils.hh"
"qzxing/src/zxing/bigint/BigUnsigned.hh"
"qzxing/src/zxing/bigint/BigUnsignedInABase.hh"
"qzxing/src/zxing/bigint/BigIntegerAlgorithms.hh"
from processing by AUTOMOC and AUTOUIC. If any of the files should be processed, set CMP0100 to NEW. If any of the files should not be processed, explicitly exclude them by setting the source file property SKIP_AUTOGEN:
set_property(SOURCE file.hh PROPERTY SKIP_AUTOGEN ON)
Updated Qt version to 6.8 since it's the oldest still officially supported.
Added in QZXingFilterVideoSink.h a READ method for the property videoSink to solve the warning
qzxing/src/QZXingFilterVideoSink.h:34:1: warning: Property declaration videoSink has neither an associated QProperty<> member, nor a READ accessor function nor an associated MEMBER variable. The property will be invalid.
Fixed the namespace in ResultIO.cpp to fix the following warning:
qzxing/src/zxing/zxing/ResultIO.cpp:27:10: warning: ‘std::ostream& zxing::operator<<(std::ostream&, zxing::Result&)’ has not been declared within ‘zxing’
In file included from qzxing/src/zxing/zxing/ResultIO.cpp:22:
qzxing/src/zxing/zxing/Result.h:57:24: note: only here as a ‘friend’
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The provided src/CMakeLists.txt was setup for Qt5, with little adjustments it works perfectly with Qt6.
I set the minimum Qt version to 6.5 since it's the oldest still officially supported, and hence removed the support for Qt5. Anyway, the file could be configured to still support both versions.
Since Qt is also abandoning qmake in favor of cmake, it is crucial to have an updated CMakeLists.txt to build qzxing with cmake.