summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Add getter and setter for qt_qhash_seedGabriel de Dietrich2015-09-224-32/+23
| | | | | | | | | | | | | | | | | | In some cases it's not possible to use QT_HASH_SEED, specially when we need to set the environment variable from inside the application, as dynamically loaded libraries or plugins may create static QHash instances. That would set qt_qhash_seed to a value different from -1 and skip the env var value. For those cases, and when we still want to set qt_qhash_seed, we provide a way to enforce its value. Auto-tests accessing qt_qhash_seed directly have been updated accordingly. Usage in qdoc, uic and rcc has been left as is for the time being. Change-Id: I3b35b4fa0223c83b1348a6508641905a2a63266f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix taskQTBUG_34717_collapseAtBottom testJędrzej Nowacki2015-09-222-30/+33
| | | | | | | | | | The test is moved from tst_qtreeview to tst_qtreewidget as it tests qtreewidget class. C++ usage is fixed, there was an illegal C cast that was causing crashes Change-Id: I80e90a9b531e87f9b133186b6f48be42f54901b5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix QImageReader::size() to return correct size for .ico files.Serge Lysenko2015-09-171-0/+5
| | | | | | | | | | | | | | According to MSDN, the zero value of ICONDIRENTRY bHeight and bWidth fields mean a maximum icon size 256 pixels. So QtIcoHandler::option() should return 256 instead of 0 pixels for such icons. Also there is fixed wrong seek offset at the second call on this method. http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx Task-number: QTBUG-48103 Change-Id: I99f0c9720fd58889045b0c73c51498f2065b0b91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
* Serialize the capitalization value of QFontAndy Shaw2015-09-152-1/+8
| | | | | | | | | | | | | | | | By serializing the capitalization value of QFont, it ensures that it is correctly preserved when QPicture streams it and later plays it back. Subsequently the QDataStream version has been bumped up to account for the change of the data format for serializing QFont. [ChangeLog][QtGui][QFont] QFont now serializes the capitalization setting. [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 17 to account for changes in the serialization of QFont. Task-number: QTBUG-15214 Change-Id: I042680760e5a69d18d41e786b7500a3eebbe562f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Replace direct QPA access in tst_qguiappliction with testlib wrapperTor Arne Vestbø2015-09-151-3/+3
| | | | | Change-Id: I698aa9d7633992d257296759f5e04307ff0d8331 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove QGraphicsView autotest that doesn't test anythingTor Arne Vestbø2015-09-151-9/+0
| | | | | | | | It sends a shortcut override event directly, which should go though QPA anyways. Change-Id: Ie2c6f45cd44222cd9be8846099573dcd2968a77c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* tst_QDBusAbstractAdaptor: fix reception of signals from P2P connectionThiago Macieira2015-09-151-1/+1
| | | | | | | | | | | | | P2P connections don't have senders and receivers, so asking QDBusConnection to connect to a signal with a sender was a mistake (added in 5368e44a86a4e0d4582ff5268986ea8bd0fa64ca). Due to an internal bug, this never presented itself -- double fault. Fix the connection so that we don't get unit test failures when the bug is solved. Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1a78b7dea6d07 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QDBusServiceWatcher: Move the logic to QDBusConnectionPrivateThiago Macieira2015-09-151-0/+104
| | | | | | | | | | | With kdbus, we won't have a regular signal, but instead a special message. So keep the logic of what to do in QDBusConnectionPrivate. The #ifdef is to make sure the bootstrapped qdbuscpp2xml continues to build in cross-compilation environments. Change-Id: Iee8cbc07c4434ce9b560ffff13d06f0d9904cb6d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* And move the creation of connections to the threadThiago Macieira2015-09-156-257/+378
| | | | | | | | | | Now we know that all timers and socket notifiers get created only in the QDBusConnectionManager thread. Incidentally, this reduced code duplication. Change-Id: I27eaacb532114dd188c4ffff13d5075a8d2efb0b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Use a dedicated thread for handling incoming libdbus-1 eventsThiago Macieira2015-09-151-32/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Each application will have one thread dedicated for this, for all QDBusConnections. I wouldn't mind sharing such a thread with other uses in Qt, provided none of them ever block (the QProcessManager thread comes to mind, but it's going away soon). The cost associated with this change in this commit is so far rather minimal. All incoming D-Bus calls need to be handled after an event is posted anyway, to avoid deadlocking on reentering libdbus-1 functions that acquire locks still held. The cost is the one more thread running and the cost of synchronizing them when an event is posted. The benefits far outweigh that cost: no longer will we have problems of QtDBus failing to run if the main system or session connections are used before QCoreApplication is run. Moreover, events can be received and handled in aux threads even if the main thread is blocked on some operation. Note: this commit may not be testable (tst_qdbusconnection may fail) Task-number: QTBUG-43585 Change-Id: Ic5d393bfd36e48a193fcffff13b737556ccd11a8 Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Implement the blocking QtDBus call in terms of the non-blocking oneThiago Macieira2015-09-151-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code a little by having a single code path. More importantly, we no longer need to call the evil function dbus_connection_send_with_reply_and_block. That function acquires a lock on the socket transport inside libdbus-1, which means all threads need to wait until the one call gets unblocked before they can continue. To do that, this commit reimplements the QDBus::Block part of QDBusConnectionPrivate::sendWithReply by reusing the existing call to sendWithReplyAsync() and then doing a blocking-wait with QDBusPendingCallPrivate::waitForFinished(). By using (Q)DBusPendingCall and the threaded connection approach (next commit), now we never block on the socket. That also means the code to call dbus_pending_call_block() is no longer necessary and the waitForFinished() function itself can be considerably simplified. As a side-effect of no longer blocking, a number of pre-existing race conditions that used to be hidden showed up. Note: this commit deadlocks without the threading (next commits). Task-number: QTBUG-43585 Change-Id: Ic5d393bfd36e48a193fcffff13b73754954a3f7d Reviewed-by: Albert Astals Cid <aacid@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Autotest: Make tst_QNetworkInterface::interfaceFromXXX data-drivenThiago Macieira2015-09-131-20/+28
| | | | | Change-Id: I7de033f80b0e4431b7f1ffff13f98c015ae37dc6 Reviewed-by: Richard J. Moore <rich@kde.org>
* Declare QNetworkAddressEntry and QNetworkInterface as metatypesThiago Macieira2015-09-131-1/+0
| | | | | Change-Id: I7de033f80b0e4431b7f1ffff13f98c092ea3ba3e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Testlib/Windows: Output crash information on stdout instead of stderr.Friedemann Kleint2015-09-031-0/+7
| | | | | | | | | | | | | | | Make it easier to capture information about crashing tests in log files, since it is not possible to do something like foo > log.txt 2> errlog.txt on Windows. Adapt selftest. [ChangeLog][QtTest][Important Behavior Changes] Crash/exception information is now logged to standard output on Windows. Task-number: QTBUG-47370 Change-Id: I3e6a2d25855ed0f20516418a031990b562f5f757 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Move min left/right bearing calculations to QFontEngine baseclassTor Arne Vestbø2015-09-021-1/+6
| | | | | | | | | | | | | | | | The logic used in the FreeType font engine can be generalized and move to the QFontEngine baseclass. This allows the CoreText font engine to correctly report the minimum left/right bearings, which decreases the chance that an optimization in QTextLayout's line breaking algorithm will produce wrong results. The calculation of left and right bearing has been moved to the glyph_metrics_t type to reduce code duplication. This allows us to use the with and height of the bounding box to determine if the glyph has any contours. Change-Id: I864697d3f31ed56f22f04666199b6c5023c5e585 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Simon Hausmann2015-08-2722-89/+753
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-2622-89/+753
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| | * Avoid overflow in QTime::addSecs with too big a number of secondsThiago Macieira2015-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime::addSecs needs to do something similar, but not identical because it needs the number of days too. And then there are daylight savings transitions... Task-number: QTBUG-47717 Change-Id: I7de033f80b0e4431b7f1ffff13f976f4f5e5a059 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * QRegularExpression: fix matching over QStringRefsGiuseppe D'Angelo2015-08-182-15/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Playing with the offset argument of pcre_exec is not equivalent to adjusting the pointer to the subject string. In particular, PCRE can go behind the offset to check for lookbehinds or "transition" metacharacters (\b, \B, etc.). This made the code that deals with QStringRefs not matching in behavior with the corresponding code dealing with QStrings. For instance, QString subject("Miss"); QRegularExpression re("(?<=M)iss"); re.match(subject.mid(1)); // doesn't match re.match(subject.midRef(1)); // matches!!! Instead, actually adjust the pointer to the subject string so that the behavior is identical. A broken test that relied on the equivalence is also removed. Change-Id: If96333241ef59621d7f5a6a170ebd0a186844874 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Handle action events in QLineEditIconButton.Friedemann Kleint2015-08-181-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure QAction::setVisible() is handled and reposition if visibility changes. Task-number: QTBUG-39660 Change-Id: I14f0659aedc8dc89ddef3159d3a500b40b1563ff Reviewed-by: David Faure <david.faure@kdab.com>
| | * Open menu on the third click on QMenuBar on X11Alexander Volkov2015-08-171-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't replay mouse events after closing popups on X11. This leads to the bug when the menu doesn't show after clicking three times on the menu bar. It can be fixed by reverting 78d7192338e2cbba0c9b53c429d35b9437b7e1cd, but then we need an alternative fix for QTBUG-32807 on Windows. So don't replay mouse events for the menu bar on all platforms. Change-Id: I3db8e24a6de6f35b0a17dffac6a131f1cad42e6d Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * tst_qprocess cleanupJoerg Bornemann2015-08-171-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | Give setStandardOutputFile2 a sensible name, move it to where it belongs and remove bogus Q_OS_WINCE ifdef. Change-Id: I5c843e8b6cb626979966f3e61f7a7c720173bb28 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * fix assertion in QProcess/WinJoerg Bornemann2015-08-171-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not call bytesAvailableInChannel if the source pipe end is invalid. This is the case when redirecting channels on Windows. The assertions in bytesAvailableInChannel were triggered whenever an output process or output file was set and waitForBytesWritten was called. Task-number: QTBUG-45548 Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * WinRT: Skip unsupported multicast UDP socket testsOliver Wolff2015-08-171-0/+18
| | | | | | | | | | | | | | | Change-Id: I69f756ad829569060ae9931748b940842d23a6ea Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
| | * tst_qudpsocket: Do not crash if no testserver address could be foundOliver Wolff2015-08-171-2/+14
| | | | | | | | | | | | | | | Change-Id: Ica61974b20b848997c8ab101abde4b536814ba83 Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
| | * QMimeDatabase: adapt to changes in shared-mime-info 1.3David Faure2015-08-162-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The generated xml file is now lowercase. This was changed in shared-mime-info 3805d0bcf2. It led to runtime warnings "No file found for ...", which helped notice the bug. Change-Id: I31f0fc7f0fe8a098c3f79c0bcbeeb1909d2cc05a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QProcess: Ensure that the stdin buffer is cleared on start()Thiago Macieira2015-08-154-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer may have been left dirty if we were unable to write all the data to the child process in the previous run. So ensure we clear it before starting a new one. We already did that for stdout and stderr, for some reason. Task-number: QTBUG-44517 Change-Id: I1a800c709d3543699131ffff13c419da3bbffacf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * QMimeProvider: Do not crash when globPatterns is empty.Milian Wolff2015-08-124-0/+23
| | | | | | | | | | | | | | | Change-Id: I351a533a1f03ac2e7bdec876b657a80fac60b2ed Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| | * Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Oswald Buddenhagen2015-08-121-4/+5
| | |\
| | | * Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-07-171-4/+5
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/manifest-meta.qdocconf src/corelib/global/qnamespace.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qtools_p.h src/sql/drivers/psql/qsql_psql.cpp Change-Id: I23a15ac84e03ad61d865e3df872b013eb0752949
| | | | * Network: Fix up previous corruption patchMarkus Goetz2015-07-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix-up for cff39fba10ffc10ee4dcfdc66ff6528eb26462d3. That patch lead to some internal state issues that lead to the QTBUG-47048 or to QNetworkReply objects erroring with "Connection Closed" when the server closed the Keep-Alive connection. This patch changes the QNAM socket slot connections to be DirectConnection. We don't close the socket anymore in slots where it is anyway in a closed state afterwards. This prevents event/stack recursions. We also flush QSslSocket/QTcpSocket receive buffers when receiving a disconnect so that the developer always gets the full decrypted data from the buffers. [ChangeLog][QtNetwork] Fix HTTP issues with "Unknown Error" and "Connection Closed" [ChangeLog][QtNetwork][Sockets] Read OS/encrypted read buffers when connection closed by server. Change-Id: Ib4d6a2d0d988317e3a5356f36e8dbcee4590beed Task-number: QTBUG-47048 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| | * | | tst_qmimedatabase: check that QFile::remove() worked.David Faure2015-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It failed on Windows due to readonly files copied from the resource, until adding a setPermission call. Change-Id: I1d42b53763583aca73d011e0f2bbf061ef6aa891 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | * | | QMimeDatabase: Run more tests on non-XDG/shared-mime-info platformsEike Ziller2015-08-116-25/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows and OS X, where QStandardPaths does not use XDG_DATA_DIRS/ _HOME and shared-mime-info is not installed, the tests that require additional shared mime info xml files were never run. Mend that by using QStandardPaths' test mode instead of setting XDG_DATA_HOME. Change-Id: I53b75c293c41c4dac63986dcb88972c2b54d5428 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
| | * | | Extend QNetworkReply test exclusion on OS XSimon Hausmann2015-08-101-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is very flakey in 5.5 integrations and the OS X CI machines have notorious problems with networking stability. So the previously listed tests are not really at fault, it's an infrastructure problem, that we choose to ignore for the time being. Change-Id: I7fbfa7b3778daa6b5e60d95b822847c92927122f Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | * | | Make tst_accessibility's characterRect match ↵Tor Arne Vestbø2015-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAccessibleTextWidget::characterRect The former didn't account for ascent and descent. Change-Id: If741f22f7e79ac3c13e58f2966358010d9f9ec81 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | | | QPlatformFileDialogHelper::cleanFilterList(): Allow for ',' in glob.Friedemann Kleint2015-08-271-0/+23
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCS files (text/plain) have the glob pattern "*,v", which caused the regular expression match to fail. Task-number: QTBUG-47923 Change-Id: I7d8682ef51306cb4da58a2b3880842bd99892ea3 Reviewed-by: David Faure <david.faure@kdab.com>
* | | | remove pointless function separator comments from tst_qprocessJoerg Bornemann2015-08-261-67/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer test functions don't have those. Removing those comments makes the code consistent. Change-Id: I542b89e797ef061395ce1fc87d848195e6f81f35 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | Harmonize input context selectionBernd Weimer2015-08-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* | | | Autotest: Print errno in case of failureThiago Macieira2015-08-221-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I7de033f80b0e4431b7f1ffff13fc4a02e1c1a2a5 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | | QAbstractSocketEngine: introduce QIpPacketHeader for datagramsThiago Macieira2015-08-222-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the readDatagram() and writeDatagram() virtual functions to take a QIpPacketHeader as meta data, instead of a QHostAddress/quint16 pair. As previously, the header is an "out" parameter for readDatagram() and an "in" parameter for writeDatagram(). The header pointer in readDatagram() is allowed to be null if the PacketHeaderOptions indicates WantNone. Otherwise, it must not be null. The extra options parameter is introduced because we may not always want all the metadata upon reception. For sending, we know what to include or not based on what's set in the incoming header parameter. QIpPacketHeader splits sender and destination because we'll be able to return both on datagram reception. Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | | QHostAddress: Improve code generationThiago Macieira2015-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly related to IPv6, because Q_IPV6ADDR is an array of char, so the compilers were generating byte access to each value. Instead, force access as 32- and 64-bit in most places that make sense (64-bit access decays to 32-bit on 32-bit machines). In one isLoopback(), this is now a 128-bit access for best improvement. Some smaller improvements relating to SpecialAddress by combining the three IPv4 special addresses. Change-Id: I7de033f80b0e4431b7f1ffff13f932b1cd7b5d21 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | | Merge dev into 5.6Oswald Buddenhagen2015-08-178-1/+221
|\ \ \ \ | | | | | | | | | | | | | | | Change-Id: I061f2513ef58f696e75b11928d89aaaf059659a3
| * | | | QProcess: discard unwanted output from the child processAlex Trotsenko2015-08-161-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop process output to nullDevice(), if an application does not request forwarding, redirecting or reading from the device channel. This prevents from accumulation of unnecessary data which can not be read. Change-Id: Ia311a8c658a46cf580ffa9484c5369f3fc5f98a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * | | | Add QMainWindow::resizeDocksOlivier Goffart2015-08-161-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API allows to programatically resize QDockWidgets Task-number: QTBUG-32001 Change-Id: I58072a391f8e7f325a26745b5bedd3fe49508e91 Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
| * | | | Remove temporary string allocations when reading prepared statement.Milian Wolff2015-08-131-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, we use the binary MySQL encoding and copy the data directly into the QVariant of the desired type. This gets rid of the temporary string allocations and greatly improves the performance of the added benchmark. On my machine, the results are: Before: 0.562 msecs per iteration (total: 563, iterations: 1000) 1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000) After: 0.381 msecs per iteration (total: 381, iterations: 1000) 774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000) Note that the same could be applied to floating point data types in the future. Additionally, special support for MYSQL_TIME structure coult be added to get rid of the string conversions there. To ensure everything keeps working, a new auto test is added as well that verifies the select statements and insertions of integral data into a MySql table works as intended. [ChangeLog][QtSql] Improve performance when reading integer values from MySQL databases via prepared statements. Change-Id: I21dd9277661971ded934546f09535014b63f8eb8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | | | Don't try to dynamically resolve dbus symbols if QT_NO_LIBRARYUlf Hermann2015-08-132-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9e307653229c04746d66d3a9f3b3e46ea9a42381 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | | Remove type punning from QRgba64.Erik Verbruggen2015-08-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C++, type punning with a union is not allowed. It will result in compiler defined behavior at best, and undefined behavior at worst. Specifically, if QRgba64 is passed to a function by value, the different members of a struct might be passed in separate registers. This means that any write to the quint64 might not blank out the values of the struct whenever the compiler looses track with TBAA. Change-Id: I991b5492fe4bb13a14bb670fef5bf13dacbe6c0a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * | | | Fix repremultiply from RGB64 to RGB30Allan Sandfeld Jensen2015-08-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like from RGB32 to RGB30 we must also repremultiply when converting from RGB64 because the alpha channel loses more precision than the other color channels. Since this is not approximated accurately in the simple blending functions and the functions are no longer needed now the main render engine supports higher accuracy, the simple blending routines for RGB30 have been removed. Change-Id: I2b7b8eb015e330a487848fc4370ad3a1e966be91 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | | | windows: Verify the built-in GPU blacklist in autotestsLaszlo Agocs2015-08-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have an autotest to prevent introducing JSON syntax errors that become apparent only at runtime. Change-Id: If2bcbf4d227fddcbeb9c095b7986bada078131d7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | | Add QHostAddress::isMulticastThiago Macieira2015-08-151-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This complements QHostAddress::isLoopback. The only missing check now is for the "Any" address types, though operator== is quite fast nowadays. Change-Id: Iee8cbc07c4434ce9b560ffff13cc2691e15014b6 Reviewed-by: Richard J. Moore <rich@kde.org>