Commit Graph

12166 Commits

Author SHA1 Message Date
Tor Arne Vestbø
935bb94385 iOS: Simplify arch detection/configuration in mkspec
NEON detection is handled by configure's arch test, and THUMB2 is the
default for ARMv7.

Change-Id: I8ec3ce0ec6af9ad8d9509890aa1f8c87e18364d5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:28 +01:00
Tor Arne Vestbø
89fbad0827 iOS: Force static builds so that apps can be submitted to the App Store
Change-Id: I66c917e98e40c07ae9532c106ee1c47caa61abd5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:28 +01:00
Tor Arne Vestbø
810eee8c77 iOS: Bump arch and iOS SDK, now that we require GLES 2.x
We now require SDK version 4.3 or above, and armv7.

Change-Id: I4766e277a3a4a32712bf2ec27fede694e8316c95
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:27 +01:00
Tor Arne Vestbø
978eb6bdec iOS: Simplify SDK resolving in mkspec
There's no need to duplicate the logic for device vs simulator. The only
difference is the iPhoneOS/iPhoneSimulator name.

Change-Id: I87c57fa785279a3ee258b76fdac8317e52e7daa2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:27 +01:00
Tor Arne Vestbø
3bc4afc223 iOS: Move Q_OS_IOS out of makesespec to qsystemdetection.h
We treat iOS as a variant of Mac OS, so for iOS both Q_OS_MAC and
Q_OS_IOS will be defined. This matches what Apple assumes in the
header file TargetConditionals.h

Change-Id: I55cc851401b748297478e4c32e84e0f6e1fdfc28
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-26 13:13:27 +01:00
Richard Moe Gustavsen
8224e5ac7f iOS: Don't reference QMacStyle from QStyleOption as we don't build it
QMacStyle is not buildt as a part of iOS. So make sure we dont
reference it from QStyleOption

Change-Id: I98e779c576d0607402e45a19b457144a6bdfc73b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-26 13:13:26 +01:00
Richard Moe Gustavsen
5d6c57fcba iOS: fix build issue, dont link against cocoa
Make sure the libraries dont depend on Cocoa. This will be
picked up by libtool, and make all apps and examples link
against cocoa too (which will ofcourse fail)

Change-Id: I5654bb08c4ed376fc7ee74da422d903270a8af38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:26 +01:00
Richard Moe Gustavsen
8cbdb25ee6 iOS: copy brute-force port of Qt4 uikit plugin into Qt5.
The plugin has been renamed from uikit to ios.
Other than that, the plugin will now build, but do nothing. Most of
the Qt4 code is preserved, with a rough translation
into the Qt5 qpa API. A lot of code has simply been commented
out so far, and most lacking at the moment is the event dispatcher
which will need to be rewritten, and the opengl paint device
implementation. But it should suffice as a starting ground.

Also: The plugin will currently not automatically build when
building Qt, this needs to be enabled from configure first.

Change-Id: I0d229a453a8477618e06554655bffc5505203b44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-26 13:13:25 +01:00
Tor Arne Vestbø
6382105f3d iOS: Get rid of GCC/LLVM makespecs for iOS
We only want to support Clang.

Change-Id: Id0558df905106158f4c25ca10462bf4ca41e1e45
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:13:25 +01:00
Tor Arne Vestbø
20cfe04535 iOS: Remove hard-coding of Xcode /Developer path in common/ios mkspecs
We can use xcode-select -print-path to get the /Developer directory.

This also removes the need for the "legacy" makespecs, which only
differ from their non-legacy counterparts in the location of the
Xcode developer directory.

Change-Id: Ia9245033a4b82cc3933226bf998f07177b60871f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:25 +01:00
Tor Arne Vestbø
de5553aad5 qmake: Resolve QMAKE_INFO_PLIST against current working dir
We're not in the output directory yet, so resolving using vanilla
fileFixify will end up failing when we check if the file exists, since
QFileInfo resolves relative paths against the current directory.

Change-Id: I414c6a2e83b49e3fb30e6153a49f7a90a8e528a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
dd5b437d6a qmake: Fix file paths in Xcode projects when shadow-building
The Xcode generator seems to have been written with the assumption that
writeMakeParts() would be called with the output directory as the current
directory, but that's not the case when shadow-building. Perhaps this
was changed in qmake at some point, and the Xcode generator was not
updated to reflect that.

