Avoid checking an invalid QUrl - instead restore
old code of always creating one an verifying this
instead.
Remove the now unused FilePath::isLocal().
Change-Id: I037c43e6fbdb7dc1f8901fc70b581f3c94ab503a
Reviewed-by: hjk <hjk@qt.io>
This generates quite a bit of code, and the non-inlined call
should not be noticible given the rest.
Change-Id: If3a699737142c2953dd0977df850b07bc529a124
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
In line with the general move toward use of FilePath nowadays.
Change-Id: I1c50e1479f7d9100ff8ded3ce3c22dd82b7fe6aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The are set in a central place, in the precompile header file.
Or as DEFAULT_DEFINES when the precompile header file is not used.
Change-Id: Ie020f916b64eabcd5a8153f4be5474986f5afed5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
CMake gives the path to the cmake_pch.h[xx] file as relative path
to build directory. Making it absolute fixes the code model.
Fixes: QTCREATORBUG-22888
Change-Id: I2fdc080be779f22b737788be2074254290994aaa
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Into the regular case, and a fileNameWithPathComponents() function
handling the rarely used case with argument.
This saves a few cycles in the regular case and makes the function
usable by member function pointer in e.g. Utils::transform.
Change-Id: Ic4469198c3f8a44f59e50d70e67b864d876700d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Currently the only place that's using it and the scope is much smaller.
Change-Id: I1a43d14f0e2c69a16f76e6f83b82436bbeeac1c9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... taking a QString for the executable.
This weakens the very explicit QString -> FileName conversion via the
named constructors for the special case of constructing a CommandLine.
I think that's worthwhile here, as it reduces the noise on the caller
site under circumstance where the nature of the thing is obvious.
Change-Id: I27b4a73639728893d053b2e7ba65cb745f0ffe83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... and use it from within new SynchronousProcess functions
taking CommandLine arguments.
Change-Id: I5d7f83727cbb22f03b1a79b1645db95514c66033
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and extend the idea to addArgs(list)
Change-Id: Ia5423ee5ab96835b4adc23b72749e9c13892ee83
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Causes less #include hassle when using downstream instead of
command/argument pairs.
Change-Id: I0fa0d016374df0b8e0a22f3786623652af684d36
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This is meant to be helpful to piggy-back device information
in situations where the file resides on a remote file system.
The approach taken effectively duplicates the path data of the
url if the url constructor is actually used, but does not rely
on lossless path/fromPath conversions as it leaves the non-url
code paths unaffected in all situations.
The total overhead is deemed acceptable as the common use case
only default-constructs the m_url member which only sets a
pimpl nullptr.
Change-Id: Ie441cb1355ce086507333c31c7356ae5e6d10b96
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... and start using it. The plan is to replace all appendPath() uses.
Change-Id: I555bcfa742b99b0951b98b0c0e707422c348fadb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... by a non-mutating .stringAppended, doing the same.
Change-Id: I7adb6cae3415942cc9a80088bd75cda9d577d4a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
More consistent with the fromString case and avoiding false
conversions QString -> QFileInfo -> FileName in case the
inheritance of QString suddenly disappears.
Change-Id: Ib14646ab1a660fd45dd1ea6862a0b5faa52ad0e3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Believe it or not, they exist :)
Git for Windows installs all its exectables as hardlinks for instance.
Logic copied from qfilesystemengine_{win,unix}.cpp in Qt.
This amends commit 118f713eb4.
Change-Id: Iafc64be4b2150378c7f9676fda0e01a43cd8b7cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Overloaded functions are ugly to use in algorithms like transform().
Change-Id: Ia4f191e1cd9a21ceb99dec23a8f4fd1ce5f24182
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The PIDLIST_ABSOLUTE item returned by SHParseDisplayName has to be freed
again by ILFree according to the documentation of ITEMIDLIST structure.
Change-Id: I29eb7576600287cdc8380e81a83ce2af79e13e33
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
In case isRoot() returns false, but cleanPath fails to find the parent
directory, return an empty string.
For example: QDir::cleanPath("D:/..") returns "D:/.." on Windows.
I'm not aware of any concrete case when this can happen, but let's be
cautious.
Change-Id: I0f4af5f5c11bb768d99d90290a4a1a6a1bda7c27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
It breaks cross-compilation on linux/mingw.
This reverts commit 1c014ed3d9.
Change-Id: I3e8183ec318541a4393ad242eefbdeaa78b7be44
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Although Windows is case insensitive, and lower case always works, Clang
complains:
Lexical or Preprocessor Issue: warning: non-portable path to file
'<FooBar.h>'; specified path differs in case from file name on disk
Change-Id: I8f94e9fb62f6afec8aa6b9d08a7c78f6ba8a4435
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
As exercised by the test directories as Utils::FileName are actually
supported. The resulting fileName() is empty.
Change-Id: Ie20ac58c1d0f416d711c8cc3281054c0d70c449e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Fixes warnings
"Empty filename passed to function"
(introduced by qtbase 0dee566e98f5ff4f224e596de1c04de4f9685df4)
emitted when running Qt Creator against 5.10.
The warnings originate from Kit::icon().
Change-Id: I501914195b8e4d340fd02362b215ffc6e3dc99d4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>