Commit Graph

26 Commits

Author SHA1 Message Date
David Schulz
fc53dc27e4 Move filename line split into Utils::Link
Since we already have a container for file path, line and column move
the parse function there.

Change-Id: I5d0d97d271c5aaeb618e1a303b02cc6514e94e81
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-25 17:32:45 +00:00
hjk
a71bb36682 Utils: Centralize FilePath case sensitivity handling
This could or possibly should the target device's file name case
sensitivity into account by diverting to IDevice. However, as this is
expensive and we are in time-critical path here, we go with "good
enough" for now.

The first approximation is "Anything unusual is not case sensitive"
which is better than "Any device equals the host".

Change-Id: Ib3d4a627abebd96a7285a855af66e0c800767767
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-19 13:02:05 +00:00
hjk
2db9ebc615 Utils: Rework FilePath guts
This replaces FilePath::m_url by explicit host and scheme members

This removes the unclear duplication of information in m_data and
m_url.path() and avoids syntactic restrictions a real url has on
scheme and host and complex (and potentially lossy) url parsing:

    QUrl url;
    url.setHost("1234");
    assert(url.host() == "0.0.4.210")

The toString/fromString methods now accept strings of the form
scheme://host/path, mimicing the use of urls so far.

Relative remote paths are representable, their toString() output
looks like scheme://./host/path and can be parsed back by fromString().

Change-Id: Id3b52c270b228e23834faa3f44daad8b1718b654
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-19 11:41:42 +00:00
Jochen Becher
05324cf21f Extend Utils::FilePath for relative paths
The new methods allows converting a path to a file or directory into a
path relative to another path to a file or directory.

Change-Id: I8c743d5bced9fec81b05ce94ac2b7bec307d9028
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-19 04:55:54 +00:00
Eike Ziller
097892cc10 Merge remote-tracking branch 'origin/4.10'
Change-Id: I887fbf79ebfdf2af2719cb0d8aa56ab3dcb08fab
2019-09-17 16:20:52 +02:00
Christian Stenger
6808c891fb Tests: Fix expectation for parent of COM port
Keep expected path in line with result when using QFileInfo.

Change-Id: I8d323212d1627b81de01582c368a4e9ffbba734c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-09-12 08:50:22 +00:00
Christian Stenger
10b32863ca Tests: Fix compile
Broke with e027ed5e96.

Change-Id: Ic79537865f42c4d6190d262fcf73399ed42b3035
Reviewed-by: hjk <hjk@qt.io>
2019-08-14 11:39:49 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
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>
2019-05-28 12:23:26 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Tobias Hunger
954569387c Update License according to agreement with Free Qt Foundation
* Update license information in tests directory

Change-Id: I311441dd37d053ca3175e44b284258e232ee93e0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 16:01:06 +00:00
Davide Pesavento
d3583883a8 Tests: add missing column to tst_fileutils::parentDir testcase
The third column was accidentally removed from one data row in
commit 271794fbc9

Fixes the following fatal error:
QFETCH: Requested testdata 'expectFailMessage' not available, check your _data function.

Change-Id: I4a09df2e044b4dcee1ed2ffc589082a3e2601232
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-10-19 09:00:31 +00:00
Christian Kandeler
271794fbc9 Remove some superfluous QT_VERSION_CHECKs.
5.4.0 is required these days.

Change-Id: I0dc4c788b058f4c3fd2b9026fd7d6c7ab2840884
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-30 10:20:45 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
156228aeb8 Tests: Break trigraphs
Change-Id: I9bc0e5f6080adfb518ff6e4d22052013728e6458
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-03 10:10:37 +00:00
Orgad Shaneh
97d957e3e3 Utils: Introduce FileName::fileName()
* Replacement for QFileInfo::fileName()
* Supports additional path components

Change-Id: I2b3e3dfb02617c8f98f1d67e16396bed97f97526
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-28 11:42:41 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Orgad Shaneh
e62e47f0d0 Tests: Cleanup FileUtils test
QTestData converts raw string as Utf8.

Change-Id: I201f283ce16732dfc85927fdcc9bb15c230ec16f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-12 12:03:37 +01:00
Christian Stenger
cd8dc3ae12 Tests: Fix tst_fileutils for Qt5.4+
Change-Id: I65b4eb8dff91c69bff50c63cd42a4894df0470f0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-18 14:43:22 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Orgad Shaneh
34354148db FileName: Fix isChildOf for some corner cases
empty directory has no children, and root directory was not handled correctly

Change-Id: I1936eab96aef0a3be462f705c60f1f26995be68b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-10-04 16:50:02 +02:00
hjk
6a7cf405bd rename QtDebug to QDebug
More uniform.

Change-Id: I1c6057981f4c2b3170a4e69f0674fe4caf1143a2
Reviewed-by: Robert Loehning <robert.loehning@nokia.com>
2012-08-06 14:55:08 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Tobias Hunger
0df375a08a FileName: Add method to find parent directories
Change-Id: Ia8382e3f7a9312e0878cce041723973ccf751aae
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-25 17:15:17 +01:00