summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-1971-200/+197
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* don't require a fake qconfig.h for the configure bootstrapOswald Buddenhagen2012-09-191-1/+1
| | | | | Change-Id: I3d1224ad19b9e5278e35cf7c5142a29ccb589140 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* remove mentions of borland from project filesOswald Buddenhagen2012-09-196-13/+4
| | | | | Change-Id: I3049b24ae287bee50aca1de06664a2309df69edf Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix typo in docs.Frederik Gladhorn2012-09-191-1/+1
| | | | | Change-Id: Icfafa00062b442903579dd7993c75fffb60187f9 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Make QStatusBar text available via accessibility.Tilman Sauerbeck2012-09-193-1/+18
| | | | | | | UNTESTED cause the build fails for me (unrelated to this patch). Change-Id: Ie6836596b6fbaf93baa21d7008509774f1379f5c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fixed potential use of uninitialized variable in qgl.cppSamuel Rødal2012-09-191-1/+1
| | | | | | | | If glGetBooleanv fails this variable is left uninitialized. Task-number: QTBUG-26952 Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Split the qt_message_output function in twoThiago Macieira2012-09-191-31/+74
| | | | | | | | This way, I can ensure that the noreturn qFatal function calls a noreturn function as its last action. Change-Id: I6db7aa2539af430414645f386d7fce87cdb97186 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QFileInfoGatherer: remove unused members userId/groupIdMarc Mutz2012-09-192-7/+0
| | | | | | | None of the code references these, so remove. Change-Id: Ie48d30b49c644f093df9f42c8d087751c4e980ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileInfoGatherer: fix race conditions pt.1: abortMarc Mutz2012-09-192-24/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a race on the 'abort' variable. While there was a mutex lock around the code that sets the variable in ~QFileInfoGatherer, there was no protection in getFileInfos(), where it is read: // T:this->thread() // T:*this // in getFileInfos(), after last mutex.unlock() mutex.lock(); abort = true; while (!abort... // ... // ... Fix by making 'abort' an atomic. This means that we can drop the mutex locker in the destructor, too. We still mostly access 'abort' under protection of the mutex, because we need to protect other variables that just happen to be accessed together with 'abort', but we avoid the mutex lock/unlock on each iteration of the while loop in getFileInfos(). Also cleaned up the logic in run(): - by using the canonical form of condition.wait() (in a loop that checks the condition), we can ensure that !path.isEmpty() and avoid having to use the updateFiles boolean. - by checking for abort.load() after we return from condition.wait(), we minimise the waiting time for thread exit. - by using different local names, we avoid having to this->qualify members. Also changed one condition.wakeOne() to wakeAll() for consistency with fetchExtendedInformation(). Change-Id: If35f338fe774546616ec287c1c37e2c32ed05f1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVarLengthArray: provide STL-compatible member function namesMarc Mutz2012-09-192-0/+50
| | | | | | | | | This allows, among other things, to use QVarLengthArray as the target of a std::back_insert_iterator. Change-Id: I507f612a23da854bf865780aa0a7e6312f4a896b Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OpenGL: Make use of the requested version and profile in QGLWidgetSean Harmer2012-09-191-0/+3
| | | | | | | | | | When instatiating a QGLWidget in Qt5 at present it ignores the version and profile information in the QGLFormat meaning that we always end up with an OpenGL 2.x profile rather than what we asked for. This commit properly takes the version and profile into account. Change-Id: I097f10e397c23f5d97c5fcd8d5354667da286896 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Add flags and logic for newer versions of OpenGL in QGLFormatSean Harmer2012-09-192-2/+29
| | | | | Change-Id: Iad57286c36c7fd205f06abc40cca5f568d572e81 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* OpenGL: Request latest GL version when using QGLTemporaryContextSean Harmer2012-09-191-0/+7
| | | | | | | | | | | This is necessary so that QGLFormat::openGLVersionFlags() returns the complete set of versions. Without this patch the temporary context ends up obtaining an OpenGL 2.x context as the QPA plugins now prefer to use the ARB {wgl,glx}CreateContextAttribsARB function which creates contexts of the specified version (2.0 for a default QSurfaceFormat). Change-Id: I2c3e02c9d7b77d4ee0484f9e8786f41675f8a439 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Make QTimer::singleShot take a pointer-to-const QObjectGiuseppe D'Angelo2012-09-192-7/+7
| | | | | | | | | | | The obvious idea is that a connect() happens behind the scenes. As QObject::connect takes a pointer-to-const, singleShot should do that as well. Change-Id: I36433c723441294b2088b23f0c37724ab43d9503 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove qUpperBound usages from qtbaseGiuseppe D'Angelo2012-09-198-11/+16
| | | | | | | | | Replace them with std::upper_bound; this allows for deprecation of qUpperBound. Change-Id: Idef01d2228b9a70eee3d52931d7aedb5bb6ba902 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-1915-40/+67
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* sql: Include own headers firstSergio Ahumada2012-09-193-5/+5
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I225bc0f09988167ae7f938f7f21a77d05a3d191b Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Introducing NoDropShadowWindowHint window flagGabriel de Dietrich2012-09-184-4/+14
| | | | | | | | | | Added suppport on QCocoaWindow. Also we deprecate WA_MacNoShadow since it isn't used anywhere, and updated the 'windowflags' example app. Change-Id: Id0b453ba15a23b768b0615838597bca139f507ad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Core: Fix gcc warning about signed/unsigned integer comparisonKai Koehne2012-09-181-1/+1
| | | | | | | Fix warning: 'comparison between signed and unsigned integer expressions' Change-Id: I5ce2857115137f9a06eddc74fda55ae49e37d345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Network: Fix mingw-gcc warningKai Koehne2012-09-181-1/+1
| | | | | | | | Fix warning: missing braces around initializer for 'BYTE [6] {aka unsigned char [6]}' Change-Id: Ic247ff0721955c4562ed027fad7cb3786809a840 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Network: Fix gcc warning about qDebug formatKai Koehne2012-09-181-1/+1
| | | | | | | | Fix gcc warnings: 'unknown conversion type character 'l' in format' , and 'too many arguments for format'. Change-Id: Ic7547a5bd5ba0d4c9f115004f250a0f7d3b378cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QElapsedTimer: Fix typo in restart() documentationJonathan Liu2012-09-181-1/+1
| | | | | Change-Id: Iac5df9edbe16ec841f783bc5266091a6e34e9cab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix mapping to/from global coordinates for child/embedded windows.Miikka Heikkinen2012-09-186-2/+63
| | | | | | | | | | | | | | | | | | | | | QWidget's mapToGlobal() and mapFromGlobal() functions assumed that if the widget reports it's a window or if it has no parent widget, it must be a top level window whose coordinates are in global coordinates. This is not true for child QWindows or embedded native windows (QAxWidgets). Changed the logic for mapping coordinates to use equivalent methods from QWindow if widget has a window handle, and changed QWindow's methods to map coordinates using native methods if window is embedded. Also fixed newly failing accessibility autotest. The geometry related failures there popped up because now the position of the rect returned by accessible interface is actually correct while widget geometry still reports position 0,0 before widget has shown up. Task-number: QTBUG-26436 Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* X11 (xcb) support for QScreen-per-output and runtime changesShawn Rutledge2012-09-186-67/+263
| | | | | | | | | | | | | QScreen has notifiers for its properties, but they were not being emitted when one changes the resolution or arrangement of individual outputs, e.g. via xrandr. Also there should be one QScreen per "output", e.g. laptop LCD + external monitor means 2 QScreens which will be siblings, rather than just 1 QScreen to represent the whole desktop. Change-Id: Ia61bbc5e6a3506f813ab11f87c03d14cf7f4ce85 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Disable SSL compression by default.Richard Moore2012-09-182-3/+5
| | | | | | | | | Disable SSL compression by default since this appears to be the a likely cause of the currently hyped CRIME attack. Change-Id: I515fcc46f5199acf938e9e880a4345f2d405b2a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2012-09-182-2/+10
| | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Prevent buffer overflow in QXcbWindow.Samuel Rødal2012-09-181-1/+1
| | | | | | | | Thanks to Janne Kulmala for noticing this and informing about the fix. Task-number: QTBUG-27123 Change-Id: Idd3cfd74fb7be277b6d805446aea5784b8fdf2f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make qdoc read multiline macros in files with CRLF endingsJan-Arve Saether2012-09-181-1/+4
| | | | | | | | | | | | | | | | | | | | | This caused qdoc for instance to not being able to parse qglobal.h correctly. (On windows, it stopped to parse anything meaningful after the line with this macro:) #define Q_INIT_RESOURCE_EXTERN(name) \ extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) (); It worked on linux just because on linux a line continuation 'token' is the sequence "\\\n" (on windows it is "\\\r\n") So for files with CRLF line endings, it treated *only* the first line as a macro, potentially causing the subsequent lines to affect the state of the tokenizer. Change-Id: If7c80ee7eb317f2d324ace7ff540ced7c31185dc Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Let qVersion() be extern "C" if this is not a namespace buildThiago Macieira2012-09-181-1/+13
| | | | | | | | | | | This allows one to even dlopen() QtCore and call qVersion, to figure out which version it is. A bit crazy, but someone might want to do it. Change-Id: I932460515d07bed3f0e41c8ab2b46fc268ca73ff Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* HTTP header may be damaged - fix, unit testTomasz Duda2012-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | "HTTP/1.1 100 CONTINUE\r\n" If the header from a server is splitted between two packets the first packet contains "HTTP/1.1 100" and the second one contains " CONTINUE\r\n", one space (0x20) is skipped. After processing the line looks in this way "HTTP/1.1 100CONTINUE". QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) is called twice, if a http header is splitted as above. The function always removes whitespace from the beginning of a packet, even if it is the second part of a http header. QHttpNetworkReply returns QNetworkReply::RemoteHostClosedError due to damaged http header during processing. Improvement of unit test. Task-number: QTBUG-27161 Change-Id: Ifc2949f62473209b4032185effbf5078b4130cda Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SIC: QtPrintSupport - Remove QAbstractPageSetupDialogJohn Layt2012-09-1710-276/+131
| | | | | | | | | | | | QAbstractPageSetupDialog is a completely unnecessary base class that is not really abstract and is used nowhere else. This changes merges its methods into the QPageSetupDialog main class. While technically SIC no-one else uses this so no apps should be affected. Change-Id: I59b1739f1c453c34c25d1664d5d042e7918db316 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Exclude QIcuCodec when QT_NO_TEXTCODEC is definedJ-P Nurmi2012-09-162-0/+8
| | | | | | | Change-Id: Iec0178c427abcc1c79e4fe6ef449d399ac8ca363 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* network: Fix missing or improper include guard in headersSergio Ahumada2012-09-1517-26/+34
| | | | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Also, cpp files should include their own headers first (but below config.h) Change-Id: Iecf5da23c0f8e6d457f67657b88ef7557bde9669 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* concurrent: Fix missing or improper include guard in headersSergio Ahumada2012-09-153-7/+7
| | | | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Also, cpp files should include their own headers first (but below config.h) Change-Id: I902c8936382f5c1a8e0de7dbf49e5423f9b72bbe Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* gui/opengl: Fix missing or improper include guard in headersSergio Ahumada2012-09-1515-41/+49
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: I29b41e9d33e4ea17165f44c49de0a963574dd809 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Make maemo scope syntax in project files more genericLaszlo Papp2012-09-143-3/+3
| | | | | | | | | | | | | | | | | It is necessary to use the n9 device file for now in scratchbox or/and on the community open build service because the maemo platform mkspecs file assumes that a cross-toolchain is used all the time. If no platform file is used, then for instance certain plugins may not be built in general. There is currently an ongoing issue with the meego plugin for context management in the Harmattan components project. That is currently not built due to this issue, so no orientation works in those applications. The nice solution would be to make the maemo platform file work with cross and native toolchains as well, but that requires a decent amount of investigation and work. Thereby, the scope is extended this way for now. Change-Id: I172c7d152bdbb2db279526d9fd1ca5648d0cd0a9 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* QErrorMessage: Use qInstallMessageHandler instead of qInstallMsgHandlerKai Koehne2012-09-141-6/+6
| | | | | | | | qInstallMsgHandler got deprecated in Qt 5. Use qInstallMessageHandler instead. Change-Id: Ie1156ca11eb6be555c681007ddc230978211d029 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qdoc: Refactoring of qdoc data structuresMartin Smith2012-09-1435-2111/+1817
| | | | | | | | | | | | | | | | | | This commit is the beginning of a significant overhaul of qdoc. A new class, QDocDatabase, is added, which will eventually encapsulate all the data structures used by qdoc. In this commit, the Tree class is made private and only accessible from QDocDatabase. Several maps structures are also moved into QDocDatabase from other classes. Much dead code and unused parameters were removed. Further simplification will follow. Change-Id: I237411c50f3ced0d2fc8d3b0fbfdf4e55880f8e9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-1425-44/+44
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* remove usage of QT_MAKEDLL in favor of the new QT_STATIC macroJoerg Bornemann2012-09-142-8/+8
| | | | | | Change-Id: I411cab0d92a8cad6b4f3676afe5cee050c4b789b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix repaint issue when resizing a window in WindowsMiikka Heikkinen2012-09-142-15/+5
| | | | | | | | | | | | | | | QWindowsWindow::handleWmPaint() cached the device context it got from BeginPaint call and used that for the window when the backing store blitted itself to the window. The problem with this device context is that the clipping region is set to only encompass the newly exposed areas, which means any changes caused by the resize on the previously exposed area were not repainted. Fixed by removing the DC caching. The benefit was minimal anyway. Change-Id: I8bd3c4031432ce6b52434c80bfe65d35d9feae49 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QDoc manual: ordered command listJerome Pasion2012-09-141-3/+3
| | | | | | | | Some commands were not listed in alphabetical order. Change-Id: I299abe145ca0f9d63c9ceefb801f5c53548e7938 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Documented QtOpenGL classes that have better replacements as obsolete.Samuel Rødal2012-09-146-0/+19
| | | | | | | These have new replacements in QtGui since Qt 5.0. Change-Id: I20e8fdd4e9c14d8c626eda3072217af1858bf492 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* qpa: avoid useless resize in DirectFB platformJulien Brianceau2012-09-141-0/+6
| | | | | | | | Check current size before resizing QDirectFbBackingStore through its resize() method to avoid useless deallocation/reallocation. Change-Id: Idc32eb20d3d3cac988fa9dd2feb80910303f5763 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove deprecated QInputMethod::visible()Pekka Vuorela2012-09-142-11/+0
| | | | | | | | Replaced with isVisible() Change-Id: Id47683954e89c53e73fc5171977609de7f1b4245 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix compilation on HarmattanSimon Hausmann2012-09-141-0/+9
| | | | | | | | | | | The GLES2 libraries on Harmattan do not provide a typedef for GLChar. Work around it here by adding it. The Kkronos headers specify GLChar as a typedef to char, so if an implementation already provides it, then this doesn't do any harm. Change-Id: I0848b72b81fcc602dc8d9eecefdacb5436163040 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move QRecursiveMutexPrivate to qmutex.cpp and mark inlineThiago Macieira2012-09-142-14/+15
| | | | | | | | | | | | | | | | | Disassembly of the optimised code shows that the compiler was already inlining the bodies of one or both functions (since they're in the same .cpp, it's allowed to do that). However, since there was no "inline" marker, the compiler was also emitting an out-of-line copy, which wasn't used by anyone, as the class is not exported. So add the marker. To make sure that they don't get used by accident elsewhere, the class is moved to the .cpp file too. Change-Id: Iead578ec9c7d8dd6b4e6bb582ce5b829cdec5992 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove QBasicAtomic::tryLock with a timerThiago Macieira2012-09-141-2/+2
| | | | | | | | | | The non-futex implementation does not support timed locks in QBasicMutex. That is only supported in QMutex (due to the destructor). Change-Id: I46d33a66a36e05c8a4344823537178e80a6ddd76 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* #include the qmutex_xxx.cpp at the end of qmutex.cppThiago Macieira2012-09-141-1/+10
| | | | | | | | This produces slightly better inlining results. Change-Id: Ie86471577f888cb2d9c9989306ec69ce0a296108 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use storeRelease to unlock a mutex instead of fetchAndStoreReleaseThiago Macieira2012-09-141-1/+1
| | | | | | | | We're not checking the result anyway, so use a simpler operation. Change-Id: I8c2db35be86660b29d81dd97ce3e269de55a37df Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>