summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QString: add missing contains(QLatin1String) overloadMarc Mutz2013-11-263-0/+14
| | | | | | | | | | | Since contains() just wraps indexOf(), which has a QLatin1String overload, add one for contains(), too, for consistency. [ChangeLog][QtCore][QString] Added QLatin1String overload of contains() Change-Id: I2acc628a51e00789fb2b90400cf0c523a5b5e65a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change format of dist/changes-5.3.0 to what is used in changes-5.2.0Marc Mutz2013-11-261-4/+5
| | | | | | Change-Id: I9c11a126a70c25085f1465e2593bb878c736f8b4 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QVERIFY_EXCEPTION_THROWN macro for testing exceptions using QtTestDmitry Ashkadov2013-11-2611-0/+396
| | | | | | | | | | New macro QVERIFY_EXCEPTION_THROWN may be used to check that some code really throws an exception of specified type. Change-Id: I7cf499c7c37a35407862bc604c6eb862c5f329d3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* QNX: Make use of _readdir64_rBernd Weimer2013-11-253-2/+16
| | | | | | | | | | | Latest QNX versions support _readdir64_r. It will be used by QFileSystemIterator now, when available to support large file systems. Change-Id: I40135f405ad72e1ba85c6a4cd282144dd8171bc6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* remove finishEdit() call, fix double textChanged on deleteGraham Coleman2013-11-212-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a known bug where duplicate textChanged signals are triggered on backspace/delete. The bug has been seen on Windows, Mac, and Linux. Gabi showed that this duplicate signal is caused by two calls to finishEdit(), one direct and one nested, in QTextCursorPrivate::remove(). To attempt a fix, I removed the direct call and do not change the nested call. This change only affects text buffers when they receive remove commands. This seems to fix the problem, shown by the test project uploaded to the bug tracker and also in countTextChangedOnRemove in tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp. Further analysis of finishEdit() and QTextCursorPrivate::remove(): finishEdit() calls signals contentsChanged() as long as a valid block is being edited. Remove() calls finishEdit for all non-table edits, so finishEdit will be called for most cases. Methods in the public QTextCursor all seem to set adjusted_anchor and anchor, none reading it directly, so I haven't found publicly observable consequences to "adjusted_anchor = anchor = position;". Task-number: QTBUG-15003 Change-Id: Ic35f25ee81c4007867b47cd8be03c146a673f86d Reviewed-by: Graham Coleman <ravelite@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Convert more QVector*D member functions to constexprAlex Blasche2013-11-203-3/+31
| | | | | | | | | | constexpr requires inline functions. We convert more member functions to inline functions while retaining a version of those functions inside QtGui. This prevents any BC breakage. Change-Id: I325b78da6b41611bda3994869f474c700b6fb306 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* BB10: Clean up IMF session codeRoger Maclean2013-11-191-10/+16
| | | | | | | | | | | | | | | Be more rigorous about checking if we're in a session before invoking IMF functions. In particular the code would call initEvent if a key was received while no text field had focus leading to a crash. Also closeSession is now always called when a session is terminated rather than just setting sInputSession to 0 and hasSession is always called to check for a valid session. Change-Id: I22ce1c9bcdf8dd130f05ae319c4cc1e01afc4456 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* qmake: add the store library path on WinRTAndrew Knight2013-11-181-1/+2
| | | | | | | | Starting with MSVC2013, a separate set of libs for Windows Store apps is supplied, so make sure it is in the LIBPATH (and before the desktop libs). Change-Id: I74f3f385c2db749010fbfe7e2d4c3d1228e4e603 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* libjpeg: Define NO_GETENV for WinRTAndrew Knight2013-11-181-0/+2
| | | | | | | | getenv isn't available on this platform, and has been stripped from the lib starting with MSVC2013. Change-Id: I5a69055b7c3ca85dc6d5a74c5b2842e7886b13bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add overload of QTest::ignoreMessage() taking a QRegularExpression.Friedemann Kleint2013-11-179-19/+127
| | | | | | | Make it possible to match messages by a pattern. Change-Id: I713312e86db5471755459f1ecc43e8f1ac7a95fb Reviewed-by: Jason McDonald <macadder1@gmail.com>
* ANGLE: Enable D3D11 for feature level 9 cardsAndrew Knight2013-11-1720-110/+1250
| | | | | | | | | | | Enable use of ANGLE on lower-end hardware, such as Surface RT and Windows Phone 8. Based on https://codereview.appspot.com/12917046/ Change-Id: Ice536802e4eedc1d264abd0dd65960638fce59e4 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add C++11 constexpr to 3D vector classesAlex Blasche2013-11-153-114/+114
| | | | | | | | | This turns QVector2D(1,1) into compile-time expressions when using a C++11 compiler. Change-Id: Ifea2d1cdfd5481300f9a5a0c7bbe8bfe9115c636 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Benchmark for QWaitConditionOlivier Goffart2013-11-152-121/+54
| | | | | Change-Id: I89fc0819324c12030bc23ba080b21f3d8d5c9852 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* xcb: Only create listener window when neededUli Schlachter2013-11-152-24/+13
| | | | | | | | | | | | | | | | | | | | | The xcb QPA plugin uses a separate thread for getting events from the X11 server in a race-free manner. This thread has to be stopped when shutting down. This is done by causing the X11 server to send a special event that causes the thread to exit when it sees it. (Also, the thread exits if the xcb connection goes into an error state, but that does not matter here) So this event listener window is only needed when Qt is sending events to itself. This means that it does not have to be kept around and instead can be created only when needed. Since this window does not stay around for long, it does not need a name. However, it does need the list of screens to find the correct root window, so destroy screens later. Change-Id: Ib4104cbc3f372fa5d1391bcf5a633a158409862f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Make console a no-op for WinRTMaurice Kalinowski2013-11-144-1/+22
| | | | | | | | | | | | | | | | | | Compared to other platforms there is no concept of a console application in WinRT. Hence all applications need to be UI applications and use winmain. Furthermore winmain takes care of launch arguments to be properly converted to arguments passed to user's main(). There is a chicken and egg problem with config.tests as compilation needs to have an existing entry point which is not available at configure time. Hence hardcode the entry point to main for configuring to WinRT. Those tests are pure compile tests, so the logic of the test does not change. Change-Id: I4d3186691a8440845c24b2529cc9646e86dfd8da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fixed CE build of sqlite3Bjoern Breitmeyer2013-11-141-0/+4
| | | | | | | | | | | | | | | | The updated sqlite3 lacks a forward declaration of localtime. Depending on the CE version that forward declaration was sometimes available. Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (forward-ported from commit fb1649d30b0542a69a534218e96950d0533dec8b) Change-Id: Ief6d8ed1cad51fa92a333a20c5dfe781d19761eb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> (forward-ported from commit ea70ec8711af45128d63634a01dfc4c1a51ac331) Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* update bundled sqlite to 3.8.1Mark Brand2013-11-143-6420/+9795
| | | | | | | | Change-Id: Id75bf901c9014419eddbe2d0e5a75ee274b17914 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Fatih Aşıcı <fatih.asici@gmail.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Make drawing to and from RGBA8888 images fasterAllan Sandfeld Jensen2013-11-131-6/+38
| | | | | | | | | | | After profiling drawing with RGBA8888 images most of the time appears to be spend in converting to and from ARGB32PM. This patch adds four small converters that are 3-4 times faster than the generic converter. Change-Id: I3c7498756f440ca3ea9c1417b26dd8e1953b9d06 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add swapInterval to QSurfaceFormatLaszlo Agocs2013-11-1314-38/+144
| | | | | | | | | | | | | | | Implement swap interval support for EGL, GLX and WGL. The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications' setting of the swap interval. Task-number: QTBUG-31939 Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* WinRT: implement QStandardPathsMaurice Kalinowski2013-11-122-5/+60
| | | | | | | | | | | | need to leave some items out like media folder access, as this is not available by default and also requires certain capabilities to use those. Furthermore updated the tests for sandboxing as well as skip cmd.exe related tests as that does not exist on WinRT. Change-Id: I992b1e195b79615bea0be4f84f56cfb8f0d902bf Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* fix directory separators for WinRTMaurice Kalinowski2013-11-121-1/+1
| | | | | | | internally we always use forward slashes Change-Id: I0573d63b993bb76bc5798ee060fe9bdfb7304658 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* change to basic file info on WinRTMaurice Kalinowski2013-11-121-11/+16
| | | | | | | | | FILE_FULL_DIR_INFO failed under certain circumstances on WinRT and provides far more information than required. Hence prefer the basic version in every case and standard for files with size description. Change-Id: I63f1365f83cdd5d69f81278411f822dbd361fa92 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Enable qfile tests for platforms without networkMaurice Kalinowski2013-11-113-4/+6
| | | | | | | | | | Currently network is only required to gather the host info for one test case. That does not justify to disable all other tests, which can provide useful information on the state when doing a port. Hence disable that testcase if no network is available. Change-Id: I202ef49b3e07ae69ec85ee0432ae0a771a90e816 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* uic: Accept an -include argument to generate a #include.Stephen Kelly2013-11-115-0/+112
| | | | | Change-Id: I2854619ab995b4ba3c820fec58e998ad04ac9858 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QComboBox: use QSignalBlockerMarc Mutz2013-11-091-6/+6
| | | | | Change-Id: If805652d05007de9206951f09499acf931990df2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make use of the internal space for enum in QVariantOlivier Goffart2013-11-082-2/+2
| | | | | | | | Enums are movable even if they have not been tagged as such, and therefore can safely make use of the internal storage. Change-Id: I3bec8556bfeb4a07cb30d918f8d1dd2565d6d94a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* QSocks5SocketEngine: use QSignalBlockerMarc Mutz2013-11-081-3/+4
| | | | | Change-Id: Ib30daf8d716401cf3e2c562dc3ab7924b026189d Reviewed-by: Richard J. Moore <rich@kde.org>
* Disable error message box on WinRTMaurice Kalinowski2013-11-081-1/+3
| | | | | | | | | While exception handling methods are not available on WinRT, the debug mode ones are. This way we can suppress error dialogs from popping up like on desktop windows. Change-Id: Id6e9666af9274d373e7d46e3f9e44892a2bd0dbc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Introduce proper QSurfaceFormat's setters/testers for format optionsGiuseppe D'Angelo2013-11-072-5/+79
| | | | | | | | | | | | | | | Fixes several things * setOption(options) has the wrong name (singular) * setOption(options) doesn't set the current options to the argument, but ORs the current options with the argument and sets the result * testOption(options) has the wrong name The old methods get deprecated, and new methods and overloads get introduced here. Old code behavior is thereby preserved. Change-Id: I51bba49f22810c80e6b4980892600d616503af6b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* compile fix if no QFileSystemWatcher is availableMaurice Kalinowski2013-11-071-0/+4
| | | | | | | Change-Id: I22d0cd90da96e6b6f651768955c7f445dfbcf6bc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Examples: Add support for custom nameserver to dnslookupMandeep Sandhu2013-11-071-1/+12
| | | | | | | | | Updated dnslookup example to take an optional nameserver argument for doing DNS lookup against a specific nameserver. Task-number: QTBUG-30166 Change-Id: I9f46f9f766b56f770d2c8372e3bfad5c71023c73 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* use apartment threading for CoInitializeExMaurice Kalinowski2013-11-051-1/+1
| | | | | | | | otherwise we are risking a lock by freeing resources from other threads when calling CoUnitialized() Change-Id: I1fe09d7d3b1674a00b44ababfc90da79580278b3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QStandardPaths: Add GenericConfigLocation to the documentationDavid Faure2013-11-051-0/+6
| | | | | | | The actual feature comes from a merge from the stable branch. Change-Id: Id067fb2b26cb3c6b78c7705b77bd741e3bd8f090 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor plugin loading for WinRTMaurice Kalinowski2013-11-055-2/+46
| | | | | | | | | | | | | | | | | Specify the root directory to be the package root. Only plugins inside the root can be opened (actually also only files). Furthermore current defaults to the package root now, which in most cases is identical to previous behavior. When attempting to load a plugin the path can either be specified in host format "C:/..." or as plugin absolute "/platforms/...". Check for both, with preference of latter case, like when qt.conf is used with / being used as plugin path. Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT compatibility functions: properly return ERANGE from getenvAndrew Knight2013-11-041-1/+1
| | | | | | | ...when the buffer's size is smaller than the value size. Change-Id: Id345982c9fc4ceed6505d0c192680c47c554fcb4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* WinRT: Remove Windows metadata flags from common mkspecAndrew Knight2013-11-041-2/+2
| | | | | | | Winmd is not used, so there is no reason to embed it. Change-Id: I0820256aecd9c3c71b0b0c8afa53941b03f97363 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Fix QTimeZone test compilation on WinRTAndrew Knight2013-11-041-1/+1
| | | | | | | | WinRT doesn't use the Windows Timezone backend, so don't build the Windows test. Change-Id: I32620546de3ad1f19402cc1359f8038200c915ec Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Replace use of putenv in test caseAndrew Knight2013-11-041-2/+1
| | | | | | | This should be using qputenv; putenv is deprecated on MSVC. Change-Id: I7c27cf5f7955624fa3553b7a34ab11c6fae462b8 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Ignore debugger arguments on WinRTMaurice Kalinowski2013-11-011-0/+4
| | | | | | | | | Visual Studio debuggers send an argument to specify the debugger port. This argument needs to be skipped while parsing and not to be interpreted as an option or test function. Change-Id: I24efb52fbd668a7bc3388c876f5ea0d950de1d5b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Avoid adding empty argumentsMaurice Kalinowski2013-11-011-5/+7
| | | | | | | | QByteArray split does create one item even if the string is empty. Hence check if the launch arguments string needs to be parsed at all. Change-Id: I0a355212aaa7254fe0f417c61a59c30223311915 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QThreadPool: fix race at time of thread expiry.David Faure2013-10-313-22/+34
| | | | | | | | | | | | | | | | | | | | The current synchronization mechanism was racy: decrementing waitingThreads and then hoping that the wakeOne will wake a thread before its expiry timeout happens. In other words, on timeout, a just-assigned task would never run. And then no other task would run, if maxThreadCount is reached. Fixed by using a queue of waiting threads (rather than just a count), and by moving the wait condition into the thread itself, so we know precisely which one we're waking up, and we can remove it from the set of waiting threads before waking it up, and therefore it can determine on wakeup whether it has work to do (caller removed it from the queue) or it expired (it's still in the queue). This is reliable, whereas the return value from QWaitCondition::wait isn't reliable, when the main thread has already decided that this thread has work to do. Task-number: QTBUG-3786 Change-Id: I1eac5d6c309daed7f483ac7a8074297bfda6ee32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPlainTextEdit: use QSignalBlockerMarc Mutz2013-10-301-9/+13
| | | | | Change-Id: I581e60c4efd985fb909614459229806185f9501c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMenu: use QSignalBlockerMarc Mutz2013-10-301-2/+2
| | | | | Change-Id: I41006d2b6f1454382b8c0bede20999d882b66f26 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QFontComboBox: use QSignalBlockerMarc Mutz2013-10-301-3/+4
| | | | | Change-Id: I6a9eab39088275427e4282ee590fda439b2f2901 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QTreeWidget: use QSignalBlockerMarc Mutz2013-10-301-3/+2
| | | | | | Change-Id: I0b69cd5680dfae6349bd4a952f358fe0b4acb2ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QInputDialog: use QSignalBlockerMarc Mutz2013-10-301-4/+5
| | | | | Change-Id: I711dbc0c35bc51ad3149e3d7b41e716bc9ab94b5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QPrintPreviewWidget: use QSignalBlockerMarc Mutz2013-10-301-3/+4
| | | | | Change-Id: Ic2d48c8e2c9c3c6f06e67ebf7e12bd4899b421aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QTabWidget: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: I4621e6b504c531903210242cf0f1cf12e7538784 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMdiArea: use QSignalBlockerMarc Mutz2013-10-301-2/+1
| | | | | Change-Id: I54bb64531b1b9639bec163a96baae67b9cabd16b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QDockAreaLayout: use QSignalBlockerMarc Mutz2013-10-301-3/+1
| | | | | | | | | | This change changes the point where signals are unblocked again in QDockAreaLayoutInfo::updateTabBar() to include the final tabBar->count() call. This should not be a problem, as count() is a const function and thus shouldn't emit any signals. Change-Id: I6f3dc5696a9c31db51fbe4cdee4b9d83ddeaf61f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>