summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ifdef drivespec handling in relativeFilePath to windowsOswald Buddenhagen2012-08-071-9/+4
| | | | | | | on unix, the code wouldn't do anything except burning cycles anyway. Change-Id: I1c28b1a7014af93ca70a17e0bd669debad8003c2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Properly manage window geometry in kmsLaszlo Agocs2012-08-072-4/+9
| | | | | | | | | | | If QWindow::setGeometry() is called before QWindow::create(), QKmsWindow::setGeometry() is not called at all. This is wrong because there is some special size restricting happening there which must never be skipped. Change-Id: I321632d4fdb327b0a75e6791c019b3f4c2793888 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* qdoc: Don't always add example .qdoc files to source listMartin Smith2012-08-071-3/+5
| | | | | | | | | When qdoc finds a .qdoc file in an exampledirs directory, it only adds it to the source list if it isn't already in the source list. This may be overkill, but it's safe. Change-Id: I2c5714c968f06e90f9b29b3a5481f80469e19ced Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Only use glXCreateContext if glXCreateContextAttribsARB did not succeed.Zeno Albisser2012-08-071-16/+13
| | | | | | | | | | | | If glXCreateContextAttribsARB does not succeed or is not available, we should fallback to using glXCreateContext. But we should not just create a context with glXCreateContext by default that is being thrown away if glXCreateContextAttribsARB succeeds. Otherwise glXMakeCurrent with context 0 might cause an unexpected context change when dealing with multiple contexts. Change-Id: I7627abbe2500b4006180653a1b3b074fe7aca1d3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't export QAtomicInt, it's all inlineThiago Macieira2012-08-071-1/+1
| | | | | | | | | | | Moreover, exporting it causes the horrible side-effect on Windows (with MSVC) that the compiler will not inline the functions, but instead will place indirect calls to the functions in QtCore DLL, even in release mode. For such a critical piece of code, inlining is necessary. Change-Id: Ib31c12f6bf8dc8ece1b51824716a480559753c24 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Add a T parameter to the memory barrier functions in atomics.Thiago Macieira2012-08-076-39/+49
| | | | | | | | This is so we can insert valgrind (helgrind) annotation macros. They require the actual address of the variable to work. Change-Id: I988f6a46385ad58143c53ad34b6cf0f58be2cdb8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMessageLogger: mark default ctor as constexpr, tooMarc Mutz2012-08-071-2/+2
| | | | | | Change-Id: I6f92f4a01e43dbe811b11b3e8d9b8a02a31463c5 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Avoid crashes when invalidating a proxy model filter.Stephen Kelly2012-08-071-3/+10
| | | | | | Task-number: QTBUG-26107 Change-Id: I2df7ae6402136570c8469d3251edae6ca8290f1f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Do not draw garbage branches if 0px indentation is specified.Stephen Kelly2012-08-071-1/+2
| | | | | | | | | This can't realisitically be unit tested. Task-number: QTBUG-26305 Change-Id: If7f56c44c472ff0ffbda4744b76ed2119bb64bf8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make QSignalSpy copy QVariant parameters directlyKent Hansen2012-08-071-1/+4
| | | | | | | | | | | | | | | | | | | | | Previously, a QVariant parameter would be wrapped inside a new QVariant, and you would have to cast the QSignalSpy's QVariant to a QVariant to get the actual value. This behavior was unintuitive and undocumented. Check if the parameter type is QVariant, and copy it directly if it is. This makes the QSignalSpy's QVariant directly usable (no need to "unwrap" the value in user code). Existing tests that use QSignalSpy together with QVariant parameters (such as tst_QPropertyAnimation::valueChanged()) and do cast the QVariant parameter to a QVariant, continue to work after this change; this is because qvariant_cast<QVariant>() returns its input value (unchanged) when the type is not QMetaType::QVariant. Task-number: QTBUG-21645 Change-Id: Ibfb171edd60c0d3f7ca1d5419e5c5f3d0380d5b3 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* QWindowSystemInterface: fix mem leak and raceMarc Mutz2012-08-072-18/+26
| | | | | | | | | | | | | | | | | There was a race where QGuiApplicationPrivate::processMouseEvent accessed QWindowSystemInterfacePrivate::windowSystemEventQueue without holding QWindowSystemInterfacePrivate::queueMutex. There was a memory leak where QWindowSystemInterfacePrivate::windowSystemEventQueue would not delete events contained in it when it was destroyed. Fix both of these by properly encapsulating the QList/QMutex pair in a small class, WindowSystemEventList, that allows only properly protected access to the internal QList and calls qDeleteAll() in its dtor. Change-Id: Ifaa9968c9272096df2f7109a7a6cf1c8e5fa736c Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Use == for button flag test instead of &Stephen Kelly2012-08-071-2/+2
| | | | | | | | QMouseEvent::button() returns Qt::MouseButton, not Qt::MouseButtons. Change-Id: Ib5dc5b3998ed8f442c72e26d1aff62bc4ebcff71 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove extra Q_COMPILER_xxx defines from the MSVC section.Thiago Macieira2012-08-061-11/+0
| | | | | | | | Those are defined below, after the list that describes the macros and the papers. Change-Id: I1f2df0e33c84eb17ebbb0147662f560defed182c Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* MSVC's throw() behaviour matches the C++11 noexcept, so use itThiago Macieira2012-08-061-1/+5
| | | | | | | | | | | | This allows code using methods marked Q_DECL_NOEXCEPT to benefit from optimisations before MSVC supports the C++11 keyword. Even MSVC 2012 doesn't have it yet. Using throw() in other compilers is not a good idea because they might actually be implementing the C++ standard -- which is broken. Change-Id: Id07ab4fe40a641583d5285d5abb536998bc419ba Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Optimise QMutexLocker a little: don't call relock() in the constructorThiago Macieira2012-08-061-2/+5
| | | | | | | | | | | | QMutexLocker does not support being passed already-locked mutexes, unless they are recursive mutexes. But in that case, it behaves as if the mutex weren't locked in the first place. Since that's the case, there's no point in testing the low bit to see if it's set or not. It's never going to be. Change-Id: Ie4b81f7e2cca16e6db36f3cb51a5377dbdfc157d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* OpenGL: Add finer-grained functionality checks for NPOT texturesSean Harmer2012-08-062-3/+5
| | | | | | | | | | | | | | | | The GL_IMG_texture_npot extension only provides partial support for npot textures in that it allows use of npot textures but it does not support the GL_REPEAT texture mode (needed for tiling fill modes in the QQ2 image element). Adding this new finer-grained feature check allows QQ2 to still use npot textures where GL_REPEAT is not needed with only the IMG extension present. A follow-up commit will make a check for this in qtdeclarative. Change-Id: Iff3dbdb955fb334d9e32f3abd49e90ff0ed9836c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make sure codecForLocale returns a valid codec in bootstrap modeJan-Arve Saether2012-08-061-1/+1
| | | | | | | | | This was a regression caused by acbfb4d777474aadd2813614108, causing for instance qdoc to crash. Change-Id: Id8daa19d467c4f1729e5a5a203a388f16ec4a6de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: Adding a landing page for Qt SQL.Jerome Pasion2012-08-063-3/+37
| | | | | | | | -Simple landing page which contains a link to the SQL guide and API. -Gave a new title to C++ API page. Change-Id: I54eca4f6933bafa0affd5825e7fe2e1a2522dad0 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* fix maximize -> fullscreen -> maximize on WindowsJoerg Bornemann2012-08-061-1/+1
| | | | | | | | Using a reference changes the value of oldState within this function, which is undesired. Change-Id: I9fb66e488015d6b3e586ffa2f0b05a40c095e16b Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* Add missing const qualifier to snippet in QIdentityProxyModel doc.Mitch Curtis2012-08-061-1/+1
| | | | | | | Task-number: QTBUG-26751 Change-Id: Icb1f25dd015bcc62ec7c4c2b26c897649f1bbabb Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix some documentation inconsistency in QtNetwork.Stephen Kelly2012-08-062-21/+21
| | | | | Change-Id: Id3e25480d4a8529813e02dc3d19f553a9263a363 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qdoc: Removed "../" from paths to imagesMartin Smith2012-08-062-12/+16
| | | | | | | | | | | qdoc was mistakenly assuming that the output was going into subdirectories. The base dir variable was not being tested. Task nr: QTBUG-26638 Change-Id: I9b331926f8954b58102f75fad3f233eaebb2bb4d Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Fix typos in qdatetime.cpp.Mitch Curtis2012-08-061-8/+8
| | | | | Change-Id: I1c2e3dafcca69590cd7a18fdf65e2c9083ba91b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not call markDirty() for hidden widgets.Samuel Rødal2012-08-061-1/+1
| | | | | | | | | | Fixed crash when resizing a scroll area with a native viewport (typically a QGLWidget) causes the scroll bars to get hidden, while there are still expose events in the queue for the scroll bar widget. Task-number: QTBUG-26746 Change-Id: Ia77c8eb32a6730670333120af3f9a772c64807f1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed popups getting blocked by modal windows.Samuel Rødal2012-08-061-1/+1
| | | | | | | | | | | | | | In the case of a file dialog with a completer, the completion list view is a popup that is not a transient child of the file dialog. Thus it ends up getting its blockedByModal flag set due to the file dialog window being a modal window. To prevent this we make sure popups don't get blocked by modal windows, as they were special cased and processed before modal windows in Qt 4.x. Change-Id: Id5688cfb1534541cd1678b1e53d75e34a68f9b8e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qdoc: No longer prints namespace qualifier twiceMartin Smith2012-08-062-8/+5
| | | | | | | | | | | | enum values in the Qt namespace were being printed as. e.g.: Qt::Qt::AlignLeft. This was due to the presence of a collision node that was not handled properly. Task nr: QTBUG-26628 Change-Id: I54adaba72410b2838f0922f181846bb7e76b61d4 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Logging: mark qEmergencyOut() noexceptMarc Mutz2012-08-061-1/+1
| | | | | | | | This function is called in OOM situations and when other exceptions are still in flight, so it really shouldn't throw, indeed. Change-Id: I50cda699ffd74f3710c3bafd15af356ff410bc47 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix intended assignment to customSet variable.Frank Osterfeld2012-08-061-1/+1
| | | | | | | | The naming suggests that this variable should be set to true here (instead of leaving the expression result unused). Also, the variable isn't written to anywhere else. Change-Id: I8aae904f6e4456ce0bdd053ce89c2721168dccd3 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qdatetime: micro optimization in fmtDateTimehjk2012-08-051-36/+36
| | | | | | | | The function showed up in the profiler when doing heavy logging involving timestamps in Qt Creator. Change-Id: I81c4e22981a5de91df3da6a0f1df2a08552fa71a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* XCB: Correction to OpenGL version check for profile supportSean Harmer2012-08-041-1/+1
| | | | | Change-Id: I2f2bf877b1e2e628806f22fe66180b05090f4b3e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* ICU: lock the mutex before calling an Unlocked functionThiago Macieira2012-08-041-0/+2
| | | | | | | | | | | | | The QIcuCodec::defaultCodecUnlocked function is not thread-safe because it calls codecForNameUnlocked. In turn, that one accesses and even modifies a QHash stored in the QCoreGlobalData singleton, which is what makes it non-threadsafe. In order to call the Unlocked function, we need to lock the mutex first. Change-Id: I915570110229f4c0929986aa26731244317ef6ab Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* ICU: Mark which functions are threadsafe and which ones aren'tThiago Macieira2012-08-043-14/+20
| | | | | | | | | | | | | Mark the thread-safe functions with the \threadsafe doc marker. This includes public API, which should be thread-safe anyway. The thread-unsafe functions are marked "\nonreentrant" already. In addition, I renamed the functions that must be called with locked mutexes to Unlocked, following the convention in other libraries like libdbus-1. Change-Id: Ibd93d1266149767f546c8e82959b73c138008469 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QNX: Ensure that m_requestedBufferSize is properly initialisedSean Harmer2012-08-031-1/+2
| | | | | | | | | | | | This solves a new corner case resulting from the recent refactoring of QQnxWindow::setGeometry() that occurs when using a plain OpenGL backed window in a single threaded environment and the user code calls QOpenGLContext::makeCurrent(this) in the QWindow subclass ctor. Change-Id: Iaf07fbff1cb2743f5706020a8d657a82cb9f2255 Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix order of QT_END_NAMESPACE and QT_END_HEADER macrosSergio Ahumada2012-08-031-1/+1
| | | | | Change-Id: I798311bdacaac341210626489410740c130f8724 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix FullScreen for Windows CEAndreas Holzammer2012-08-032-0/+26
| | | | | | | | | For Windows CE the taskbar needs to be hidden manually. Change-Id: Ife69a2a91457ba0c162e4e1be88f87ad22c61190 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-0347-51/+51
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the obsolete scene argument for constructors of graphics itemsLars Knoll2012-08-035-322/+80
| | | | | | | | | The argument has been obsoleted and not documented since 2007. Get rid of it now before Qt 5.0 Task-number: QTBUG-25089 Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use glFlush() if swapBehavior is single-bufferedJan-Arve Saether2012-08-021-1/+2
| | | | | | | | | | | | | Otherwise, use swapBuffers() This fixes an issue where swapbuffers() did not swap the "back buffer" to the "front buffer" if we had single-buffered swap behavior. This was an issue on Windows 7 with an NVIDIA graphics card that by default was using single-buffered mode. Change-Id: If53f54146e4633305be3ad5158565752b6516b59 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix default font for X11.Friedemann Kleint2012-08-022-3/+43
| | | | | | | | | | | Qt 5 X11 applications currently have differing fonts since they no longer read ~/.config/Trolltech.conf. Set the default font value 4.8 would return for XRender/FontConfig in the theme classes. Change-Id: Ie0a77e6781a47a68fd67895821ab1773c25e0470 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Fix mimedata updating and signal emision issues in xcb clipboard.Gatis Paeglis2012-08-021-26/+38
| | | | | | | | | | | | | Clipboard should reacquire the clipboard whenever the content or metadata (e.g the list of supported targets) changes. Patch enables us to monitor changes to the clipboard through help of XFixes extension. Cleanup xlib xa_* naming conventions Task-number: QTBUG-26709 Change-Id: I9d47766ad9859b5628b0358b1c47e8af8fecef73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix badAtom issues introduced by behavior changes between Xlib and xcb.Gatis Paeglis2012-08-021-22/+7
| | | | | | | | | | | | In Xlib, the 'length' variable gets updated with the the actual number of 8-bit, 16-bit, or 32-bit items stored in the returned data, but xcb returns the actual number of bytes read through xcb_get_property_value_length, therefore the logic of calculating offset was broken. Task-number: QTBUG-26709 Change-Id: I04de3b5c5631cfaf9b3c2c3d4513be73c569f61f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qdoc: Ignore property functions of obsolete propertiesMartin Smith2012-08-022-1/+7
| | | | | | | | | | | Property setter and getter functions are no longer included in the output when the property itself has been marked \obsolete. Task nr: QTBUG-26425 Change-Id: Iac315445d1916467b12be03989bd4513a03a2397 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix a typo in the qdoc manual (QChra -> QChar)Laszlo Papp2012-08-021-1/+1
| | | | | Change-Id: I331765f42f8dd46bf312223754ade3c5d156e6dc Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QDoc: Set HTML Doctype to XHTML 1.0 Transitional.Casper van Donderen2012-08-021-1/+1
| | | | | | | | Previously QDoc HTML output was marked as XHTML 1.0 Strict, but did not pass validation. As XHTML 1.0 Transitional the W3C validation passes. Change-Id: Iced8c02b2602a82b94ee394e580bfb92023a517b Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QDoc: Set the default output encoding for HTML to UTF-8.Casper van Donderen2012-08-021-1/+1
| | | | | Change-Id: Ic6d8efae967514e143f224aed4c761a4c01eb434 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QDoc: Add extra tags when no HTML.endheader is specified.Casper van Donderen2012-08-021-1/+4
| | | | | | | | | The default Qt template inserts </head><body> with some arguments in the header of the HTML document. When you don't specify the HTML.endheader qdocconf variable those tags will not be generated and the QTextBrowser-based view in Qt Assistant will not be able to render the documentation. Change-Id: Ieee231f300e1dc71d6b6343771d2682b3de96d73 Reviewed-by: Pierre Rossi <pierre.rossi@nokia.com>
* Make tests compile without gui-privatePaul Olav Tvete2012-08-025-39/+58
| | | | | | | | | | | | | Add new qt_handleXXX functions that forward to the QWindowSystemInterface functions, and use those in the testlib inline functions. Remove use of struct QWindowSystemInterface::TouchPoint from the testlib header files (requiring some slight increase in ugliness in the two tests that use that struct). Also remove the qmake hack that adds private headers to all tests Change-Id: Iec23537e55a44802f6e9cd463f7a0f82007c5250 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* string.h is needed for memcpy()Oswald Buddenhagen2012-08-021-0/+2
| | | | | | | | ... which is used by some template code. apparently, the glibc on my rather recent system removed some implicit includes again. Change-Id: I9f85362e54a42cccc1e743f2b27bcdb6a90162e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QPlatformWindowPrivate into its own headerLaszlo Agocs2012-08-023-6/+76
| | | | | | | | | Most other qplatform* classes have the same setup and more importantly this allows QPlatformWindow subclasses to utilize the d-pointer. Change-Id: I52afeaaf35bba8ef42d59ff3107f7d7bcf931e5e Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Mention setFont() in QPainter::drawText() functionsSimon A. Eugster2012-08-011-1/+9
| | | | | | Change-Id: Id0d06d27f3aeb6a6e7e1a415da78591ae5eae91c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>