summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* include privates the right wayOswald Buddenhagen2013-10-111-2/+2
| | | | | | Task-number: QTBUG-33496 Change-Id: Id23e00627cb7896ba44c8b612ce4aff980750f7d Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Let QLoggingCategory::defaultCategory return a pointerhjk2013-10-113-6/+13
| | | | | | | | The pointer can be null. Going trough the reference invokes undefined behavior here. Change-Id: Ia84e4e732cdcbbaee0f5f0679765d18069ea8b2d Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Allow custom definition of Q_FORWARD_DECLARE_OBJC_CLASS and friendsTor Arne Vestbø2013-10-111-6/+12
| | | | | Change-Id: I761ef508672d5d4e8b9067a1b5f91debe09607d4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Reduce risks of lock file corruptionKevin Ottens2013-10-111-10/+10
| | | | | | | | | | | | Trying to do as few operations as possible once the file got opened. That includes generating the data which will go in the file. Indeed if we crashed at that point the lock file is already emptied. Could happen because of the qAppName call. It's then safer to prepare the data upfront, and just open/write/close if possible. Change-Id: Iad32fa822c6a5958ae89d84a2fe02ed5366ea278 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QVector: add some functions missing for QList compatMarc Mutz2013-10-112-9/+52
| | | | | | | | | | | | Eases migration from QList to QVector. Had to rename the 'length' parameter to mid() to suppress -Wshadow warnings. Task-number: QTBUG-3781 Change-Id: I755c6caefe4de81ea42a81b1c76aab728e639613 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* add a missing break in QGuiApplicationPrivate::processWindowSystemEventLiang Qi2013-10-111-0/+1
| | | | | | Task-number: QTBUG-34016 Change-Id: Ifbb4a63845328e32fb0ad679415dca0f90dde624 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Make QSystemTrayIcon::showMessage invokableAllan Sandfeld Jensen2013-10-112-2/+4
| | | | | | | | | | Qt WebKit's HTML5 web notifications rely on QSystemTrayIcon::showMessage to be invokable since the lower WebCore components can not link directly to QWidgets. Change-Id: I952de47ed8a90553a8f1ac30256d77ef6014da44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use QAtomicInt ref/deref patternAllan Sandfeld Jensen2013-10-111-1/+2
| | | | | | | Change check of QAtomicInt::load with the preferred ref() deref() pattern. Change-Id: I12d2e24812259c16623c8a59cac30cafa4b05565 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Memory leak with Small-caps QRawFontAllan Sandfeld Jensen2013-10-111-0/+4
| | | | | | | | | | | | | | | Make sure we deallocate the scaled rawfont, when it is not used due to a cached engine being used instead. This fixes a major memory leak in Qt WebKit when using Small Caps in the complex font path. The complex font path is always used for small caps since Qt 5.1. Task-number: QTBUG-33576 Change-Id: I500db9ae6f6576734f1a972387a1a488218a9db6 Reviewed-by: pierre.rossi@digia.com Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Ensure CSS rules are inherited from the parent tagsAndy Shaw2013-10-111-1/+5
| | | | | | | | | | | | | | | | When CSS was set in the head tag then it was not being inherited by the child tags. This ensures that the inhertiance happens and that the deeper the CSS is set then it will ensure that it has precedence over the ones set on the parent. A test is added that shows the standard inheritance from the head tag and the precedence from child tags in effect too. Task-number: QTBUG-28770 Change-Id: I30be3ec141b2cd8d6e0db8a92669aed34da93b33 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* eglfs: Show the mouse cursor when a mouse is connectedLaszlo Agocs2013-10-112-2/+15
| | | | | | | | | | | | | | | | | Currently the mouse cursor is shown by default and it can be turned off by setting QT_QPA_EGLFS_HIDECURSOR to a non-zero value. This is now enhanced with an automatic detection step via QDeviceDiscovery (the helper the input code use anyway). From now on if QT_QPA_EGLFS_HIDECURSOR is not set, the cursor is shown only if a mouse device is present in the system. This could later be enhanced further by showing and hiding the cursor dynamically during runtime although that will not be of much use for embedded platforms without libudev. Change-Id: I7e4b85ea8807200871c88fc42b11ab2adac90d32 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Make sure QLoggingCategory default is availableKevin Ottens2013-10-101-2/+4
| | | | | | | | | | | | This avoids crashes in case where qWarning() would be called from a global static deleted after the one holding the default category. I encountered this case with a QLockFile locked from a global static while the application quits, it was calling qAppName which was triggering a qWarning as the qapplication object was gone too. Change-Id: I8910e8559d063e8f0a737bae3da5edc481ab84d3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-091-2/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Android: Add QAndroidJniXxx as friend classes in qjni.Christian Strømme2013-10-091-2/+2
| | | | | | | | | The JNI classes in Qt Android Extras are changing name from QJNIXxx to QAndroidJniXxx and they need to be friends of the private JNI classes in core. Change-Id: Ib5e1729f4bbba876b7d3eba5742fe750f95c48f7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: Fix backspace bug with 4.3 stock keyboardPaul Olav Tvete2013-10-093-3/+118
| | | | | | | | | | The Android 4.3 keyboard will cause setComposingRegion() to be called when backspacing over an existing word. If we don't implement that, the editor will be out of sync with the input method. Task-number: QTBUG-32955 Change-Id: I6c4ff786269a4e74c70a093c5f03c4c5a5727dd5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix broken text layout with ShowLineAndParagraphSeparatorsEskil Abrahamsen Blomfeldt2013-10-091-0/+3
| | | | | | | | | | | | | | | Before we add the current cluster we need to check if there's space for it. Calling checkFullOtherwiseExtend() also has the side effect of resetting the space data. We would add the cluster without checking for space when showing separators, causing broken behavior like we would count the space in the current item as trailing space, which would make us chop the end of the string. Task-number: QTBUG-28832 Change-Id: I8169662218ff6e645575d4e89a57f6b234f3c4cb Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Android: Fix black screen when changing orientationEskil Abrahamsen Blomfeldt2013-10-091-1/+1
| | | | | | | | | | | When targeting API level 13 or higher, you need to explicitly subscribe to configuration changes for screen size, otherwise surfaceChanged() will not be called when you change the orientation of the screen. Task-number: QTBUG-33140 Change-Id: I48fd1d298c408802d1743736f62128cd0eec8983 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* eglfs: Separate compositor and improve raster window supportLaszlo Agocs2013-10-0910-241/+412
| | | | | | | | | | | Separating the compositor into a separate source file improves the chances of possible future reuse and paves the way to supporting multiple GL windows. Tooltips are now working too. Implemented a few window functions like raise() and lower(). Fixed the qFatal for multiple GL windows to be raised in non-SDK based Android builds too. Change-Id: Id94d2fb2a4382766f3d130eebe1e6f397a535852 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Suppress automatic positioning of popup windows.Friedemann Kleint2013-10-091-1/+2
| | | | | | | | | | This seems to cause issues with menus on certain Windows machines. Task-number: QTBUG-33653 Change-Id: I8c31dd3ba5ccc6eb0551048401051d819f49a8c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix compilation for MSVC 2008 and std::tupleThomas Hartmann2013-10-092-1/+37
| | | | | | | For MSVC 2008 make_tuple is in the tr1 namespace. Change-Id: I4a51f6cabdf068993869b404b12ed1484a21a9d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* iOS: Generalize jumping event-dispatcher to handle QEventLoop:exec()Tor Arne Vestbø2013-10-092-39/+33
| | | | | | | | | | | | | | | | | | | | | We already supported re-entering QApplication::exec(), so adding support for handling a generalized QEventLoop::exec() was nothing more than removing the qApplication->in_exec condition in processEvents() and the QThreadData::current()->quitNow condition when interrupting the event loop. Everything else is just renaming and rewording, now that the feature is not specific to QApplication::exec(). This means dialogs such as QFileDialog opened in the main() function will show something on screen, as we then fall back to the iOS root run-loop handling, while at the same time supporting QApplication exec once the dialog closes. We still don't hadle recursive QEventLoop:exec() at the root level, as that would require multiple stacks and detailed application knowledge about when to create them. Change-Id: I334a362d85796341a343ce82f3104ff5866bdc3f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Handle qApp re-exec after application termination from iOS' sideTor Arne Vestbø2013-10-091-2/+13
| | | | | | | | | If the user for some reason spins a new QApplication event loop after an initial one has been exited as a result of the application being terminated by iOS we need to prevent further event loops from starting. Change-Id: Ief8a69cebacebd5be63a1aca87a2a1babc809879 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* iOS: Cleanup, remove unneeded Q_UNUSEDTor Arne Vestbø2013-10-091-1/+0
| | | | | Change-Id: Ie7c03270279ee0b0b7daf7945b5eb6fd834c3404 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* xcb: every window should have a title in debug modeShawn Rutledge2013-10-095-0/+59
| | | | | | | | | | | | Qt creates various invisible windows for internal purposes. Giving them all titles makes the output of tools like xprop and xwininfo more readable, which makes solving certain bugs (like transient-window bugs) easier. Task-number: QTBUG-33644 Change-Id: I9d37b40d3339fb0f81ffeae64949b88ecb655474 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Ensure lastPixel.y is also initalized to -1 when necessaryAndy Shaw2013-10-081-0/+3
| | | | | | | Task-number: QTBUG-31579 Change-Id: Ia4916ac0d384ea523bbfad0dafbc90044da7ec3e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix "Empty or null file name(s)" warning textKai Koehne2013-10-081-4/+4
| | | | | | | | Remove '(s)' for methods taking only one path argument. The '(s)' has been dropped in other places already ... Change-Id: I9dc0d1cfa1e02f60bce901a309835f4bbfadde6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update ofono backendLorn Potter2013-10-081-1/+1
| | | | | | | The dbus interface has since changed, and I missed this when I updated. Change-Id: Iea3363b276a92f4a97d1ddfbae572515abac9417 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Reorder the members in QThreadData to avoid padding holesThiago Macieira2013-10-082-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, this struct had size 104 and a total of 21 padding bytes. Now it's down to 88 bytes and only 5 bytes of padding. pahole report on a 64-bit system: class QAtomicInt _ref; /* 0 4 */ /* XXX 4 bytes hole, try to pack */ public: class QThread * thread; /* 8 8 */ HANDLE threadId; /* 16 8 */ bool quitNow; /* 24 1 */ /* XXX 3 bytes hole, try to pack */ int loopLevel; /* 28 4 */ class QAtomicPointer<QAbstractEventDispatcher> eventDispatcher; /* 32 8 */ class QStack<QEventLoop*> eventLoops; /* 40 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ class QPostEventList postEventList; /* 48 32 */ bool canWait; /* 80 1 */ /* XXX 7 bytes hole, try to pack */ class QVector<void*> tls; /* 88 8 */ bool isAdopted; /* 96 1 */ /* size: 104, cachelines: 2, members: 11 */ /* sum members: 90, holes: 3, sum holes: 14 */ /* padding: 7 */ Change-Id: I1fc88e0b312f38eccdea440734fd37e0519285a2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-08388-3087/+3087
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Allow to use short names for Windows Registry root keysSebastian Schuberth2013-10-071-0/+12
| | | | | | Change-Id: I58b7681bb49e93b7577bc559d754c81d3c6f007b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QPA: Fix event dispatcher dependent operations in platform integrationLaszlo Agocs2013-10-0710-9/+55
| | | | | | | | | | | | | | | | | | 999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration implementations that perform tasks in their constructor that rely on the event dispatcher. For example creating a QSocketNotifier is not possible anymore since the event dispatcher is created later on. This is fixed by introducing an additional virtual in QPlatformIntegration that gets called after createEventDispatcher(). Two broken platform plugins have been identified so far: eglfs is creating socket notifiers to read events from input devices and xcb's input context plugins may use dbus. Both are updated accordingly. Task-number: QTBUG-33768 Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Require Windows VistaKai Koehne2013-10-071-0/+2
| | | | | | | | | | The structure FDAP is only available as Windows Vista, and MinGW-w64 do not actually define it if _WIN32_WINNT isn't set. Needed to fix compilation with latest MinGW-w64 headers (version 3). Change-Id: I566ea6bd4c3d8d5a495b644aedffb7de42a6d6e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix typo in define guardsKai Koehne2013-10-071-1/+1
| | | | | | | Needed to fix compilation with latest Mingw-w64 headers (version 3) Change-Id: I70c7ff3d833e15e99a915a2df83f04d03a968300 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove default label for QtMsgTypeKai Koehne2013-10-071-3/+1
| | | | | | | | Adding another category will most likely require a dedicated handling anyway, so better let the compiler warn about it. Change-Id: I323ca1250d82e33c086f1930e1df0a6337d6f16f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Improve QLoggingCategory documentationKai Koehne2013-10-071-42/+21
| | | | | Change-Id: I142e954cc3622643d80b8efd3b1d659c11d4e239 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fallback to the original application font handlingAndy Shaw2013-10-072-10/+8
| | | | | | | | When Qt is built for 10.8 but then used on a machine before 10.8 then it was not falling back correctly when an application font was added. Change-Id: I0f05226cdbcfa36621bb1b3aa2f2cd60e714dfdf Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix QScreen::grabWindow for multiple screens on MacAndy Shaw2013-10-071-1/+2
| | | | | | | | QScreen::grabWindow() would only with the primary screen on Mac, if you tried to grab a secondary one then it would end up with a blank pixmap. Change-Id: I24f604051835db96286c693f5ed60a2633b6528e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QCommandLineOption: declare as sharedMarc Mutz2013-10-071-0/+2
| | | | | | | | | QCommandLineOptions are held in a QList in QCommandLineParser, so they better be declared movable, which is one of the things Q_DECLARE_SHARED enables. Change-Id: I75c8185534b4e9c1ea4417a9507095c8a6512aab Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix typos of QWheelEvent exampleIvan Romanov2013-10-071-3/+3
| | | | | | | Just fixed typos with event and numPixels. Change-Id: I8191d7e812ae9d3975a142d198d709d4f9f85b7f Reviewed-by: hjk <hjk121@nokiamail.com>
* Output the CMAKE_CXX_LIBRARY_ARCHITECTURE when reporting missing dependencies.Stephen Kelly2013-10-061-1/+1
| | | | | Change-Id: I5d2d53b9899636dee9f30ab179727de82b78afd5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Replace QLoggingCategory::isEnabled by non-template functionshjk2013-10-063-59/+79
| | | | | | | | | This yields the same results as previously and is more in line with existing interfaces. Change-Id: I0bf0372bf18f3bfde579385cddbe594bf71e3c52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Improve the QWinSettingsPrivate constructor's performanceSebastian Schuberth2013-10-061-21/+26
| | | | | | | | This is mainly achieved by modifying the program flow to require fewer string comparisons and conversions. Change-Id: I9887623b9c05fe76460fc725d6534d16bd9f9e59 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Expand on thread synchronization detailsSze Howe Koh2013-10-062-57/+43
| | | | | | | | | | | | - Introduce the concept of "mutual exclusion" - Rewrite/add explanations on how synchronization happens and how to use these tools - Remove similar content from the "Thread Basics" page - Fix links to examples Change-Id: Id008a8fc3f68bf242cae1704c5c8318149d908b4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Generalize problems and solutions of mutex useSze Howe Koh2013-10-062-20/+24
| | | | | | | | | | These apply to other locks too, not just mutexes. Move from "Thread Basics" to "Synchronizing Threads" Change-Id: I6d7051cb225a8c836fb591a28b65d3de8fab4083 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Remove convoluted details of uncommon QMutex use caseSze Howe Koh2013-10-061-9/+0
| | | | | | Change-Id: If80068f44fef7ab0692b9dad99aa7e1a30cb72a6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Show both low- and high-level thread syncing on the same pageSze Howe Koh2013-10-062-25/+29
| | | | | | | | | Move text from "Thread Basics" to "Synchronizing Threads" for a more complete overview. Change-Id: Ib87259ed551fa77278b57c5922df7f4b774a829a Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Rewrite section on threaded event loopsSze Howe Koh2013-10-061-20/+20
| | | | | | | | | | | - Focus on signals instead of events; programs rarely need to call QCoreApplication::postEvent() manually - Mention QMetaMethod::invokeMethod() - Reduce verbosity Change-Id: I170b96bd0134c0bc102ef1a344d4f0b88e504f86 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Discuss the concept of thread affinity in more detailSze Howe Koh2013-10-062-31/+37
| | | | | | | | | | | | | | | - Create a section dedicated to this concept, which is fundamental to signal/event handling - Move relevant content from the very broad "Thread Basics" page to the QObject class ref - Flesh out existing content, including distinguishing signals from events - Address the common misconception that "member" = "child"; this has been encountered several times in the Qt Project forums Change-Id: I5e7e6c848596e72c0bb623f8442c8389b81ad9ef Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add Q_DECL_OVERRIDE to accessibility classesFrederik Gladhorn2013-10-058-312/+312
| | | | | | | | This actually shows two completely unused functions in QAccessibleTabBar (fixed in follow up patch). Change-Id: If6f464c022617b2ee1db654936e3ff9931103eb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QtConcurrent: remove a using declaration in a header fileMarc Mutz2013-10-053-14/+12
| | | | | | | See Sutter/Alexandrescu, Item 59, for rationale. Change-Id: Ie689e2a00f9ed0fce1ccfdb77c943dd1b1beb4dc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>