diff options
author | hjk <qthjk@ovi.com> | 2011-11-18 01:39:14 +0100 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2011-11-18 16:35:01 +0100 |
commit | 89668a8654cc079d751f9dfb351daa420a0b64dc (patch) | |
tree | 28bf0b0eb8f1f5c52ed569200deb953819e11f54 /installerbuilder/libinstaller | |
parent | 870793d86273ce0f363f45bf4a666e4ac2ccd4d2 (diff) |
Remove unneed bits of kdtoolsglobal.h
Change-Id: I534745444fc591ddc805cea692a0579dc3dea41c
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller')
5 files changed, 5 insertions, 121 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/KDToolsCore.pri b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/KDToolsCore.pri index 2855ab373..f3f5e7dea 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/KDToolsCore.pri +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/KDToolsCore.pri @@ -17,7 +17,6 @@ HEADERS += $$PWD/pimpl_ptr.h \ $$PWD/kdsysinfo.h SOURCES += $$PWD/pimpl_ptr.cpp \ - $$PWD/kdtoolsglobal.cpp \ $$PWD/kdbytesize.cpp \ $$PWD/kdjob.cpp \ $$PWD/kdgenericfactory.cpp \ diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdgenericfactory.h b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdgenericfactory.h index 1a0d7f854..08a9984a2 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdgenericfactory.h +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdgenericfactory.h @@ -28,7 +28,7 @@ #include <QtCore/QHash> template< typename T_Product, typename T_Identifier = QString, template< typename U, typename V > class T_Map = QHash > -class MAKEINCLUDES_EXPORT KDGenericFactory +class KDGenericFactory { public: virtual ~KDGenericFactory() diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.cpp b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.cpp deleted file mode 100644 index f41d7974e..000000000 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. All rights reserved. -** -** This file is part of the KD Tools library. -** -** Licensees holding valid commercial KD Tools licenses may use this file in -** accordance with the KD Tools Commercial License Agreement provided with -** the Software. -** -** -** This file may be distributed and/or modified under the terms of the -** GNU Lesser General Public License version 2 and version 3 as published by the -** Free Software Foundation and appearing in the file LICENSE.LGPL included. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** Contact info@kdab.com if any conditions of this licensing are not -** clear to you. -** -**********************************************************************/ - -#include "kdtoolsglobal.h" - -#include <QByteArray> - -#include <algorithm> - -namespace { - struct Version { - unsigned char v[3]; - }; - - static inline bool operator<( const Version & lhs, const Version & rhs ) { - return std::lexicographical_compare( lhs.v, lhs.v + 3, rhs.v, rhs.v + 3 ); - } - static inline bool operator==( const Version & lhs, const Version & rhs ) { - return std::equal( lhs.v, lhs.v + 3, rhs.v ); - } - KDTOOLS_MAKE_RELATION_OPERATORS( Version, static inline ) -} - -static Version kdParseQtVersion( const char * const version ) { - if ( !version || qstrlen( version ) < 5 || version[1] != '.' || version[3] != '.' || ( version[5] != 0 && version[5] != '.' && version[5] != '-' ) ) - return Version(); // parse error - const Version result = { { version[0] - '0', version[2] - '0', version[4] - '0' } }; - return result; -} - -bool _kdCheckQtVersion_impl( int major, int minor, int patchlevel ) { - static const Version actual = kdParseQtVersion( qVersion() ); // do this only once each run... - const Version requested = { { major, minor, patchlevel } }; - return actual >= requested; -} diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.h b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.h index 3d687da39..8d94425d5 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.h +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/kdtoolsglobal.h @@ -25,8 +25,6 @@ #include <QtCore/QtGlobal> -#define KDAB_DISABLE_COPY( x ) private: x( const x & ); x & operator=( const x & ) - #ifdef KDTOOLS_SHARED # ifdef BUILD_SHARED_KDTOOLSCORE # define KDTOOLSCORE_EXPORT Q_DECL_EXPORT @@ -55,24 +53,6 @@ # define KDTOOLS_UPDATER_EXPORT #endif // KDTOOLS_SHARED -#define MAKEINCLUDES_EXPORT - -#define DOXYGEN_PROPERTY( x ) -#ifdef DOXYGEN_RUN -# define KDAB_IMPLEMENT_SAFE_BOOL_OPERATOR( func ) operator unspecified_bool_type() const { return func; } -# define KDAB_USING_SAFE_BOOL_OPERATOR( Class ) operator unspecified_bool_type() const; -#else -# define KDAB_IMPLEMENT_SAFE_BOOL_OPERATOR( func ) \ - private: struct __safe_bool_dummy__ { void nonnull() {} }; \ - typedef void ( __safe_bool_dummy__::*unspecified_bool_type )(); \ - public: \ - operator unspecified_bool_type() const { \ - return ( func ) ? &__safe_bool_dummy__::nonnull : 0 ; \ - } -#define KDAB_USING_SAFE_BOOL_OPERATOR( Class ) \ - using Class::operator Class::unspecified_bool_type; -#endif - #define KDTOOLS_MAKE_RELATION_OPERATORS( Class, linkage ) \ linkage bool operator>( const Class & lhs, const Class & rhs ) { \ return operator<( rhs, lhs ); \ @@ -87,48 +67,6 @@ return !operator<( lhs, rhs ); \ } -template <typename T> -inline T & __kdtools__dereference_for_methodcall( T & o ) { - return o; -} - -template <typename T> -inline T & __kdtools__dereference_for_methodcall( T * o ) { - return *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 ); -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 ); -} - -#define KDTOOLS_DECLARE_PRIVATE_BASE( Class ) \ -protected: \ - class Private; \ - Private * d_func() { return _d; } \ - const Private * d_func() const { return _d; } \ - Class( Private * _d_, bool b ) : _d( _d_ ) { init(b); } \ -private: \ - void init(bool); \ -private: \ - Private * _d - -#define KDTOOLS_DECLARE_PRIVATE_DERIVED( Class, Base ) \ -protected: \ - class Private; \ - Private * d_func() { \ - return reinterpret_cast<Private*>( Base::d_func() ); \ - } \ - const Private * d_func() const { \ - return reinterpret_cast<const Private*>( Base::d_func() ); \ - } \ - Class( Private * _d_, bool b ) \ - : Base( reinterpret_cast<Base::Private*>(_d_), b ) { init(b); } \ -private: \ - void init(bool) #endif /* __KDTOOLS_KDTOOLSGLOBAL_H__ */ diff --git a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/pimpl_ptr.h b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/pimpl_ptr.h index 195b967d1..389e9bd69 100644 --- a/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/pimpl_ptr.h +++ b/installerbuilder/libinstaller/3rdparty/kdtools/KDToolsCore/pimpl_ptr.h @@ -30,8 +30,7 @@ namespace kdtools { #endif template <typename T> - class MAKEINCLUDES_EXPORT pimpl_ptr { - KDAB_DISABLE_COPY( pimpl_ptr ); + class pimpl_ptr { T * d; public: pimpl_ptr() : d( new T ) {} @@ -47,7 +46,9 @@ namespace kdtools { T & operator*() { return *get(); } const T & operator*() const { return *get(); } - KDAB_IMPLEMENT_SAFE_BOOL_OPERATOR( get() ) + private: + pimpl_ptr( const pimpl_ptr & ); + void operator=( const pimpl_ptr & ); }; // these are not implemented, so's we can catch their use at |