Qt

 view release on metacpan or  search on metacpan

qtcore/lib/QtCore4.pm  view on Meta::CPAN

qMemSet
Q_MOVABLE_TYPE
qPow
Q_PRIMITIVE_TYPE
qputenv
qQNaN
qrand
qRealloc
qReallocAligned
qRegisterStaticPluginInstanceFunction
qRemovePostRoutine
qRound
qRound64
qSetFieldWidth
qSetPadChar
qSetRealNumberPrecision
qSharedBuild
qSin
qSNaN
qSqrt
qsrand
Q_STATIC_TYPE
qstrcmp
qstrcpy
qstrdup
qstricmp
qStringComparisonHelper
qstrlen
qstrncmp
qstrncpy
qstrnicmp
qstrnlen
qTan
qt_assert
qt_assert_x
qt_check_pointer
QtCriticalMsg
QtDebugMsg
qt_error_string
QtFatalMsg
qt_message_output
qt_noop
qt_qFindChild_helper
qt_qFindChildren_helper
QtSystemMsg
qtTrId
QtWarningMsg
qUncompress
qvariant_cast_helper
qVersion
qvsnprintf
qWarning
);

unless(exists $::INC{'Qt/GlobalSpace.pm'}) {
    $::INC{'Qt/GlobalSpace.pm'} = $::INC{'QtCore4.pm'};
}

sub import {
    my $class = shift;
    my $caller = (caller)[0];
    $caller .= '::';

    foreach my $subname ( @_ ) {
        next unless grep( $subname, @EXPORT_OK );
        Qt::_internal::installSub( $caller.$subname, sub {
            $Qt::AutoLoad::AUTOLOAD = "Qt::GlobalSpace::$subname";
            my $autoload = 'Qt::GlobalSpace::_UTOLOAD';
            no strict 'refs';
            return &$autoload(@_);
        } );
    }
}

package Qt::_internal;

use strict;
use warnings;
use Scalar::Util qw( blessed );
use List::MoreUtils qw( any );

# These 2 hashes provide lookups from a perl package name to a smoke
# classid, and vice versa
our %package2classId;
our %classId2package;

# This hash stores integer pointer address->perl SV association.  Used for
# overriding virtual functions, where all you have as an input is a void* to
# the object who's method is being called.  Made visible here for debugging
# purposes.
our %pointer_map;

our %customClasses;

our %vectorTypes;

our %arrayTypes = (
    'const QList<QVariant>&' => {
        value => [ 'QVariant' ]
    },
    'const QStringList&' => {
        value => [ 's', 'Qt::String' ],
    },
);

our %hashTypes = (
    'const QHash<QString,QVariant>&' => {
        keys => [ 's', 'Qt::String' ],
        values => [ 'QVariant' ]
    },
    'const QMap<QString,QVariant>&' => {
        keys => [ 's', 'Qt::String' ],
        values => [ 'QVariant' ]
    },
);

sub arrayByName {
    my $name = shift;
    no strict 'refs';
    return \@{$name};
}



( run in 3.857 seconds using v1.01-cache-2.11-cpan-364913b4093 )