summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate qWaitForWindowShown QWidget* overload since 5.0.Stephen Kelly2012-08-271-2/+2
| | | | | | | | It is already documented as deprecated in 5.0, so marking it as deprecated since 6.0 is silly. Change-Id: If72cc81bdad18c907022c48b9aa8e7d87eb88e59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* cmake: define QT_NO_DEBUG in client release buildsPeter Kümmel2012-08-271-0/+1
| | | | | Change-Id: Ife224bf908c5e9bc1e62a830a3750de88a082eb7 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add some error checking to the qt5_use_modules function.Stephen Kelly2012-08-271-0/+8
| | | | | | Change-Id: I8fa2f10edbee1080646324c0689b23eda44aa75d Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix plugin docs regarding location of json files.Stephen Kelly2012-08-271-1/+2
| | | | | | | | | The commit 2ef52ca12416baa96feb64e02186aae04f883a12 introduced an error regarding where the json file must reside. Change-Id: I296c93abebb3e9f8c9e7e29a4a433201064969f0 Reviewed-by: Peter Kümmel <syntheticpp@gmx.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qcompilerdetection.h: set Q_DECL_OVERRIDE/Q_DECL_FINAL for 2005 <= MSVC <= 2010Marc Mutz2012-08-271-3/+18
| | | | | | | | | This enables Q_DECL_FINAL and Q_DECL_OVERRIDE backed by VC's non-standard extensions from VC 2005 on. VC 2012 will support the standard-compliant version, so use that there. Change-Id: I96874fe3d36fcaa283d2d1f53d5eb6825e55f259 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make letter spacing APIs in QTextFormat more consistentEskil Abrahamsen Blomfeldt2012-08-272-34/+48
| | | | | | | | | | | | Change d060b6f04f956ab3a6358f826dc6928b3353f5f7 introduced some new properties to QTextFormat which were unfinished and did not match the documentation in the same change. I've updated the API and docs to use the regular QFont enum for letter spacing type instead of introducing bools (which inhibits expansions later) or mutually exclusive properties in the text format. Change-Id: Ife44993b6746c413e421fdaf92ebaaab6ba95977 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* doc: clean up model view overview linksFrederik Gladhorn2012-08-271-12/+10
| | | | | Change-Id: I4aaf0cb254ffa4c7369e51b35af0226c98ec293c Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
* Fix limitting shortcuts to keypad onlyJani Honkonen2012-08-271-2/+7
| | | | | | | | | | | | | | | | | The Qt::KeypadModifier modifier is internally masked away from all shortcuts. So it is not possible to set a keypad only shortcut. Changed the implementation so that first a full keysequence match is searched. Then if no match is found the same sequence is tried without the keypad modifer. Added a autotest for this also to cover the basic use cases relating to this. Task-number: QTBUG-20191 Change-Id: Ibe7740c705fd0ab1eece4809b9a0b48882172933 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update Q_PLUGIN_METADATA docu.Peter Kümmel2012-08-261-1/+6
| | | | | Change-Id: I7e451a15de392552609ef549118600684429e0ea Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QMetaTypeId: optimize qt_metatype_id() in special casesMarc Mutz2012-08-261-48/+50
| | | | | | | | Same change as for Q_DECLARE_METATYPE, but in the container and smart pointer specialisations of it. Change-Id: If9390ccc43eb3b07122f5ea5b8094139b5e1ded0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMetaTypeId: optimize qt_metatype_id()Marc Mutz2012-08-261-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code resulted in one memory fetch for the test plus another one for the return value (at the assembler level). The new code reuses the already-loaded value: - movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %edx - testl %edx, %edx - je .L158 movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %eax - ret + testl %eax, %eax + je .L160 + rep; ret It also saves one load in the not-yet-initialised case: -.L158: +.L160: leaq .LC7(%rip), %rdi subq , %rsp .cfi_def_cfa_offset 16 movq himBH1, %rsi call _Z17qRegisterMetaTypeI12QDBusMessageEiPKcPT_ movl %eax, _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip) - movl _ZZN11QMetaTypeIdI12QDBusMessageE14qt_metatype_idEvE11metatype_id(%rip), %eax addq , %rsp .cfi_def_cfa_offset 8 ret Change-Id: I769950449822f2b1587680e05518be0a4f3120a2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: make 'impl' and 'ref' privateMarc Mutz2012-08-262-20/+21
| | | | | | | | | | | | This allows to fold the deref() and the destroy() operations into one, destroyIfLastRef(). The member variables were renamed since there's now a member function of the same name (ref()). Change-Id: Ib94416d9e658065bbf5d3711ecafaf0eb063af17 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: make Operation enum protectedMarc Mutz2012-08-261-3/+5
| | | | | | | | | We don't want people to go and call through the function pointer directly. Change-Id: I386645239974f008d513eaa62593c1141b294b60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QSlotObjectBase: remove misleading commentMarc Mutz2012-08-261-1/+1
| | | | | | | | | | | | These constructors might not benefit from being constexpr (as the objects are only created on the heap), so don't suggest so. There's no disadvantage of them begin constexpr, but their constexpr'ability depends on whether QAtomic has a constexpr constructor, and the added complexity of finding that out isn't worth it. Change-Id: I089a29dcb98ba935c339dce09d71f283522a9afd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* moc: parse classes that use Q_DECL_FINAL|final|sealedMarc Mutz2012-08-261-1/+11
| | | | | | | | | | | | | | | | | | | | This only works with the C++11 contextual keyword directly, the MSVC equivalent 'sealed', or the Qt define for it. While this isn't a problem for syncqt, being an internal tool, moc should eventually be able to parse user code using local C++11-final-wrapping macros. For this, I guess moc would have to be taught to expand macros in code and not just test #if clauses, potentially driven by something like #pragma qt-moc expand-this #define MY_FINAL_CLASS final but that's something for someone more intimately familiar with moc's source than I am. Change-Id: Id6aec961a881e8d5a9b76a7fc8e1c02c71913f64 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtGlobal: document Q_DECL_FINAL and Q_DECL_OVERRIDEMarc Mutz2012-08-261-0/+56
| | | | | | Change-Id: I9b292ae3319c30ad878aade4416fb88155465a54 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtGlobal: remove Q_DECL_FINAL_CLASSMarc Mutz2012-08-262-9/+3
| | | | | | | | | | | Now that qvariant_p.h's HasIsNullMethod check is fixed so that it doesn't require Q_COMPILER_DECLTYPE anymore to be able to deal with final classes, there's no point in distinguishing Q_DECL_FINAL and Q_DECL_FINAL_CLASS anymore, so remove the latter. Change-Id: I31de5b63e7d2e44171a13e928997c946d93e05c9 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QVariant: make the HasIsNullMethod check work across all compilers (maybe)Marc Mutz2012-08-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we have a C++11 version that requires Q_COMPILER_DECLTYPE support, and can deal with final classes, and a C++98 version that doesn't require any C++11 features, but fails on final classes. What we're missing is a version that works for MSVC v8 and v9 (2005 and 2008), which sport the 'sealed' non-standard keywords but lack decltype support. So far, we tried to solve the problem by making class-level final special (Q_DECL_FINAL_CLASS), not defining that macro for these two compilers, even though we did define Q_DECL_FINAL, the method-level keyword. This new formulation, taken from http://stackoverflow.com/a/9655327/134841 supposedly supports all compilers with a minor #ifdef for MSVC which doesn't like applying sizeof() the way we do. However, testing has shown this to blow up on OSX. So we use the less intrusive approach: add this variant as a third version, only used by VC 2005 and 2008. Change-Id: If1945f8a6e9ed36cb68212fa781d5e29eb2a082d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qcompilerdetection.h: add MSVC 2012 featuresMarc Mutz2012-08-261-0/+7
| | | | | | | | These are taken from the table at http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx Change-Id: Ifd2f88ca5d92092a6a025bef3da36fde0a802a66 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qcompilerdetection.h: stream-line MSVC feature detectionMarc Mutz2012-08-261-6/+9
| | | | | | | | | | | | | | | | | Reformat the MSVC feature detection to be similar to other compilers, ie. 1. Inside the C++11 features section instead of where the compilers are detected 2. In one block for the compiler, with sub-blocks for the version. However, it's now not 100% compatible with the previous version, since Q_CC_INTEL is now explicitly excluded while before it was implicitly included in the MSVC case. I have no idea whether that matters, since Q_CC_INTEL is handled for itself further up already. Change-Id: Id9e8da0a5394ad5643bcb29493f14bc6e8264c13 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Small optimisation to recursive mutexesThiago Macieira2012-08-261-2/+2
| | | | | | | | | | | A recursive mutex operates on top of a non-recursive mutex. Therefore, we can bypass the test for recursive. The end result is simply that the compiler can inline the locking and unlocking a little better inside the lock() and unlock() functions Change-Id: Ic06d1344ccd411c22cbdef74536f3a4d368d75d7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* blockSignals should block QML signal emission.Michael Brasser2012-08-261-3/+3
| | | | | | Change-Id: Ief35f3ca326173a87240e3cb558e47f721bd04b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QUrl: port thread-safety autotest from Qt4.David Faure2012-08-261-0/+2
| | | | | | | | This detected the same missing detach()s in QUrl::resolve. Everything else works, no need for a mutex in Qt5's QUrl. Change-Id: I0da51b7b0c6b810d314a26d4b638383cd17de12b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemModel: remove incorrect #ifndefMarc Mutz2012-08-261-2/+0
| | | | | | | | | | No other call to fileInfoGatherer.getInfo(info) is #ifndef'ed on QT_NO_FILESYSTEMWATCHER, so this one shouldn't be, either. Change-Id: If145226c13d77460d6169a9ed3028647b0f565b5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Majid Khan <mkhan3189@gmail.com>
* HarfBuzz: fix unused parameter / variable warningsMarc Mutz2012-08-251-2/+5
| | | | | | Change-Id: I362c80081ac4e4d0b9126385bab5a77826810926 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix infinite recursion while dragging toolbar of QMainWindow.Markku Heikkila2012-08-251-2/+3
| | | | | | | | | | | | | Prevent recursion in QMainWindowLayout::endSeparatorMove(). Manually cherry-picked from Qt 4.8 change 90b71dc0ff4ec9bb150a0de9933d6eb06d995a34 Task-number: QTBUG-21378 Change-Id: I901ebfd96be0bdc6ab03dd8c3335d2622db843db Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* explain specifically how to make a transparent windowShawn Rutledge2012-08-251-2/+10
| | | | | | Change-Id: I136d8d9709d4fae914f12919e513641a6e76e3f0 Task-number: QTBUG-20768 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* OSX: Drag and Drop QMimeData.Christoph Schleifenbaum2012-08-251-4/+17
| | | | | | | | | | | | When dragging and dropping within the same application, the QDropEvent should contain exactly the same instance of QMimeData as it was set to QDrag. This solves the problem in https://bugreports.qt-project.org/browse/QTBUG-26953 Change-Id: I3bc4da845ff4293c509343c1c8c62fc331416ec0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* doc: Fix doc warnings for qtextlayout.cppEskil Abrahamsen Blomfeldt2012-08-251-3/+7
| | | | | | | | | \Auml for a with umlaut doesn't seem to work with qdoc anymore, so replace this with the unicode value instead. Also, add reference to arguments in glyphRuns() function. Change-Id: I31861b384b822d1fbdcafbeeac07ea68a0e5fd07 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* doc: Fix several text-related qdoc warningsEskil Abrahamsen Blomfeldt2012-08-2510-39/+87
| | | | | | | | | Also adds a new snippet which is just copy-pasted from the old documentation, because the snippet-file previously referenced seems to have disappeared. Change-Id: I0180715544321e076acda769cbdcbf19d50a971b Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Split the futexFlags() function in two: a hot and a cold pathThiago Macieira2012-08-251-18/+26
| | | | | | | | | | | | | | We could mark the cold path with __attribute__((cold)) (since GCC 4.3), but quick tests locally indicate that the compiler is smart enough to determine that by itself. It will inline the hot path in _q_futex, which in turn is inlined in the lockInternal and unlockInternal functions, whereas the cold path is kept outside. Change-Id: I8ae7d851d4f050498bfb491ba87d3e25453a14f8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Mark mutex locking and unlocking functions with noexceptThiago Macieira2012-08-257-33/+37
| | | | | | | | | | | | | | | | | | | | | Unlocking a mutex can never throw an exception. That doesn't make sense and our code should make sure it can't happen. Right now, provided that the system-level functions don't throw, we don't either. Locking a mutex cannot throw on Linux because we use futexes directly. A non-recursive mutex is just a futex, whereas a recursive mutex uses a mutex (a futex) to manage a lock count. However, on other platforms, due to the freelist, there can be memory allocation, which means it might throw std::bad_alloc. Not because of the freelist itself (that uses malloc and will just crash if malloc fails) but because of Q_GLOBAL_STATIC. In 5.1, the global static will be noexcept provided the type's constructor is so too (it is, in this case). Change-Id: I4c562383f48de1be7827b9afb512d73eaf0792d5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a way for QtDBus to force a call to dbus_shutdownThiago Macieira2012-08-252-3/+17
| | | | | | | | | | | | This will ask the D-Bus library to free its caches. It's useful for running valgrind on a D-Bus based application, so we can detect real leaks. We can't run this by default because there could be other users of libdbus-1. Calling the shutdown function would make them stop working. Change-Id: I9854b82afcdbc4955d6f0a1a1b49a673186242c8 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Print some debugging from QDBusConnection when disconnectingThiago Macieira2012-08-251-0/+1
| | | | | Change-Id: I6e19cd8b16513faad6435d1713eab56675d07289 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Do not build qpa/gui dependant plugins in no-gui modeJ-P Nurmi2012-08-251-3/+1
| | | | | Change-Id: I725e9127e640c0dd3cbd7f1488b16dcf4eb06377 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* src.pro: remove redundant & incorrect platformsupport dependencyJ-P Nurmi2012-08-251-1/+1
| | | | | | | it's already added conditionally below Change-Id: I4df89b2822a3e6e46d8254c08fd69d0c98e680b7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Use nanosleep instead of pthread_cond_timedwait for thread sleepingThiago Macieira2012-08-254-40/+36
| | | | | | | | | | | | | | | There's a comment saying nanosleep's availability is questionable, but the information of what systems don't have that is now lost in time. It's quite likely that they were older, Unix systems we no longer support anyway. nanosleep comes from POSIX.1b-1993, which is merged into POSIX.1-2001, so chances are that it's supported almost everywhere where Qt runs (except for Windows anyway). Change-Id: I4fd18f8715c43a42429000f3b3d2c3b7343f94b4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Improve docs.Frederik Gladhorn2012-08-251-129/+5
| | | | | | Change-Id: I073398e4da14a1c6489c951200f022a346f4d2fa Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Don't define QT_NO_ICONV on Windows: that comes from qconfig.hThiago Macieira2012-08-251-1/+1
| | | | | | | | | | | | Both the configure script and configure.exe add QT_NO_ICONV to qconfig.h in case they can't find iconv. Since Windows doesn't use iconv anyway, we don't need to set QT_NO_ICONV here. MSVC likes to print a warning that a macro is redefined. That gets quite spammy... Change-Id: Ide9800f6f848bc0c2d8bdbcb41875a709d3e249c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add qiterator.h to tools.priThiago Macieira2012-08-251-0/+1
| | | | | Change-Id: I2c8182adbf513231bcef5dc2de60217753a54b76 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QDBusMetaType: #if -> #ifdef QT_BOOTSTRAPPEDMarc Mutz2012-08-251-1/+1
| | | | | | | The rest of the code uses #ifdef/#ifndef, so do so here, too. Change-Id: I4811755f9a1c2a1cab371e3bea78d3c5f9af086e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbus_loadLibDBus: remove unneeded volatile qualificationMarc Mutz2012-08-251-1/+1
| | | | | | | | | The variable is only ever accessed under mutex protection, and doesn't otherwise look like it could be changed by the hardware, so remove the volatile qualifier. Change-Id: I3bb00ed6f8017d662bbf73425a70d52116cc9297 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix doc: qglcolormap is not the opengl moduleFrederik Gladhorn2012-08-241-1/+1
| | | | | Change-Id: I134aeafbabc62e36da20e0a6df667b6c1aa0c477 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* fbbackingstore: Don't overload inherited virtual functionKent Hansen2012-08-242-3/+2
| | | | | | | | The QPlatformBackingStore::endPaint function does not take any parameters. Change-Id: If15d7824d65a52c38332c6676c12a954469a58ab Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix performence problem while shaping a lines with many scriptsOlivier Goffart2012-08-231-1/+1
| | | | | | | | | Fix quadradic behaviour regression introduced in commit 2e6b8b4734710377e25c199e3ff7865628e7d723 Task-number: QTBUG-22275 Change-Id: I343452c6b1cd0e571770e5dadd3cd6fd3167c96d Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Speed up QTextEngine::setBoundaryOlivier Goffart2012-08-231-6/+14
| | | | | | | | | | | | | | Before, setBoundary was O(N), now it is O(log N) assuming the boundaries are added in order. (splitItem might still be linear because of the call to QVector::insert) This speeds up a lot QTextEngine::addRequiredBoundaries when there is a lot of addFormats. (For example if there is a very long line with syntax highlighting) Task-number: QTBUG-8389 Change-Id: I10c9fca72343f46db24b1d4f519f7747188d4009 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Speed up QTextEngine::resolveAdditionalFormatsOlivier Goffart2012-08-231-2/+65
| | | | | | | | | Don't call the linear QTextEngine::format in the loop. Instead, keep track of the current formats by indexing their start and end position. Task-number: QTBUG-8389 Change-Id: I89c18b804111edfab6254442cbee33da39d1a273 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* doc: Fix some qdoc warningsEskil Abrahamsen Blomfeldt2012-08-232-10/+12
| | | | | | | | | | | QDoc doesn't supported nested tags, and there doesn't seem to be any way to trick it into thinking you've mentioned the argument (\omit didn't work), so actually rephrasing is the only way to kill the warning. Also add a const modifier to a signature to make it match the declaration. Change-Id: Ie02a488c42565205e827602959111c53e2d05a83 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Compile without the deprecated filterEvent functionThiago Macieira2012-08-231-1/+1
| | | | | | | | Use the filterNativeEvent function, which also takes the name of the event. Change-Id: Ifa3dd6285a2a526b5c3de5a86a74ead706534759 Reviewed-by: David Faure <faure@kde.org>
* xcb: fix unused static warningMarc Mutz2012-08-231-0/+2
| | | | | | | | | The variable ptrXcursorLibraryLoadCursor is only used in code wrapped in XCB_USE_XLIB. Change-Id: If0b4997ac6e80a3709263d9793d1ca0dfd5907f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>