Alien-SmokeQt
view release on metacpan or search on metacpan
generator/generators/smoke/helpers.cpp view on Meta::CPAN
#include <type.h>
#include "globals.h"
#include "../../options.h"
QHash<QString, QString> Util::typeMap;
QHash<const Method*, const Function*> Util::globalFunctionMap;
QHash<const Method*, const Field*> Util::fieldAccessors;
// looks up the inheritance path from desc to super and sets 'virt' to true if it encounters a virtual base
static bool isVirtualInheritancePathPrivate(const Class* desc, const Class* super, bool *virt)
{
foreach (const Class::BaseClassSpecifier bspec, desc->baseClasses()) {
if (bspec.baseClass == super || isVirtualInheritancePathPrivate(bspec.baseClass, super, virt)) {
if (bspec.isVirtual)
*virt = true;
return true;
}
}
return false;
generator/parser/symbol.h view on Meta::CPAN
hash_value = (hash_value << 5) - hash_value + r.data[i];
return hash_value;
}
/**
Required to put pairs of char* and std::size_t into a QHash.
Hash function is: hash = hash*31 + key[i].@n
It looks like a Bernstein's hash function with a different factor.
@n Original Bernstein's function is: hash = hash*33 + key[i].
@n Factor of 31 makes this function return reliably unique values
for english words with 6 symbols length.
@n More information can be found at @a http://burtleburtle.net/bob/hash/doobs.html.
*/
inline uint qHash(const QPair<const char*, std::size_t> &r)
{
uint hash_value = 0;
generator/parser/tests/test_parser.cpp view on Meta::CPAN
QByteArray clazz("void test() { if(val < f && val < val1 && val < val2 && val < val3 && val < val4 && val < val5 && val < val6 && val < val7 && val < val8 && val < val9 && val < val10 && val < val11 && val < val12 && val < val13 && val < val14 ...
pool mem_pool;
TranslationUnitAST* ast = parse(clazz, &mem_pool);
QVERIFY(ast != 0);
QVERIFY(ast->declarations != 0);
}
}
void testParserFail()
{
QByteArray stuff("foo bar !!! nothing that really looks like valid c++ code");
pool mem_pool;
TranslationUnitAST *ast = parse(stuff, &mem_pool);
QVERIFY(ast->declarations == 0);
QVERIFY(control.problems().count() > 3);
}
void testPartialParseFail() {
{
QByteArray method("struct C { Something invalid is here };");
pool mem_pool;
smoke/qt/qtcore/tests/test.cpp view on Meta::CPAN
#include "QtGui/macstyle.h"
int main(int argc, char ** argv)
{
QMacStyle foo;
}
#endif
#ifdef TEST_QT_NO_STYLE_CLEANLOOKS
#include "QtGui/qcleanlooksstyle.h"
int main(int argc, char ** argv)
{
QCleanlooksStyle foo;
}
#endif
#ifdef TEST_QT_NO_TABBAR
#include "QtGui/qtabbar.h"
int main(int argc, char ** argv)
{
QTabBar foo;
( run in 0.479 second using v1.01-cache-2.11-cpan-64827b87656 )