summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Mark all qtbase headers that aren't cleanThiago Macieira2013-03-0327-0/+105
| | | | | | | | | | | | | | | | QtCore has a few headers that, though public, aren't meant to be included directly. Those are the atomic headers, the three _impl.h headers and qt_windows.h. QtGui includes two OpenGL headers that don't compile on their own. Other libraries should not have headers like that (but they do, something we need to fix eventually). Change-Id: I55e4eb057748f47df927ee618f9409acbc189cc1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QGtk2Theme: use GtkSettings to fetch the icon theme nameJ-P Nurmi2013-03-022-0/+25
| | | | | | Change-Id: Ib486d65276512a94299650adfbf3d87108ae5845 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* OpenGL: Add support for the Compute shader stageSean Harmer2013-03-023-2/+17
| | | | | Change-Id: Ibb1b79358758c2adf818af8c6fcd5c379efad8c3 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* moc: Support the '$' character as an identifierOlivier Goffart2013-03-024-8/+9
| | | | | | | | | | Both gcc and clang allow the use of '$' in their identifiers as an extension. moc should not throw a parse error if there is one in the file. Instead, consider '$' as valid in identifiers. Task-number: QTBUG-22720 Change-Id: I8be3a52429c0db5b7e8308b8f4fe475d3d3994bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation of moc generated file with MEMBER propertiesOlivier Goffart2013-03-021-1/+2
| | | | | | | | | | | | | | | If the object has only MEMBER properties, without any other property specifying READ, the generated will fail to compile with this error: tst_moc.moc: In member function ‘virtual int ClassWithOneMember::qt_metacall(QMetaObject::Call, int, void**)’: tst_moc.moc:3810:42: error: ‘_v’ was not declared in this scope That's because the '_v' is only declared if 'needTempVarForGet' is set, and it should be set when we have a MEMBER property. Change-Id: I829fad3faf69654b5a3fd540857df19f4a9449d4 Reviewed-by: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add __ARM_ARCH_5TE__ to Q_PROCESSOR_ARM_V5BogDan Vatra2013-03-021-0/+1
| | | | | | | | Android uses this define for armv5. Change-Id: Iee32f3e8691fa731ab0c2185a01620e18741f9a4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* QUrl: update top level domains that may contain non-ASCII charactersPeter Hartmann2013-03-021-7/+22
| | | | | | | | | Most notably, .com and .net now may contain non-ASCII characters. list has been generated from http://www.mozilla.org/projects/security/tld-idn-policy-list.html Change-Id: Idc3191dc782bc4173ccb19b4bc81f4f061ca7999 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOpenGLShaderProgram: insert precision defines based on runtime detectionGiuseppe D'Angelo2013-03-011-10/+14
| | | | | | | | | | | Given that we can create OpenGL/ES contexts even under a Desktop OpenGL implementation, we must check the type of the surface we're renderering on at runtime. Change-Id: I55004ce918889b3fc094702976500fcfc675bd1a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* OpenGL: Add support for OpenGL 4 tessellation shader stagesSean Harmer2013-03-014-7/+252
| | | | | | | | | | This adds support for OpenGL 4 tessellation shader stages to QOpenGLShaderProgram and QOpenGLShader. Change-Id: Iefb2f411e00767990d54670c5d39413be694dd66 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add QDBusReply::error() const.Jędrzej Nowacki2013-03-011-0/+2
| | | | | | | | The accessor was missing. Task-number: QTBUG-29917 Change-Id: Ie6759a1120bc9ed6550c271df35f276e15b4eb79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add notify signals to some QCoreApplication propertiesAlan Alpert2013-03-012-4/+51
| | | | | | | | | | The various string properties are good candidates for exposure to QML. While QCoreApplication itself is unlikely to be exposed to QML directly, a wrapper exposure also needs these signals in order to react to changes from QCoreApplication. Change-Id: I266da6010f1c9300de4bb5e7775a0bdacab7f26c Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix Q_GLOBAL_STATIC support for exceptionsThiago Macieira2013-02-282-4/+7
| | | | | | | | | | | | | | | | | The problem was that the HolderBase destructor was getting called after the contained type's constructor threw an exception, as is required by RAII semantics (the base was fully initialized, so it had to be destroyed). That was required because we want to return a non-null pointer from operator() during destruction and return null after destruction, to keep compatibility with Qt 4. The solution is to only set the guard to Destroyed only if it is already at value Initialized. This way, if the HolderBase destructor is run as part of the stack unwinding, it knows that the construction did not complete. Change-Id: I9849b43ed7112bf9e70861b48a56a924c286617e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge "Merge branch 'ios' into dev" into refs/staging/devTor Arne Vestbø2013-02-2850-209/+3751
|\
| * QFusionStyle: Fix crash on iOSRichard Moe Gustavsen2013-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | First of all, the ifdef section was meant for osx, and not ios. Second, a platform theme does not necessarily need to override the palette function, which will return 0 by default. Change-Id: I5a28f4ee1020c9253d0803c9d962c6a058e5358c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * iOS: Remove debug output noiseRichard Moe Gustavsen2013-02-271-3/+0
| | | | | | | | | | | | | | | | This debug information is not needed anymore, and only causes noise when trying to debug other stuff. Change-Id: I076826e251b84a3883e63aa7669f6e1bb55a0d1f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Add QIOSIntegration::hasCapability functionRichard Moe Gustavsen2013-02-272-0/+14
| | | | | | | | | | | | | | | | Add the missing override, and report that we support OpenGL (and multiple windows). Change-Id: If95138cab9099b547d12d3dfed008bd63b6d2acf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Implement socket notifiers.Morten Johan Sørvig2013-02-278-194/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the QCFSocketNotifier class in platform support which contains shared socket notifier support for the Cocoa and iOS plugins. Remove the old code from the Cocoa plugin. The Cocoa code had one QCocoaEventDispatcher-specific call: maybeCancelWaitForMoreEvents. Create a forwarding function that is passed to QCFSocketNotifier. Change-Id: Ibf9bd4745ba4f577a55f13d0cc00f5ae04447405 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Add potentially undefined version defines to qsystemdetection.hTor Arne Vestbø2013-02-271-0/+16
| | | | | | | | | | | | | | | | | | Unless we're building on the 6.1 SDK some of the version defines will not be defined in Availability.h, so we define them ourselves so that Qt can still use them. Change-Id: Ibb45e9f8f4e888fc57e35286bf15d2fee2c1a217 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * iOS: Enable autorotate on startup.Morten Johan Sørvig2013-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The qobject_cast to QGuiAppplication will always fail at startup since QGuiApplication is not ready yet. Return YES in that case. Allowed orientations can then be controlled by setting "Supported Interface Orientations" in Xcode or the Info.plist file. Change-Id: Ifd86bbcedabc716e63563bbb7cb0c1c6833fd6c7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Don't crash on landscape mode startupMorten Johan Sørvig2013-02-274-5/+7
| | | | | | | | | | | | | | | | | | fromPortraitToPrimary is called from the QIOSScreen constructor. This is probably to early to call QGuiApplication functions. Change-Id: I882304fd641df13dc530491990245ba9ad495377 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Set touch point position in screen coords.Morten Johan Sørvig2013-02-273-4/+19
| | | | | | | | | | | | | | | | Previously the position was set in window coordinates, which would break for non-fullscreen windows. Change-Id: Iefa2f590c6d62b09fc3e7fe60a882c1acd33e029 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Skip flushing child windows in QIOSBackingStoreRichard Moe Gustavsen2013-02-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | We skip flushing raster-based child windows, to avoid the extra cost of copying from the parent FBO into the child FBO. Since the child is already drawn inside the parent FBO, it will become visible when flushing the parent. The only case we end up not supporting is if the child window overlaps a sibling window that's draws using a separate QOpenGLContext. Change-Id: Ib10414f4494747e5fe67f84b06575fe16ffddf96 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: QIOSWindow::setParent()Richard Moe Gustavsen2013-02-272-3/+12
| | | | | | | | | | Change-Id: I1a413d898d10b55a4d0653eae719f5bd909a01ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: implement QIOSWindow::winId()Richard Moe Gustavsen2013-02-273-3/+4
| | | | | | | | | | Change-Id: I3dd7accae43bcf7d4d6dfd8b272ab65d67bd935c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Enable retina resolution for stylesMorten Johan Sørvig2013-02-272-0/+6
| | | | | | | | | | | | | | | | | | | | The QStyle code uses the global qApp->devicePixelRatio(), which queries the screen, not the window. Implement QIOSScreen::devicePixelRatio(). Change-Id: I0091e5793f8d07ab7a46b6de443edd9457dcff85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: avoid activating modally blocked windowsRichard Moe Gustavsen2013-02-272-1/+19
| | | | | | | | | | | | | | | | Make sure that the user cannot activate a window that is modally shaddowed. Change-Id: Ib92be319d017460bbc1ef63ad7556cb4758dfa6c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: add QIOSWindow::windowLevel() to simplify window stackingRichard Moe Gustavsen2013-02-272-11/+34
| | | | | | | | | | | | | | | | | | | | | | When adding modal windows into the mix, raiseOrLower became even more messy to write. So do it the usual way instead, and add a windowLevel variable to each QIOSWindow that we can sort on. The code becomes more readable, and we can handle more window types correctly. Change-Id: I348352473a7d8cf9909c17c1b074b2fe3fab9819 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Implement touch events.Morten Johan Sørvig2013-02-274-11/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Track touch events during the standard [Began -> Moved -> Ended] event sequence based on the UITouch pointer which stays constant. Enable multiTouch on Qt's UIView. Mouse events should now be automatically created from (unhanded) touch events by QGuiApplication. Reviewed by: Ada Sørvig (fingerpaint app approved) Change-Id: I2aeb48c962c697d8b8337f8ceab062070c2a4240 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: let first responder follow the view of the focus windowRichard Moe Gustavsen2013-02-273-18/+23
| | | | | | | | | | | | | | | | | | | | This to ensure that the keyboard does not close prematurly. This can happen if the user opens up the keyboard while typing inside one window, then switch window, continue typing while the other window gets deleted. Change-Id: I5cfb1673ccbe4d5aaa14167b7aa53451031089a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: implement QPlatformWindow::requestActivateWindow()Richard Moe Gustavsen2013-02-272-7/+14
| | | | | | | | | | | | | | | | Dispite the name, 'requestActivateWindow' means raise and transfer focus to the window. Change-Id: Ib97321ed7ec8da90e924ff8155a95896c12160c9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: raise windows that becomes visibleRichard Moe Gustavsen2013-02-271-1/+9
| | | | | | | | | | | | | | | | When a QWindow becomes visible, it should move to front and be active. Change-Id: Icab12c6031c0cc8d791e4f8cc49b9c2d5c73100d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: implement QPlatformWindow::raise() and lower()Richard Moe Gustavsen2013-02-272-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Probably not going to be the most used functions on iOS, but implemented to support old widget apps out of the box. The implementation stacks both staysOnTop and popup windows on the same level for simplicity, since iOS does not have a concept of z-ordering UIViews (UILayer has z-order, but layers belong in a different hierarchy, and cannot be used in this respect). Change-Id: Idd68e5ceea7d4eaeb3066486c47400930cebb1b0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Use 72 DPI for font size conversionTor Arne Vestbø2013-02-272-0/+6
| | | | | | | | | | | | | | This matches how UIKit behaves Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: transfer focus to the window touchedRichard Moe Gustavsen2013-02-271-0/+5
| | | | | | | | | | | | | | | | | | Since our QWindows are UIViews rather than UIWindows, we need to implement window activation manually. This patch will ensure that the window touched by the user also gets keyboard focus. Change-Id: I9390c5c8e50a4b066cd1320a2a044e02f2a9f75d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: Move handling of FBOs to QIOSContext instead of QIOSWindowTor Arne Vestbø2013-02-274-84/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lifetime of an FBO is tied to its context, so letting each window manage its own FBO failed when the window tried to delete the FBO at destruction time without the proper context being current, or even available anymore. We solve this by moving all handling of FBOs to the context itself, which is fine as we're exposing the necessary bits from the window to allocate storage based on its layer. Change-Id: I8c7c96cf63d6b667527c816f10ac2f4ff6a05e0c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Don't build qiosviewcontroller.mm into qtmain pluginTor Arne Vestbø2013-02-271-4/+1
| | | | | | | | | | | | | | It's already built as part of the iOS platform plugin. Change-Id: I5a97e8723b566b9ef15aafce374be35f01e6cf08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Move debug background color setting and guard for release buildsTor Arne Vestbø2013-02-272-2/+10
| | | | | | | | | | Change-Id: Ie9131c3dfe16045805b37bf8af9381f4f9929da6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Don't init our own base view for the root viewcontrollerTor Arne Vestbø2013-02-271-1/+0
| | | | | | | | | | | | | | This is handled automatically by the default implementation. Change-Id: Ia9bd0143490e6f2507ede03f3654a2b0b00e3e3d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Auto-release the UIWindow and root view-controllerTor Arne Vestbø2013-02-271-4/+3
| | | | | | | | | | | | | | They are retained properties. Change-Id: Id1808d93fe30950fc05e41375f00183e098bff0b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Don't check for existing window in QIOSMainWrapperApplicationDelegateTor Arne Vestbø2013-02-271-12/+8
| | | | | | | | | | | | | | | | The delegate is only used when we control the application, so we know that there isn't any window yet. Change-Id: Ibd774cb4fd8ceaab6a181769d2792b569f490495 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * iOS: Fix style nitpicksTor Arne Vestbø2013-02-271-2/+2
| | | | | | | | | | Change-Id: I670567f1793b5548393a3b315650bf34a0a3880e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * iOS: make QWindow views hidden by defaultRichard Moe Gustavsen2013-02-271-0/+3
| | | | | | | | | | | | | | | | | | Qt will tell us when the window should be visible. Showing all windows by default makes e.g the desktop widget visible as well, which causes problems with activation of windows. Change-Id: Ibf2283bc5f009df7ff23126f4dd04ec898141720 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: clean-up header includesRichard Moe Gustavsen2013-02-272-4/+2
| | | | | | | | | | | | | | | | Try to keep qiosglobal.h free from unnecessary includes, since its typically included from many different locations. Change-Id: I6638bcaef1189b3eee3dbd5f744c15f8f7858d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: activate next window when active window hidesRichard Moe Gustavsen2013-02-271-1/+15
| | | | | | | | | | | | | | | | | | | | Since the OS does not handle window management for us, we need to handle this ourselves. So when a QWindow is closed or hidden, we transfer activation to the top-most visible window. This will fix application unresponsive after closing a dialog. Change-Id: I83f836ebafa71edca5ab5ae3a2bdba7cd1decbc1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: add UIView category to get the QWindow it representsRichard Moe Gustavsen2013-02-272-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Adding a simple way to get the QWindow pointer from any UIView makes writing code where you only have UIView pointers a bit easier. Perhaps we should also investigate if it is worthwhile to make this category public to the application, to further enhance working in a mixed environment. Change-Id: Ic263003dc7683a8d976024cbbbc2558e8472a790 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: make EAGLView private in QIOSWindowRichard Moe Gustavsen2013-02-272-28/+25
| | | | | | | | | | | | | | | | | | | | | | Not the biggest gain, but since all the members of EAGLView are declared private, we might as well move the whole interface into the source file. We can then make the members public without caring about interface readability. We will make use of this in a following patch. Change-Id: I144fb5748573ca6faf257d72597907b5c17b1e05 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: add convenience function to get to the root QIOSViewControllerRichard Moe Gustavsen2013-02-274-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that we need to access our view controller from many places, and the syntax to do so is tricky to remember. So lets just add it to our global functions, with the added bonus of a using a little cache. Note: many of these functions could be made inline, but since one concern of the plugin will be the end size of the app, I prefer to trade size for speed at this point. We can always change this later. Change-Id: I578ea9ae8218d23d635b7728a930763ca53c4eaa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: bugfix portraitToPrimary global functionRichard Moe Gustavsen2013-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | QScreen geometry and orientation is updated a bit after we change geometry in QPlatformScreen, which this time was enough to break availableGeometry. Since this function is for internal use, we let it be based on internal data. Change-Id: I7701b0a6043839c89c01e87242decb8a739d00f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: update primary orientation when the rotation startsRichard Moe Gustavsen2013-02-271-3/+3
| | | | | | | | | | | | | | | | | | We need to update primary orientation when the rotation starts, and not when it ends, so that we are in sync with the resize that happens to the backingstore upon layoutSubviews. Change-Id: I466a2d135e6c15550c6207c9659871629d748b73 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * iOS: report changes to keyboard rect back to QtRichard Moe Gustavsen2013-02-275-5/+25
| | | | | | | | | | | | | | | | | | QInputContext expects us to report whenever the input panel changes geometry. This patch implements this. Change-Id: I9162f0d48da6925274a7489c9bcb6adab9afae82 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>