~ubuntu-branches/ubuntu/saucy/qt-gstreamer/saucy-proposed

« back to all changes in this revision

Viewing changes to src/QGlib/refpointer.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-06-15 15:03:26 UTC
  • mfrom: (1.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120615150326-pkmdog620pkytcgt
Tags: 0.10.2-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Enable unit tests.
    + Build-depend on gstreamer0.10-plugins-base.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    This program is distributed in the hope that it will be useful,
12
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
    GNU General Public License for more details.
 
14
    GNU Lesser General Public License for more details.
15
15
 
16
16
    You should have received a copy of the GNU Lesser General Public License
17
17
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
#ifndef QGLIB_REFPOINTER_H
20
20
#define QGLIB_REFPOINTER_H
21
21
 
22
 
#ifdef Q_MOC_RUN
23
 
#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
24
 
#endif
25
 
 
26
22
#include "global.h"
27
23
#include "type.h"
28
24
#include "wrap.h"
29
25
#include <cstddef>
30
26
#include <boost/type_traits.hpp>
31
27
#include <boost/utility/enable_if.hpp>
 
28
#include <QtCore/QHash>
32
29
 
33
30
namespace QGlib {
34
31
 
490
487
    inline operator Type() { return GetType<T>(); }
491
488
};
492
489
 
 
490
/*! \relates QGlib::RefPointer */
 
491
template <typename T>
 
492
inline uint qHash(const RefPointer<T> & ptr)
 
493
{
 
494
    return qHash(static_cast<typename T::CType*>(ptr));
493
495
}
494
496
 
 
497
} //namespace QGlib
 
498
 
495
499
#endif