Instead of replacing every occurance of fileFixify and other logic to
deal with paths, we just chdir into the output_dir for the duration
of the function (except when writing the 'make qmake' makefile, as
the regular makefile generator works as expected with the current
directory set to the input directory).

Change-Id: I6ba492036d73f29f4adbd7cd554db9504050629e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
f6d13a45c8 qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode
We already assume that if a source is buildable and should end up in OBJECTS we
can let Xcode build it, so we skip this input for the extra compiler.

Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
0e548b5856 qmake: Use PBXResourcesBuildPhase for QMAKE_BUNDLE_DATA without a path
The PBXResourcesBuildPhase will optimize resources, such as turning XIB
files into NIB files, running pngcrush on images, turning string files
into binary plists, etc, so we prefer that if possible.

Unfortunatly this phase does not support custom paths, so whenever we
encounter bundle data with a custom path we fall back to the regular
PBXCopyFilesBuildPhase.

Change-Id: I539db03dd7982fd37293123b6428cdb695f64d2b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
3cc738dfc7 qmake: Don't treat .xcodeproj directories as OUT_PWD when passed with -o
The Xcode generator creates a makefile for running 'make qmake', and the
makefile passes -o to ensure it writes to the same Xcode project. This
fails when qmake then treats -o foo.xcodeproj/project.xcproj as not only
setting the output filename, but also the output directory to foo.xcodeproj,
which results in the Xcode project trying to reference files relative
to this directory, such as '../main.cpp'.

Unfortunatly the output filename parsing happens too early for us to know
whether or not the generator is Xcode, so we just have to assume that
a certain combination of output filename and directories means we are
generating an Xcode project.

Change-Id: I0901d4db995f287c35cbbbd015683d5abda6d0f5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:17 +01:00
Tor Arne Vestbø
883efa10cd qmake: Prevent duplicate libaries from being added to the link phase
Change-Id: I5ec7acb8f060e9d9bbd8cdb95d40ace03cffe9c7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:12:25 +01:00
Tor Arne Vestbø
c6eae1acf8 qmake: Don't generate Xcode project bundle identifiers with spaces
Replace them with dashes, like Xcode itself does.

Change-Id: I302425363a2eef13394025cd4a9e414048ce55ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:19 +01:00
Tor Arne Vestbø
66f6e5b162 qmake: Update Xcode generator to produce project files similar to Xcode
There was quite a bit of cruft left over from older Xcode version. We
now produce Xcode 3.2 compatible files, similar to what Xcode would do
when asked to upgrade one of our generated files. In particular:

 - Removed refType
 - Set more lastKnownFileTypes
 - Renamed defaultConfigurationIsName to defaultConfigurationName
 - Add runOnlyForDeploymentPostprocessing = 0 to build phases
 - Don't put buildSettings directly into PBXNativeTarget
 - Don't write productSettingsXML
 - Don't write startupPath
 - Don't write name when path is the exact same
 - Write empty buildSetting lists as empty string
 - Don't write empty PBXBuildFile settings
 - Don't write generated/neede filenames for PBXShellScriptBuildPhase
 - Use PBXFileReference instad of PBXFrameworkReference
 - Prune deprecated buildSetting variables
 - Remove deprecated PBXBuildStyle sections
 - Resolve correct CC/CPLUSPLUS/LDPLUSPLUS
 - Write IPHONEOS_DEPLOYMENT_TARGET

Change-Id: Ia2365c2623fe898878bd10636c3b85145c1cff04
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:11 +01:00
Tor Arne Vestbø
e70e81d554 Xcode: Change groups/build phase wording to match Apple's templates
Change-Id: I286965a05750bc77b94ca4d3b76364b0130e32ed
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +01:00
Tor Arne Vestbø
a36eaae893 Xcode: Merge various sources and extra-compilers into more managable groups
Instead of letting each qmake variable have its own auto-generated name
we try to group common variables into similar groups as used by the Xcode
templates provided by Apple.

