[libcalamares] Reduce warnings in KDAB code

- Use nullptr and suitable include guards
main
Adriaan de Groot 6 years ago
parent 2777b5dd30
commit 365f83b789

@ -1,5 +1,5 @@
#ifndef __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__ #ifndef KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H
#define __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__ #define KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H
#include <QtCore/QObject> #include <QtCore/QObject>
@ -31,9 +31,9 @@ public:
AutoKillOtherInstances = 1 AutoKillOtherInstances = 1
}; };
explicit KDSingleApplicationGuard( QObject * parent=0 ); explicit KDSingleApplicationGuard( QObject * parent=nullptr );
explicit KDSingleApplicationGuard( Policy policy, QObject * parent=0 ); explicit KDSingleApplicationGuard( Policy policy, QObject * parent=nullptr );
explicit KDSingleApplicationGuard( const QStringList & arguments, QObject * parent=0 ); 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=0 );
~KDSingleApplicationGuard(); ~KDSingleApplicationGuard();
@ -138,4 +138,4 @@ QT_END_NAMESPACE
#endif // QT_NO_SHAREDMEMORY #endif // QT_NO_SHAREDMEMORY
#endif /* __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__ */ #endif /* KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H */

@ -1,5 +1,5 @@
#ifndef __KDTOOLS_KDTOOLSGLOBAL_H__ #ifndef KDTOOLS_KDTOOLSGLOBAL_H
#define __KDTOOLS_KDTOOLSGLOBAL_H__ #define KDTOOLS_KDTOOLSGLOBAL_H
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
@ -110,5 +110,5 @@ private: \
void init(bool) void init(bool)
#endif /* __KDTOOLS_KDTOOLSGLOBAL_H__ */ #endif /* KDTOOLS_KDTOOLSGLOBAL_H */

@ -1,5 +1,5 @@
#ifndef __KDTOOLSCORE__PIMPL_PTR_H__ #ifndef KDTOOLSCORE__PIMPL_PTR_H
#define __KDTOOLSCORE__PIMPL_PTR_H__ #define KDTOOLSCORE__PIMPL_PTR_H
#include "kdtoolsglobal.h" #include "kdtoolsglobal.h"
@ -14,7 +14,7 @@ namespace kdtools {
public: public:
pimpl_ptr() : d( new T ) {} pimpl_ptr() : d( new T ) {}
explicit pimpl_ptr( T * t ) : d( t ) {} explicit pimpl_ptr( T * t ) : d( t ) {}
~pimpl_ptr() { delete d; d = 0; } ~pimpl_ptr() { delete d; d = nullptr; }
T * get() { return d; } T * get() { return d; }
const T * get() const { return d; } const T * get() const { return d; }
@ -40,5 +40,5 @@ namespace kdtools {
} // namespace kdtools } // namespace kdtools
#endif #endif
#endif /* __KDTOOLSCORE__PIMPL_PTR_H__ */ #endif /* KDTOOLSCORE__PIMPL_PTR_H */

Loading…
Cancel
Save