Commit Graph

115 Commits

Author SHA1 Message Date
Eike Ziller
b09b6bd747 Merge remote-tracking branch 'origin/5.0'
Change-Id: I370268624bd6e91e7b44fa236e913f5f55867e17
2021-08-20 09:50:30 +02:00
hjk
142a34464f Utils: Avoid adding duplicated slashs in FilePath::pathAppended
Change-Id: I791412906e94a967a61d9b3212b704936c447183
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-20 05:33:34 +00:00
hjk
f8ff5d0652 Utils: Use FilePath::toString() for logging reasons
Change-Id: Id3a26327994e55a8d400739e9b7a6e7dcb9b99c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-19 11:49:20 +00:00
hjk
6e8c4aa835 Use new FilePath::setPermissions in a few cases
Change-Id: Ic7122c86c273a87134ea8cd1a00b1bbdf5035971
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-19 08:33:12 +00:00
Christian Stenger
28d2674b54 Utils: Adjust FilePath::relativePath()
When using the same path for the anchor and the relative path
we end up in an empty path which is conceptually wrong.
Especially when passing such a result directly without further
checking may lead to bad issues.
Return a path containing just the '.' (dot) instead.

Change-Id: I86e1ab91e6610831fc05bd81776d278e9fe10105
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2021-08-19 04:39:05 +00:00
hjk
27708158db Utils: Introduce FilePath::setPermission()
And implement it for the direct access docker case.

Change-Id: I5c91402630a5b010fdbcaab96c435f66a36f2e3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 12:25:44 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
hjk
a78665ede7 Utils: Rename FilePath::searchOnDevice to searchInDirectories
Makes it a bit clearer that there's no magic path use or similar
beyond this point.

Change-Id: I86c06850d16bf777db05ad23b540d8096926c059
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-12 08:29:09 +00:00
Eike Ziller
c7168d1063 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/coreplugin/locator/executefilter.cpp

Change-Id: Iff5b82a9e491b782e4720138904f389d318b005c
2021-08-11 10:10:51 +02: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
Christian Stenger
1e901c5d61 Utils: Add helper function
Recurring pattern for local Windows paths.

Change-Id: I4deb7e42012a06281c6081a63415eaeb60203157
Reviewed-by: hjk <hjk@qt.io>
2021-08-05 09:57:35 +00:00
hjk
a6b73dc501 Utils: Remove unused FilePath::absoluteFromRelativePath
Change-Id: I15dce44696a396b9be8f3bb98a31e0363f1165bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-03 05:46:56 +00:00
hjk
764bf7396c Utils: Introduce FilePath::fileSize()
And implement it locally and for docker.

Change-Id: I362f4cae95560836d9300473a286429eb4569329
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 08:19:43 +00:00
Christian Stenger
a0da3ce69f Utils: Move filterEntriesHelper() out of FilePath
Currently only used inside DockerDevice and it fails to build
when building sdktool with old Qt which is still necessary.

Change-Id: Ic48414f0cb8f0955e7561f7484e3ea1c726c816a
Reviewed-by: hjk <hjk@qt.io>
2021-07-22 12:49:45 +00:00
hjk
fd677101a9 Utils: Split FilePath off fileutils.h
This now rather central class deserves a suitably named file(pair).

The rarer used declarations including otherwise not needed includes are
still in fileutils.h.

Change-Id: Ib18d72f16322c03f76023fdefcd5f6da35311b8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-22 11:52:58 +00:00