LibrePCB Developers Documentation
QtCompat Class Referencefinal

Qt compatibility helper class. More...

#include <qtcompat.h>

+ Collaboration diagram for QtCompat:

Public Types

using Hash = uint
 Return type of Qt's qHash() function. More...
 

Public Member Functions

 QtCompat ()=delete
 
 QtCompat (const QtCompat &other)=delete
 
 ~QtCompat ()=delete
 
QtCompatoperator= (const QtCompat &rhs)=delete
 

Static Public Member Functions

static constexpr Qt::SplitBehavior keepEmptyParts () noexcept
 String split behavior. More...
 
static constexpr Qt::SplitBehavior skipEmptyParts () noexcept
 
static QStringRef midRef (const QString &s, int pos, int n=-1) noexcept
 Wrapper for QString::midRef() More...
 

Detailed Description

Qt compatibility helper class.

This class provides some helpers to simplify keeping compatibility with various Qt versions without getting deprecation warnings.

Member Typedef Documentation

◆ Hash

using Hash = uint

Return type of Qt's qHash() function.

Constructor & Destructor Documentation

◆ QtCompat() [1/2]

QtCompat ( )
delete

◆ QtCompat() [2/2]

QtCompat ( const QtCompat other)
delete

◆ ~QtCompat()

~QtCompat ( )
delete

Member Function Documentation

◆ operator=()

QtCompat & operator= ( const QtCompat rhs)
delete

◆ keepEmptyParts()

static constexpr Qt::SplitBehavior keepEmptyParts ( )
inlinestaticconstexprnoexcept

String split behavior.

Used for QString::split() which changed its function signature in Qt 5.15.

+ Here is the caller graph for this function:

◆ skipEmptyParts()

static constexpr Qt::SplitBehavior skipEmptyParts ( )
inlinestaticconstexprnoexcept
+ Here is the caller graph for this function:

◆ midRef()

static QStringRef midRef ( const QString &  s,
int  pos,
int  n = -1 
)
inlinestaticnoexcept

Wrapper for QString::midRef()

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: