summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Q_DECL_NOTHROW: stronger and more widely available version of Q_DECL_NOEXCEPTMarc Mutz2012-08-072-4/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1adca807 defined Q_DECL_NOEXCEPT to be the same as throw() for the Microsoft compiler. However, the two are not equivalent: - C++11 noexcept is defined to call std::terminate() if a noexcept function nevertheless encounters an exception. - MSVC throw() has essentially undefined behaviour in this situation: http://msdn.microsoft.com/en-us/library/wfa0edys%28v=vs.100%29 "Due to code optimizations that might be performed by the C++ compiler [...] if a function does throw an exception, the program may not execute correctly." So define two macros: 1. Q_DECL_NOEXCEPT/Q_DECL_NOEXCEPT_EXPR always have C++11 behaviour. This is expected to be the more efficient implementation if the function can actually throw. 2. Q_DECL_NOTHROW means that the function gives the nothrow guarantee. It is stronger than noexcept, but not all functions that can be marked Q_DECL_NOEXCEPT can be marked Q_DECL_NOTHROW. In general Q_DECL_NOTHROW functions need to use a try/catch block in order to prevent exceptions from leaving the functions, unless you can proove that none of the operations can throw. For the caller, both macros are equivalent: it can be relied on that no exception leaves the function. Change-Id: I32f822a82e06a31cb71d38db438387aee5ec3334 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Improve the QOpenGLExtensionMatcher classSean Harmer2012-08-072-50/+11
| | | | | | | | | | | | Using a QSet<QByteArray> internally means that checking for the presence of an extension no longer uses an O(N) search. This patch also allows users of this class to easily get a list of the supported extensions. Change-Id: I02194e5345573c47be0876f3ea6eb6b69a2ead81 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* qmake vcxproj generator: map TARGET_EXT to $(TargetExt)Joerg Bornemann2012-08-073-2/+12
| | | | | | | | Task-number: QTBUG-26782 Change-Id: Ib143fa6b8674c4d09d798a9301bb209b886e791d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* qmake: un-copy-and-pastify vcxproj generator a bitJoerg Bornemann2012-08-072-60/+70
| | | | | | | Reusing already built strings improves readability and performance. Change-Id: I8555fb860561ff214ae123efeda78fc770b6459f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add the filters for extra compilers for vcxproj filesAndy Shaw2012-08-071-0/+8
| | | | | | | | | | | The files were grouped into the relevant filters but the filters themselves were not added. This now ensures the filters are added to the vcxproj files so they appear grouped correctly. Task-number: QTBUG-26755 Change-Id: I7d2c6fa96dcbb0496fd9d1bb1d01e7dd660052f4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix class and file names in the d-bus examplesOswald Buddenhagen2012-08-078-22/+22
| | | | | | | some omissions from the com.trolltech => org.example replacement. Change-Id: I078c272fc3729fc7b9e9cd3e6ede7c21f0386b62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add possibility to add OpenSSL, DBUS, MySQL path under WindowsAndreas Holzammer2012-08-077-0/+35
| | | | | | | | | | | Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtGui: collapse two qgetenv() on the same variableMarc Mutz2012-08-071-1/+2
| | | | | | | | | | Store the result in a temporary QByteArray and continue working with that one. Change-Id: I24bc243f0f3dfb37d840faf7592b3383bd37c7e2 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl::idnWhiteList(): add QList::reserve() callMarc Mutz2012-08-071-2/+4
| | | | | | | | Avoids reallocation. Change-Id: I3238574590463596a797d237b066ef60214392a7 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNoDebug: remove special member functionsMarc Mutz2012-08-071-3/+0
| | | | | | | | These are better generated by the compiler. Change-Id: I5afa9fd17997c220622ed0e5990c33e52700840f Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Only emit the clicked() signal from views if the left button is used.Stephen Kelly2012-08-073-2/+31
| | | | | | | | | | | | This is consistent with QAbstractButton, QCalendarWidget, QDialogButtonBox and QGroupBox (ie, all other widgets with a clicked signal) Task-number: QTBUG-26105 Change-Id: Ieafe988b5c03216796b69a7cd70ac1a03fc12b0a Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Ensure that we return an invalid QTableWidgetItem when none is available.Stephen Kelly2012-08-072-1/+17
| | | | | | | Task-number: QTBUG-26195 Change-Id: Iede4f51770bd8c8eab3558137aaf7b1721f25a87 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* add support for PKGCONFIG_PRIVATEOswald Buddenhagen2012-08-071-20/+28
| | | | | | | | | | | | this does the same as PKGCONFIG, only that the libraries end up in LIBS_PRIVATE, not LIBS, which means they don't end up in prl files. in the vast majority of cases, the user should use this new variable. Change-Id: Icb57a1166f1896f51284c64e4047cfc79410e73a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add support for QT_PRIVATEOswald Buddenhagen2012-08-072-35/+43
| | | | | | | | | | | | | | | | this is handled the same way as the QT variable, only that the actual libraries end up in LIBS_PRIVATE, not LIBS, which means they don't end up in prl files. the handling of the two variables is entirely independent, including independent dependency resolution, so some libraries will typically end up twice on the linker command line. this is not a problem. Change-Id: I257ad0d414bf273c08a7bd6a874fe9ddb7356009 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* respect copy_dir_files with manually flagged directories as wellOswald Buddenhagen2012-08-071-3/+5
| | | | | | | otherwise the second installation on unix would be bogus. Change-Id: I162533ee262c6820e7e2d4710b5342cafecd9d59 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* centralize+fix addition of copy_dir_files flagOswald Buddenhagen2012-08-0710-9/+12
| | | | | | | | this is in fact a shell-related flag, which determines how QMAKE_DIR_COPY is assumed to behave. Change-Id: If774f8a83b40c9ae7107c8e7ef7263af8a2e6c6e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove not particularly useful branchOswald Buddenhagen2012-08-071-4/+1
| | | | | | | | | we just determined that the file does not exist, so it's entirely pointless to query its type from the file system. consequently, the respective fallback branch would assume a regular file anyway. Change-Id: I42590ffc2a5f650fb430a9398cb1859217ed4350 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove clearly bogus escapeFilePath() callOswald Buddenhagen2012-08-071-1/+0
| | | | | | | | the value is still re-processed numerous times, end each "exit path" does own escaping, while not every path can deal with an escaped path. Change-Id: I0bf4a043809bf4b7877d02e5d8dfe8f794a7dd00 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make $$relative_path() minimize already relative pathsOswald Buddenhagen2012-08-071-4/+5
| | | | | | | | | | QDir::relativeFilePath() doesn't do anything if the path is already relative, so make it absolute first to force a re-calculation. the cleanPath() is gone, as relativeFilePath() already does that. Change-Id: I8f4d0d839db3fe99a608f70916b4b5bd52c56535 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* 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-072-3/+78
| | | | | | 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-073-1/+18
| | | | | | | | | | | | | | | | | | | | | 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>
* lancelot: detect and handle Jenkins CI environmentRohan McGovern2012-08-061-0/+8
| | | | | | | | | | | | | | | | | | Make the test behave in Jenkins similarly as it behaves in Pulse: - a test run in Jenkins is not an ad-hoc run - the JENKINS_HOME environment variable implies we are running in Jenkins - the GIT_BRANCH environment variable, set by the Jenkins git plugin, is equivalent to PULSE_GIT_BRANCH - there is no equivalent to PULSE_TESTR_BRANCH, since testr is no longer used Change-Id: I89ffeec659b4adaab309d8b93ad793ce640029c7 Reviewed-by: aavit <qt_aavit@ovi.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>
* Fix builds with sysroot: a space is necessary before ] in scriptsThiago Macieira2012-08-061-1/+1
| | | | | | | | | | | When using [ ] for tests in shell scripts, the ending ] must be a separate parameter. Otherwise, it won't work. configure was reporting: configure:5918: ']' expected Change-Id: I38a843356ee0feb97edb8692a828306821045c77 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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 qmake -projectRafael Roquetto2012-08-062-0/+7
| | | | | | | | qmake -project was always outputting a project with subdirs template, because Option::h_moc_mod was not being properly read, causing addFile() to misbehave. Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix typos in qdatetime.cpp.Mitch Curtis2012-08-061-8/+8
| | | | | Change-Id: I1c2e3dafcca69590cd7a18fdf65e2c9083ba91b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* introduce -fully-process configure option, change behavior of -processOswald Buddenhagen2012-08-062-15/+31
| | | | | | | | | | | configure will now run qmake without -recursive, as on modern systems one can get a lot more out of parallelization done by make, which qmake cannot do. use -fully-process to get back the old behavior. -dont-process is unchanged. Change-Id: I2874321a963175463ae8992f3ab2b01bc13c9922 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove phonon vestigesOswald Buddenhagen2012-08-062-66/+1
| | | | | Change-Id: Ifae2c631ddaae95ad9fc92e1f768fd910b254292 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove -dsp & -vcp vestigesOswald Buddenhagen2012-08-061-27/+1
| | | | | | | only -vcproj is meaningful at this point Change-Id: If727c96a9628e37a5a00a19a6eabede261c9c4b2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove references to dead variablesOswald Buddenhagen2012-08-061-5/+0
| | | | | Change-Id: I2603ebabbec5011fa0bf3e858401655a9a822768 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove stray messageOswald Buddenhagen2012-08-061-4/+0
| | | | | | | | i think this was a vestige from the old wince build proces Change-Id: I13305de627c65fc1c93ba6d2383557ff5ea7a147 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>