We also prevent the same files from ending up multiple times in a group.

Change-Id: I73b13d6071bb7b3cd1501c422a99c60743221485
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +01:00
Tor Arne Vestbø
0575baac5e Don't link QtPlatformSupport to CoreFoundation or Carbon
Move the Carbon dependency to the Cocoa platform plugin instead, where
it's actually used.

CoreFoundation was not used by any plugins and could be removed
completely.

Change-Id: I1c825cdf94e2cc348ea13519b894fd868be0d14a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-22 23:56:36 +01:00
Keith Gardner
3b5600f6ee QStringRef: Added toInt(), toUInt(), etc... functions to QStringRef.
Added the following functions to QStringRef: toShort, toUShort, toInt,
toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and toDouble.
These functions use the corresponding functions found in QLocale.
Updated tst_qstringref.cpp to exercise the new functionality.

Change-Id: I38668a0cc7da0c101a62613fd16cb5a98286617f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-22 21:23:33 +01:00
Tor Arne Vestbø
736e4258a1 Use sdk.prf to set macosx-version-min instead of static conf files
Allows us to dynamically generate the command line option for iOS later,
and allows the user to override QMAKE_MACOSX_DEPLOYMENT_TARGET with the
expected effect on the command line options.

We unset PERL5LIB to ensure we get the system Perl libraries, since the
Mac OS 10.6 CI machine seems to have a broken XML::Parser::Expat from
macports/CPAN.

Change-Id: I04430c7b1daf9452d72f9a04a6b7f8d0d6926884
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 19:23:26 +01:00
Giuseppe D'Angelo
cb8bfeafac Drop the unused qcgl_createGlContext function
Change-Id: I09286388e9af7ec472b394be87204746f8ae22b1
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-22 17:27:03 +01:00
Sean Harmer
06af277c59 Update qopenglext.h to latest glext.h from Khronos.org
This now includes support for OpenGL 4.3

Change-Id: I964284843dffe806280e7f67cde67f17e84dc6df
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-22 12:57:44 +01:00
Ray Donnelly
bb842bb0d5 Fix DEFAULT_LIBDIRS detection on Windows
Must use ; as the path delimiter instead of :

Change-Id: I549e1652ef5bbae09c8fddec3e83ac9f52cec3a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 09:26:05 +01:00
Milian Wolff
4f14b42f7d Add support for forced VSYNC using the EGLFS platform plugin.
Before a buffer swap the new QEglFSHooks::waitForVSync method is
called which looks at QT_QPA_EGLFS_FORCEVSYNC and - if that is set
and non-null - calls ioctl with the FBIO_WAITFORVSYNC request on
the framebuffer device.

This is required on some embedded platforms where the driver does not
support VSYNC yet the Kernel provides a generic implementation.

I tested this using QML_RENDER_TIMING=1 which proofs that the frame
rate for an example of mine drops from >125fps to a straight ~60fps
with a few frames that take ~33ms (i.e. 30fps) as expected for VSYNC.

To prevent excessive open/close calls on the frame buffer device
per frame, the file descriptor is now cached. To keep the QEglFSHooks
interface as clean as possible this is done via a global static in
qeglfshooks_stub.cpp and initialized and freed in platformInit and
platformDestroy.

Change-Id: I4d31b227c65ff22aa089db0fbc62c89a59cbb6c7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-22 09:24:40 +01:00
Sean Harmer
25c9005097 OpenGL: Refactor some defines and typedefs to a common location
These will be needed by the upcoming OpenGL enablers so move them
out of qopenglfunctions.h to somewhere that any opengl related file can
access them.

Change-Id: I0c788559397d446ec7210e2ad940da862179710d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-21 20:39:23 +01:00
Richard Moe Gustavsen
22077e1609 QPA: Add interface for setting the application state explicitly
The motivation for this patch is twofold:

1: we need a way (for iOS/Android) to tell the current window to remove
focus from the focus object when the user hides the input panel.
Otherwise, if the focus object is e.g a line edit, the cursor will
continue to blink inside it, which is wrong. As it stands, telling
the active window to deactivate
(by calling QWindowSystemInterface::handleWindowActivated(0)), will cause
the whole application to deactivate if no windows are active, which
is not what we want.

