Merge lp:~sergiusens/phablet-extras/qtmultimedia-opensource-src-touch-5.2 into lp:~phablet-team/phablet-extras/qtmultimedia-touch

Proposed by Sergio Schvezov
Status: Needs review
Proposed branch: lp:~sergiusens/phablet-extras/qtmultimedia-opensource-src-touch-5.2
Merge into: lp:~phablet-team/phablet-extras/qtmultimedia-touch
Diff against target: 1645 lines (+1343/-63)
10 files modified
debian/changelog (+14/-0)
debian/control (+23/-21)
debian/libqt5multimedia5-touch.postrm (+1/-1)
debian/libqt5multimedia5-touch.preinst (+1/-1)
debian/libqt5multimedia5-touch.symbols (+70/-35)
debian/libqt5multimediaquick-p5-touch.postrm (+1/-1)
debian/libqt5multimediaquick-p5-touch.preinst (+1/-1)
debian/qtmultimedia5-touch-dev.install (+8/-3)
debian/rules (+1/-0)
debian/syncqt.pl (+1223/-0)
To merge this branch: bzr merge lp:~sergiusens/phablet-extras/qtmultimedia-opensource-src-touch-5.2
Reviewer Review Type Date Requested Status
Timo Jyrinki Approve
Ricardo Salveti Pending
Review via email: mp+208474@code.launchpad.net

Commit message

* Updating for 5.2 migration:
  - Depending on qt >= 5.2.1 for the ABI change
  - Updating symbols (qreal in armhf)
  - Adjusting diverts for 5.2.
  - Fixing pri files to adapt to new paths
* Fixing qtdeclarative control file
* Updating standards to 3.9.5
* Adding syncqt.pl from qtbase-opensource-src to sync headers and using in
  during configure.

Description of the change

Don't push or merge until Qt 5.2 is ready

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Functional testing shows this works great:
- Audio and video playback possible on device
- Installation on top of earlier Qt 5.2 upgraded device works
- Dist-upgrade from 5.0.2 continues to work, while now the qtmultimedia-touch packages don't need removal

Awesome!

review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Unmerged revisions

93. By Sergio Schvezov

* Updating for 5.2 migration:
  - Depending on qt >= 5.2.1 for the ABI change
  - Updating symbols (qreal in armhf)
  - Adjusting diverts for 5.2.
  - Fixing pri files to adapt to new paths
* Fixing qtdeclarative control file
* Updating standards to 3.9.5
* Adding syncqt.pl from qtbase-opensource-src to sync headers and using in
  during configure.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-02-06 21:08:43 +0000
