summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix init order of platfromIntegration and forcedWindowIconFrederik Gladhorn2014-07-011-2/+5
| | | | | | | | The problem shows when running tst_qguiapplication.cpp and configuring with -no-widgets Change-Id: I9f241760953e543d488096c66a3e886a14f6ae50 Reviewed-by: David Faure <david.faure@kdab.com>
* Move deletion of the QDrag object into QDragManager::drag().Friedemann Kleint2014-07-012-3/+1
| | | | | | | | | | The QDrag objects were apparently leaking on all platforms other than XCB. Task-number: QTBUG-39651 Change-Id: I09efcd250c1f42eb385e9d5779be7af6b9b59376 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* Remove the rcc output file if we failed to write itThiago Macieira2014-07-011-1/+7
| | | | | | | | | | | | This happens if the second pass failed to find the signature data in the compiled output, which can happen if the compiler is not *actually* compiling anything (LTO / LTCG mode). If we left the unmodified file in the output, make would continue running next time it was invoked, resulting in bad data. Change-Id: I97f23a89a1ca1f8b8c449b0744de3f0c78daa706 Reviewed-by: hjk <hjk121@nokiamail.com>
* qdoc: Add header file debug output to match source file debug outputRobin Burchell2014-07-011-0/+1
| | | | | Change-Id: If8c941be42986704e9ac4da056a6c4b2490e6131 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QNetworkReply: Fix finish signal is not emittedFabian Bumberger2014-07-011-0/+4
| | | | | | | | | When a QNetworkReply is in WaitingForSession state and is aborted the finished signal was not emitted. Task-number: QTBUG-37473 Change-Id: Iccc4dfd8e8e65e9e42625a908432ce9083caa231 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Save the _MSC_VER variable instead of <unknown version>Thiago Macieira2014-07-011-1/+1
| | | | | | | | | | That way, for future or old versions, we at least will know which version it is. For example, for MSVC "14.0" (compiler version 19), it produces "MSVC _MSC_VER 1900". Change-Id: I86dcaea8e4b23bd052288cea5663b267da31c890 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Accessibility: Password QLineEdit should use * as text replacementFrederik Gladhorn2014-07-011-0/+2
| | | | | Change-Id: Ie07e86f1b6dff3096cab462f918994efa07b2a87 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Make QFreeList constexprThiago Macieira2014-06-301-2/+2
| | | | | | | It's still not a literal type because the destructor is not constexpr Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* qHash overload for Q{Explicitly,}SharedDataPointerKevin Funk2014-06-301-0/+12
| | | | | | | | | | | | | | | | | Interestingly, before that patch this compiled fine: typedef Q{Explicitly,}SharedDataPointer<QSharedData> Ptr; Ptr p(new QSharedData); auto hash = qHash(p); This was because both Q{Explicitly,}SharedDataPointer overload 'operator bool()' => qHash(int) was accepted. This, however, doesn't make sense. Someone should probably take care of applying the safe bool idiom to these classes as well. Change-Id: I8bb6b2aacaa6166da817a6f3847093fd20a05a67 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Emit a notifications when targetState and targetStates are changed.BogDan Vatra2014-06-302-3/+44
| | | | | | | | In order to properly use QAbstractTransition object in QML we need to know when these properties are changed. Change-Id: I5449ecf3fce33e164f645d7263f21b20abfcd026 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Emit a notifications when senderObject and signal are changed.BogDan Vatra2014-06-302-2/+36
| | | | | | | | | In order to properly use QSignalTransition object in QML we need to know when these properties are changed. Change-Id: I7ca318d50513086146b85eaeee4dabbcdef8c299 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Enablers for QQuickWidget render() support.Paul Olav Tvete2014-06-302-3/+8
| | | | | | | | | Add a QImage based fallback for renderToTexture widgets, and use that when rendering to something else than a QWidgetBackingStore. Change-Id: I415a3a27c4ecb4ddbac45181c5a568b01ac5cb7a Task-number: QTBUG-39562 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Cleanup local var usageFrederik Gladhorn2014-06-301-4/+2
| | | | | Change-Id: I24c8bc1eef444e3ef4823d5d092089e4f308585b Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Include QMetaType in the native context headersLaszlo Agocs2014-06-303-0/+3
| | | | | | | | Just to be safe. The Q_DECLARE_METATYPE needs this. And including some Qt header is necessary anyways. Change-Id: I6e97493434760f37a79e735293cef8d4213c2e11 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Do not add QOffscreenSurface windows to the global listLaszlo Agocs2014-06-301-0/+3
| | | | | | | | | | | | | | | QOffscreenSurface has to stay usable even after returning from app.exec(). Hence close()ing the underlying hidden window, that is used on platforms that do not provide real offscreen surfaces, is wrong. Normally all QWindows are closed (and thus destroy()'ed) when quitting the application, meaning the the offscreen surface cannot be made current anymore after returning from exec(). This is an unnecessary limitation and makes certain cleanup operations impossible. Task-number: QTBUG-39908 Change-Id: Iea1489378a18f29ff84ba8f13a6dad2d66d2b315 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* OS X: Fix build with QT_NO_OPENGLSergio Martins2014-06-3011-6/+58
| | | | | | Task-number: QTBUG-31151 Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add QEnableSharedFromThis classRoman Pasechnik2014-06-293-0/+103
| | | | | | | | | It enables you to get a valid QSharedPointer instance to 'this', when all you have is 'this'. Task-number: QTBUG-7287 Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c Reviewed-by: Richard J. Moore <rich@kde.org>
* QEGLPlatformIntegration: fix build on AndroidJ-P Nurmi2014-06-281-0/+2
| | | | | Change-Id: Ibf2ae4563e2b842d5e70c1e66592e1dc2de4b3d4 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* winrt: Fix main thread dispatcher creationAndrew Knight2014-06-281-1/+1
| | | | | | | | Don't create a dispatcher for all adopted threads, only the main thread. This was causing the GUI thread to skip platform dispatcher creation. Change-Id: Id0de976f9def48e8d58efd20815b6fd18faebefa Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Logging: support %{time} and %{time format} in QT_MESSAGE_PATTERNShawn Rutledge2014-06-271-1/+30
| | | | | | | | [ChangeLog][QtCore][Logging] QT_MESSAGE_PATTERN can include a timestamp using %{time} or %{time format} Change-Id: I2aaa9c7a6fcb340b5ce9f1fe8a78002e5fc4e6fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Windows: Fix setting of geometries in minimized state.Friedemann Kleint2014-06-271-4/+26
| | | | | | | | | Use SetWindowPlacement() to set the normal position when applicable as is done in Qt 4. Task-number: QTBUG-39544 Change-Id: Ia158b968ea15361d9937619f07b56eb8a0312a13 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Introduce qUtf8Printable() macro to qglobal.hTakumi Asaki2014-06-273-11/+29
| | | | | | | | | | This macro is equivalent to arg.toUtf8().constData(). It is usable for "%s" arguments of qDebug(), qWarning(), qFatal(), qCritical(). Change-Id: I2d9956e6651271e1e2183dce9c835511cf923bf3 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix ICC build on Windows: __VERSION__ isn't definedThiago Macieira2014-06-271-1/+29
| | | | | | | | | | So let's define the version ourselves. This is done for all OS because __VERSION__ doesn't include the actual compiler version... Change-Id: Ida706a8f4bfe75af04ce8f11ea2124c1659c19ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* MIPS: Support recognition of the DSP ASE at run-timeAdrian Perez de Castro2014-06-275-13/+174
| | | | | | | | | | | | | Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it possible to have generic Qt builds for MIPS that can enable the fast code paths for processors with the DSP ASE at run-time. Also, this makes it possible to manually disable them by setting the environment variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions requiring DSPr2 are not enabled when running in CPUs with version-1 DSP. Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add Q_COMPILER_THREADSAFE_STATICS (a.k.a. "Magic Statics")Thiago Macieira2014-06-272-1/+12
| | | | | | | | | | | | It had been so far only supported by GNU-style compilers due to the IA-64 portable C++ ABI. But it's mandated by C++11, so let's add the macro and use it in Q_GLOBAL_STATIC. Looks like Visual Studio "14" will support it. Change-Id: I9710b5146606c7e494c43413f49900419396cfe0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Accessibility: improve text attribute rangesFrederik Gladhorn2014-06-262-34/+33
| | | | | | | | | Improve consistency and use QTextDocument functions to find ranges instead of coming up with our own scheme. This is important since QCursor's char format depends on block positions. Change-Id: I94eb137882dc6b5f7b01fa7693b4a536cc48d02a Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix inconsistent export in QPixmapIconEngineAndrew Knight2014-06-261-2/+2
| | | | | | | | Removes "warning C4273: 'operator <<' : inconsistent dll linkage" under MSVC2013. Change-Id: I463441802a76f02db329631947232c70a85ae9e7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Silence warnings about not supporting setMask on platforms like eglfsLaszlo Agocs2014-06-261-4/+0
| | | | | | | | | | | | | | | Showing warnings based on an (otherwise unused) WindowMasks platform capability is wrong. The default implementation of setMask() shows a warning anyway so it is safe to call it in any case. On top of this, platforms like eglfs may want to avoid showing any warnings, since they are completely useless for end users and pollute their debug output and Creator panes. The standard way is to provide an empty implementation for the function. This cannot work however if there are hardcoded warnings generated in the common widget code. Change-Id: I842a96b5b84c50b7caa59bdd48107785b21ab5af Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Set fallback for QFont::System to be MS Sans Serif and not ArialAndy Shaw2014-06-261-1/+4
| | | | | | | | The system font for Windows should be MS Sans Serif which is what Qt 4 was using and not Arial. Change-Id: If3ed55bce87f6376b2897f1fc487bbc0627d1799 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix crash when inserting the same instance widget more than onceJorgen Lind2014-06-261-0/+2
| | | | | | | Task-number: QTBUG-39324 Change-Id: Ib1e0e107cd411311344aa5d85c3ca4c34211448b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update doc: match actual compact JSON outputmlpo2014-06-261-1/+1
| | | | | | | Task-number: QTBUG-36682 Change-Id: I0fca746a7838cce49efc243a242bb9bb7119bd9e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Improve docs for QWidget::accessibleName/DescriptionFrederik Gladhorn2014-06-261-5/+21
| | | | | Change-Id: Ie898c49ed10b9598a0482ecadb18bbadb586d7a9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Export QStateMachine running property.BogDan Vatra2014-06-262-2/+39
| | | | | | | It is needed to control a QStateMachine object from QML. Change-Id: I19271d97718af2d688c477647d6341f70fdef3ea Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* qdoc: Give documenter more control of linkingMartin Smith2014-06-2618-431/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This update enables using the module name as the parameter in square brackets for the \l command. You will use this when your link goes to the wrong page. e.g. Suppose this link command went to a page in QtGui instead of the page where it is meant to go in QtQuick: \l { mytarget } { the text for my link } When a link goes to a page in the wrong module, it means the target exists in more than one module and because qdoc searches the modules in sequence and stops when it finds a match, it might match the wrong target. This would be a collision in the single tree version of qdoc, but now qdoc builds a separate tree for each module. Since you know which module you want your link to go to, put the module name in square brackets as the first parameter, like this: \l [QtQuick] { mytarget } { the text for my link } Now qdoc will only search for mytarget in the tree for the QtQuick module. The \target command can now be used anywhere. It has not been tested in all possible locations, but it works in the places where people have asked why it doesn't work there. There will be a further update to complete this task for implementing the other types of parameters that can be in the square brackets. Task-number: QTBUG-39221 Change-Id: I2db4fdd0319ff272ec1d2fa9dc396f14599d80f9 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Unduplicate the implementations of next power of twoAllan Sandfeld Jensen2014-06-266-62/+95
| | | | | | | | | | | Qtbase contains four identical implementations of next power of two, these should be shared and the implementation made available to other qt modules, as it is also used many places outside of qtbase. [ChangeLog][QtCore][QtMath] Introduced qNextPowerOfTwo methods. Change-Id: Id23fbe5ad6bae647b30d5a4212c0330e48a50278 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDebug: Remove handling of FORCE_UREF defineKai Koehne2014-06-251-35/+0
| | | | | | | | | | | | | | | | | | This is the only place in Qt source code we use FORCE_UREF, and can be traced back to the very first qt.git commit. In any case, it's broken: It returns a reference to a local variable, since the debug argument is _not_ a reference. Using a reference both for the argument and the return value would be actually the canonical solution, but that breaks with QDebug << operator(QDebug, const QVariant &), exported in QtCore. The C++ lookup rules apparently prefer this overload then to be used for outputting containers ... Change-Id: Iaf5e5dd89d4f3ebe6454eba219046b4f25b0d717 Reviewed-by: hjk <hjk121@nokiamail.com>
* qdoc: Improve <title> element contents in HTML pages.Jerome Pasion2014-06-251-4/+39
| | | | | | | | | | | | | | | | -applied logic to projects that set (or not set): -landing page -home page -version -change would remove duplicate information and proper module names instead of "Title | QtModule 5.4", it would be "Title | Qt Module 5.4" -tested on various projects: -Digia projects -Qt 5 -Qt Creator Change-Id: Ica7d5203d293910c98306f947bfee8454b9225d0 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Update MSVC compiler features according to testingThiago Macieira2014-06-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | Looks like a few extra features have been supported for a while and we had never noticed. That includes the C++98 template friends, C++11 extern templates and C++11 nullptr. They've been supported since at least MSVC 2010, possibly even earlier, but I don't have MSVC 2008 to test with. Testing also indicates that MSVC 2012 and 2013 have a bug in their support for the range for construct. The following code fails to compile: for (int i : l) do { (void)0; } while (0); test.cpp(2) : error C2059: syntax error : '}' Reported as https://connect.microsoft.com/VisualStudio/feedback/details/903999/c-11-range-for-construct-fails-to-compile-when-body-is-a-do-while-block Change-Id: I5d0156f4c847c45fa1f6f5b9ee4ddbdacb8ab59b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Only define the MSVC C++11 feature macros in C++Thiago Macieira2014-06-251-0/+2
| | | | | | | | Don't define them if qcompilerdetection.h was compiled in C mode. Change-Id: I080b62ef7c68bb582e55e9e3a1dff4e6c1bb48bd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Introduce std::string conversion to QByteArrayAllan Sandfeld Jensen2014-06-254-3/+34
| | | | | | | | | | | | | Add conversion methods similar to those in QString to QByteArray. This is often more useful than the QString version since std::string like QByteArray are byte arrays. [ChangeLog][QtCore][QByteArray] Added convenience methods to convert directly to and from std::string. Change-Id: I92c29d4bb1d9e06a667dd9cdd936970e2d272006 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* winrt: Refactor timer callbacksAndrew Knight2014-06-251-135/+115
| | | | | | | | | | | | | | With the previous solution, a thread pool timer callback fired in the same thread as the dispatcher. Now that timers can be called from the base thread pool, callbacks can come from alternate threads and so the associated event dispatcher must be tracked. This change refactors how timer info objects are created and tracked so that they can be properly created/destroyed/queued inside the timer callbacks. All QTimer tests pass. Change-Id: I18a5573df2a8fa32d1982c61e665d5df664b6db0 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Use native threadingAndrew Knight2014-06-255-154/+483
| | | | | | | | | | | | | | | | | Instead of using std::thread, use the WinRT ThreadPool to manage threads. This allows for setting the scheduling priority, and provides a path to enable XAML integration (which requires Qt run on a background thread). QThread::terminate() is still unsupported, and only the winmain thread can be adopted due to the behavior of the thread pool when creating tasks from the GUI thread. The associated tests are now skipped, and all other QThread tests pass. Task-number: QTBUG-31397 Change-Id: Ib512a328412e1dffecdc836bc39de3ccd37afa13 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* winrt: Clean up QWinRTScreenAndrew Knight2014-06-253-337/+312
| | | | | | | | | | | - Remove WP8.0 code paths - Remove WinRT types from header as much as possible - Use ComPtr where appropriate - Use COM convenience methods Task-number: QTBUG-38115 Change-Id: Ib241c3e5107add255a48340f86ee5885f895ff83 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Clean up QWinRTServicesAndrew Knight2014-06-252-81/+68
| | | | | | | | | | - Remove WinRT types from the header - Use ComPtr everywhere - Use convenience methods for HRESULT and async operations Task-number: QTBUG-38115 Change-Id: I540a3349612b98c45545c92b2cb6d21a34918b8f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Clean up QWinRTCursorAndrew Knight2014-06-253-44/+42
| | | | | | | | | | - Remove WinRT types from the header - Remove WP8.0 code paths - Use convenience methods for HRESULT handling Task-number: QTBUG-38115 Change-Id: I05e77d75a7975a783d0f0714e6bab014231a406c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: use ComPtr in network classesAndrew Knight2014-06-255-79/+48
| | | | | | | | | | This removes extra code and potential memory leaks by using smart pointers instead of calling Release() directly. Task-number: QTBUG-38115 Change-Id: If799d6948af8c3df3d0c1617742653b104087e3b Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Add convenience method for waiting on an async callAndrew Knight2014-06-251-0/+78
| | | | | | | | | | | As most of the Windows Runtime API is asynchronous, we have used various methods for blocking in the calling thread waiting for the operation to complete. This introduces an inline method, QWinRTFunctions::await(), which performs the wait in a consistent and safe manner. Task-number: QTBUG-39407 Change-Id: I54cd0e178aa560891ab92bfc5e7a6553e60e01b2 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* winrt: Add convenience macros for returning from HRESULT callsAndrew Knight2014-06-251-1/+16
| | | | | | | | | Almost every native call in WinRT uses COM HRESULTS. Provide some convenience macros for returning after failure. Task-number: QTBUG-39407 Change-Id: Ia99b0acd771d53c52732f270e46dd6937538e131 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* winrt: Return correct value from QSysInfo::windowsVersion()Andrew Knight2014-06-251-1/+1
| | | | | | Task-number: QTBUG-38439 Change-Id: I26303d040cc4b958e6af90ea63e5b0d821e2bb74 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Propagate source/flags of QMouseEvent to QGraphicsSceneMouseEvent.Friedemann Kleint2014-06-256-1/+79
| | | | | | | | | | | | | | | It is useful to be able to detect synthesized mouse events in GraphicsView as well. [ChangeLog][QtWidgets][QGraphicsSceneMouseEvent] Accessors for Qt::MouseEventSource and Qt::MouseEventFlags were added to QGraphicsSceneMouseEvent to enable detection of synthesized mouse events. Task-number: QTBUG-39814 Change-Id: Ib5835fef1f484005f9b0fc86518ed32ea79cd80f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>