2: Qt currently understands just two application states, Activated and
Deactivated. On mobile platforms we can have other states
as well, like "suspended" on iOS. So controlling the application
state should not depend on window activation, but instead be controlled
through a separate API by the platform plugin.

This patch will add the following function:
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState)
that lets us control the application state from the plugin. This also
means that we factor out application state handling from window
activation, which also gives us a way to remove focus from a window while
keeping the application active.

To not break existing desktop platforms that relies on application
activation being tied to window activation, we need to make this API
opt-in by using a platform integration capability hint. This is not optimal, but
found necessary after investigating several other solutions.

Which states (other that active/inactive) it makes sense
to add to Qt::ApplicationState will be a topic for later patches.

Change-Id: Ic6fdd3b66867abb67da43eba04ec86f06d82ff94
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-21 14:55:10 +01:00
Olivier Goffart
03b2512598 Fix QMetaType of const references
This fixes QMetaType detection of const reference arguments in signals
while connecting using the new syntax and Qt::QueuedConnection

const references should have the same QMetaType as non references.
That means we need to remove the const reference while getting the
QMetaType.

Change-Id: I9b2688da7fb9ae985aec0d8fa62a1165357ffe71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-02-21 14:54:00 +01:00
Giuseppe D'Angelo
8fd1330029 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-21 10:37:21 +01:00
Oliver Wolff
f9fc180d50 Check for network module when building according examples
Change-Id: Id17ba13988e37fa583948f4861b44bb1f05bf375
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-21 07:27:25 +01:00
Tor Arne Vestbø
f73ddd4dfb Reintroduce use of CTFontCopyDefaultCascadeListForLanguages on Mac OS
Now that we always build against an SDK, we can be sure that the
function declaration for CTFontCopyDefaultCascadeListForLanguages
is available in the CoreText CTFont.h header.

Change-Id: I304a701548833e5c7774b4fd2e72eb8c541dd103
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-02-21 00:20:09 +01:00
Ray Donnelly
4486e12033 Relax unix compile.test to check the expected file exists
When cross compiling between two systems that use different
program file formats (such as PECOFF vs ELF) -x cannot be
relied upon, so -f should be used instead.

Change-Id: I4c80646b2b1fbdd6072589d4d9e852adda83424a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 22:19:43 +01:00
Ray Donnelly
7d408c543f syncqt: Use /usr/bin/env perl not /usr/bin/perl
This is because on some systems, /usr/bin/perl is too old to
run syncqt. MSYS is one such system.

Change-Id: I3e1aa2db557cc3919618350775e7218ae05aa93f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 22:19:43 +01:00
Richard Moore
4030b6339c Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.
This change lets you call QHostInfo::lookupHost() with a null receiver
in order to warm up the DNS cache. This allows you to try to get the
DNS request in flight early.

Change-Id: Icfdd28146479aa534ae9ceb472f75e08aaa39cd2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 22:19:43 +01:00
J-P Nurmi
b92d951bb1 QGtk2XxxDialogHelper: cleanup unnecessary mutable keywords
Change-Id: Ic0b72661e561e20d50de7aca6d8a681975100b56
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-02-20 22:19:43 +01:00
Frederik Gladhorn
dcb710dd87 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/features/unix/separate_debug_info.prf
	src/gui/kernel/qwindow_p.h
	src/plugins/platforms/cocoa/qcocoacursor.mm
	tests/auto/tools/moc/tst_moc.cpp

Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
2013-02-20 22:08:29 +01:00
Gabriel de Dietrich
26bc4ab22e Gtk Style: Workaround to get combo box item style from QtQuick Controls
Change-Id: I0f39269d08d58e0ee1f5b09b90e11ab1030a3932
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-20 19:32:24 +01:00
Pavel Mogylevskiy
eff6dbb306 Fix path separators in archives created by QZipWriter
It was not possible to extract data from the archive on OSX
which was created on Windows platform because of wrong
separators. Archive was created on Windows via QZipWriter and
opened on OSX with QZipReader. It consisted of a lots directories
and subdirectories with files. The solution is to use '/' separator
for internal representation.

