Add hash-function for QModelIndex and QPersistenModelIndex

Change-Id: I2725e78a1006fbee54894f202997e2e408998551
Task-number: PYSIDE-41
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Bug pyside-35: GIL was not acquired in several important places.

Change-Id: I876732f90690d9679537611e9a71e33aa3a4e4e3
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Fix bug 1041 - "QAbstractItemModel has wrong ownership policy for selectionModel()"

Change-Id: I1dbe6d3cd69774dfa18f15d83794396f17b769f0
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Do not always try to remove bytecode version of the test.

Trying to remove the bytecode file doesn't work if it wasn't created
in the first place.  This can happen for example under Gentoo, where
bytecode is disabled while building packages to avoid sandbox
violations when Python tries to write a bytecode file for an
already-installed module outside the package build directory.

Change-Id: I4cbd63527479365e6f201d3fc51c576f55830680
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Improved QVector to python conversion

Added pyseq_to_cppvector_conversion template that calls
reserve() with the sequence size to reduce memory reallocations
Changed QVector conversion to use new the template

Change-Id: I099ab15d5f725499218e2ed081a325246aa5b902
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Fixed template name typo

Fixed typo of template names by changing "convertion" to "conversion"
Fixed all usages of incorrect name
Note that this change is not backwards compatible if using the
misspelled names in user code.

Change-Id: Ie34e0ef8cc23362c8efb2d6bf1ec9779d6e4c42b
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Add missing unit test.

Change-Id: Ia8442dd910c52a892767a49a339c63fec6fbf3c0
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Optimize vector to pylist conversion

Incorporate changes from Shiboken change I5f0c93b7
Note switch to push_back() should allow the template to work
for both QVector and std::vector.
Likewise, using size_type should avoid compiler warnings.

Change-Id: I4742aa9030e1bfa2e070f4b6f71d124d3c99749d
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Invalidate invisibleRootItem in clear() method

Fixes PYSIDE-56

Change-Id: If0529a289e6d9613fdd85bd9d37ccf438d4e92ca
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
During signal emission don't get return type after callback

The callback can disconnect the slot, causing the C++ object for
the connection to be deleted. Accessing the return type would then
read already freed memory.

Change-Id: Ib33fa806978793bcac42167dd45f1e59829a3104
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Version bump to 1.1.2

Change-Id: If67468b046da795ddf2253779f56b027a138b14e
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Change the order of pysitetest and signals directories because signals/disconnect_test.py depends on pysidetest module.

Change-Id: I31e9fa50cd36979b4843c8c12e3d0680dba2135e
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Fix reference leak on convertion from a C++ map type to Python dict.

Patch by Dennis Victorovich.

Change-Id: I050da20f6c0bef2f568aefcc81a9a159a412be24
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Invalidate metaObject wrapper before deletion

Change-Id: I95d3f8dd4a8473849ca19b5c8d5d59dee4c42991
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Use QObject property to invalidate wrapper before deletion.

Define a getWrapperForQObject function to create / find
wrappers for QObject derived objects.  It sets a property
so that an invalidate function can be called when the QObject
property is cleared in the QObject destructor after all destroyed
signal handlers have been called.  Requires a change to shiboken
to generate calls to the getWrapperForQObject function.

Change-Id: I4ed548af114bf7176e8e8255a3ea70549c35d74c
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Add explicit type conversion to fix mingw compile error

Change-Id: Id15e68fc34fd8fbb386794f04039a23766691cfe
Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Look first in the PySide package for Qt's plugins folder,

instead of just in Qt's install or build folder.  Only do it if the path
exists in the PySide package, and if it's not already on the search path.

Change-Id: I5a8ec8724cad2cb011e7e1c364c82a8b87289c5c
Reviewed-by: John Ehresman <jpe@wingware.com>
Preload OpenSSL DLLs on Windows.

Add code to _setupQtDirectories that will preload the OpenSSL DLLs if
they are included in the PySide package.  It uses a trick of temporarily
modifying the PATH so Qt's QSystemLibrary will be able to find them.

Change-Id: I67b56642ef74444f19806b52c6a1080dc6d92996
Reviewed-by: John Ehresman <jpe@wingware.com>
Fixed licenses

License fixed using replace-licenses.zsh from mkdist repo.
Possible copyright and contact changes will come later.

Change-Id: I18b977ac33f1b00e99fa7aae6c1a824769ce5f6e
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Replaced Nokia copyrights and contact details

Replaced Nokia copyrights with correct Digia copyrights.
Text in front of copyright is now retained:
** File is part of Foo, Copyright Nokia... ->
** File is part of Foo, Copyright Digia...
Replaced Nokia contact details with Digia's.
Removing "All Rights Reserved" no longer leaves an empty line.

Used the following command:

find . -path '*/3rdparty/*' -prune -o -exec grep -ilI -E
'.*Copyright.*Nokia.*|.*Contact.*' {} \; | tee >(xargs sed -i -r
'1,50 { /INdT|copy[a-z]*[ ]*=/ !{ s/(^[ \t:#*]*)([a-z ]*)
(Copyright.*Nokia.*)/
\1\2Copyright \(C\) 2013 Digia Plc and\/or its subsidiary\(-ies\)\./I
 }}') >(xargs sed -i -r '1,50 s/(^[ \t:#*]*)(.*info@qt\.nokia\.com.*
|.*INSERT EMAIL ADDRESS.*|.*qt-info@nokia\.com.*
|.*qt-label1@nokia\.com.*|.*http:\/\/qt\.nokia\.com\/contact.*
|.*qt-sales@nokia\.com.*|.*http:\/\/www\.qt-project\.org\/.*)/
\1Contact: http:\/\/www\.qt-project\.org\/legal/I')
>(xargs sed -i -r '1,50{/(^[ \t:#*]*)(all rights reserved.*)/Id}')

Command now finds command details that point to qt-project.org and
changes them to qt-project.org/legal
Also no longer wrongly replaces code snippet "copyright = ..". Need to
fix these case-by-case later.

Change-Id: I4456c00202c4a2264a400bdc18c19cd097876861
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>