Commit Graph

19 Commits

Author SHA1 Message Date
Orgad Shaneh
2f41f35952 Git: Make commit a bit less synchronous
If gc.auto is configured, commit can trigger garbage collection, which
takes time. Avoid completely blocking the UI on this case, and at least
show the output of the commit command.

Change-Id: Id301c878c26599bbc363928a6770c04369a62f2f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-14 13:37:49 +00:00
Orgad Shaneh
594ee54e42 Utils: Add namespace qualification to signals arguments
Fixes the following warning, and connections to these signals:

 QObject::connect: Cannot queue arguments of type 'FileName'

This amends commit 7cee991c70.

Change-Id: I95e81fd9c328759daec29bf35c4b953983387d30
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-26 09:35:42 +00:00
Alessandro Portale
f6943a712a Utils: Modernize further
Many issues, mostly in headers, were not addressed in
e38410b76c

modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: I320a51726db881e582b898948d53735ebb06887a
Reviewed-by: hjk <hjk@qt.io>
2018-07-24 12:21:42 +00:00
Orgad Shaneh
7cee991c70 Utils: Remove superfluous qualifications
Change-Id: I36e17dac0cff87f82f0ddaf97bc613389110f218
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-07-19 08:21:29 +00:00
Orgad Shaneh
b82ffb917b VcsCommand: Block auto reload while a command is running
Git rebase is executed in the background, and it can change a file multiple
times in a short period. If we reparse a file while this happens on
Windows, Git fails to replace it, the rebase action fails and the
repository becomes unstable (remains with a modified file).

See discussion at https://github.com/git-for-windows/git/pull/1666

Task-number: QTCREATORBUG-15449
Change-Id: Iba40a770a1df2dfff0dd1c874c491dfbe1cceb58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-27 09:43:47 +00:00
Eike Ziller
c4b5048836 ShellCommand: Show some progress information without progress parser
Show magically timed progress when running a shell command without a
progress parser. The assumption is that the timeout is much larger than
the expected runtime, but still an indicator for how long it might take.
Progress manager does its magic on top of that.

This is e.g. used for the update info plugin, for which checking for
updates might take quite some while.

Change-Id: Ib3d3d37b86fac17816fe592e39e26a3d484bba26
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-09-07 11:24:33 +00:00
Tobias Hunger
ad2b968e4c ShellCommand: Fix crash with OutputProxy use
Pass a shared pointer into runSynchronous and runFullySynchronous.
That way the proxy will stay around for as long as needed.

Task-number: QTCREATORBUG-16612
Change-Id: Ic529440c81d85149abd67e5eeb564cc5f12181ab
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-07-18 12:06:12 +00:00
Tobias Hunger
b851b57ea3 Utils::ShellCommand: Force fully synchronous execution from UI thread
Force runCommand when run from the UI thread to do fully synchronous
operations. This prevents two event loops in one thread with (sometimes)
interesting side effects.

This also stops signals from being sent while the process is running,
but the remaining users seem to be able to handle that.

Change-Id: Id5eb9868b660419987730c60e3fbfb4cbced1218
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-07-15 14:49:02 +00:00
Tobias Hunger
d1be129abe Utils::ShellCommand: Add runSynchronous method
Add runSynchronous method and move code from runCommand there.

Change-Id: Ic7c452d583fd88468fc6466a683159ecd8328b48
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:22:39 +00:00
Tobias Hunger
c2075f6a73 ShellCommand: Pass OutputProxy to runFullySynchronous
No need to create a fresh one.

Change-Id: I3c7b92319ab43030620428987dfa254be7ac03a7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:22:02 +00:00
Tobias Hunger
53c602633c Utils::ShellCommand: Rename runSynchronous to runFullySynchronous
This name just got free, so use it for the method that actually is
called if the process runs with the FullySynchronously flag set.

Change-Id: Ic86bb291d578ad06b74db1ab89a22b1b8cb4f4bb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:21:40 +00:00
Tobias Hunger
cc27125092 Utils::Shellcommand: Remove runFullySynchronous
Nobody uses that anymore.

Change-Id: I24935ac8d25eb639eb253250749750993c740516
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-15 14:21:21 +00:00
Eike Ziller
967177d3d8 SynchronousProcess: Change exit code interpreter to function object
Change-Id: Ic48d4f5810f171c070f0980581fb6e45f6fe6b4a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-04-27 08:48:32 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Tobias Hunger
f72370f20a Update License according to agreement with Free Qt Foundation
* Update remaining files in src

Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:59:41 +00:00
Tobias Hunger
f2be797696 ShellCommand: Allow setting working directory per job
Change-Id: I6d541f87b76bdc7f1503f202792079f833e8932c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 13:04:42 +00:00
Tobias Hunger
ea476ffc39 ShellCommand: Store workingdirectory in the jobs
Not all jobs of one command can run in the same directory, so
prepare for having individual working directories per job.

Change-Id: Ice43361fe54f2b7153ccd38435f6108d83570082
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 12:05:31 +00:00
Tobias Hunger
a44c403b5f ShellCommand: Rename some signals
Rename the signals used to report stdout/stderr to make it clearer
what they actually do. Remove some unimplemented private member
functions while at it.

Change-Id: I7e856f906ccb45964f3b1b64336d4d8ebca7b9ee
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-07 13:07:14 +00:00
Tobias Hunger
eec0a03212 Vcs: Split up VcsCommand
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.

Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-04 15:27:25 +00:00