Change-Id: Ic0837ca184bb6188129d53b587a5df2ec61e4e05
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 16:11:52 +01:00
jian liang
af27b37b08 Activate window before replay mouse press event
Activate the window of the widget under mouse pointer before replay mouse
press event.

Change-Id: I9e699374accf108aa49b2a3c73d5e76631100dfd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-20 16:09:59 +01:00
Oliver Wolff
a4c9ddb68f Check for printsupport module when building according example
Change-Id: Ie98418c0640e2fe7cb829988f9194cb620b71629
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-20 10:28:52 +01:00
Andy Shaw
e47c2744e6 Clean up the cached cursors inside the destructor of QCocoaCursor
Change-Id: I4e1222832efa29680b4e658a5c9109641599a2b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-20 08:38:39 +01:00
Andy Shaw
79498af6e4 Fix the default handling of cursor shape when there is no standard one
When the cursor specified is a bitmap one we cannot cache it based on
the shape as the pixmap set on the cursor may be different. Therefore
we should always create a new cursor in this instance.

Change-Id: I2c201590ff632490d76c1b423908ae32aa584eb6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-20 08:38:39 +01:00
Friedemann Kleint
4606ea5395 QProgressBar: Use localized numbers and percent sign.
Task-number: QTBUG-28751

Change-Id: I56aca3e0ee9c579297110c69d2d832c7a57f1ae7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
2013-02-20 08:15:26 +01:00
Friedemann Kleint
dd30f3e65b Fix QDockWidget being unable to dock when initially floating.
When setFloating(true) is called before show, frame strut events
are not enabled for the native window (since there is none yet)
in QDockWidgetPrivate::setWindowState(). In that case, do
it in the show event handling.

Task-number: QTBUG-29012
Change-Id: I93b679f20200c149d608a1bcc65b4936a035c6a0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-20 06:39:03 +01:00
Simeon Bird
8efad82d6c Fix QTBUG-18934 by checking return value of qt_safe_pipe
When QProcess->start() is called, Qt creates a pipe to the process to
get its exit value and output.
It does this with qt_create_pipe, which calls qt_safe_pipe.
qt_safe_pipe, on failure, returns 1. qt_create_pipe then
sets errno and returns void.
The calling function, QProcessPrivate::startProcess, does not check
errno, and thus continues to fork the process, assuming the pipe has been
created successfully.

The child process then has no way to pass its exit value to the calling
process, since the communication pipes it would normally use do not
exist, and thus when it exits it becomes a zombie.

As a bonus, if waitForFinished is called on a broken process, a crash
results because it is trying to wait on a pipe which does not exist.

The fix makes qt_create_pipe return an integer, and QProcess::startProcess
check the return value, set processError and not create the child
process.

Task-Number: QTBUG-18934
Change-Id: I2e1effdd0617be5b8c5492bcbcf5f2b1584b2241
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 02:47:32 +01:00
Laszlo Papp
2f5b4d47f6 Document the qintptr for public usage
The QAbstractSocket API has been already using this as a return type. Hence,
this has already been exposed to the public API users, anyhow.

http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html#socketDescriptor

A minor mistake has also been fixed in this commit at the quintptr section.

Change-Id: I8143b3050428548ff6baee2e3a0bce4058ea8701
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-20 01:30:29 +01:00
Tor Arne Vestbø
c3a5681225 Always build against an SDK on Mac OS
Building against the local /System can cause build issues when for example
the headers have not been updated to reflect the system version. The system
headers are updated as part of installing the command line tools from within
Xcode, not as part of the system update process, so we might think we are
on 10.8, but the system headers will not reflect that, and we get build
breaks. It's preferable to always build against an SDK, so that we have
a known state for the OS X libraries and headers.

We choose the latests SDK by default, as recommended by Apple.

Change-Id: I79028217ff3a9cbe45aa4cb05ed6dd90388dee50
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-20 00:46:50 +01:00
Tor Arne Vestbø
443380d97f Don't run qmake test that requires macx makespec on non Mac OS platforms
And update test to use the clang makespec now that it's the default.

Change-Id: Ifdd34c4220ad76f60b91fd6ef39d189f0f6525f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 00:46:50 +01:00