summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Added WindowOverridesSystemGesturesHint to our window flags.Gunnar Sletta2012-02-012-0/+5
| | | | | Change-Id: I42c3d3e5ef71960d16f85969b66380999fb15922 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-0/+1
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QtDebug: Include file, line, function informationKai Koehne2012-02-015-102/+408
| | | | | | | | | | | | | | Record the file, line, and function where a qDebug, qWarning, qCritical or qFatal call happens, and make this information available in a custom message handler. The patch uses the C preprocessor to replace qDebug, qWarning, ... with a line that also records the current file, line, and function. Custom message handlers can access this information via a new QMessageLogContext argument. Change-Id: I0a9b89c1d137e41775932d3b1a35da4ebf12d18d Reviewed-by: David Faure <faure@kde.org>
* Remove non existant features from qfeature.hLars Knoll2012-01-312-540/+54
| | | | | | | | | This doesn't clean it all up, but at least removes things that are clearly gone from Qt. We still have way too many individual feature switches. Change-Id: I7926ee8cf72567a86257f1e7b0d852f11ff5f4bb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove Symbian specific code from QtCore.Xizhi Zhu2012-01-302-23/+1
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3021-21/+21
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compilation warnings on MSVC.Jędrzej Nowacki2012-01-291-2/+2
| | | | | | | | Q_STATIC_ASSERT as condition should accept anything cast-able to "bool". Change-Id: Id76992080f9bb84d3a16b80adffc656d52eca91d Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Introduce QTypeInfo::sizeOf.Jędrzej Nowacki2012-01-291-5/+10
| | | | | | | | In QMetaType "void" is a regular type, lack of c++ sizeof operator force us to write a template specialization for the type. Change-Id: I9a56e135223b416b8031836d29ef33ef3fb750e4 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Mark the single argument containers as movable.Stephen Kelly2012-01-261-0/+25
| | | | | | Change-Id: I1557b9f3c2d3ad805e1ab7bf4d49973f08664a79 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Made QWindow::currentOrientation() a property.Samuel Rødal2012-01-261-2/+1
| | | | | | | | | | | | | | To match the previous QWindow::orientation() property which can be useful to access from QML. Also, removed the automatic translation of Qt::PrimaryOrientation to QScreen::primaryOrientation() on the QWindow level, as it leads to a lot of complexity regarding the QWindow::contentOrientationChanged() signal, and makes it hard to distinguish between the case where the window's orientation follows that of the screen, and the case where the orientation just happens to be set to that of the screen. Change-Id: I6950d1337b7f929815eff1328181855090d8066b Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Wrap unimplemented clang feature in __has_featureOlivier Goffart2012-01-261-4/+13
| | | | | | | | So that when they are actually implemented in future version, the proper defines get defined. Change-Id: I5cc3e3ef64b06facc27e6d697700dcb7a96300d5 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-255-140/+1
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* remove vestiges of text codec pluginsMark Brand2012-01-251-7/+0
| | | | | | | follow-up to 3a3356a85079d734dfa57205a00e1996afc033df Change-Id: Iba84958cbcd105ec702568752090719cc108e101 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Q_COMPILER_FINALOlivier Goffart2012-01-241-7/+1
| | | | | | | | | | | | | Merge it with Q_COMPILER_EXPLICIT_OVERRIDES No compiler will implement one and not the other, "overrideS" is a shortcut for the two features It was even wrongly not defined with clang Change-Id: I22dcffe6f0c96285c2b409a5ae9ce2f6f1652094 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Made window orientation API more flexible.Samuel Rødal2012-01-242-2/+3
| | | | | | | | | | | | | | | Previously we only had QWindow::setOrientation() which was a hint about the orientation the window's contents were rendered in. However, it's necessary to separate between the orientation corresponding to the window buffer layout and orientation of the contents. A game for example might typically want to use a landscape buffer even on a portrait device. Thus, we replace QWindow::orientation() with QWindow::reportContentOrientationChange() and QWindow::requestWindowOrientation(). Change-Id: I1f07362192daf36c45519cb05b43ac352f1945b5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove dependencies on removed "TEXTSTREAM" option (f65a10b733)David Faure2012-01-241-3/+3
| | | | | | Change-Id: If7d6ca7af8eb305bd127776a35223d50c1fb4f04 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove Symbian code from QtCore.Xizhi Zhu2012-01-243-19/+2
| | | | | Change-Id: I9abdc674bcfa7bb38ce27c5213c5a672f59e63d5 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-2/+2
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Id689fdb78727abafba033bed7b0402e2cf27aba1 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2321-22/+22
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* remove obsolete codec plugin loading codeMark Brand2012-01-205-17/+0
| | | | | | Change-Id: I1f3dbb5c10009413f701947b1b89ed3dbc94bf3d Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QBool and use bool instead.David Faure2012-01-201-17/+0
| | | | | | | | | | | | QBool was introduced with Qt-4.0, to detect Qt3-like code like if (c.contains(d) == 2) and break compilation on such constructs. This isn't necessary anymore, given that such code couldn't possibly compile in Qt4 times. And QBool was confusing developers, and creating compile errors (e.g. QVariant doesn't have support for it), so better remove it for Qt 5. Change-Id: I6642f43f5e12b872f98abb56600186179f072b09 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Q_CC_MWERKS.Robin Burchell2012-01-192-36/+2
| | | | | | | | This is no longer supported. Change-Id: I3914f5007595fd699fa1e9a565a0a3f59a0e135e Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Remove Q_CC_NOKIAX86.Robin Burchell2012-01-191-6/+3
| | | | | | | | This is no longer supported. Change-Id: Ic393bc48c4c842514da69b6696cfb62b54360070 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* qglobal: Remove symbian specific featuresOlivier Goffart2012-01-162-496/+15
| | | | | Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Document Q_DECL_CONSTEXPROlivier Goffart2012-01-141-0/+11
| | | | | Change-Id: I61f4017186e8c7b943855723d7c677a01f7a7bf7 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-132-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way we do it of having the platform or touch plugin send both mouse and touch events is not ideal. There's no good way to write an application that works sanely both on a touch-only device and on a desktop except by restricting yourself to only handling mouse events. If you try to handle touch events you don't get any events at all on desktop, and if you try to handle both, you end up getting duplicate events on touch devices. Instead, we should get rid of the code in the plugins that automatically sends mouse events translated from touch events. This change enables that by making the behaviour fully configurable in QtGui. Two new application attributes are added to explicitly say whether unhandled touch events should be sent as synthesized mouse events and vice versa, and no duplicates are automatically sent as the current situation. Synthesized mouse events are enabled by default. We also get rid of the QTouchEvent::TouchPoint::Primary flag, which was only used to signal that the windowing system automatically generated mouse events for that touch point. Now we only generate mouse events from the first touch point in the list. Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Add Q_COMPILER_* defines for C++11 features supported by clangBradley T. Hughes2012-01-121-1/+40
| | | | | Change-Id: I9487720c33e6ac628f7e13f80057524a950c4c5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStyleHelper: Base DPI-calculation on QScreen.Friedemann Kleint2012-01-111-2/+1
| | | | | | | | | | | | | | | - Use qt_defaultDpiX() to obtain the resolution, which obtains it from QScreen. This implies that for X11, which previously used a hardcoded default of 96 DPI, the real resolution will be used (typically 75). - Since many tests (layouts, graphicsview) contain test data for 96 DPI, add an attribute to QCoreApplication making it possible to set the resolution to 96 DPI for testing. Change-Id: I77c8233a96b0d75de07406f58d48886a89c3de06 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-114-27/+1
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix Q_ASSERT_X to handle QT_FORCE_ASSERTSHarald Fernengel2012-01-111-3/+3
| | | | | | | This change aligns the behavior of Q_ASSERT and Q_ASSERT_X Change-Id: Iac9f399da6462fcf70826d3ce1177522bed9f897 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Add defines for explicit virtual overrides.Stephen Kelly2012-01-101-0/+17
| | | | | | Change-Id: Ia9a610e81eeaaa0a08ca6ef4945b002bdb13fe8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Document timer accuracy behavior on UNIX.Bradley T. Hughes2012-01-101-1/+9
| | | | | Change-Id: I5e8b383cc4d8ce0d249be164c5ef596328bdc50c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use Qt::TimerType on Windows when starting timersBradley T. Hughes2012-01-101-0/+6
| | | | | | | | | | | | | | | | | | Make all Qt::PreciseTimers and timers with intervals < 20ms use Multimedia timers for maximum accuracy. Qt::CoarseTimers and Qt::VeryCoarseTimers use normal Windows timers, with Qt::VeryCoarseTimers having their interval rounded to the nearest full second. Note that the Windows timer implementation does not attempt to align timers and reduce CPU wakeups like the UNIX implementation does. This might be done in the future, though. However, this change does the best we can do now, keeping most timers working as-is, while allowing explicit use of Multimedia timers via Qt::PreciseTimer. Change-Id: I1898272b101c572a2a9b9454fef27a651eb178f5 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove symbian debug macro definition.Stephen Kelly2012-01-101-9/+0
| | | | | Change-Id: I3c4cc5cfd8e157587dbda1589501bb829a5a18db Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add define for C++11 explict delete methodsStephen Kelly2012-01-091-8/+8
| | | | | Change-Id: Ief4b8949acb528dcfc0be725b562ae71bd1640cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the Q_TYPENAME define.Stephen Kelly2012-01-081-6/+0
| | | | | | | | | | | | | It is mostly not used (most places in Qt use typename directly), so is already not very useful. For example typename is used in: QDataStream& operator<<(QDataStream& s, const QVector<T>& v) Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Introduced input method hints for latinPekka Vuorela2012-01-072-0/+5
| | | | | | | | | | | On many cases especially latin input is wanted. Hint for these may, e.g., help virtual keyboards on changing the layout to a western one. Added a hint for requiring and another for preferring latin based input. Change-Id: I0ea79643665e25d9f916c3b8d0b7d7352843c2dc Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-061-3/+3
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-051-0/+1
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUTDavid Faure2012-01-051-7/+9
| | | | | | | | | | | | | | | | All QDebug operator << in custom classes were disabled by QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT. Now QT_NO_DEBUG_STREAM is never set automatically, but remains available for reducing the feature set altogether (qconfig.h). Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it doesn't even undefine QTextStream, and this is unrelated to QDebug streaming anyway. Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removed Qt::ImhMultiLinePekka Vuorela2012-01-052-2/+0
| | | | | | | | | | | Multi line information does not really work that well as input method hint. Application developer is the one setting value for the hint, and thus would be responsible for always having right value for multi line. Change-Id: I6102be95549f6f6d4da40845f52d5c873cd46a47 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0521-22/+22
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added flag operators for Qt::InputMethodQueriesPekka Vuorela2012-01-051-0/+1
| | | | | Change-Id: I9e65e81c0a5a9854e28e24315a021371c9170f3f Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* corelib: Introduce Q_ALLOC_SIZE and use it on qMalloc and friendsHolger Hans Peter Freyther2012-01-021-4/+11
| | | | | | | | | GCC 4.3 introduced the alloc_size attribute to hint the compiler that allocated memory will be returned, inform the compiler which parameter holds the size of the allocation. Change-Id: I8734868f6bd19e201abdacd0a1b0fb80a27883c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not unconditionally define QT_BEGIN_MOC_NAMESPACEDenis Dzyubenko2012-01-021-0/+8
| | | | | | | | | | | | | | | | | | Qt5 modules are supposed to be in a namespace, but if the namespace definition is hidden in a macro, then moc doesn't know about it and generates invalid moc_xx.cpp that cannot be compiled due to usage of classes outside of their namespaces - e.g. in qtjsondb we have QtAddOn::JsonDb::Foo class, but the moc_foo.cpp expects to find that class in the global namespace instead. Fixed it in QtJsonDb to define QT_BEGIN_MOC_NAMESPACE="QT_USE_NAMESPACE QT_ADDON_JSONDB_USE_NAMESPACE", however we need to ensure qglobal.h doesn't re-define that macro back. Change-Id: Ic8407f50c11d2d787167ad2f92457aa3ec126d45 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add Qt::TimerType and the QTimer::timerType propertyBradley T. Hughes2012-01-022-0/+17
| | | | | | | | | | | | | | | | | | | | The timer type will control the accuracy of the timer. By default, all timers are CoarseTimers, which allows for +/- 5% interval adjustment. PreciseTimers will not have any interval adjustments, VeryCoarseTimers will have intervals adjusted to full second resolution. Use QTimer::setTimerType() or the QTimer::singleShot() overload to specify the type. QObject::startTimer() now takes a Qt::TimerType argument which defaults to Qt::CoarseTimer. QBasicTimer::startTimer() gets an overload that takes a Qt::TimerType argument. The argument is unused for now, since the QAbstractEventDispatcher interface needs to change (done in a separate commit). Author: Thiago Macieira <thiago.macieira@nokia.com> Change-Id: I3100da5aa1fe17ec30b8644897d0fe6ec4a07f52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable variadic macros if building in c++0x mode.Stephen Kelly2011-12-291-0/+1
| | | | | | Change-Id: I40d1f1f64ad31a299ccad9258f70e9bf3255c3cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Increase the value of the UserRole for the ItemDataRole enum.Stephen Kelly2011-12-271-1/+1
| | | | | | | | For future proofing. No need for it to be so small. Change-Id: I8a0c734f87671881f114922ada7c5bc9524de19b Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QT_NO_STL_WCHAR hackHarald Fernengel2011-12-221-1/+0
| | | | | | | We don't support gcc 2.95 any more. Change-Id: I842f1f8ac64b9006516c104add0991830ac9a46a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q_STATIC_ASSERT: fix C style castOlivier Goffart2011-12-191-1/+1
| | | | | | | | Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in some headers included by moc generated files Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>