Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BUG #1105 - "Spyder fails with HEAD" #61

Open
wants to merge 635 commits into
base: master
Choose a base branch
from

Conversation

pcacjr
Copy link

@pcacjr pcacjr commented Jan 11, 2012

When handling typedef'd primitive types we don't need to create indices
for them, nor converters. Instead, we must use the underlying primitive
type converters.

See http://bugs.pyside.org/show_bug.cgi?id=1105.

Signed-off-by: Paulo Alcantara [email protected]

Marcelo Lira and others added 30 commits July 18, 2011 15:30
Checking if a type is an Object Type is a very common task, followed
by asking if a type is a pointer to a type that has a Python wrapper.

These functions solve the problem:

ShibokenGenerator::isObjectType(type)
ShibokenGenerator::isPointerToWrapperType(type)

I refactored the generator code to make use of those functions.

Reviewed by Hugo Parente <[email protected]>
Reviewed by Lauro Moura <[email protected]>
Reviewed by Luciano Wolf <[email protected]>
ShibokenGenerator::isPointer()
ShibokenGenerator::isWrapperType()

Reviewed by Hugo Parente <[email protected]>
Reviewed by Luciano Wolf <[email protected]>
…e to QML (qmlRegisterType) function.

Reviewer: Luciano Wolf <[email protected]>
          Lauro Moura <[email protected]>
The new methods replace the contents of the following type system
variables:

%CONVERTTOPYTHON
%CONVERTTOCPP
%ISCONVERTIBLE
%CHECKTYPE

The replacements were part of the ShibokenGenerator::writeCodeSnips()
method.
…or to Generator Runner.

They were needed by other methods in the Generator class.
…or Runner.

Updated tests' type systems to reflect the behaviour of
Generator::minimalConstructor().
The Shiboken::Module namespace also provides management of module types,
including the communication of types among dependent modules.

Module::create() will call Shiboken::init(), so this can be removed
from the generated module's source code.

This deprecates the old Shiboken::importModule() function.

The generation of module initialization code was updated to use the new
Shiboken::Module functions.
…ule or enclosing class.

The class register writer was updated to use the new
ObjectType::introduceWrapperType().

Types are now created and registered via the introduceWrapperType() function.
I also did a little refactoring on CppGenerator::writeClassRegister.
Also removed the default value for a more explicit use of the method.
Now anyone wanting to get a cppSelf object must go through this method.
The indentation, and everything else about it, was terrible.
Added test for a reference to integer as a function argument.
…ode.

The contents of the new CppGenerator::writeMethodWrapperPreamble()
method were moved from the writers of constructor and method wrappers.

Reviewed by Hugo Parente <[email protected]>
Reviewed by Luciano Wolf <[email protected]>
Marcelo Lira and others added 28 commits December 9, 2011 20:28
…d on a given string.

Also added code to register a couple of type conversions by name,
a bunch of related tests, and some fixes to the converter functions.
Also removed erroneus deletions of said AbstractMetaTypes - they
are kept in a cache and should be deleted only when the generator
is finished.
…f long.

Using long causes erratic behaviour on linux in 64-bits architectures.
Sometimes.
E.g., when calling QtGui.QShortcut.setKey(QtCore.Qt.CTRL +
QtCore.Qt.Key_Delete) it was being called as
QtGui.QShortcut.setKey(long) (in Python 2) when it should be actually
QtGui.QShortcut.setKey(int). So that resulted in a TypeError exception
when using Python version 2 with that small code.

See http://bugs.pyside.org/show_bug.cgi?id=1097.

Signed-off-by: Paulo Alcantara <[email protected]>
Reviewed-by: Marcelo Lira <[email protected]>
Reviewed-by: Hugo Parente Lima <[email protected]>
Expanded the Complex type conversion unit test.

Reviewed by Hugo Parente <[email protected]>
Reviewed by Paulo Alcantara <[email protected]>
See http://bugs.pyside.org/show_bug.cgi?id=1092.

Signed-off-by: Paulo Alcantara <[email protected]>
Reviewed-by: Marcelo Lira <[email protected]>
Reviewed-by: Hugo Parente Lima <[email protected]>
Reviewed by Lauro Moura <[email protected]>
Reviewed by Luciano Wolf <[email protected]>
When handling typedef'd primitive types we don't need to create indices
for them, nor converters. Instead, we must use the underlying primitive
type converters.

See http://bugs.pyside.org/show_bug.cgi?id=1105.

Signed-off-by: Paulo Alcantara <[email protected]>
@hugopl
Copy link
Member

hugopl commented Jan 11, 2012

+1

1 similar comment
@setanta
Copy link

setanta commented Jan 11, 2012

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants