[libcalamares] Reduce warnings in KDAB code

- This is an older copy of kdsingleapplicationguard, now updated for
   C++11 warnings; removed __ in header guards, fixed up last of 0-for-
   nullptr, signedness mismatch.
main
Adriaan de Groot 6 years ago
parent 92b60dac65
commit 27140ff5bb

@ -34,7 +34,7 @@ public:
explicit KDSingleApplicationGuard( QObject * parent=nullptr );
explicit KDSingleApplicationGuard( Policy policy, QObject * parent=nullptr );
explicit KDSingleApplicationGuard( const QStringList & arguments, QObject * parent=nullptr );
explicit KDSingleApplicationGuard( const QStringList & arguments, Policy policy, QObject * parent=0 );
explicit KDSingleApplicationGuard( const QStringList & arguments, Policy policy, QObject * parent=nullptr );
~KDSingleApplicationGuard();
bool isOperational() const;

@ -27,7 +27,7 @@ static Version kdParseQtVersion( const char * const version ) {
return result;
}
bool _kdCheckQtVersion_impl( int major, int minor, int patchlevel ) {
bool _kdCheckQtVersion_impl( unsigned int major, unsigned int minor, unsigned int patchlevel ) {
static const Version actual = kdParseQtVersion( qVersion() ); // do this only once each run...
const Version requested = { { static_cast< unsigned char >( major ),
static_cast< unsigned char >( minor ),

@ -78,7 +78,7 @@ inline T & __kdtools__dereference_for_methodcall( T * o ) {
#define KDAB_SET_OBJECT_NAME( x ) __kdtools__dereference_for_methodcall( x ).setObjectName( QLatin1String( #x ) )
KDTOOLSCORE_EXPORT bool _kdCheckQtVersion_impl( int major, int minor=0, int patchlevel=0 );
KDTOOLSCORE_EXPORT bool _kdCheckQtVersion_impl( unsigned int major, unsigned int minor=0, unsigned int patchlevel=0 );
static inline bool kdCheckQtVersion( unsigned int major, unsigned int minor=0, unsigned int patchlevel=0 ) {
return (major<<16|minor<<8|patchlevel) <= static_cast<unsigned int>(QT_VERSION)
|| _kdCheckQtVersion_impl( major, minor, patchlevel );

@ -1,5 +1,5 @@
#ifndef KDTOOLSCORE__PIMPL_PTR_H
#define KDTOOLSCORE__PIMPL_PTR_H
#ifndef KDTOOLSCORE_PIMPL_PTR_H
#define KDTOOLSCORE_PIMPL_PTR_H
#include "kdtoolsglobal.h"
@ -40,5 +40,5 @@ namespace kdtools {
} // namespace kdtools
#endif
#endif /* KDTOOLSCORE__PIMPL_PTR_H */
#endif /* KDTOOLSCORE_PIMPL_PTR_H */

Loading…
Cancel
Save