Commit Graph

19 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
ed94e0c066 Archive: Avoid calling blocking stopProcess
Make Archive constructor public.
Make the caller responsible for deleting the Archive object.

Don't automatially run the unarchive process when constructing
Archive object. Provide a start() method, to be called after
the caller has connected to Archive signals.

Add Archive::isValid() method.

Remove Archive::unarchive() gui overload, as it's unused.

Make sure we don't leak the Archive object in
AndroidSdkDownloader.

Change-Id: Idf67262554cdfef50aef4a2234b6a5089110f9a2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-25 12:49:19 +00:00
hjk
2ab2d96753 Utils: Use FilePath in copy helpers
Change-Id: I81b367a5851c0fbcdf45c63c5536c206845a8337
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-10 07:19:10 +00:00
hjk
a58dd22f2d Utils: Use FilePath in TemporaryDirectory API
This helps to lower impedance in the using code.

Even though TemporaryDirectory will very likely always stay on the local
host, this is one of the entry points into path related string
manipulation
that we want to base on FilePath nowadays.

Change-Id: I302016b8d65e54df94296659a54a93935d9e4627
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 05:05:12 +00:00
hjk
430e81facd All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 07:55:31 +00:00
David Schulz
aa8d2dc2d1 Utils: add FilePath::(complete)suffix
The same as FilePath::(complete)baseName avoid some toFileInfo.

Change-Id: Id1901ce2a4bef675215a9e020280df1c846df405
Reviewed-by: hjk <hjk@qt.io>
2021-06-04 09:32:52 +00:00
hjk
90ad902486 Utils: Remove CommandLine argument from QtcProcess::run{,Blocking}
Makes run() more similar to what start() looks like.

Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.

Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-19 13:01:51 +00:00
hjk
c23cdd9262 Utils: Merge {synchronous,qtc}process.{h,cpp} file pairs
Mechanical to prepare merging the actual classes.
Adapting #includes.

Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-10 09:47:51 +00:00
Eike Ziller
768d4321f9 Merge remote-tracking branch 'origin/4.14'
Change-Id: I214b8d59e8ff7fe0511cd6116ec7725ddc4376ee
2021-02-18 09:26:22 +01:00
Eike Ziller
27300c66fe Improve plugin install wizard on macOS
Downloaded files get a quarantine flag on macOS, which prevents loading
them as a plugin in Qt Creator. Remove the quarantine flag when copying
the plugin.

Change-Id: I3edef3ddfbab299be750e728a9fac0536634ba1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-15 14:10:17 +00:00
Eike Ziller
2197eeb4aa Fix installation directory in plugin install wizard
Correctly initialize the bool variable that decides where the plugin is
installed.
Fix creation of installation directory: QDir::cdUp does not do anything
for directories that do not exist.

Change-Id: I5ee559a663380f293046eded7a2c3efbb1023776
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-15 08:30:47 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Alessandro Portale
871c8e3ffd Don't access static functions via Utils::HostOsInfo instance
Change-Id: Ic45b8f324cb7c6a4691545fc8d668eed69dfeced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-18 22:08:42 +00:00
Alessandro Portale
30aec82285 Add missing "final" to unexported/unshared classes
Change-Id: I84d5fc39d7ef5588a20545854d0cfd0b993db090
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 15:40:29 +00:00
Eike Ziller
f88deb5b70 Plugin install wizard: Search in subdirectories of archive too
Default install structure of a plugin is in a subdirectory like in a Qt
Creator installation.

Change-Id: Ia4e5a08eb9fbe4b1586ff5d406cae1883e7dbd59
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-18 11:03:02 +00:00
Eike Ziller
d67ab36c6f Plugin install: Check if archive contains a usable plugin
Checks if there is a library file which is a Qt Creator plugin
that is compatible with the version of Qt Creator that is running.

Change-Id: Ic5284e3803c45b8e2ef0d30afccb1680fabf43f3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-02 06:59:47 +00:00
Eike Ziller
1c30c868f1 Plugin install: Fix state when going back from archive check
We can ignore the Archive result when the user goes back, and we need to
reset the warning label style when she checks another archive.

Change-Id: I76ce07d1a46875ac72696bcf7ab6c804d63b906b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 11:44:35 +00:00
Eike Ziller
30b6bbfb6b Plugin Wizard: Investigate archive before installing
So far that only moves unarchiving and the check if that succeeds to
within the wizard.
To be extended with additional checks for the archive content's sanity.

Change-Id: I6798937826fbe9cb584d83a920e67b6cfcc119ed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-17 06:50:48 +00:00
Eike Ziller
4613199548 Extract plugin install wizard
It will become more complicated, so pull it into its own files.

Change-Id: If362f0775cc9d97a3c715c046d32d6a20c30a1f9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-05 06:15:15 +00:00