summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make transparency test actually test transparencyLaszlo Agocs2015-01-161-1/+1
| | | | | | | | The OpenGL windows should have some more obvious transparent areas in them. Change-Id: I7d000cd367208f99a79b11c341bf94062613f357 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QComboBox: simplify codeGiuseppe D'Angelo2015-01-161-7/+6
| | | | | | | | Remove an useless check and hoist a costly call out of a loop. Change-Id: Ibd1750026af44462a4f0223a9b2f422ebcc7c0e3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Rename QML debug macro to Qt naming stylePasi Petäjäjärvi2015-01-162-2/+2
| | | | | | | | | With change macro is in line with QT_NO_<feature> style of naming macros. This way it will also be automatically added to file mkspecs/qmodule.pri in QT_NO_DEFINES value. Change-Id: I111d07fd015994290c54e00e8aac2d6dbdb7de9e Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* qtest_widgets.h: add support for pretty-printing QSizePolicyMarc Mutz2015-01-163-0/+151
| | | | | | | | | | | | | | | ... in QCOMPAREs. The implementation is hidden in a nested Internal namespace that retrieves the strings without strdup()ing. That makes it easier to compose these functions as there is no need to delete character arrays when using them. The public interface (which qstrdup()s) is implemented on top of these. [ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}. Change-Id: Ib03d969847e5a12474c71a7921366b400025f680 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant: attempt to work around an ICE on linux-arm-gnueabi-g++ (Ubuntu ↵Marc Mutz2015-01-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 11.10) with constexpr QSizePolicy This is the error: src/corelib/kernel/qvariant_p.h: In constructor ‘QVariantPrivateSharedEx<T>::QVariantPrivateSharedEx() [with T = QSizePolicy]’: src/corelib/kernel/qvariant_p.h:107:61: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560 There are two things fishy in this file: 1. Use of the unnamed namespace in a file that gets included in different libraries. While not technically undefined behavior, it may become so when used in the implementation, which it is. 2. Missing explicit initialization of a member of QVariantPrivateSharedEx. This is just a wild guess, because the ICE happens in that line. That class itself is quite smelly, because the address of an object is taken before the lifetime of the object begins. A fix would be to store the object in a wrapper class from which QVPSEx inherits _first_, but then a cast from QVPSEx to QVariant::PrivateShared would require pointer adjustments, and I didn't look through all the code to determine whether that would be an issue. Having been bitten by this sometime ago: https://marcmutz.wordpress.com/private-practice/private-practice-taming-templates/#edit-20111128 I opted to do these easy changes first to see whether they already fix the ICE. Change-Id: Ic15fd928b3dff2318c425c915b2dab5e54254d71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't call static members with objectThiago Macieira2015-01-161-3/+3
| | | | | | | This makes it clear that we're not modifying d. Change-Id: Ic5d393bfd36e48a193fcffff13b968c6d08e69f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QTimeZone::{systemTimeZone,utc}Thiago Macieira2015-01-163-5/+28
| | | | | | | | | [ChangeLog][QtCore][QTimeZone] Added methods systemTimeZone() and utc() that return QTimeZone objects for the system time zone and for UTC, respectively. Change-Id: Ic5d393bfd36e48a193fcffff13b96821bb8514b9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix forkfd build when O_CLOEXEC isn't defined.Thiago Macieira2015-01-162-3/+3
| | | | | | | | | | | | | | | | | | O_CLOEXEC was introduced with the 2008 revision of POSIX.1 and it's the only way of doing child processes safely with fork(2) in multithreaded applications. But we need to support pre-2008 systems, so we can't use that constant. So let's just choose two arbitrary values for both of our constants -- we need to change both because we need to be sure that FFD_CLOEXEC won't be the same as FFD_NONBLOCK. Linux will probably implement them to the O_ constants, like epoll, signalfd and inotify have done. Change-Id: I20a5aa6e6264e7a219e19759eeb8747e01df05ff Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Fix assignment within a Q_ASSERTHolger Hans Peter Freyther2015-01-161-1/+1
| | | | | | | | | This was introduced in 3b844c16e0988b017c67b2329cbe34d4da112b33 and doesn't seem to be right. Change-Id: I1c6a9445996650566d44f223651dd0c855619a88 Fixes: Coverity CID 21589 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QFileSelector to use QSysInfo betterThiago Macieira2015-01-168-31/+51
| | | | | | | | | | This reduces a bit of string duplication by relying on the constants defined in qglobal.cpp and detection via uname(2), in addition to adding the Linux distribution name as a selector. Change-Id: I64a46a0fc552c399db787125b1b32aae5c50056f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix compilation of manual Open GL tests with Dynamic GL.Friedemann Kleint2015-01-152-7/+10
| | | | | Change-Id: Iffd57f26dfc9d6a00cab855270207fc4da7eb1ab Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* eglfs: Split kms integration into multiple filesLaszlo Agocs2015-01-159-901/+1245
| | | | | | | | | | | Now that it's a plugin, the restrictions for the compiled-in hooks do not apply. Make it maintainable and prepare for future development by splitting up properly. The actual functions are not touched at all in this patch. Change-Id: I4c666817afe15b31a63c1f9fc01413e9a2376a3b Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* eglfs: Fix hardware cursor with kmsLaszlo Agocs2015-01-151-1/+5
| | | | | | | | | We have to set a default arrow cursor on startup because non-widget apps will not request one. This is how we behave with non-kms backends too. Change-Id: I11b7bf96e46f570bc49f3e8701616b13c480fda6 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Do not build kms platform plugin by defaultLaszlo Agocs2015-01-151-4/+0
| | | | | | | This plugin is deprecated and replaced by eglfs. Change-Id: Ib559ed411b145b2cb992cc475772894ecd936c07 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid warning about QString from char in xcbLaszlo Agocs2015-01-151-1/+1
| | | | | Change-Id: I013f0caa8aba7fef07c7dbe90ed01dfb85347223 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Haiku: Fix compilation of qarraydata unit testTobias Koenig2015-01-141-1/+1
| | | | | | | | | On Haiku the compilation failed with error: "undefined reference to 'bool QTest::qCompare<unsigned long, unsigned int> (unsigned long const&, unsigned int const&, char const*, char const*, char const*, int)'" Change-Id: I0daf2e6029898cb6c3d7da9d603aa1ea533aa829 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Haiku: Make remaining auto tests compile on HaikuTobias Koenig2015-01-147-7/+7
| | | | | | Change-Id: I369b988b8c7d441ebc912298a81d3d82ec19df8c Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Haiku: Make examples compile on HaikuTobias Koenig2015-01-143-3/+3
| | | | | | Change-Id: I469619b5d749be1043e0bc43e9199a39ace61f16 Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Haiku: Make network module compile on HaikuTobias Koenig2015-01-141-0/+5
| | | | | | | | | Add the missing definition for IFF_RUNNING like documented on http://ports.haiku-files.org/wiki/CommonProblems Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Reduce excessive painting caused by transient scrollbarsJ-P Nurmi2015-01-141-1/+1
| | | | | | | | | | | | The step logic in scrollByDelta() made scrollbar position to go temporarily outside its min/max boundaries, and then setValue() corrected it immediately back within its bounds. The false change notifications caused by this position vs. value ping pong caused plenty of unnecessary updates. Task-number: QTBUG-30316 Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* QComboBox: make setModel reset the root model indexGiuseppe D'Angelo2015-01-132-0/+27
| | | | | | | | | | | | | When changing models it makes no sense to keep the old root model index, pointing into a possibly deleted model. Reset it to the root of the new model is the best line of action. [ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root model index when a new model is set on it. Task-number: QTBUG-43350 Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Introduce Q_ENUM and Q_FLAG macrosOlivier Goffart2015-01-1312-35/+151
| | | | | | | | | | | | | | In replacement for Q_ENUMS and Q_FLAGS. Q_ENUM(Foo) has to be put after the declaration of Foo in an object. It will tell moc to include the enum in the meta object (just like Q_ENUMS) and will allow templated code to get the metaobject for that enum. Will be used by QDebug and QMetaType Change-Id: Iefaf8ae07dc0359828102bf384809346629b3e23 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Add QWheelEvent::sourceShawn Rutledge2015-01-1310-19/+83
| | | | | | | | | | | | This is analogous to 0a92295ca829a62125c9f122fd3daec991993855 which added QMouseEvent::source. For now, we say that a wheel event is synthetic when it comes from a trackpad or other device that provides scrolling by some means other than an actual wheel. Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make QStyleHints usable in QMLJ-P Nurmi2015-01-132-18/+69
| | | | | | | Change-Id: Ia8f143d12c754b4af4a29bb9542cd050b5ae2ab0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Extend selections in QGraphicsView when selection extension key downAndy Maloney2015-01-138-7/+132
| | | | | | | | | | | | | | If the user has some objects selected and holds down the "extend selection" key (Control on Windows, Command on Mac OS X), clicking and dragging a rubber band selection deselects the current selection. This is counter-intuitive and confusing for users. This commit fixes the behavior so users can extend selections using the rubber band when the proper key is held down. Task-number: QTBUG-6523 Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Remove unnecessary call to strlenJędrzej Nowacki2015-01-131-1/+0
| | | | | | | The call was invalid from C99 perspective. Change-Id: Ie07310735736eddf5eb0e142297e56164fde7fe4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* QOpenGLWindow example: Remove unused codeKai Koehne2015-01-131-2/+1
| | | | | Change-Id: Ide47a9edf726298b2032e45d6865511801f94fcb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* ANGLE: Disable MSVC warning 4996 for debug buildsKai Koehne2015-01-131-1/+2
| | | | | | | | | | | | | | | | | Disable compiler warning 4996 about the use of C++ standard library functions like std::copy: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' Commit 0a76b6bc already silenced the warning in the general MSVC mkspecs, the flags set there are however overwritten for ANGLE. Change-Id: I8f9a84d19171057715a8f9be1e8338e02a6c5ba0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Avoid double cache lookup in QHostInfoCacheJędrzej Nowacki2015-01-131-2/+1
| | | | | Change-Id: If5ef2d2f117fe8c1abdf361f1122e32075e14385 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support QMetaType::equals()Alex Blasche2015-01-134-4/+152
| | | | | | | | This avoids having to define operator< for types where operator== is required but operator< doesn't make any sense (e.g. QGeoCoordinate). Change-Id: I81f6a9d8fc0009a4514c974b5e02b446c50d1e31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QNX: Enable QSharedMemory and QSystemSemaphore support.Rafael Roquetto2015-01-133-9/+2
| | | | | | | | | Commit 96995db4af6e1f5e9fe313 implements the necessary bits for this to work under QNX. Change-Id: Ie9e2f421f4f27fcaf40697dd363e9ed047754f0d Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* remove dead codeJoerg Bornemann2015-01-131-17/+3
| | | | | | | | | | | | | | | | | | In ancient times, the existence of QMAKE_RUN_CXX_IMP determined the use of implicit rules. The code path for implicit rules was turned off in 2006 (0287fe3c), which probably was a refactoring artifact. Later, implicit rules were enabled again using a different approach. These days, the non-existence of QMAKE_RUN_CXX determines the use of implicit rules. We remove the dead code path now and rely on the latter condition. One part of the dead code is a feature that turns off inference rules if the OBJECTS_DIR is set or source file names do not match expectations. If somebody ever missed this, it has been reimplemented otherwise. Or not. Change-Id: If3ce9904d9c1df6e4048c58c2452854cce7fa206 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* use QSet<T> instead of QHash<T, void*>Joerg Bornemann2015-01-131-10/+10
| | | | | Change-Id: Ifdc4d7c8e5fcb86834b2ee2c9db73decfffb4ff6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* WinRT: Refactor icon specification usageMaurice Kalinowski2015-01-139-6/+24
| | | | | | | | | | | | | | | | Naming for different logo sizes on WinRT has been varying in the past and evolved from using small/medium/large to some being explicit (71x71). Add new values introduced by 8.1 (310x150, 310x310,...) and clean up mixed usage. Detailed pixel versions overrule general specification and latter ones stay mostly for compatibility reasons. Still the preferred way is to use explicit pixel values. Task-number: QTBUG-43644 Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* moc: Don't link to inexistent parent staticMetaObjectGabriel de Dietrich2015-01-136-1/+113
| | | | | | | | | | | | | Contrarily to Q_OBJECTs, Q_GADGETs are not guaranteed to descend from a Q_GADGET. Here, we ensure that if the first superclass is a Q_GADGET, then the derived class will be treated as one. This allows gaps in the Q_GADGET hierarchy while preventing from trying to link to the inexistent staticMetaObject if there's no such ancestor. Change-Id: If10fb952e23655102a425bb18fe8babaf447a47f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* qdoc: qdoc's 'square bracket' parameters were evaluated too earlyMartin Smith2015-01-127-28/+72
| | | | | | | | | | | | | | qdoc's link command (\l) allows an optional first argument enclosed in square brackets. This argument is used for narrowing and focusing the search for the link target. The argument should not be evaluated until the generate phase, but it was being evaluated in the prepare phase. This was also a problem when running qdoc in the single-exec mode. This update prevents qdoc from evaluating the argument until it is used in the generate phase. Change-Id: I82785e97077053fb5f5c11f0592155675334aaeb Task-number: QTBUG-42880 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Add D-Bus types marshalling for Linux tray icon supportMarco Martin2015-01-122-0/+244
| | | | | | | | | | | | Add marshalling for icon pixmaps to be used in DBus tray icon support according to the specification http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/Icons/ Task-number: QTBUG-31762 Change-Id: I16e66c272eef413a7c94345c273e5fd3a8c0f771 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QFileSystemEntry: Replace manual seek in string with lastIndexOf()Orgad Shaneh2015-01-111-7/+1
| | | | | Change-Id: Icf45795a962baa7102c02293cb7ce1781b8f2f56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove Q_STATIC_GLOBALxxx_OPERATOR macrosThiago Macieira2015-01-117-26/+18
| | | | | | | | | | These macros existed for working around an RVCT compiler bug, but since we stopped trying to work around it, the macros are no longer necessary. Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Clean up ltcg.prf with variables, including a new static modeThiago Macieira2015-01-114-18/+35
| | | | | | | | | | By using the special "ar" and "ranlib" tools, the symbol table is made visible, so we don't need fat LTO binaries. Since we need to store the new tool names, we may as well clean up ltcg.prf with variable names for the fat mode too. Change-Id: I7e53af0c74a3d069313f38500b72538af1d61128 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Let qmake find the number of processors onlineThiago Macieira2015-01-112-8/+39
| | | | | | | Instead of trying to load in ltcg.prf and cache the value. Change-Id: If485ff68fc6ff9d9cf7009cd72d5e702d0199c7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Do the same for qDebug of QByteArray and QLatin1StringThiago Macieira2015-01-113-3/+73
| | | | | | | | | | | | | | | QLatin1String are actually Unicode, so print them with \uXXXX sequences. QByteArray are binary (arbitrary), so print as hex. Since hex escape sequences in C are not limited in length (\x00000F is a valid hex sequence), we need to insert "" if the next character is a valid hex digit. [ChangeLog][QtCore][QDebug] Similarly, printing of QByteArrays whenever "noquote" is not active now prints the arrays in a format consumable in C++, with all non-printable characters printed in hex escape sequences. Change-Id: Ibd0c1a97cbac98610c65c1091bfbcf5581c835db Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QDebug: pretty-print QStrings and QStringRefsThiago Macieira2015-01-119-8/+182
| | | | | | | | | | | | | [ChangeLog][QtCore][QDebug] Printing of QStrings and QStringRefs whenever "noquote" is not active now prints the strings in a format that can be copied back to C++ code. All characters that aren't printable in US-ASCII are escaped (this includes printable Unicode characters outside of US-ASCII). Pretty-printing will not respect QTextFormat padding or field widths. Change-Id: I169a8a0508e24693f5652f0129defe7f709e5d08 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prettify the per-compiler setting of Makefile.win32Thiago Macieira2015-01-111-21/+13
| | | | | | | This just reindents and makes it easier to read what's going on. Change-Id: Id0afcdfb8f468b4553bba8c5a572a1d0115b0886 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove support for MSVC mkspecs that don't exist anymoreThiago Macieira2015-01-111-1/+1
| | | | | Change-Id: Ic5d393bfd36e48a193fcffff13b73b9578a9f7ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Support threaded OpenGL on linux again.Gunnar Sletta2015-01-102-0/+9
| | | | | | | Broken since 8758f532ae6209bcf9447e27edc4fd412c0f173d. Change-Id: Ifadf37252cc7c1ca68b0a82320b12833f97bf302 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix a couple of bugs in the QOpenGLWindow exampleJørgen Lind2015-01-103-12/+18
| | | | | | | Also make the fragment shader a bit simpler Change-Id: Ie50940da0a4f896504c9f5962cdb6c455983302f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Haiku: Make corelib compile on HaikuTobias Koenig2015-01-105-2/+13
| | | | | Change-Id: I66bc492390eedd723ab7866d3c7a38539d708727 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Android: Don't assume native window decoration in QDockWidgetKai Pastor2015-01-101-1/+1
| | | | | | | | | | | Android does not decorate a floating QDockWidget, leaving the user with no option to close or move such a widget. This changes activates Qt's own drawing of window decorations for this case (similar to Win CE). [ChangeLog][Android][QtWidgets] Enable QDockWidget window decorations. Change-Id: Id46a994a8be9b8f3e7b530af118315cd36b5fb0e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QWindowsVistaStyle: Draw PE_PanelItemViewItem for non-item view widgets.Friedemann Kleint2015-01-101-9/+10
| | | | | | Task-number: QTBUG-43157 Change-Id: I2a5f721cadc0dfffbb81902ef1d06ba34a729300 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>