summaryrefslogtreecommitdiffstats
path: root/src/network/socket/qlocalsocket_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-211-3/+5
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket/Win: stop reading in close()Alex Trotsenko2021-10-061-0/+1
| | | | | | | | | | After calling close(), the socket can enter 'Closing' state, in which we try to write buffered data before disconnecting. As the device is already closed, we must disable any pipe reader activity and clear the read buffer. Change-Id: I8994df32bf324325d54dd36cbe1a1ee3f08022d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: add missing check to waitForBytesWritten()Alex Trotsenko2021-10-051-1/+1
| | | | | | | | | | | | | | | Calling pipeWriter->checkForWrite() can indirectly close the socket even if the bytesWritten() signal has not been sent. So, we need to make sure the handle is valid before checking pipe state in the reader. There is no harm in calling PeekNamedPipe() with an invalid handle, but the wrong call should be avoided. This patch amends b2c3b3e8fe0d8bdc88051d0120aaa8d5cf8acce0. Change-Id: I5d2ecbbbe0af817aac68ad6f1173b0ed9b324e98 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Q{LocalSocket|Process}/Win: handle write errorsAlex Trotsenko2021-09-181-0/+12
| | | | | | | | | To match the Unix behavior, we should emit errorOccurred() signal and close the channel if the write operation fails. Change-Id: Iac3acb18dbbfe6e7e8afb2555d9adaff1fe98d0f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QWindowsPipeWriter: do not clear the buffer in thread pool callbackAlex Trotsenko2021-09-181-1/+1
| | | | | | | | | | | | | | | | | In a blocking application, receiving the results of write operations must be synchronized with the waitFor...() functions. But, clearing the buffer in another thread can cause the code localsocket.write(...); QVERIFY(localsocket.bytesToWrite() > 0); to fail unexpectedly, if the socket has been disconnected between the calls. So, defer resetting the buffer until checkForWrite() is called. Change-Id: I8c21036aab6a4c56d02c0d9a18d4bbce52d724f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Doc: mark documentation of internal functions as such to silence qdocVolker Hilsheimer2021-09-061-0/+2
| | | | | | | | Pick-to: 6.2 Change-Id: I9523511b9adf40d1280fbf320c24a79aa2860ef2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Luca Di Sera <luca.disera@qt.io>
* QLocalSocket/Win: fix waitFor...() functions for write-only socketAlex Trotsenko2021-09-021-8/+36
| | | | | | | | | | | | | | | | | There were several issues with the socket state checking when the pipe reader is not running: - the number of object handles in the WaitForMultipleObjectsEx() call might have been zero; - a call to the waitForDisconnected(-1) might have hung; - we did not perform a loop iteration for the waitFor...(0) calls, so disconnect detection was unreliable. These issues are related to the same code, so they don't seem to be addressable separately. Change-Id: I3bca872bb4191e6a7d38a693d81f7981af7fe145 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: allow delayed close to workAlex Trotsenko2021-07-251-15/+1
| | | | | | | | | | | | This mechanism was neither properly designed nor correctly tested initially on Windows. [ChangeLog][QtNetwork][Important Behavior Changes] QLocalSocket on Windows now implements delayed closing, which is consistent with the behavior on Unix. Change-Id: Ic3bc427e68eea7f18201f6129df19fbc87d68101 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: do not close the device on disconnectFromServer()Alex Trotsenko2021-07-241-5/+7
| | | | | | | | | | | | | It's the user's privilege to do so when they want to finish reading the QIODevice. Moreover, this is the only difference between close() and disconnectFromServer(). [ChangeLog][QtNetwork][Important Behavior Changes] The Windows implementation of QLocalSocket::disconnectFromServer() no longer calls close(), which is consistent with the behavior on Unix. Change-Id: Ie9ce20c60259a2b08f5254b719355bd7be9b17cd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: do not flush the pipe in disconnectFromServer()Alex Trotsenko2021-07-241-1/+0
| | | | | | | | | | | | | | | | | | In the case where we have pending data to write, calling flush() here may cause the device to close immediately, if the pipe writer already got a result of the last operation from the thread pool. In this scenario, the device does not enter the 'Closing' state, which leads the following code to unexpectedly fail on Windows socket.write(...); socket.disconnectFromServer(); QVERIFY(socket.waitForDisconnected()); Removing the call to flush() makes the behavior consistent with the implementation on Unix. Change-Id: Ic31fbc999be979c1e5befa8f132d9fb367f472ca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket: call abort() instead of close() on destructionAlex Trotsenko2021-07-241-11/+8
| | | | | | | | | | | | The QLocalSocket destructor should immediately close the connection and destroy the socket, clearing any pending data in the write buffer. The abort() call ensures that the pipe is destroyed on Windows, making the additional call to destroyPipeHandles() from the private destructor unnecessary. Change-Id: Ic7a0d8cf2779cd933cded864c8bab0d096469499 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: remove unnecessary call to setWriteChannelCount()Alex Trotsenko2021-07-241-1/+0
| | | | | | | | | | We no longer use the QIODevice's internal write buffer. This patch amends 5b78d7fdcf9b758f117eaa65dc5eeddd0d4557e0 . Change-Id: Ife5a6ba3c2216d5a3e0a8278da98e0a36886d765 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: remove dead code in disconnectFromServer()Alex Trotsenko2021-07-241-8/+0
| | | | | | | | | The _q_pipeClosed() slot unconditionally removes the pipeWriter just before closing the pipe. Thus, if we have an invalid handle here, the pipe writer has already been destroyed anyway. Change-Id: I57463d8464afe6141c21a63851a56ebddabd3f13 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: destroy the pipe before emitting final signalsAlex Trotsenko2021-07-141-4/+5
| | | | | | | | | | | | | | | | Both readChannelFinished() and disconnected() signals should be emitted after closing the pipe. Otherwise, these signals do not correspond to the state of the socket and may even be resent, if a slot connected to one of these signals processes events. [ChangeLog][QtNetwork][Important Behavior Changes] QLocalSocket on Windows now emits both readChannelFinished() and disconnected() signals after closing the pipe and emitting stateChanged(UnconnectedState), which is consistent with the behavior on Unix. Pick-to: 6.2 Change-Id: I1cc551b7897fdba3cec1fd6705f5396790818c7d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix some documentation warningsAndreas Buhr2021-07-121-1/+1
| | | | | Change-Id: Icb6a689e4c4c8272df2f72fd99aaa8d258e4e7b2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLocalSocket/Win: reimplement skipData() functionAlex Trotsenko2021-07-081-1/+6
| | | | | | | | The base implementation discards the data by reading into a dummy buffer, which is slower than necessary. Change-Id: Iabf0c4a25746af6cac5b61d7bda66d89501c808c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: fix typo in function nameAlex Trotsenko2021-07-071-3/+3
| | | | | | | Amends b3fbfcd3738a0ff864439499390513b95ca671aa. Change-Id: If6557f851324cdbb89af6c89e7b792a777d2dedd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket: reimplement readLineData() functionAlex Trotsenko2021-07-061-9/+25
| | | | | | | | The base implementation reads data using repeated calls to getChar(), which is quite slow. Change-Id: Ie46624df63791b2cdd3c8a28fe3327427d942505 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: simplify flush()Alex Trotsenko2021-06-191-4/+2
| | | | | | | | | | Replacing a call to waitForWrite(0) with checkForWrite() changes nothing in logic, but saves one system call. As a result, unused functions in the QWindowsPipeWriter class have been removed. Change-Id: I34ec6310d9659f59a720056b9be54e31f2193116 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket/Win: avoid double buffering on writeAlex Trotsenko2021-06-091-30/+11
| | | | | | | | | As QWindowsPipeWriter now maintains a chunk queue, there is no need to use the internal QIODevice buffer and wait for the previous operation to complete. Change-Id: Id4d54edfe920aeb4a534980cb0cc85a56c067a70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: fix closed state detection in waitFor...() functionsAlex Trotsenko2021-05-181-15/+20
| | | | | | | | | | | A delayed close should only be completed in the _q_bytesWritten() slot as a confirmation of a successful write operation on the socket. Otherwise, a failed write operation may cause the socket to be closed unexpectedly within the waitFor...() function, which may result in a malfunction. Change-Id: I14cff26734f64a89090b6b5c13037466a6400597 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: implement duplex communication in blocking modeAlex Trotsenko2021-05-061-23/+116
| | | | | | | | | | | | | | | | [ChangeLog][QtNetwork][QLocalSocket] The waitFor*() functions on Windows now support duplex operation, as they already did on Unix. As a side effect, this restores the behavior that a single call to waitForReadyRead() won't emit both readyRead() and disconnected(), which also matches Unix behavior. The groundwork for that misbehavior was laid by incorrect refactoring in d1a671b69 already, but at this point it was harmless, as the pipe couldn't be newly closed after a successful read. That changed with f265c87e0, which made the queuing of signals async. Change-Id: I1eb80e8f147bb58825143e0fe1e4300c59ae0fbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QWindowsPipe{Reader|Writer}: restructure signalsAlex Trotsenko2021-04-151-6/+27
| | | | | | | | | | | | | | | | | | | For QProcess, there is no point in suppressing recursive QWPR::readyRead() emission, as the former manages this logic itself. On top of that, the non-recursive nature of QWPR::readyRead() indirectly disallowed reading from the channels inside QProcess::waitForReadyRead(), if that is called from a slot connected to QProcess::readyRead(). QWPW had two signals, one allowing recursion and one not. This commit allows recursion of QWPR::readyRead() and QWPW::bytesWritten(), and moves recursion suppression to the higher- level classes. This makes the code more uniform and efficient, at the cost of a few duplicated lines. Change-Id: Ib20017fff4d92403d0bf2335f1622de4aa1ddcef Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: fix possible UB in _q_pipeClosed()Alex Trotsenko2021-03-311-5/+2
| | | | | | | | | We must stop the pipe writer before closing the handle on which it operates. Pick-to: 5.15 6.0 6.1 Change-Id: I4765dd8393167fe2453653aba76a097b8ace8e3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QLocalSocket/Win: prevent writing to broken pipeAlex Trotsenko2020-10-151-0/+6
| | | | | | | | | | | | When a peer closes the connection, the device remains opened for reading purposes. However, we should disable writing on disconnected socket. Otherwise, if the user issues a write() call, a new pipe writer object will be created and the write call occurs with invalid handle value. Pick-to: 5.15 Change-Id: Id136798c7663df1fce7ed0aa4e3c6f5c65218a11 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QIODevice: implement a "zero-copy" strategy for buffered writesAlex Trotsenko2020-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It works as follows: - user calls write(const QByteArray &); - this function keeps a pointer to the chunk and calls a regular write(data, len); - write(data, len) calls a virtual writeData(); - subclass calls a new QIODevicePrivate::write(); - QIODevicePrivate::write() makes a shallow copy of the byte array. Proposed solution is fully compatible with existing subclasses. By replacing a call to d->writeBuffer.append() with d->write(), subclasses can improve their performance. Bump the TypeInformationVersion field in qtHookData, to notify the Qt Creator developers that the offset of QFilePrivate::fileName was changed and dumpers should be adapted. Change-Id: I24713386cc74a9f37e5223c617e4b1ba97f968dc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Introduce QIODevice::skipData()Alex Trotsenko2020-08-111-0/+5
| | | | | | | | | | | | | | | | | | | QIODevice::skip() called a virtual QIODevicePrivate::skip() to implement an efficient skipping on I/O devices for the internal subclasses. The user subclasses cannot inherit QIODevicePrivate, so this functionality was not externally accessible. This patch replaces QIODevicePrivate::skip() with a virtual protected QIODevice::skipData(). While the basic implementation simply discards the data by reading into a dummy buffer, users can reimplement this function to improve the performance in their subclasses. [ChangeLog][QtCore][QIODevice] Added virtual protected skipData(). Now, subclasses can implement device-specific skipping of data. Change-Id: I9522f7f7ab9d03ac06e972a525f8ec2fa909a617 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' insteadv5.15.0-alpha1Alexander Akulich2020-02-111-3/+3
| | | | | | | [ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Revert "QLocalSocket - deprecate ambiguous 'error' overloads"Alexander Akulich2020-02-111-7/+0
| | | | | | | | | | | | | This reverts commit 0de6c26ac17c90f513329fdbe87ef036fc25925a. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket - deprecate ambiguous 'error' overloadsTimur Pocheptsov2020-01-101-0/+7
| | | | | | | | | | | | | | QLocalSocket::error is overloaded as a signal and an accessor (for the error reported by the signal). This means connecting to the signal using a pointer to member function would require ambiguity resolution. We deprecate the old accessor (to be removed in Qt 6) and introduce a new one - 'socketError'. [ChangeLog][Deprecation Notice] QLocalSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Iab346f7b4cd1024dee9e5ef71b4b7e09f6d95b12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix: "Missing emit keyword on signal call"Alessandro Portale2019-02-131-2/+2
| | | | | | | [-Wclazy-incorrect-emit] Change-Id: I32cf5db522dcb14bbe5151914624979929eeb52e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QLocalSocket (windows) - remove broken setErrorStringTimur Pocheptsov2018-11-221-10/+6
| | | | | | | | | | | | | | | | | | We report two types of errors - those found by our code and errors coming from the OS. setErrorString(), despite its name, does not just set a string, but extracts a windows error code via GetLastError() and then calls _q_winError(). This is wrong: some arbitrary error code (or no error) can be reported when it was actually an error found by Qt. Worse yet, string operations (allocations etc.) can potentially clear the real error code. So remove setErrorString(), set errors explicitly if it's the application code error or use _q_WinError directly. Task-number: QTBUG-71744 Change-Id: I67277d84006c4ad365f5636caf850e1f3ba4e1dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-301-3/+3
| | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove superfluous handle assignment in QLocalSocket::connectToServer()Benjamin Terrier2017-04-051-3/+1
| | | | | | | The handle is already assigned by QLocalSocket::setSocketDescriptor(). Change-Id: I695cfa31f3d14a3a9eef2fb79d23e9651616e8a8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLocalSocket/Win: Fix access to deleted pipeWriterAleksei Timofeyev2017-01-231-4/+2
| | | | | | | | waitForWrite can emit a signal outside QLocalSocket and pipeWriter could be deleted there. Change-Id: Ic35ec6455bd05402fd38fb3e1b219aa4534a0ff6 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QLocalSocket/Win: Use QIODevice's internal write bufferJoerg Bornemann2016-05-171-1/+2
| | | | | | | | | Remove the extra write buffer from QLocalSocketPrivate and use QIODevice's new internal write buffer. Change-Id: I4297774ee89da2df59782adae8b804296e7f3301 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QLocalSocket/Win: use QRingBuffer::appendJoerg Bornemann2016-05-171-2/+1
| | | | | | | | Use QRingBuffer::append instead of an explicit reserve + memcpy. Change-Id: I237d1e43a377e156c148e89e410e15e400e1e426 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-15/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * QWindowsPipeWriter: ensure validity of the write bufferAlex Trotsenko2016-04-301-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle has been started, the write buffer must remain valid until the write operation is completed. To avoid data corruption and possibly undefined behavior, this patch makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive for the duration of the write cycle. Autotest-by: Thomas Hartmann Task-number: QTBUG-52401 Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-4/+0
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * Remove superfluous includes from qlocalsocket_win.cppJoerg Bornemann2016-04-061-4/+0
| | | | | | | | | | Change-Id: I4f641966af3443d0c487df95d2e565182a945bf3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Simon Hausmann2016-03-241-12/+36
|\| | | | | | | Change-Id: I13c7ea6a74eb98606cf45702ae068101943bec6a
| * Add a write buffer to QLocalSocket/WinJoerg Bornemann2016-03-241-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0307c008 removed the buffering of data-to-be-written from QWindowsPipeWriter, because it was assumed that users of this class (QProcess and QLocalSocket) already buffer data internally. This assumption was wrong for QLocalSocket. The following sequence localSocket->write(someData); localSocket->write(someMoreData); would not write anything on the second write. Add a write buffer to the Windows implementation of QLocalSocket. Task-number: QTBUG-52073 Change-Id: I6d0f03a722ec48138cbde3e2f69aae7dafe790d3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-1/+0
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * Make QWindowsPipeWriter thread-free.Joerg Bornemann2016-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-work QWindowsPipeWriter to not use a thread anymore but the WriteFileEx API, similar to QWindowsPipeReader. This saves us a lot of thread synchronization code and enables us to directly write data without yet another buffering layer. Also, this fixes the dreaded deadlocks in the QWindowsPipeWriter destructor that could occur when the reading end was closed before the write was finished. Task-number: QTBUG-23378 Task-number: QTBUG-38185 Change-Id: If0ae96dcd756f716ddf6fa38016080095bf3bd4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QLocalServer, QLocalSocket: simpler use of startsWith()Anton Kudryavtsev2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | It has a variant accepting QL1S directly, so no need to go via a QString. Change-Id: Ia8f1198ef2af7027bc9f7c2e1dad3a5f78a12eb4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* LocalSocket: Do not return early in waitForReadyReadKai Koehne2015-02-161-3/+0
| | | | | | | | | | | | | | | Do not return early on Windows if bytes are still in the buffer. This is not in line with the behavior on other platforms, and also breaks apps where the caller knows that the bytes available are insufficient. [ChangeLog][Network][QLocalSocket] On Windows, waitForReadyRead now always waits for more data, even if bytes are still in the buffer. Task-number: QTBUG-16688 Change-Id: I1425a5780c7707295374934a6b5446ff8e148cc8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>