3+++ debian/changelog 2014-02-26 20:49:23 +0000
4@@ -1,3 +1,17 @@
5+qtmultimedia-opensource-src-touch (5.1.1+git20131205+8230c02-0ubuntu4) UNRELEASED; urgency=medium
6+
7+ * Updating for 5.2 migration:
8+ - Depending on qt >= 5.2.1 for the ABI change
9+ - Updating symbols (qreal in armhf)
10+ - Adjusting diverts for 5.2.
11+ - Fixing pri files to adapt to new paths
12+ * Fixing qtdeclarative control file
13+ * Updating standards to 3.9.5
14+ * Adding syncqt.pl from qtbase-opensource-src to sync headers and using in
15+ during configure.
16+
17+ -- Sergio Schvezov <sergio.schvezov@canonical.com> Wed, 26 Feb 2014 17:42:55 -0300
18+
19 qtmultimedia-opensource-src-touch (5.1.1+git20131205+8230c02-0ubuntu3) trusty; urgency=medium
20
21 * Fixing symbols table for libqgsttools-p1-touch.
22
23=== modified file 'debian/control'
24--- debian/control 2013-10-02 23:44:09 +0000
25+++ debian/control 2014-02-26 20:49:23 +0000
26@@ -10,10 +10,10 @@
27 Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>,
28 Timo Jyrinki <timo@debian.org>
29 Build-Depends: debhelper (>= 9.0.0),
30- qtbase5-dev (>= 5.0.2+dfsg1-6~),
31- libqt5opengl5-dev (>= 5.0.2~),
32- qtbase5-private-dev (>= 5.0.2~),
33- qtdeclarative5-private-dev (>= 5.0.2~),
34+ qtbase5-dev (>= 5.2.1+dfsg~),
35+ libqt5opengl5-dev (>= 5.2.1+dfsg~),
36+ qtbase5-private-dev (>= 5.2.1+dfsg~),
37+ qtdeclarative5-private-dev (>= 5.2.1~),
38 libasound2-dev [linux-any],
39 libpulse-dev,
40 libgstreamer-plugins-base1.0-dev,
41@@ -22,8 +22,8 @@
42 zlib1g-dev,
43 pkg-kde-tools,
44 Build-Depends-Indep: libqt5sql5-sqlite,
45- qttools5-dev-tools (>= 5.0.2~)
46-Standards-Version: 3.9.4
47+ qttools5-dev-tools (>= 5.2.1~)
48+Standards-Version: 3.9.5
49 Homepage: https://qt-project.org/
50 Vcs-Git: git://github.com/jhodapp/qtmultimedia.git
51 Vcs-Browser: https://github.com/jhodapp/qtmultimedia
52@@ -148,21 +148,6 @@
53 This package contains the development files needed to build Qt applications
54 using Qt Multimedia libraries.
55
56-Package: qtmultimedia5-touch-private-dev
57-Architecture: any
58-Section: libdevel
59-Pre-Depends: dpkg (>= 1.15.6~)
60-Depends: qtmultimedia5-touch-dev (= ${binary:Version}), ${misc:Depends}
61-Conflicts: qtmultimedia5-private-dev
62-Description: APIs for multimedia functionality - private development files
63- Qt is a cross-platform C++ application framework. Qt's primary feature
64- is its rich set of widgets that provide standard GUI functionality.
65- .
66- This package contains the private header development files for building some
67- Qt 5 applications like Qt Creator QML Designer plugin.
68- .
69- Use at your own risk.
70-
71 Package: qtmultimedia5-touch-dbg
72 Architecture: any
73 Multi-Arch: same
74@@ -177,3 +162,20 @@
75 .
76 This package contains the debugging symbols for the Qt 5 Multimedia
77 libraries.
78+
79+Package: qtmultimedia5-touch-private-dev
80+Architecture: any
81+Section: libdevel
82+Pre-Depends: dpkg (>= 1.15.6~)
83+Depends: qtmultimedia5-touch-dev (= ${binary:Version}), ${misc:Depends}
84+Conflicts: qtmultimedia5-private-dev
85+Description: APIs for multimedia functionality - private development files
86+ Qt is a cross-platform C++ application framework. Qt's primary feature
87+ is its rich set of widgets that provide standard GUI functionality.
88+ .
89+ This package contains the private header development files for building some
90+ Qt 5 applications like Qt Creator QML Designer plugin.
91+ .
92+ Use at your own risk.
93+
94+
95
96=== modified file 'debian/libqt5multimedia5-touch.postrm'
97--- debian/libqt5multimedia5-touch.postrm 2013-09-20 20:15:35 +0000
98+++ debian/libqt5multimedia5-touch.postrm 2014-02-26 20:49:23 +0000
99@@ -2,7 +2,7 @@
100 divert_dir="/var/lib/$pkg-diverted"
101
102 if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" -o purge = "$1" ]; then
103- for version in 5.0.2 5.0 5; do
104+ for version in 5.2.1 5.2 5; do
105 dpkg-divert --package "$pkg" --remove --rename \
106 --divert \
107 "$divert_dir"/libQt5Multimedia.so.$version.diverted-$pkg \
108
109=== modified file 'debian/libqt5multimedia5-touch.preinst'
110--- debian/libqt5multimedia5-touch.preinst 2013-09-20 20:15:35 +0000
111+++ debian/libqt5multimedia5-touch.preinst 2014-02-26 20:49:23 +0000
112@@ -6,7 +6,7 @@
113 mkdir -p "$divert_dir"
114 fi
115
116- for version in 5.0.2 5.0 5; do
117+ for version in 5.2.1 5.2 5; do
118 dpkg-divert --package "$pkg" --add --rename \
119 --divert \
120 "$divert_dir"/libQt5Multimedia.so.$version.diverted-$pkg \
121
122=== modified file 'debian/libqt5multimedia5-touch.symbols'
123--- debian/libqt5multimedia5-touch.symbols 2013-09-20 08:12:11 +0000
124+++ debian/libqt5multimedia5-touch.symbols 2014-02-26 20:49:23 +0000
125@@ -30,7 +30,8 @@
126 _ZN11QAudioInput6notifyEv@Base 5.0.2
127 _ZN11QAudioInput6resumeEv@Base 5.0.2
128 _ZN11QAudioInput7suspendEv@Base 5.0.2
129- (subst)_ZN11QAudioInput9setVolumeE{qreal}@Base 5.0.2
130+ _ZN11QAudioInput9setVolumeEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
131+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN11QAudioInput9setVolumeE{qreal}@Base 5.0.2
132 _ZN11QAudioInputC1ERK12QAudioFormatP7QObject@Base 5.0.2
133 _ZN11QAudioInputC1ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject@Base 5.0.2
134 _ZN11QAudioInputC2ERK12QAudioFormatP7QObject@Base 5.0.2
135@@ -155,7 +156,8 @@
136 _ZN12QAudioOutput6notifyEv@Base 5.0.2
137 _ZN12QAudioOutput6resumeEv@Base 5.0.2
138 _ZN12QAudioOutput7suspendEv@Base 5.0.2
139- (subst)_ZN12QAudioOutput9setVolumeE{qreal}@Base 5.0.2
140+ _ZN12QAudioOutput9setVolumeEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
141+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QAudioOutput9setVolumeE{qreal}@Base 5.0.2
142 _ZN12QAudioOutputC1ERK12QAudioFormatP7QObject@Base 5.0.2
143 _ZN12QAudioOutputC1ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject@Base 5.0.2
144 _ZN12QAudioOutputC2ERK12QAudioFormatP7QObject@Base 5.0.2
145@@ -169,12 +171,17 @@
146 _ZN12QCameraFocus16staticMetaObjectE@Base 5.0.2
147 _ZN12QCameraFocus17focusZonesChangedEv@Base 5.0.2
148 _ZN12QCameraFocus17setFocusPointModeENS_14FocusPointModeE@Base 5.0.2
149- (subst)_ZN12QCameraFocus18digitalZoomChangedE{qreal}@Base 5.0.2
150- (subst)_ZN12QCameraFocus18opticalZoomChangedE{qreal}@Base 5.0.2
151+ _ZN12QCameraFocus18digitalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
152+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QCameraFocus18digitalZoomChangedE{qreal}@Base 5.0.2
153+ _ZN12QCameraFocus18opticalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
154+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QCameraFocus18opticalZoomChangedE{qreal}@Base 5.0.2
155 _ZN12QCameraFocus19setCustomFocusPointERK7QPointF@Base 5.0.2
156- (subst)_ZN12QCameraFocus25maximumDigitalZoomChangedE{qreal}@Base 5.0.2
157- (subst)_ZN12QCameraFocus25maximumOpticalZoomChangedE{qreal}@Base 5.0.2
158- (subst)_ZN12QCameraFocus6zoomToE{qreal}{qreal}@Base 5.0.2
159+ _ZN12QCameraFocus25maximumDigitalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
160+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QCameraFocus25maximumDigitalZoomChangedE{qreal}@Base 5.0.2
161+ _ZN12QCameraFocus25maximumOpticalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
162+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QCameraFocus25maximumOpticalZoomChangedE{qreal}@Base 5.0.2
163+ _ZN12QCameraFocus6zoomToEdd@Base 5.1.1+git20131205+8230c02-0ubuntu7
164+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QCameraFocus6zoomToE{qreal}{qreal}@Base 5.0.2
165 _ZN12QCameraFocusC1EP7QCamera@Base 5.0.2
166 _ZN12QCameraFocusC2EP7QCamera@Base 5.0.2
167 _ZN12QCameraFocusD0Ev@Base 5.0.2
168@@ -217,13 +224,15 @@
169 _ZN12QMediaPlayer15durationChangedEx@Base 5.0.2
170 _ZN12QMediaPlayer15positionChangedEx@Base 5.0.2
171 _ZN12QMediaPlayer15seekableChangedEb@Base 5.0.2
172- (subst)_ZN12QMediaPlayer15setPlaybackRateE{qreal}@Base 5.0.2
173+ _ZN12QMediaPlayer15setPlaybackRateEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
174+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QMediaPlayer15setPlaybackRateE{qreal}@Base 5.0.2
175 _ZN12QMediaPlayer16staticMetaObjectE@Base 5.0.2
176 _ZN12QMediaPlayer18mediaStatusChangedENS_11MediaStatusE@Base 5.0.2
177 _ZN12QMediaPlayer18supportedMimeTypesE6QFlagsINS_4FlagEE@Base 5.0.2
178 _ZN12QMediaPlayer19bufferStatusChangedEi@Base 5.0.2
179 _ZN12QMediaPlayer19currentMediaChangedERK13QMediaContent@Base 5.0.2
180- (subst)_ZN12QMediaPlayer19playbackRateChangedE{qreal}@Base 5.0.2
181+ _ZN12QMediaPlayer19playbackRateChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
182+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QMediaPlayer19playbackRateChangedE{qreal}@Base 5.0.2
183 _ZN12QMediaPlayer21audioAvailableChangedEb@Base 5.0.2
184 _ZN12QMediaPlayer21videoAvailableChangedEb@Base 5.0.2
185 _ZN12QMediaPlayer24setNetworkConfigurationsERK5QListI21QNetworkConfigurationE@Base 5.0.2
186@@ -278,7 +287,8 @@
187 _ZN12QSoundEffect4stopEv@Base 5.0.2
188 _ZN12QSoundEffect8setMutedEb@Base 5.0.2
189 _ZN12QSoundEffect9setSourceERK4QUrl@Base 5.0.2
190- (subst)_ZN12QSoundEffect9setVolumeE{qreal}@Base 5.0.2
191+ _ZN12QSoundEffect9setVolumeEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
192+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN12QSoundEffect9setVolumeE{qreal}@Base 5.0.2
193 _ZN12QSoundEffectC1EP7QObject@Base 5.0.2
194 _ZN12QSoundEffectC2EP7QObject@Base 5.0.2
195 _ZN12QSoundEffectD0Ev@Base 5.0.2
196@@ -502,7 +512,8 @@
197 _ZN14QMediaRecorder12mutedChangedEb@Base 5.0.2
198 _ZN14QMediaRecorder12stateChangedENS_5StateE@Base 5.0.2
199 _ZN14QMediaRecorder13statusChangedENS_6StatusE@Base 5.0.2
200- (subst)_ZN14QMediaRecorder13volumeChangedE{qreal}@Base 5.0.2
201+ _ZN14QMediaRecorder13volumeChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
202+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN14QMediaRecorder13volumeChangedE{qreal}@Base 5.0.2
203 _ZN14QMediaRecorder14setMediaObjectEP12QMediaObject@Base 5.0.2
204 _ZN14QMediaRecorder15durationChangedEx@Base 5.0.2
205 _ZN14QMediaRecorder15metaDataChangedERK7QStringRK8QVariant@Base 5.0.2
206@@ -523,7 +534,8 @@
207 _ZN14QMediaRecorder5pauseEv@Base 5.0.2
208 _ZN14QMediaRecorder6recordEv@Base 5.0.2
209 _ZN14QMediaRecorder8setMutedEb@Base 5.0.2
210- (subst)_ZN14QMediaRecorder9setVolumeE{qreal}@Base 5.0.2
211+ _ZN14QMediaRecorder9setVolumeEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
212+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN14QMediaRecorder9setVolumeE{qreal}@Base 5.0.2
213 _ZN14QMediaRecorderC1EP12QMediaObjectP7QObject@Base 5.0.2
214 _ZN14QMediaRecorderC1ER21QMediaRecorderPrivateP12QMediaObjectP7QObject@Base 5.0.2
215 _ZN14QMediaRecorderC2EP12QMediaObjectP7QObject@Base 5.0.2
216@@ -556,23 +568,29 @@
217 _ZN15QCameraExposure11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.2
218 _ZN15QCameraExposure11qt_metacastEPKc@Base 5.0.2
219 _ZN15QCameraExposure12setFlashModeE6QFlagsINS_9FlashModeEE@Base 5.0.2
220- (subst)_ZN15QCameraExposure15apertureChangedE{qreal}@Base 5.0.2
221+ _ZN15QCameraExposure15apertureChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
222+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure15apertureChangedE{qreal}@Base 5.0.2
223 _ZN15QCameraExposure15setAutoApertureEv@Base 5.0.2
224 _ZN15QCameraExposure15setExposureModeENS_12ExposureModeE@Base 5.0.2
225 _ZN15QCameraExposure15setMeteringModeENS_12MeteringModeE@Base 5.0.2
226 _ZN15QCameraExposure16staticMetaObjectE@Base 5.0.2
227- (subst)_ZN15QCameraExposure17setManualApertureE{qreal}@Base 5.0.2
228+ _ZN15QCameraExposure17setManualApertureEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
229+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure17setManualApertureE{qreal}@Base 5.0.2
230 _ZN15QCameraExposure19setAutoShutterSpeedEv@Base 5.0.2
231- (subst)_ZN15QCameraExposure19shutterSpeedChangedE{qreal}@Base 5.0.2
232+ _ZN15QCameraExposure19shutterSpeedChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
233+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure19shutterSpeedChangedE{qreal}@Base 5.0.2
234 _ZN15QCameraExposure20apertureRangeChangedEv@Base 5.0.2
235 _ZN15QCameraExposure20setSpotMeteringPointERK7QPointF@Base 5.0.2
236 _ZN15QCameraExposure21isoSensitivityChangedEi@Base 5.0.2
237 _ZN15QCameraExposure21setAutoIsoSensitivityEv@Base 5.0.2
238- (subst)_ZN15QCameraExposure21setManualShutterSpeedE{qreal}@Base 5.0.2
239- (subst)_ZN15QCameraExposure23setExposureCompensationE{qreal}@Base 5.0.2
240+ _ZN15QCameraExposure21setManualShutterSpeedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
241+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure21setManualShutterSpeedE{qreal}@Base 5.0.2
242+ _ZN15QCameraExposure23setExposureCompensationEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
243+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure23setExposureCompensationE{qreal}@Base 5.0.2
244 _ZN15QCameraExposure23setManualIsoSensitivityEi@Base 5.0.2
245 _ZN15QCameraExposure24shutterSpeedRangeChangedEv@Base 5.0.2
246- (subst)_ZN15QCameraExposure27exposureCompensationChangedE{qreal}@Base 5.0.2
247+ _ZN15QCameraExposure27exposureCompensationChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
248+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN15QCameraExposure27exposureCompensationChangedE{qreal}@Base 5.0.2
249 _ZN15QCameraExposureC1EP7QCamera@Base 5.0.2
250 _ZN15QCameraExposureC2EP7QCamera@Base 5.0.2
251 _ZN15QCameraExposureD0Ev@Base 5.0.2
252@@ -656,12 +674,18 @@
253 _ZN18QCameraZoomControl11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.2
254 _ZN18QCameraZoomControl11qt_metacastEPKc@Base 5.0.2
255 _ZN18QCameraZoomControl16staticMetaObjectE@Base 5.0.2
256- (subst)_ZN18QCameraZoomControl25currentDigitalZoomChangedE{qreal}@Base 5.0.2
257- (subst)_ZN18QCameraZoomControl25currentOpticalZoomChangedE{qreal}@Base 5.0.2
258- (subst)_ZN18QCameraZoomControl25maximumDigitalZoomChangedE{qreal}@Base 5.0.2
259- (subst)_ZN18QCameraZoomControl25maximumOpticalZoomChangedE{qreal}@Base 5.0.2
260- (subst)_ZN18QCameraZoomControl27requestedDigitalZoomChangedE{qreal}@Base 5.0.2
261- (subst)_ZN18QCameraZoomControl27requestedOpticalZoomChangedE{qreal}@Base 5.0.2
262+ _ZN18QCameraZoomControl25currentDigitalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
263+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl25currentDigitalZoomChangedE{qreal}@Base 5.0.2
264+ _ZN18QCameraZoomControl25currentOpticalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
265+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl25currentOpticalZoomChangedE{qreal}@Base 5.0.2
266+ _ZN18QCameraZoomControl25maximumDigitalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
267+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl25maximumDigitalZoomChangedE{qreal}@Base 5.0.2
268+ _ZN18QCameraZoomControl25maximumOpticalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
269+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl25maximumOpticalZoomChangedE{qreal}@Base 5.0.2
270+ _ZN18QCameraZoomControl27requestedDigitalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
271+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl27requestedDigitalZoomChangedE{qreal}@Base 5.0.2
272+ _ZN18QCameraZoomControl27requestedOpticalZoomChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
273+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN18QCameraZoomControl27requestedOpticalZoomChangedE{qreal}@Base 5.0.2
274 _ZN18QCameraZoomControlC1EP7QObject@Base 5.0.2
275 _ZN18QCameraZoomControlC2EP7QObject@Base 5.0.2
276 _ZN18QCameraZoomControlD0Ev@Base 5.0.2
277@@ -780,7 +804,8 @@
278 _ZN19QMediaPlayerControl16staticMetaObjectE@Base 5.0.2
279 _ZN19QMediaPlayerControl18mediaStatusChangedEN12QMediaPlayer11MediaStatusE@Base 5.0.2
280 _ZN19QMediaPlayerControl19bufferStatusChangedEi@Base 5.0.2
281- (subst)_ZN19QMediaPlayerControl19playbackRateChangedE{qreal}@Base 5.0.2
282+ _ZN19QMediaPlayerControl19playbackRateChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
283+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN19QMediaPlayerControl19playbackRateChangedE{qreal}@Base 5.0.2
284 _ZN19QMediaPlayerControl21audioAvailableChangedEb@Base 5.0.2
285 _ZN19QMediaPlayerControl21videoAvailableChangedEb@Base 5.0.2
286 _ZN19QMediaPlayerControl30availablePlaybackRangesChangedERK15QMediaTimeRange@Base 5.0.2
287@@ -806,7 +831,8 @@
288 _ZN19QPlaylistFileParserD2Ev@Base 5.0.2
289 _ZN19QVideoSurfaceFormat11setPropertyEPKcRK8QVariant@Base 5.0.2
290 _ZN19QVideoSurfaceFormat11setViewportERK5QRect@Base 5.0.2
291- (subst)_ZN19QVideoSurfaceFormat12setFrameRateE{qreal}@Base 5.0.2
292+ _ZN19QVideoSurfaceFormat12setFrameRateEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
293+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN19QVideoSurfaceFormat12setFrameRateE{qreal}@Base 5.0.2
294 _ZN19QVideoSurfaceFormat12setFrameSizeERK5QSize@Base 5.0.2
295 _ZN19QVideoSurfaceFormat12setFrameSizeEii@Base 5.0.2
296 _ZN19QVideoSurfaceFormat18setYCbCrColorSpaceENS_15YCbCrColorSpaceE@Base 5.0.2
297@@ -870,7 +896,8 @@
298 _ZN20QAudioDecoderControlD0Ev@Base 5.0.2
299 _ZN20QAudioDecoderControlD1Ev@Base 5.0.2
300 _ZN20QAudioDecoderControlD2Ev@Base 5.0.2
301- (subst)_ZN20QAudioHelperInternal16qMultiplySamplesE{qreal}RK12QAudioFormatPKvPvi@Base 5.0.2
302+ _ZN20QAudioHelperInternal16qMultiplySamplesEdRK12QAudioFormatPKvPvi@Base 5.1.1+git20131205+8230c02-0ubuntu7
303+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN20QAudioHelperInternal16qMultiplySamplesE{qreal}RK12QAudioFormatPKvPvi@Base 5.0.2
304 _ZN20QImageEncoderControl11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.2
305 _ZN20QImageEncoderControl11qt_metacastEPKc@Base 5.0.2
306 _ZN20QImageEncoderControl16staticMetaObjectE@Base 5.0.2
307@@ -958,7 +985,8 @@
308 _ZN21QMediaRecorderControl12mutedChangedEb@Base 5.0.2
309 _ZN21QMediaRecorderControl12stateChangedEN14QMediaRecorder5StateE@Base 5.0.2
310 _ZN21QMediaRecorderControl13statusChangedEN14QMediaRecorder6StatusE@Base 5.0.2
311- (subst)_ZN21QMediaRecorderControl13volumeChangedE{qreal}@Base 5.0.2
312+ _ZN21QMediaRecorderControl13volumeChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
313+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN21QMediaRecorderControl13volumeChangedE{qreal}@Base 5.0.2
314 _ZN21QMediaRecorderControl15durationChangedEx@Base 5.0.2
315 _ZN21QMediaRecorderControl16staticMetaObjectE@Base 5.0.2
316 _ZN21QMediaRecorderControl21actualLocationChangedERK4QUrl@Base 5.0.2
317@@ -979,7 +1007,8 @@
318 _ZN21QMediaServiceProviderD2Ev@Base 5.0.2
319 _ZN21QVideoEncoderSettings10setBitRateEi@Base 5.0.2
320 _ZN21QVideoEncoderSettings10setQualityEN11QMultimedia15EncodingQualityE@Base 5.0.2
321- (subst)_ZN21QVideoEncoderSettings12setFrameRateE{qreal}@Base 5.0.2
322+ _ZN21QVideoEncoderSettings12setFrameRateEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
323+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN21QVideoEncoderSettings12setFrameRateE{qreal}@Base 5.0.2
324 _ZN21QVideoEncoderSettings13setResolutionERK5QSize@Base 5.0.2
325 _ZN21QVideoEncoderSettings13setResolutionEii@Base 5.0.2
326 _ZN21QVideoEncoderSettings15setEncodingModeEN11QMultimedia12EncodingModeE@Base 5.0.2
327@@ -1022,13 +1051,18 @@
328 _ZN22QCameraFeedbackControlD2Ev@Base 5.0.2
329 _ZN22QCameraImageProcessing11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.0.2
330 _ZN22QCameraImageProcessing11qt_metacastEPKc@Base 5.0.2
331- (subst)_ZN22QCameraImageProcessing11setContrastE{qreal}@Base 5.0.2
332- (subst)_ZN22QCameraImageProcessing13setSaturationE{qreal}@Base 5.0.2
333+ _ZN22QCameraImageProcessing11setContrastEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
334+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN22QCameraImageProcessing11setContrastE{qreal}@Base 5.0.2
335+ _ZN22QCameraImageProcessing13setSaturationEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
336+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN22QCameraImageProcessing13setSaturationE{qreal}@Base 5.0.2
337 _ZN22QCameraImageProcessing16staticMetaObjectE@Base 5.0.2
338- (subst)_ZN22QCameraImageProcessing17setDenoisingLevelE{qreal}@Base 5.0.2
339- (subst)_ZN22QCameraImageProcessing18setSharpeningLevelE{qreal}@Base 5.0.2
340+ _ZN22QCameraImageProcessing17setDenoisingLevelEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
341+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN22QCameraImageProcessing17setDenoisingLevelE{qreal}@Base 5.0.2
342+ _ZN22QCameraImageProcessing18setSharpeningLevelEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
343+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN22QCameraImageProcessing18setSharpeningLevelE{qreal}@Base 5.0.2
344 _ZN22QCameraImageProcessing19setWhiteBalanceModeENS_16WhiteBalanceModeE@Base 5.0.2
345- (subst)_ZN22QCameraImageProcessing21setManualWhiteBalanceE{qreal}@Base 5.0.2
346+ _ZN22QCameraImageProcessing21setManualWhiteBalanceEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
347+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN22QCameraImageProcessing21setManualWhiteBalanceE{qreal}@Base 5.0.2
348 _ZN22QCameraImageProcessingC1EP7QCamera@Base 5.0.2
349 _ZN22QCameraImageProcessingC2EP7QCamera@Base 5.0.2
350 _ZN22QCameraImageProcessingD0Ev@Base 5.0.2
351@@ -1264,7 +1298,8 @@
352 _ZN28QMediaGaplessPlaybackControl16nextMediaChangedERK13QMediaContent@Base 5.0.2
353 _ZN28QMediaGaplessPlaybackControl16staticMetaObjectE@Base 5.0.2
354 _ZN28QMediaGaplessPlaybackControl19advancedToNextMediaEv@Base 5.0.2
355- (subst)_ZN28QMediaGaplessPlaybackControl20crossfadeTimeChangedE{qreal}@Base 5.0.2
356+ _ZN28QMediaGaplessPlaybackControl20crossfadeTimeChangedEd@Base 5.1.1+git20131205+8230c02-0ubuntu7
357+#MISSING: 5.1.1+git20131205+8230c02-0ubuntu7# (subst)_ZN28QMediaGaplessPlaybackControl20crossfadeTimeChangedE{qreal}@Base 5.0.2
358 _ZN28QMediaGaplessPlaybackControlC1EP7QObject@Base 5.0.2
359 _ZN28QMediaGaplessPlaybackControlC2EP7QObject@Base 5.0.2
360 _ZN28QMediaGaplessPlaybackControlD0Ev@Base 5.0.2
361
362=== modified file 'debian/libqt5multimediaquick-p5-touch.postrm'
363--- debian/libqt5multimediaquick-p5-touch.postrm 2013-09-20 20:15:35 +0000
364+++ debian/libqt5multimediaquick-p5-touch.postrm 2014-02-26 20:49:23 +0000
365@@ -2,7 +2,7 @@
366 divert_dir="/var/lib/$pkg-diverted"
367
368 if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" -o purge = "$1" ]; then
369- for version in 5.0.2 5.0 5; do
370+ for version in 5.2.1 5.2 5; do
371 dpkg-divert --package "$pkg" --remove --rename \
372 --divert \
373 "$divert_dir"/libQt5MultimediaQuick_p.so.$version.diverted-$pkg \
374
375=== modified file 'debian/libqt5multimediaquick-p5-touch.preinst'
376--- debian/libqt5multimediaquick-p5-touch.preinst 2013-09-20 20:15:35 +0000
377+++ debian/libqt5multimediaquick-p5-touch.preinst 2014-02-26 20:49:23 +0000
378@@ -6,7 +6,7 @@
379 mkdir -p "$divert_dir"
380 fi
381
382- for version in 5.0.2 5.0 5; do
383+ for version in 5.2.1 5.2 5; do
384 dpkg-divert --package "$pkg" --add --rename \
385 --divert \
386 "$divert_dir"/libQt5MultimediaQuick_p.so.$version.diverted-$pkg \
387
388=== modified file 'debian/qtmultimedia5-touch-dev.install'
389--- debian/qtmultimedia5-touch-dev.install 2013-09-19 11:12:34 +0000
390+++ debian/qtmultimedia5-touch-dev.install 2014-02-26 20:49:23 +0000
391@@ -193,6 +193,11 @@
392 usr/lib/*/pkgconfig/Qt5Multimedia.pc
393 usr/lib/*/pkgconfig/Qt5MultimediaQuick_p.pc
394 usr/lib/*/pkgconfig/Qt5MultimediaWidgets.pc
395-usr/share/qt5/mkspecs/modules/qt_lib_multimedia.pri
396-usr/share/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri
397-usr/share/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools.pri
398+usr/lib/*/qt5/mkspecs/modules/qt_lib_multimedia.pri
399+usr/lib/*/qt5/mkspecs/modules/qt_lib_multimedia_private.pri
400+usr/lib/*/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri
401+usr/lib/*/qt5/mkspecs/modules/qt_lib_multimediawidgets_private.pri
402+usr/lib/*/qt5/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri
403+usr/include/qt5/QtMultimedia/QtMultimediaDepends
404+usr/include/qt5/QtMultimediaWidgets/QtMultimediaWidgetsDepends
405+usr/include/qt5/QtMultimediaQuick_p/QtMultimediaQuick_pDepends
406
407=== modified file 'debian/rules'
408--- debian/rules 2013-11-25 14:42:05 +0000
409+++ debian/rules 2014-02-26 20:49:23 +0000
410@@ -56,6 +56,7 @@
411 debian/libqt5multimedia5-touch-plugins.preinst
412 sed "s/__ARCH__/$(DEB_HOST_MULTIARCH)/g" -i \
413 debian/libqt5multimedia5-touch-plugins.postrm
414+ ./debian/syncqt.pl -version 5.1.1
415 qmake CONFIG+=mir
416
417 override_dh_auto_install-arch:
418
419=== added file 'debian/syncqt.pl'
420--- debian/syncqt.pl 1970-01-01 00:00:00 +0000
421+++ debian/syncqt.pl 2014-02-26 20:49:23 +0000
422@@ -0,0 +1,1223 @@
423+#!/usr/bin/env perl
424+#############################################################################
425+##
426+## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
427+## Contact: http://www.qt-project.org/legal
428+##
429+## This file is part of the build configuration tools of the Qt Toolkit.
430+##
431+## $QT_BEGIN_LICENSE:LGPL$
432+## Commercial License Usage
433+## Licensees holding valid commercial Qt licenses may use this file in
434+## accordance with the commercial license agreement provided with the
435+## Software or, alternatively, in accordance with the terms contained in
436+## a written agreement between you and Digia. For licensing terms and
437+## conditions see http://qt.digia.com/licensing. For further information
438+## use the contact form at http://qt.digia.com/contact-us.
439+##
440+## GNU Lesser General Public License Usage
441+## Alternatively, this file may be used under the terms of the GNU Lesser
442+## General Public License version 2.1 as published by the Free Software
443+## Foundation and appearing in the file LICENSE.LGPL included in the
444+## packaging of this file. Please review the following information to
445+## ensure the GNU Lesser General Public License version 2.1 requirements
446+## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
447+##
448+## In addition, as a special exception, Digia gives you certain additional
449+## rights. These rights are described in the Digia Qt LGPL Exception
450+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
451+##
452+## GNU General Public License Usage
453+## Alternatively, this file may be used under the terms of the GNU
454+## General Public License version 3.0 as published by the Free Software
455+## Foundation and appearing in the file LICENSE.GPL included in the
456+## packaging of this file. Please review the following information to
457+## ensure the GNU General Public License version 3.0 requirements will be
458+## met: http://www.gnu.org/copyleft/gpl.html.
459+##
460+##
461+## $QT_END_LICENSE$
462+##
463+#############################################################################
464+
465+#
466+# Synchronizes Qt header files - internal development tool.
467+#
468+
469+# use packages -------------------------------------------------------
470+use File::Basename;
471+use File::Path;
472+use File::Spec;
473+use Cwd;
474+use Cwd 'abs_path';
475+use Config;
476+use strict;
477+use warnings;
478+use English qw(-no_match_vars );
479+
480+my $normalizePath_fixDrive = ($^O eq "msys" ? 1 : 0);
481+
482+######################################################################
483+# Syntax: normalizePath(\$path)
484+# Params: Reference to a path that's going to be normalized.
485+#
486+# Purpose: Converts the path into a form that can be used as include
487+# path from C++ sources and qmake's .pro files.
488+# Only relevant on Windows.
489+# Returns: -none-
490+######################################################################
491+sub normalizePath {
492+ my $s = shift;
493+ $$s =~ s=\\=/=g;
494+ if ($normalizePath_fixDrive && ($$s =~ m,^/([a-zA-Z])/(.*), || $$s =~ m,^([a-zA-Z]):/(.*),)) {
495+ $$s = lc($1) . ":/$2";
496+ }
497+}
498+
499+# set output basedir to be where ever syncqt is run from
500+our $out_basedir = getcwd();
501+normalizePath(\$out_basedir);
502+our $basedir;
503+our $quoted_basedir;
504+
505+# Make sure we use Windows line endings for chomp and friends on Windows.
506+$INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys");
507+
508+# will be defined based on the modules sync.profile
509+our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders);
510+our @qpa_headers = ();
511+
512+# global variables (modified by options)
513+my $isunix = 0;
514+my $module = 0;
515+my $showonly = 0;
516+my $verbose_level = 1;
517+my $remove_stale = 1;
518+my $force_win = 0;
519+my $force_relative = 0;
520+my $check_includes = 0;
521+my $copy_headers = 0;
522+my $create_private_headers = 1;
523+my $minimal = 0;
524+my $module_version = 0;
525+my @modules_to_sync ;
526+$force_relative = 1 if ( -d "/System/Library/Frameworks" );
527+
528+
529+# functions ----------------------------------------------------------
530+
531+######################################################################
532+# Syntax: showUsage()
533+# Params: -none-
534+#
535+# Purpose: Show the usage of the script.
536+# Returns: -none-
537+######################################################################
538+sub showUsage
539+{
540+ print "$0 usage:\n";
541+ print " <module directory> Specifies which module to sync header files for (required for shadow builds!)\n\n";
542+
543+ print " -copy Copy headers instead of include-fwd(default: " . ($copy_headers ? "yes" : "no") . ")\n";
544+ print " -remove-stale Removes stale headers (default: " . ($remove_stale ? "yes" : "no") . ")\n";
545+ print " -relative Force relative symlinks (default: " . ($force_relative ? "yes" : "no") . ")\n";
546+ print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
547+ print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
548+ print " -minimal Do not create CamelCase headers (default: " . ($minimal ? "yes" : "no") . ")\n";
549+ print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
550+ print " -version <VERSION> Specify the module's version (default: detect from qglobal.h)\n";
551+ print " -quiet Only report problems, not activity (same as -verbose 0)\n";
552+ print " -v, -verbose <level> Sets the verbosity level (max. 4) (default: $verbose_level)\n";
553+ print " The short form increases the level by +1\n";
554+ print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR>\n";
555+ print " Create headers for <NAME> with original headers in\n";
556+ print " <HEADERDIR> relative to <PROFILEDIR> \n";
557+ print " -private Force copy private headers (default: " . ($create_private_headers ? "yes" : "no") . ")\n";
558+ print " -help This help\n";
559+ exit 0;
560+}
561+
562+######################################################################
563+# Syntax: checkUnix()
564+# Params: -none-
565+#
566+# Purpose: Check if script runs on a Unix system or not. Cygwin
567+# systems are _not_ detected as Unix systems.
568+# Returns: 1 if a unix system, else 0.
569+######################################################################
570+sub checkUnix {
571+ my ($r) = 0;
572+ if ( $force_win != 0) {
573+ return 0;
574+ } elsif ( -f "/bin/uname" ) {
575+ $r = 1;
576+ (-f "\\bin\\uname") && ($r = 0);
577+ } elsif ( -f "/usr/bin/uname" ) {
578+ $r = 1;
579+ (-f "\\usr\\bin\\uname") && ($r = 0);
580+ }
581+ if($r) {
582+ $_ = $Config{'osname'};
583+ $r = 0 if( /(ms)|(cyg)win/i );
584+ }
585+ return $r;
586+}
587+
588+sub checkRelative {
589+ my ($dir) = @_;
590+ return 0 if($dir =~ /^\//);
591+ return 0 if(!checkUnix() && $dir =~ /[a-zA-Z]:[\/\\]/);
592+ return 1;
593+}
594+
595+######################################################################
596+# Syntax: shouldMasterInclude(iheader)
597+# Params: iheader, string, filename to verify inclusion
598+#
599+# Purpose: Determines if header should be in the master include file.
600+# Returns: 0 if file contains "#pragma qt_no_master_include" or not
601+# able to open, else 1.
602+######################################################################
603+sub shouldMasterInclude {
604+ my ($iheader) = @_;
605+ return 0 if (basename($iheader) =~ /_/);
606+ return 0 if (basename($iheader) =~ /qconfig/);
607+ if (open(F, "<$iheader")) {
608+ while (<F>) {
609+ chomp;
610+ return 0 if (/^\#pragma qt_no_master_include$/);
611+ }
612+ close(F);
613+ } else {
614+ return 0;
615+ }
616+ return 1;
617+}
618+
619+######################################################################
620+# Syntax: classNames(iheader)
621+# Params: iheader, string, filename to parse for classname "symlinks"
622+#
623+# Purpose: Scans through iheader to find all classnames that should be
624+# synced into library's include structure.
625+# Returns: List of all class names in a file.
626+######################################################################
627+sub classNames {
628+ my @ret;
629+ my ($iheader) = @_;
630+
631+ my $classname = $classnames{basename($iheader)};
632+ push @ret, $classname if ($classname);
633+
634+ my $parsable = "";
635+ if(open(F, "<$iheader")) {
636+ while(<F>) {
637+ my $line = $_;
638+ chomp $line;
639+ chop $line if ($line =~ /\r$/);
640+ if($line =~ /^\#/) {
641+ return @ret if($line =~ m/^#pragma qt_sync_stop_processing/);
642+ push(@ret, $1) if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/);
643+ $line = 0;
644+ }
645+ if($line) {
646+ $line =~ s,//.*$,,; #remove c++ comments
647+ $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro
648+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro
649+ $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE(_[A-Z]+)*[\r\n]*$/); #qt macro
650+ $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro
651+ $parsable .= " " . $line;
652+ }
653+ }
654+ close(F);
655+ }
656+
657+ my $last_definition = 0;
658+ my @namespaces;
659+ for(my $i = 0; $i < length($parsable); $i++) {
660+ my $definition = 0;
661+ my $character = substr($parsable, $i, 1);
662+ if($character eq "/" && substr($parsable, $i+1, 1) eq "*") { #I parse like this for greedy reasons
663+ for($i+=2; $i < length($parsable); $i++) {
664+ my $end = substr($parsable, $i, 2);
665+ if($end eq "*/") {
666+ $last_definition = $i+2;
667+ $i++;
668+ last;
669+ }
670+ }
671+ } elsif($character eq "{") {
672+ my $brace_depth = 1;
673+ my $block_start = $i + 1;
674+ BLOCK: for($i+=1; $i < length($parsable); $i++) {
675+ my $ignore = substr($parsable, $i, 1);
676+ if($ignore eq "{") {
677+ $brace_depth++;
678+ } elsif($ignore eq "}") {
679+ $brace_depth--;
680+ unless($brace_depth) {
681+ for(my $i2 = $i+1; $i2 < length($parsable); $i2++) {
682+ my $end = substr($parsable, $i2, 1);
683+ if($end eq ";" || $end ne " ") {
684+ $definition = substr($parsable, $last_definition, $block_start - $last_definition) . "}";
685+ $i = $i2 if($end eq ";");
686+ $last_definition = $i + 1;
687+ last BLOCK;
688+ }
689+ }
690+ }
691+ }
692+ }
693+ } elsif($character eq ";") {
694+ $definition = substr($parsable, $last_definition, $i - $last_definition + 1);
695+ $last_definition = $i + 1;
696+ } elsif($character eq "}") {
697+ # a naked } must be a namespace ending
698+ # if it's not a namespace, it's eaten by the loop above
699+ pop @namespaces;
700+ $last_definition = $i + 1;
701+ }
702+
703+ if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) /
704+ && substr($parsable, $i+1, 1) eq "{") {
705+ push @namespaces, $1;
706+
707+ # Eat the opening { so that the condensing loop above doesn't see it
708+ $i++;
709+ $last_definition = $i + 1;
710+ }
711+
712+ if($definition) {
713+ $definition =~ s=[\n\r]==g;
714+ my @symbols;
715+ my $post_kw = qr/Q_DECL_FINAL|final|sealed/; # add here macros and keywords that go after the class-name of a class definition
716+ if($definition =~ m/^ *typedef *.*\(\*([^\)]*)\)\(.*\);$/) {
717+ push @symbols, $1;
718+ } elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) {
719+ push @symbols, $2;
720+ } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?((?!$post_kw)[^<\s]+) ?(<[^>]*> ?)?\s*(?:$post_kw)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/o) {
721+ push @symbols, $4;
722+ } elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) {
723+ push @symbols, "Q" . $1 . "Iterator";
724+ push @symbols, "QMutable" . $1 . "Iterator";
725+ }
726+
727+ our $publicclassregexp;
728+ foreach my $symbol (@symbols) {
729+ $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces);
730+
731+ if ($symbol =~ /^Q[^:]*$/) { # no-namespace, starting with Q
732+ push @ret, $symbol;
733+ } elsif (defined($publicclassregexp)) {
734+ push @ret, $symbol if ($symbol =~ $publicclassregexp);
735+ }
736+ }
737+ }
738+ }
739+ return @ret;
740+}
741+
742+sub make_path {
743+ my ($dir, $lib, $be_verbose) = @_;
744+ unless(-e $dir) {
745+ mkpath $dir;
746+ $dir = "<outbase>" . substr($dir, length($out_basedir)) if ($be_verbose < 3);
747+ print "$lib: mkpath $dir\n" if ($be_verbose > 1);
748+ }
749+}
750+
751+######################################################################
752+# Syntax: syncHeader(header, iheader, copy, timestamp)
753+# Params: header, string, filename to create "symlink" for
754+# iheader, string, destination name of symlink
755+# copy, forces header to be a copy of iheader
756+# timestamp, the requested modification time if copying
757+#
758+# Purpose: Syncronizes header to iheader
759+# Returns: 1 if successful, else 0.
760+######################################################################
761+sub syncHeader {
762+ my ($lib, $header, $iheader, $copy, $ts) = @_;
763+ normalizePath(\$iheader);
764+ normalizePath(\$header);
765+ return copyFile($lib, $iheader, $header) if($copy);
766+
767+ unless(-e $header) {
768+ my $header_dir = dirname($header);
769+ make_path($header_dir, $lib, $verbose_level);
770+
771+ #write it
772+ my $iheader_out = fixPaths($iheader, $header_dir);
773+ open(HEADER, ">$header") || die "Could not open $header for writing: $!\n";
774+ print HEADER "#include \"$iheader_out\"\n";
775+ close HEADER;
776+ if(defined($ts)) {
777+ utime(time, $ts, $header) or die "$iheader, $header";
778+ }
779+ return 1;
780+ }
781+ return 0;
782+}
783+
784+######################################################################
785+# Syntax: fixPaths(file, dir)
786+# Params: file, string, filepath to be made relative to dir
787+# dir, string, dirpath for point of origin
788+#
789+# Purpose: file is made relative (if possible) of dir.
790+# Returns: String with the above applied conversion.
791+######################################################################
792+
793+sub cleanupPath {
794+ my ($file) = @_;
795+ normalizePath(\$file);
796+ while ($file =~ s,/[^/]+/\.\./,/,) {}
797+ return $file;
798+}
799+
800+sub fixPaths {
801+ my ($file, $dir) = @_;
802+
803+ my $out = File::Spec->abs2rel(cleanupPath($file), cleanupPath($dir));
804+ $out =~ s,\\,/,g;
805+ return $out;
806+}
807+
808+######################################################################
809+# Syntax: fileContents(filename)
810+# Params: filename, string, filename of file to return contents
811+#
812+# Purpose: Get the contents of a file.
813+# Returns: String with contents of the file, or empty string if file
814+# doens't exist.
815+# Warning: Dies if it does exist but script cannot get read access.
816+######################################################################
817+sub fileContents {
818+ my ($filename) = @_;
819+ my $filecontents = "";
820+ if (-e $filename) {
821+ open(I, "< $filename") || die "Could not open $filename for reading, read block?";
822+ local $/;
823+ binmode I;
824+ $filecontents = <I>;
825+ close I;
826+ }
827+ return $filecontents;
828+}
829+
830+######################################################################
831+# Syntax: writeFile(filename, contents)
832+# Params: filename, string, filename of file to write
833+# contents, string, new contents for the file
834+#
835+# Purpose: Write file with given contents. If new contents match old
836+# ones, do no change the file's timestamp.
837+# Returns: 1 if the file's contents changed.
838+######################################################################
839+sub writeFile {
840+ my ($filename, $contents, $lib, $what) = @_;
841+ my $oldcontents = fileContents($filename);
842+ $oldcontents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
843+ if ($oldcontents ne $contents) {
844+ open(O, "> " . $filename) || die "Could not open $filename for writing: $!\n";
845+ print O $contents;
846+ close O;
847+ if ($lib && $verbose_level) {
848+ my $action = ($oldcontents eq "") ? "created" : "updated";
849+ print "$lib: $action $what\n";
850+ }
851+ return 1;
852+ }
853+ return 0;
854+}
855+
856+######################################################################
857+# Syntax: fileCompare(file1, file2)
858+# Params: file1, string, filename of first file
859+# file2, string, filename of second file
860+#
861+# Purpose: Determines if files are equal, and which one is newer.
862+# Returns: 0 if files are equal no matter the timestamp, -1 if file1
863+# is newer, 1 if file2 is newer.
864+######################################################################
865+sub fileCompare {
866+ my ($file1, $file2) = @_;
867+ my $file1contents = fileContents($file1);
868+ my $file2contents = fileContents($file2);
869+ if (! -e $file1) { return 1; }
870+ if (! -e $file2) { return -1; }
871+ return $file1contents ne $file2contents ? (stat($file2))[9] <=> (stat($file1))[9] : 0;
872+}
873+
874+######################################################################
875+# Syntax: copyFile(file, ifile)
876+# Params: file, string, filename to create duplicate for
877+# ifile, string, destination name of duplicate
878+#
879+# Purpose: Keeps files in sync so changes in the newer file will be
880+# written to the other.
881+# Returns: 1 if files were synced, else 0.
882+# Warning: Dies if script cannot get write access.
883+######################################################################
884+sub copyFile
885+{
886+ my ($lib, $file,$ifile, $copy,$knowdiff,$filecontents,$ifilecontents) = @_;
887+ # Bi-directional synchronization
888+ open( I, "< " . $file ) || die "Could not open $file for reading";
889+ local $/;
890+ binmode I;
891+ $filecontents = <I>;
892+ close I;
893+ if ( open(I, "< " . $ifile) ) {
894+ local $/;
895+ binmode I;
896+ $ifilecontents = <I>;
897+ close I;
898+ $copy = fileCompare($file, $ifile);
899+ $knowdiff = 0,
900+ } else {
901+ $copy = -1;
902+ $knowdiff = 1;
903+ }
904+
905+ if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
906+ if ( $copy > 0 ) {
907+ my $file_dir = dirname($file);
908+ make_path($file_dir, $lib, $verbose_level);
909+ open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
910+ local $/;
911+ binmode O;
912+ print O $ifilecontents;
913+ close O;
914+ utime time, (stat($ifile))[9], $file;
915+ return 1;
916+ } elsif ( $copy < 0 ) {
917+ my $ifile_dir = dirname($ifile);
918+ make_path($ifile_dir, $lib, $verbose_level);
919+ open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
920+ local $/;
921+ binmode O;
922+ print O $filecontents;
923+ close O;
924+ utime time, (stat($file))[9], $ifile;
925+ return 1;
926+ }
927+ }
928+ return 0;
929+}
930+
931+######################################################################
932+# Syntax: findFiles(dir, match, descend)
933+# Params: dir, string, directory to search for name
934+# match, string, regular expression to match in dir
935+# descend, integer, 0 = non-recursive search
936+# 1 = recurse search into subdirectories
937+#
938+# Purpose: Finds files matching a regular expression.
939+# Returns: List of matching files.
940+#
941+# Examples:
942+# findFiles("/usr","\.cpp$",1) - finds .cpp files in /usr and below
943+# findFiles("/tmp","^#",0) - finds #* files in /tmp
944+######################################################################
945+sub findFiles {
946+ my ($dir,$match,$descend) = @_;
947+ my ($file,$p,@files);
948+ local(*D);
949+ normalizePath(\$dir);
950+ ($dir eq "") && ($dir = ".");
951+ if ( opendir(D,$dir) ) {
952+ if ( $dir eq "." ) {
953+ $dir = "";
954+ } else {
955+ ($dir =~ /\/$/) || ($dir .= "/");
956+ }
957+ foreach $file ( sort readdir(D) ) {
958+ next if ( $file =~ /^\.\.?$/ );
959+ $p = $file;
960+ ($file =~ /$match/) && (push @files, $p);
961+ if ( $descend && -d $p && ! -l $p ) {
962+ push @files, &findFiles($p,$match,$descend);
963+ }
964+ }
965+ closedir(D);
966+ }
967+ return @files;
968+}
969+
970+sub listSubdirs {
971+ my @subdirs = @_;
972+ foreach my $subdir (@subdirs) {
973+ opendir DIR, $subdir or die "Huh, directory ".$subdir." cannot be opened.";
974+ foreach my $t (sort readdir(DIR)) {
975+ push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
976+ !($t eq "..") && !($t eq ".obj") &&
977+ !($t eq ".moc") && !($t eq ".rcc") &&
978+ !($t eq ".uic") && !($t eq "build") &&
979+ !($t eq "doc"));
980+ }
981+ closedir DIR;
982+ }
983+ return @subdirs;
984+}
985+
986+######################################################################
987+# Syntax: loadSyncProfile()
988+#
989+# Purpose: Locates the sync.profile.
990+# Returns: Hashmap of module name -> directory.
991+######################################################################
992+sub loadSyncProfile {
993+ my ($srcbase, $outbase) = @_;
994+ if ($verbose_level) {
995+ print("<srcbase> = $$srcbase \n");
996+ print("<outbase> = $$outbase \n");
997+ }
998+
999+ my $syncprofile = "$$srcbase/sync.profile";
1000+ my $result;
1001+ unless ($result = do "$syncprofile") {
1002+ die "syncqt couldn't parse $syncprofile: $@" if $@;
1003+ die "syncqt couldn't execute $syncprofile: $!" unless defined $result;
1004+ }
1005+ return $result;
1006+}
1007+
1008+sub basePrettify {
1009+ my ($arg) = @_;
1010+ $$arg =~ s,^\Q$basedir\E,<srcbase>,;
1011+ $$arg =~ s,^\Q$out_basedir\E,<outbase>,;
1012+}
1013+
1014+sub cleanPath {
1015+ my ($arg) = @_;
1016+ while ($arg =~ s,[^/]+/\.\.(/|$),,) {}
1017+ return $arg;
1018+}
1019+
1020+sub locateSyncProfile
1021+{
1022+ my ($directory) = @_;
1023+ $directory = abs_path($directory);
1024+ while (1) {
1025+ my $file = $directory."/sync.profile";
1026+ return $file if (-e $file);
1027+ my $odir = $directory;
1028+ $directory = dirname($directory);
1029+ return undef if ($directory eq $odir);
1030+ }
1031+}
1032+
1033+sub isQpaHeader
1034+{
1035+ my ($header) = @_;
1036+ foreach my $qpa_header (@qpa_headers) {
1037+ return 1 if ($header =~ $qpa_header);
1038+ }
1039+ return 0;
1040+}
1041+
1042+# check if this is an in-source build, and if so use that as the basedir too
1043+$basedir = locateSyncProfile($out_basedir);
1044+if ($basedir) {
1045+ $basedir = dirname($basedir) ;
1046+ normalizePath(\$basedir);
1047+ $quoted_basedir = "\Q$basedir";
1048+}
1049+
1050+# --------------------------------------------------------------------
1051+# "main" function
1052+# --------------------------------------------------------------------
1053+
1054+while ( @ARGV ) {
1055+ my $var = 0;
1056+ my $val = 0;
1057+
1058+ #parse
1059+ my $arg = shift @ARGV;
1060+ if ($arg eq "-h" || $arg eq "-help" || $arg eq "-?" || $arg eq "?") {
1061+ $var = "show_help";
1062+ $val = "yes";
1063+ } elsif($arg eq "-copy") {
1064+ $var = "copy";
1065+ $val = "yes";
1066+ } elsif($arg eq "-o" || $arg eq "-outdir") {
1067+ $var = "output";
1068+ $val = shift @ARGV;
1069+ } elsif($arg eq "-showonly" || $arg eq "-remove-stale" || $arg eq "-windows" ||
1070+ $arg eq "-relative" || $arg eq "-check-includes") {
1071+ $var = substr($arg, 1);
1072+ $val = "yes";
1073+ } elsif($arg =~ /^-no-(.*)$/) {
1074+ $var = $1;
1075+ $val = "no";
1076+ #these are for commandline compat
1077+ } elsif($arg eq "-inc") {
1078+ $var = "output";
1079+ $val = shift @ARGV;
1080+ } elsif($arg eq "-module") {
1081+ $var = "module";
1082+ $val = shift @ARGV;
1083+ } elsif($arg eq "-separate-module") {
1084+ $var = "separate-module";
1085+ $val = shift @ARGV;
1086+ } elsif($arg eq "-show") {
1087+ $var = "showonly";
1088+ $val = "yes";
1089+ } elsif($arg eq "-quiet") {
1090+ $var = "verbose";
1091+ $val = "0";
1092+ } elsif($arg eq "-v") {
1093+ $var = "verbose";
1094+ $val = "yes";
1095+ } elsif($arg eq "-verbose") {
1096+ $var = "verbose";
1097+ $val = shift @ARGV;
1098+ } elsif($arg eq "-minimal") {
1099+ $var = "minimal";
1100+ $val = "yes";
1101+ } elsif($arg eq "-private") {
1102+ $var = "create_private_headers";
1103+ $val = "yes";
1104+ } elsif($arg eq "-version") {
1105+ $var = "version";
1106+ $val = shift @ARGV;
1107+ } elsif($arg =~/^-/) {
1108+ print "Unknown option: $arg\n\n" if(!$var);
1109+ showUsage();
1110+ } else {
1111+ $basedir = locateSyncProfile($arg);
1112+ die "Could not find a sync.profile for '$arg'\n" if (!$basedir);
1113+ $basedir = dirname($basedir);
1114+ normalizePath(\$basedir);
1115+ $quoted_basedir = "\Q$basedir";
1116+ $var = "ignore";
1117+ }
1118+
1119+ #do something
1120+ if(!$var || $var eq "show_help") {
1121+ print "Unknown option: $arg\n\n" if(!$var);
1122+ showUsage();
1123+ } elsif ($var eq "copy") {
1124+ if($val eq "yes") {
1125+ $copy_headers++;
1126+ } elsif($showonly) {
1127+ $copy_headers--;
1128+ }
1129+ } elsif ($var eq "showonly") {
1130+ if($val eq "yes") {
1131+ $showonly++;
1132+ } elsif($showonly) {
1133+ $showonly--;
1134+ }
1135+ } elsif ($var eq "verbose") {
1136+ if($val eq "yes") {
1137+ $verbose_level++;
1138+ } elsif($val eq "no" && $verbose_level) {
1139+ $verbose_level--;
1140+ } else {
1141+ $verbose_level = int($val);
1142+ }
1143+ } elsif ($var eq "check-includes") {
1144+ if($val eq "yes") {
1145+ $check_includes++;
1146+ } elsif($check_includes) {
1147+ $check_includes--;
1148+ }
1149+ } elsif ($var eq "remove-stale") {
1150+ if($val eq "yes") {
1151+ $remove_stale++;
1152+ } elsif($remove_stale) {
1153+ $remove_stale--;
1154+ }
1155+ } elsif ($var eq "windows") {
1156+ if($val eq "yes") {
1157+ $force_win++;
1158+ } elsif($force_win) {
1159+ $force_win--;
1160+ }
1161+ } elsif ($var eq "relative") {
1162+ if($val eq "yes") {
1163+ $force_relative++;
1164+ } elsif($force_relative) {
1165+ $force_relative--;
1166+ }
1167+ } elsif ($var eq "minimal") {
1168+ if($val eq "yes") {
1169+ $minimal++;
1170+ } elsif($minimal) {
1171+ $minimal--;
1172+ }
1173+ } elsif ($var eq "module") {
1174+ push @modules_to_sync, $val;
1175+ } elsif ($var eq "separate-module") {
1176+ my ($module, $prodir, $headerdir) = split(/:/, $val);
1177+ $modules{$module} = $prodir;
1178+ push @modules_to_sync, $module;
1179+ $moduleheaders{$module} = $headerdir;
1180+ } elsif ($var eq "version") {
1181+ if($val) {
1182+ $module_version = $val;
1183+ } else {
1184+ die "The -version option requires an argument";
1185+ }
1186+ } elsif ($var eq "output") {
1187+ my $outdir = $val;
1188+ if(checkRelative($outdir)) {
1189+ $out_basedir = getcwd();
1190+ chomp $out_basedir;
1191+ $out_basedir .= "/" . $outdir;
1192+ } else {
1193+ $out_basedir = $outdir;
1194+ }
1195+ normalizePath(\$out_basedir);
1196+ }
1197+}
1198+
1199+# if we have no $basedir we cannot be sure which sources you want, so die
1200+die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir);
1201+
1202+my $class_lib_map_contents = "";
1203+our @ignore_headers = ();
1204+our @ignore_for_master_contents = ();
1205+our @ignore_for_include_check = ();
1206+our @ignore_for_qt_begin_namespace_check = ();
1207+our @ignore_for_qt_module_check = ();
1208+our %inject_headers = ();
1209+
1210+# load the module's sync.profile here, before we can
1211+loadSyncProfile(\$basedir, \$out_basedir);
1212+
1213+@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
1214+
1215+my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate;
1216+
1217+$isunix = checkUnix; #cache checkUnix
1218+
1219+if (!$module_version) {
1220+ my $filco = fileContents($basedir."/src/corelib/global/qglobal.h");
1221+ if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) {
1222+ die "Cannot determine Qt/Module version. Use -version.\n";
1223+ }
1224+ $module_version = $1;
1225+}
1226+foreach my $lib (@modules_to_sync) {
1227+ die "No such module: $lib" unless(defined $modules{$lib});
1228+
1229+ #iteration info
1230+ my $module = $modules{$lib};
1231+ my $is_qt = !($module =~ s/^!//);
1232+ my @dirs = split(/;/, $module);
1233+ my $dir = $dirs[0];
1234+
1235+ my $pathtoheaders = "";
1236+ $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib});
1237+
1238+ my $allheadersprivate = 0;
1239+ $allheadersprivate = 1 if $allmoduleheadersprivate{$lib};
1240+
1241+ #information used after the syncing
1242+ my $pri_install_classes = "";
1243+ my $pri_install_files = "";
1244+ my $pri_install_pfiles = "";
1245+ my $pri_install_qpafiles = "";
1246+
1247+ my $libcapitals = uc($lib);
1248+ my $master_contents =
1249+ "#ifndef QT_".$libcapitals."_MODULE_H\n" .
1250+ "#define QT_".$libcapitals."_MODULE_H\n" .
1251+ "#include <$lib/${lib}Depends>\n";
1252+
1253+ #remove the old files
1254+ if($remove_stale) {
1255+ my %injections = ();
1256+ for my $p (keys %inject_headers) {
1257+ next unless ($p =~ /^\Q$dir\E(\/|$)/);
1258+ my $sp = $p;
1259+ $sp =~ s,^\Q$basedir\E/,$out_basedir/,;
1260+ for my $n (@{$inject_headers{$p}}) {
1261+ $injections{$sp."/".$n} = 1;
1262+ }
1263+ }
1264+ my @subdirs = ("$out_basedir/include/$lib");
1265+ foreach my $subdir (@subdirs) {
1266+ if (opendir DIR, $subdir) {
1267+ foreach my $t (sort { $b cmp $a } readdir(DIR)) {
1268+ my $file = "$subdir/$t";
1269+ if(-d $file) {
1270+ push @subdirs, $file unless($t eq "." || $t eq "..");
1271+ } else {
1272+ my @files = ($file);
1273+ #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t");
1274+ foreach my $file (@files) {
1275+ my $remove_file = 0;
1276+ if(open(F, "<$file")) {
1277+ while(my $line = <F>) {
1278+ chomp $line;
1279+ if($line =~ /^\#include \"([^\"]*)\"$/) {
1280+ my $include = $1;
1281+ $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/");
1282+ $remove_file = 1 unless(-e $include or defined $injections{cleanPath($include)});
1283+ } else {
1284+ $remove_file = 0;
1285+ last;
1286+ }
1287+ }
1288+ close(F);
1289+ unlink $file if($remove_file);
1290+ }
1291+ }
1292+ }
1293+ }
1294+ closedir DIR;
1295+ }
1296+
1297+ }
1298+ }
1299+
1300+ #create the new ones
1301+ foreach my $current_dir (@dirs) {
1302+ my $thisprivate = 0;
1303+ ($current_dir =~ s/^\^//) and $thisprivate = 1;
1304+ my @headers_paths = split(/;/, $pathtoheaders);
1305+ if (@headers_paths) {
1306+ @headers_paths = map { "$current_dir/$_" } @headers_paths;
1307+ } else {
1308+ push @headers_paths, $current_dir;
1309+ }
1310+
1311+ foreach my $headers_dir (@headers_paths) {
1312+ #calc subdirs
1313+ my @subdirs = listSubdirs($headers_dir);
1314+
1315+ #calc files and "copy" them
1316+ foreach my $subdir (@subdirs) {
1317+ my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
1318+ my $header_dirname = "";
1319+ foreach my $header (@headers) {
1320+ $header = 0 if($header =~ /^ui_.*.h/);
1321+ foreach (@ignore_headers) {
1322+ $header = 0 if($header eq $_);
1323+ }
1324+ if($header) {
1325+ my $header_copies = 0;
1326+ #figure out if it is a public header
1327+ my $public_header = $header;
1328+ my $qpa_header = 0;
1329+ if(isQpaHeader($public_header)) {
1330+ $public_header = 0;
1331+ $qpa_header = 1;
1332+ } elsif($allheadersprivate || $thisprivate || $public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
1333+ $public_header = 0;
1334+ } else {
1335+ foreach (@ignore_for_master_contents) {
1336+ $public_header = 0 if($header eq $_);
1337+ }
1338+ }
1339+
1340+ my $iheader = $subdir . "/" . $header;
1341+ my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader) : ();
1342+ if($showonly) {
1343+ print "$header [$lib]\n";
1344+ foreach(@classes) {
1345+ print "SYMBOL: $_\n";
1346+ }
1347+ } else {
1348+ my $ts = (stat($iheader))[9];
1349+ #find out all the places it goes..
1350+ my @headers;
1351+ if ($public_header) {
1352+ @headers = ( "$out_basedir/include/$lib/$header" );
1353+ foreach my $full_class (@classes) {
1354+ my $header_base = basename($header);
1355+ # Strip namespaces:
1356+ my $class = $full_class;
1357+ $class =~ s/^.*:://;
1358+ # if ($class =~ m/::/) {
1359+ # class =~ s,::,/,g;
1360+ # }
1361+
1362+ if (defined $explicitheaders{$lib}{$class}) {
1363+ $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$explicitheaders{$lib}{$class}", 0, $ts));
1364+ } else {
1365+ $class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
1366+ $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
1367+ }
1368+ }
1369+
1370+ if ($explicitheaders{$lib}{basename($header)}) {
1371+ $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$explicitheaders{$lib}{basename($header)}", "$out_basedir/include/$lib/$header", 0, $ts));
1372+ }
1373+
1374+ } elsif ($create_private_headers && !$qpa_header) {
1375+ @headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" );
1376+ } elsif ($create_private_headers) {
1377+ @headers = ( "$out_basedir/include/$lib/$module_version/$lib/qpa/$header" );
1378+ }
1379+
1380+ foreach(@headers) { #sync them
1381+ $header_copies++ if (syncHeader($lib, $_, $iheader, $copy_headers, $ts));
1382+ }
1383+
1384+ if($public_header) {
1385+ #put it into the master file
1386+ $master_contents .= "#include \"$public_header\"\n" if (shouldMasterInclude($iheader));
1387+
1388+ #deal with the install directives
1389+ if($public_header) {
1390+ my $pri_install_iheader = fixPaths($iheader, $dir);
1391+ foreach my $class (@classes) {
1392+ # Strip namespaces:
1393+ $class =~ s/^.*:://;
1394+ # if ($class =~ m/::/) {
1395+ # $class =~ s,::,/,g;
1396+ # }
1397+ my $class_header = fixPaths("$out_basedir/include/$lib/$class",
1398+ $dir) . " ";
1399+ $pri_install_classes .= $class_header
1400+ unless($pri_install_classes =~ $class_header);
1401+ }
1402+ if ($explicitheaders{$lib}{basename($iheader)}) {
1403+ my $compat_header = fixPaths("$out_basedir/include/$lib/$explicitheaders{$lib}{basename($iheader)}",
1404+ $dir) . " ";
1405+ $pri_install_files .= $compat_header unless($pri_install_files =~ $compat_header);
1406+ }
1407+ $pri_install_files.= "$pri_install_iheader ";;
1408+ }
1409+ }
1410+ elsif ($qpa_header) {
1411+ my $pri_install_iheader = fixPaths($iheader, $dir);
1412+ $pri_install_qpafiles.= "$pri_install_iheader ";;
1413+ }
1414+ else {
1415+ my $pri_install_iheader = fixPaths($iheader, $dir);
1416+ $pri_install_pfiles.= "$pri_install_iheader ";;
1417+ }
1418+ }
1419+
1420+ if ($verbose_level && $header_copies) {
1421+ my $new_header_dirname = dirname($iheader);
1422+ basePrettify(\$new_header_dirname) if ($new_header_dirname && $verbose_level < 2);
1423+ my $header_base = basename($iheader);
1424+ if ($verbose_level < 3) {
1425+ my $line_prefix = ",";
1426+ if ($new_header_dirname ne $header_dirname) {
1427+ $line_prefix = "$lib: created fwd-include header(s) for $new_header_dirname/ {";
1428+ $line_prefix = " }\n".$line_prefix if ($header_dirname);
1429+ $header_dirname = $new_header_dirname;
1430+ } else {
1431+ $line_prefix = ",";
1432+ }
1433+ print "$line_prefix $header_base ($header_copies)";
1434+ } else { # $verbose_level >= 3
1435+ basePrettify(\$iheader) if ($verbose_level == 3);
1436+ print "$lib: created $header_copies fwd-include headers for $iheader\n";
1437+ }
1438+ }
1439+ }
1440+ }
1441+ print " }\n" if ($header_dirname && $verbose_level > 0 && $verbose_level < 3);
1442+ }
1443+ }
1444+ }
1445+
1446+ # close the master include:
1447+ $master_contents .=
1448+ "#include \"".lc($lib)."version.h\"\n" .
1449+ "#endif\n";
1450+
1451+ unless ($showonly || $minimal || !$is_qt) {
1452+ # create deprecated headers
1453+ my $first = 1;
1454+ while (my ($header, $include) = each %{$deprecatedheaders{$lib}}) {
1455+ my $public_header = 0;
1456+ $public_header = 1 unless ($allheadersprivate || ($header =~ /_p\.h$/));
1457+ next unless ($public_header || $create_private_headers);
1458+
1459+ my $header_path = "$out_basedir/include/$lib/";
1460+ unless ($public_header) {
1461+ $header_path .= "$module_version/$lib/private/";
1462+ }
1463+ $header_path .= "$header";
1464+
1465+ unless (-e $header_path) {
1466+ my $guard = "DEPRECATED_HEADER_" . $lib . "_" . $header;
1467+ $guard =~ s/([^a-zA-Z0-9_])/_/g;
1468+
1469+ my $header_dir = dirname($header_path);
1470+ make_path($header_dir, $lib, $verbose_level);
1471+
1472+ my $hdrcont =
1473+ "#ifndef $guard\n" .
1474+ "#define $guard\n";
1475+ my $warning = "Header <$lib/";
1476+ $warning .= "private/" unless ($public_header);
1477+ $warning .= "$header> is deprecated. Please include <$include> instead.";
1478+ $hdrcont .=
1479+ "#if defined(__GNUC__)\n" .
1480+ "# warning $warning\n" .
1481+ "#elif defined(_MSC_VER)\n" .
1482+ "# pragma message (\"$warning\")\n" .
1483+ "#endif\n" .
1484+ "#include <$include>\n";
1485+ if ($public_header) {
1486+ $hdrcont .=
1487+ "#if 0\n" .
1488+ "#pragma qt_no_master_include\n" .
1489+ "#endif\n";
1490+ }
1491+ $hdrcont .=
1492+ "#endif\n";
1493+ if (writeFile($header_path, $hdrcont)) {
1494+ if ($verbose_level < 3) {
1495+ my $line_prefix = ",";
1496+ $line_prefix = "$lib: created deprecated header(s) {" if ($first);
1497+ print "$line_prefix $header";
1498+ } else {
1499+ print "$lib: created deprecated header $header => $include\n";
1500+ }
1501+ $first = 0;
1502+ }
1503+ }
1504+
1505+ my $addendum = fixPaths($header_path, $dir) . " ";
1506+ if ($public_header) {
1507+ $pri_install_files .= $addendum;
1508+ } else {
1509+ $pri_install_pfiles .= $addendum;
1510+ }
1511+ }
1512+ if ($verbose_level < 3) {
1513+ print " }\n" unless ($first);
1514+ }
1515+
1516+ # module version header
1517+ my $vheader = "$out_basedir/include/$lib/".lc($lib)."version.h";
1518+ my $VHeader = "$out_basedir/include/$lib/${lib}Version";
1519+ syncHeader($lib, $VHeader, $vheader, 0);
1520+ $pri_install_files .= fixPaths($vheader, $dir) . " ";
1521+ $pri_install_classes .= fixPaths($VHeader, $dir) . " ";
1522+ my @versions = split(/\./, $module_version);
1523+ my $modulehexstring = sprintf("0x%02X%02X%02X", $versions[0], $versions[1], $versions[2]);
1524+ my $vhdrcont =
1525+ "/* This file was generated by syncqt. */\n".
1526+ "#ifndef QT_".uc($lib)."_VERSION_H\n".
1527+ "#define QT_".uc($lib)."_VERSION_H\n".
1528+ "\n".
1529+ "#define ".uc($lib)."_VERSION_STR \"".$module_version."\"\n".
1530+ "\n".
1531+ "#define ".uc($lib)."_VERSION ".$modulehexstring."\n".
1532+ "\n".
1533+ "#endif // QT_".uc($lib)."_VERSION_H\n";
1534+ writeFile($vheader, $vhdrcont, $lib, "version header");
1535+
1536+ my $master_include = "$out_basedir/include/$lib/$lib";
1537+ $pri_install_files .= fixPaths($master_include, $dir) . " ";
1538+ writeFile($master_include, $master_contents, $lib, "master header");
1539+ }
1540+
1541+ unless ($showonly || $minimal) {
1542+ #handle the headers.pri for each module
1543+ my $headers_pri_contents = "";
1544+ $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
1545+ $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n";
1546+ $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n";
1547+ $headers_pri_contents .= "SYNCQT.QPA_HEADER_FILES = $pri_install_qpafiles\n";
1548+ my $headers_pri_file = "$out_basedir/include/$lib/headers.pri";
1549+ writeFile($headers_pri_file, $headers_pri_contents, $lib, "headers.pri file");
1550+ }
1551+}
1552+
1553+if($check_includes) {
1554+ foreach my $lib (@modules_to_sync) {
1555+ next if ($modules{$lib} =~ /^!/);
1556+ #calc subdirs
1557+ my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
1558+
1559+ foreach my $subdir (@subdirs) {
1560+ my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0);
1561+ foreach my $header (@headers) {
1562+ my $header_skip_qt_begin_namespace_test = 0;
1563+ $header = 0 if($header =~ /^ui_.*.h/);
1564+ $header = 0 if ($header eq lc($lib)."version.h");
1565+ foreach (@ignore_headers) {
1566+ $header = 0 if($header eq $_);
1567+ }
1568+ if($header) {
1569+ my $public_header = $header;
1570+ if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) {
1571+ $public_header = 0;
1572+ } elsif (isQpaHeader($public_header)) {
1573+ $public_header = 0;
1574+ } else {
1575+ foreach (@ignore_for_master_contents) {
1576+ $public_header = 0 if($header eq $_);
1577+ }
1578+ if($public_header) {
1579+ foreach (@ignore_for_include_check) {
1580+ $public_header = 0 if($header eq $_);
1581+ }
1582+ foreach(@ignore_for_qt_begin_namespace_check) {
1583+ $header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
1584+ }
1585+ }
1586+ }
1587+
1588+ my $iheader = $subdir . "/" . $header;
1589+ if($public_header) {
1590+ if(open(F, "<$iheader")) {
1591+ my $qt_begin_namespace_found = 0;
1592+ my $qt_end_namespace_found = 0;
1593+ my $qt_namespace_suffix = "";
1594+ my $line;
1595+ my $stop_processing = 0;
1596+ while($line = <F>) {
1597+ chomp $line;
1598+ my $output_line = 1;
1599+ if($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) {
1600+ $stop_processing = 1;
1601+ last;
1602+ } elsif($line =~ /^ *\# *include/) {
1603+ my $include = $line;
1604+ if($line =~ /<.*>/) {
1605+ $include =~ s,.*<(.*)>.*,$1,;
1606+ } elsif($line =~ /".*"/) {
1607+ $include =~ s,.*"(.*)".*,$1,;
1608+ } else {
1609+ $include = 0;
1610+ }
1611+ if($include) {
1612+ for my $trylib (keys(%modules)) {
1613+ if(-e "$out_basedir/include/$trylib/$include") {
1614+ print "$lib: WARNING: $iheader includes $include when it should include $trylib/$include\n";
1615+ }
1616+ }
1617+ }
1618+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE(_[A-Z_]+)?\s*$/) {
1619+ $qt_namespace_suffix = defined($1) ? $1 : "";
1620+ $qt_begin_namespace_found = 1;
1621+ } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE$qt_namespace_suffix\s*$/) {
1622+ $qt_end_namespace_found = 1;
1623+ }
1624+ }
1625+
1626+ if ($header_skip_qt_begin_namespace_test == 0 and $stop_processing == 0) {
1627+ if ($qt_begin_namespace_found == 0) {
1628+ print "$lib: WARNING: $iheader does not include QT_BEGIN_NAMESPACE\n";
1629+ }
1630+
1631+ if ($qt_begin_namespace_found && $qt_end_namespace_found == 0) {
1632+ print "$lib: WARNING: $iheader has QT_BEGIN_NAMESPACE$qt_namespace_suffix but no QT_END_NAMESPACE$qt_namespace_suffix\n";
1633+ }
1634+ }
1635+
1636+ close(F);
1637+ }
1638+ }
1639+ }
1640+ }
1641+ }
1642+ }
1643+}
1644+
1645+exit 0;

Subscribers

People subscribed via source and target branches