summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/remoteserverconnection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Remove internal classes and structs from generated documentationArttu Tarkiainen2020-09-211-0/+12
| | | | | | | | | | After migration to using 5.12.7 based qdoc, the generated documentation contains also empty declarations for members of undocumented internal classes. Mark them internal as needed. Task-number: QTIFW-1483 Change-Id: Iad40e4efdd098f09a825ce1c8d0aafcc76bd83bf Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Use of QLoggingCategoryKatja Marttila2020-02-131-5/+6
| | | | | | | | The change enables easier filtering of log messages Change-Id: I769f7c163e20f34c37fa0fe2b0729867ffca5bcb Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Enable support for Qt 5.12 in installer frameworkArttu Tarkiainen2019-08-221-0/+7
| | | | | | | | | | | | | | | | | Workaround issues of IFW not being able to work on elevated mode caused by changes in qtbase, namely when initializing socket connection between remote installer client and server, and writing maintenance tool binary. Switch to using unbuffered mode for QFSFileEngine instances as buffered mode support has been dropped. Fix calls to QFile::copy() when running elevated installer process. Make minor modifications for unit tests to pass. Explicitly fail and return when performing CreateLocalRepositoryOperation on non-owned directory. Task-number: QTIFW-1312 Change-Id: I3db72547ee95c87d8c02d27e5b31c7b30e793431 Reviewed-by: Katja Marttila <katja.marttila@qt.io>
* Replace 0 with nullptrKatja Marttila2019-01-091-5/+5
| | | | | | | Prevents a lot of warnings seen in QtCreator Change-Id: I63bf95aca68a04fc9fd0eecbe29c63e9b9c47efd Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
* Merge remote-tracking branch 'origin/2.0'Katja Marttila2017-01-301-17/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Changelog dist/config/config.xml dist/packages/org.qtproject.ifw.binaries/meta/package.xml dist/packages/org.qtproject.ifw/meta/package.xml installerfw.pri src/libs/installer/lib7z_create.h src/libs/kdtools/kdgenericfactory.cpp src/libs/kdtools/kdgenericfactory.h src/libs/kdtools/kdupdaterapplication.cpp src/libs/kdtools/kdupdaterapplication.h src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp src/libs/kdtools/kdupdaterupdatesourcesinfo.h src/libs/kdtools/localpackagehub.cpp src/libs/kdtools/localpackagehub.h src/libs/kdtools/updatefinder.cpp src/libs/kdtools/updatefinder.h tools/binarycreator/resources/mkdmg.sh Change-Id: Iab2513f549832d2e750e77131c673457ab265af4
| * License header update to GPL-EXCEPTKatja Marttila2017-01-261-17/+12
| | | | | | | | | | Change-Id: I6426c4e8f932cf26c6c638dec18d0c12e22972d1 Reviewed-by: Janne Anttila <janne.anttila@theqtcompany.com>
* | Revert "Windows: Fix crashes in elevated installation"Katja Marttila2016-05-201-2/+1
| | | | | | | | | | | | | | | | This reverts commit 95ae661cba931a982d12cd68d8b4da392d74bdd0. As we now require at least Qt5.5.0 we don't need this workaround Change-Id: I6ab930886bc9af0716a61a8e21b12db83018b0c2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Fixed handling of Destroy command in server processFrerich Raabe2016-04-071-2/+2
|/ | | | | | | | | Destroying QProcess or QAbstractFileEngine objects never worked, since the code for deciding what type of object is to be destroyed confused the 'type' with the 'command'. Change-Id: I8d6c6bf2f11ff82cfbd744c43fcc91d234967b69 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
* Update license headersIikka Eklund2015-12-291-4/+3
| | | | | | | | | Update existing license headers. LGPL -> LGPLv21. Update copyright year as well. Change-Id: Ie1d71f8c68186b8f625f409ddf94691f178093c9 Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Replace waitForBytesWritten with flushKai Koehne2015-05-111-0/+2
| | | | | | | | | | | Unfortunately waitForByesWritten is known to fail from time to time: QTBUG-24451 . We introduced it for making sure large data is actually send, but flush() seems to serve the same purporse. The only drawback is that flush() operates on the concrete socket, and therefore needs to be called on the caller's side. Change-Id: Ic92db298b3dad2c3f9eaa47d160aec517e33e284 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Windows: Fix crashes in elevated installationKai Koehne2015-04-161-5/+2
| | | | | | | | | | | | | | | | | | | | | | Until Qt 5.5.0, QLocalSocket::waitForReadyRead() immediately returns when there are still bytesAvailable(). This means our busy loop for polling new data gets stuck. To work around this we've been explicitly calling processEvents(), which however can have undesired side effects: Namely that non-network events get delivered too, and that 'intermediate' requests are sent to the server, resulting in the protocol getting out of sync - requests get replies from intermediate commands, ultimately leading to crashes. The patch therefore removes the processEvents() call, and instead works around the QLocalSocket::waitForReadyRead() deficiency by subclassing. Task-number: QTIFW-663 Task-number: QTIFW-656 Task-number: QTIFW-659 Change-Id: I4099fa1702cd8dceda954d672c9c3dac0ca7fd66 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Compile with Qt 5.5kh2015-04-131-0/+1
| | | | | Change-Id: Iaab5bd3821bc4f1d4a826c9fee0c2a8c75d06bba Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix handling of incomplete messages in client/server communicationKai Koehne2015-02-201-125/+102
| | | | | | | | | | | | | Do not assume that the socket always contains enough data. Instead, prefix every 'packet' with its size, and back off until the full packet is available. The actual encoding/decoding is done in Protocol::sendPacket, Protocol::receivePacket. To be able to use the methods everywhere, replies are now prefixed by a Protocol::Reply command. Change-Id: I75a89605b2cc3fe2f2f841d8e3159fc8aea65d77 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Use local sockets for client-server communicationKai Koehne2015-02-201-3/+3
| | | | | | Change-Id: I12bfef671ab31ae9fb8c4bb02776517e7f434d27 Task-number: QTIFW-228 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Update CopyrightKai Koehne2015-02-181-7/+7
| | | | | Change-Id: I8dde6629cfd461104364d5cdc255cb54b58283fa Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Set objectName for QThreadKai Koehne2015-02-021-0/+1
| | | | | | | | The objectName of a QThread will be picked up and shown by debuggers. Change-Id: Iabd1006a228a73fff0a9a89bd3d8c1021bab6945 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* RemoteServer: Exit early if authorization failedKai Koehne2015-02-021-1/+3
| | | | | | | | | | There's no point in listening to the socket after the authorization failed. It will then be closed by the client, anyway. Change-Id: I26eb2023e08ac3b16ecb894a89ffa0bfeddc62b0 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Make sure RemoteServerConnection is properly shut downKai Koehne2015-02-021-2/+4
| | | | | | | | | | | QThreadServerConnection is automatically deleted via deleteLater on exit. Anyhow, TcpServer::shutdown() also tries to quit() all child threads by going through the list of children. Making the QThread a child of TcpServer activates this behavior again. Change-Id: If1639ae2c9cd74a83b8ff1814aa2131d9016de14 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
* Set correct permissions for ini filesNiels Weber2015-01-261-34/+35
| | | | | | | | | | | This is necessary due to a behavior change in QSettings/Qt 5 that now creates ini files with more restrictive permissions than before. Task-number: QTIFW-589 Task-number: QTBUG-44086 Change-Id: I296ad4b312a933cbda7dd5c1f644294f83e1850d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix running out of sockets in serverKai Koehne2015-01-211-1/+1
| | | | | | | | | | The client side (RemoteObject) sends a Destroy message to the socket when it's done. The server however did continue to listen to the socket even after the message, letting inactive socket descriptors pile up until we run out of them. Change-Id: I659ab8e24a81ab6163a05e2fb8db4dfd47ebd02f Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fixed wrong placeholder in string.Niels Weber2015-01-061-3/+3
| | | | | Change-Id: Ifeca6563c9b1c82ab754fe87e8cacfae040cc070 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Refine server starting/stopping code.kh2014-12-021-2/+4
| | | | | | | | | If we can't connect, the server is most likely not running. Also send an acknowledgment that we are going to shutdown. Change-Id: I1a06b0ea5b5bdeb736042ca8b49508b6a4fd90b8 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Remove pointer, superfluous members. Use signals and slots.kh2014-11-281-6/+5
| | | | | | | | | Use signals and slots to tell about the shutdown request. Instead of passing around the server pointer, give the port and key as parameter. Change-Id: I0ad1667aa1caee4ffdee8b6951336f2254974810 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Use qint32 throughout the whole communication.kh2014-11-211-21/+21
| | | | | | Change-Id: Id2d9ca3043b0d75a7ea93f9ac1f1467059cb1f0b Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
* Fix typo.kh2014-11-171-1/+1
| | | | | Change-Id: Id8301f8691340a41b9d314e8421fb4d245453a5a Reviewed-by: Niels Weber <niels.weber@digia.com>
* Add LGPLv3 as new licenseKai Koehne2014-10-161-14/+7
| | | | | | | Change-Id: I61158f956894e209dccf83744b4753774676099d Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Add/remove/implement/reorder methods to match Qt5.kh12014-07-101-6/+13
| | | | | | | | | Unify if statements for better reading. Implement missing methods. Adjust {extension, supportsExtension} to tell that our remote does not support any extensions but our local file engine does probably. Change-Id: I6c1c392b531e4060cf12bde8b32eb6c6ec8f1037 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix endless loop.kh12014-06-061-1/+1
| | | | | | | | | | | | | | | Caused by the fact that the settings wrapper did not support anything different then native format, we had to trick the wrapper into using its default QSettings object which in turn uses a QFile (which roundtrips to the admin server) to write the settings out (behind the scenes). The blocking appeared only on Linux cause there we try a native call fcntl(handle, F_SETLKW, &fl) to lock the file during sync, which blocks endless caused of the missing rights. The fix is to use the settings wrapper also for ini format, as both are supported (Ini and Native). Change-Id: I73131c4adf85ba175ba6af1e18acccc29451b14f Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Introduce new classes for client-server communication.kh12014-06-031-0/+525
Still based on what we had already, though more separated. Change-Id: I4cce298003a4ffc2ebcec01fea1a07adfbfdf990 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>