Update to Qt6
- New baseline minimum platform is Ubuntu 22.04
- Qt6 requires at least 6.2
- some deprecations may be flagged on later versions (e.g. 6.8)
- CMake requires at least 3.22
- Include build-tests.yml github action to validate builds on mulitple platforms
- QtTest is no longer optional since it easily comes along for the ride with Qt
- Replaced QStringRef in model::SubstitutionField with simple ParserState class
- Removed deprecations up to Qt 6.2
This commit is contained in:
@@ -80,7 +80,7 @@ namespace glbarcode
|
||||
{
|
||||
for (char c : rawData)
|
||||
{
|
||||
if ( (c < 0) || (c > 0x7F) )
|
||||
if ( c < 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -42,5 +42,5 @@ target_include_directories (glbarcode
|
||||
)
|
||||
|
||||
target_link_libraries (glbarcode
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
+1
-10
@@ -116,16 +116,7 @@ namespace glbarcode
|
||||
/**
|
||||
* Indirection "[]" operator
|
||||
*/
|
||||
inline T* operator[]( int i )
|
||||
{
|
||||
return (mData + (mNx * i));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Indirection "[]" operator
|
||||
*/
|
||||
inline T const*const operator[]( int i ) const
|
||||
inline T* operator[]( int i ) const
|
||||
{
|
||||
return (mData + (mNx * i));
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace glbarcode
|
||||
font.setPointSizeF( FONT_SCALE*size );
|
||||
|
||||
QFontMetricsF fm( font );
|
||||
double xCorner = x - fm.width( QString::fromStdString(text) )/2.0;
|
||||
double xCorner = x - fm.horizontalAdvance( QString::fromStdString(text) )/2.0;
|
||||
double yCorner = y - fm.ascent();
|
||||
|
||||
QTextLayout layout( QString::fromStdString(text), font );
|
||||
|
||||
Reference in New Issue
Block a user