Skip to content

New branch patched-5 (based on patched-4 + back ported upstream + add-qt5-support) #15

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

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0f9196c
made generator compile on VC11
Oct 23, 2013
83436b9
removed event() method from QClipboard and QWebFrame to avoid derivin…
Oct 23, 2013
15004aa
fixed wrong inplace operator function assignment
Nov 5, 2013
44520c5
Merge commit 'e1f1c77d9675c3c5fb1cba19d2a32ace483eda2c' into patched-5
Alzathar Nov 26, 2013
4c48b5a
Add Qt5 support
finetjul Sep 6, 2013
ba91d28
CMake complains about the miss of a endforeach command.
Alzathar Nov 26, 2013
456b4df
Extra “${“ in CMake message text.
Alzathar Nov 26, 2013
c11f32b
The option PythonQt_QT_VERSION is visible in cmake-gui. it needs to b…
Alzathar Nov 26, 2013
f200ce3
No ressource file or UI files are compiled. No need to use the Qt(4|5…
Alzathar Nov 26, 2013
1963b94
One more condition and variable (Qt5_CMAKE_PATH) for Qt5 to add in CM…
Alzathar Nov 26, 2013
94fd6a4
The Qt5Core module is activated by default to be able to use the macr…
Alzathar Nov 26, 2013
c4d3098
Qt 5.2.x uses also the Qt 5.0 wrappers.
Alzathar Nov 26, 2013
0b522cb
By default PythonQt is build in release mode.
Alzathar Nov 26, 2013
74e8996
Clang warning: implicit conversion of NULL constant to 'bool' [-Wnull…
Alzathar Nov 26, 2013
80d4dea
Clang warning: '&&' within '||' [-Wlogical-op-parentheses].
Alzathar Nov 26, 2013
67203c2
Project adapted In case only QtCore is wrapped.
Alzathar Nov 26, 2013
57ab3e4
Building of the tests adapted for Qt5.
Alzathar Nov 26, 2013
382f952
Some tests were adapted if only QtCore is wrapped.
Alzathar Nov 26, 2013
01722c8
One test is adapted for Qt5 which does not have the function ‘escape’…
Alzathar Nov 26, 2013
db946d7
Qt5 classes defined in the modules QtWidgets and QtPrintSupport are w…
Alzathar Nov 27, 2013
65aef7a
Qt5 classes defined in the module QtWebKitWidgets are only wrapped if…
Alzathar Nov 27, 2013
2274952
Check that dependent Qt5 modules are also wrapped or force them to be…
Alzathar Nov 27, 2013
16d1f79
Fancy output in CMake to give information on the wrapped modules.
Alzathar Nov 27, 2013
452f1ad
Message to explain possible linker errors when the project is regener…
Alzathar Nov 27, 2013
6b5dbb6
ADD_TEST command modified as the original one used unknown Slicer_LAU…
Alzathar Nov 27, 2013
4880d68
The message is only visible for the wrapping of Qt5 as only the sourc…
Alzathar Nov 27, 2013
7169fd4
GitHub Readme file updated with the modifications realized in the bra…
Alzathar Nov 27, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
453 changes: 290 additions & 163 deletions CMakeLists.txt

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Prerequisites
-------------

* CMake 2.8.x
* Qt 4.6.2 or above
* Qt 4.6.2 or above (Qt5.x also supported)

Build instructions
------------------
Expand All @@ -36,24 +36,38 @@ make
Additional configure options are:

* `CMAKE_BUILD_TYPE`: Debug, Release, RelWithDebInfo or MinSizeRel
* `PythonQt_QT_VERSION`: 4, 5
* `PythonQt_DEBUG`: Enable/Disable PythonQt debug output
* `PythonQt_Wrap_QtAll`: Make all Qt components available in python
* `PythonQt_Wrap_Qt<componentname>`: Build PythonQt wrapper associated with `<componentname>`. Possible `<componentname>` are `gui`, `network`, `opengl`, `sql`, `uitools`, `webkit`, `xml`, `xmlpatterns`.
* `Qt5_CMAKE_PATH`: Path containing the Qt5* folders with inside the Qt5*Config.cmake files.

Available branches
------------------

This repository contains three branches:
* Based on [r245](http://sourceforge.net/p/pythonqt/code/245/)
This repository contains different branches:
* Based on the original PythonQt source code on [sourceforge]( http://sourceforge.net/p/pythonqt/code/)

### patched-5

* Based on patched-4 + backported upstream: [r246](http://sourceforge.net/p/pythonqt/code/246/), [r247](http://sourceforge.net/p/pythonqt/code/247/), [r248](http://sourceforge.net/p/pythonqt/code/248/) + branch: [add-qt5-support](https://github.com/commontk/PythonQt/tree/add-qt5-support)
* List of features
* Qt 5.x support:
* Modules QtWidgets and QtPrintSupport only wrapped if selected, but they will stay in the PythonQt.QtGui namespace for compatibily reason.
* Module QtWebKitWidgets only wrapped if selected, but it stays in the PythonQt.QtWebKit namespace for compatibily reason.
* CMake forces the wrapping of the selected modules dependency (e.g. QtPrintSupport requires QtWidgets, QtGui and QtCore)
* CMake variable `PythonQt_QT_VERSION` to select the version of Qt to wrap (4 or 5)

### patched-4

* Based on patched-3 + [r245](http://sourceforge.net/p/pythonqt/code/245/)
* List of features:
* Add BUILD_TESTING option disabled by default to keep behavior consistent with previous version.
* Do not exclude enums from wrapping if they are QFlags.
* Ensure enums added using only Q_FLAGS without corresponding Q_ENUMS are wrapped.

### patched-3

* Backported:
* Most of the [change specific to](https://github.com/commontk/PythonQt/compare/e2dce4b...patched-2) `patched-2` branch have been backported upstream: [r241](http://sourceforge.net/p/pythonqt/code/241/), [r242](http://sourceforge.net/p/pythonqt/code/242/), [r243](http://sourceforge.net/p/pythonqt/code/243/)

Expand Down
63 changes: 63 additions & 0 deletions generated_cpp_50/PythonQt_QtBindings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

#include "PythonQt_QtBindings.h"

#include "PythonQt.h"

void PythonQt_init_QtGui(PyObject*);
void PythonQt_init_QtSvg(PyObject*);
void PythonQt_init_QtSql(PyObject*);
void PythonQt_init_QtNetwork(PyObject*);
void PythonQt_init_QtCore(PyObject*);
void PythonQt_init_QtWebKit(PyObject*);
void PythonQt_init_QtOpenGL(PyObject*);
void PythonQt_init_QtXml(PyObject*);
void PythonQt_init_QtXmlPatterns(PyObject*);
void PythonQt_init_QtUiTools(PyObject*);
void PythonQt_init_QtPhonon(PyObject*);

PYTHONQT_EXPORT void PythonQt_init_QtBindings()
{
#ifdef PYTHONQT_WRAP_QtCore
PythonQt_init_QtCore(0);
#endif

#ifdef PYTHONQT_WRAP_QtGui
PythonQt_init_QtGui(0);
#endif

#ifdef PYTHONQT_WRAP_QtNetwork
PythonQt_init_QtNetwork(0);
#endif

#ifdef PYTHONQT_WRAP_QtOpenGL
PythonQt_init_QtOpenGL(0);
#endif

#ifdef PYTHONQT_WRAP_QtSql
PythonQt_init_QtSql(0);
#endif

#ifdef PYTHONQT_WRAP_QtSvg
PythonQt_init_QtSvg(0);
#endif

#ifdef PYTHONQT_WRAP_QtUiTools
PythonQt_init_QtUiTools(0);
#endif

#ifdef PYTHONQT_WRAP_QtWebKit
PythonQt_init_QtWebKit(0);
#endif

#ifdef PYTHONQT_WRAP_QtXml
PythonQt_init_QtXml(0);
#endif

#ifdef PYTHONQT_WRAP_QtXmlPatterns
PythonQt_init_QtXmlPatterns(0);
#endif

#ifdef PYTHONQT_WRAP_QtPhonon
PythonQt_init_QtPhonon(0);
#endif
};
10 changes: 10 additions & 0 deletions generated_cpp_50/PythonQt_QtBindings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef _PYTHONQT_QTBINDINGS_H
#define _PYTHONQT_QTBINDINGS_H

#include "PythonQtSystem.h"

/// Initialize Qt bindings enabled at configuration time
PYTHONQT_EXPORT void PythonQt_init_QtBindings();

#endif

10 changes: 10 additions & 0 deletions generated_cpp_50/com_trolltech_qt_core/com_trolltech_qt_core.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
HEADERS += \
$$PWD/com_trolltech_qt_core0.h \
$$PWD/com_trolltech_qt_core1.h \
$$PWD/com_trolltech_qt_core2.h \

SOURCES += \
$$PWD/com_trolltech_qt_core0.cpp \
$$PWD/com_trolltech_qt_core1.cpp \
$$PWD/com_trolltech_qt_core2.cpp \
$$PWD/com_trolltech_qt_core_init.cpp
Loading