Commit Graph

154 Commits

Author SHA1 Message Date
Tobias Hunger
a8ea31bf09 FileUtils: Add static method to construct FileNames from Latin1
Change-Id: Ida513eb0537e2ef0c55887d0df21de956e85e983
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-02-11 10:46:09 +01:00
Tobias Hunger
2d4cfc90fc Make sure to generate qmake friendly file names
According to Ossi the only safe characters in a path for qmake are
alphanumerical, underscore, dot and dash.

Task-number: QTCREATORBUG-10980
Change-Id: Ibacbfeb7f04f1f0524093f1d8fce637ea4ae6fd6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-06 17:30:46 +01:00
David Schulz
0eea7ca90b Utils: Fix getting a case sensitive path on windows.
Until now we used GetShortPathName which relies on having 8.3 paths.
This short path names are converted into long names which also corrects
the case. The 8.3 paths can be manually deactivated via the fsutil. When
this is done GetShortPathName does not return a convertible path string.

If the case isn't corrected on windows we are opening multiple editors for
the same file. For example, when reaching a breakpoint when using cdb or
opening an entry from the issue panel generated by the msvc compile.

Task-number: QTCREATORBUG-11199
Change-Id: Ic04055685e0e9bbe0d45cde20563929b7370695d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-01-31 12:02:17 +01:00
Daniel Teske
5fb2f2d652 Utils::FileName: Rename append to appendString()
The function's operation of simply appending the string as is would be
fine if FileNames were strings. But they aren't, so the function name
should be intentionally ugly to stand out.

Change-Id: I85e16844e2d69cacb6566c538182b84300c45161
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-01-09 14:14:03 +01: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
Orgad Shaneh
4de3b94840 Crossify normalizePathName
Denoise usages

get{Short|Long}PathName are now static. They're not used anywhere except
in normalizePathName.

Change-Id: Ief277b6d828faadd98ec7faa39dd682bfaa8805f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-24 10:38:36 +02:00
Eike Ziller
63ff745213 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/libs/extensionsystem/pluginmanager.cpp
	src/libs/extensionsystem/pluginspec.cpp
	src/plugins/coreplugin/basefilewizard.cpp
	src/plugins/coreplugin/coreplugin.pro
	src/plugins/coreplugin/coreplugin.qbs
	src/plugins/coreplugin/editormanager/ieditor.cpp
	src/plugins/coreplugin/externaltool.cpp
	src/plugins/coreplugin/icore.cpp
	src/plugins/cpptools/cppmodelmanager.cpp
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/find/ifindfilter.cpp
	src/plugins/projectexplorer/buildstep.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.cpp
	src/plugins/vcsbase/vcsbaseeditor.cpp
	tests/system/suite_debugger/tst_simple_analyze/test.py

Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
2013-09-27 10:44:32 +02:00
Tobias Hunger
0479abdcd7 QDoc: Fix QDoc warnings
This patch fixes ~1100 warnings from qdoc

Change-Id: Ia9555db675acbf8083b2f87d9855a62a3a34ccb9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-09-26 09:56:22 +02:00
Leena Miettinen
efbecf21db Doc: edit utils docs
Use \a for all attributes in function descriptions
to avoid QDoc errors. Do not use \param, because
it is not a valid QDoc command.

Do not use \returns as it does not exist.

Do not use \brief for functions. It is not obligatory, so
rather than add them for all functions, let's consistenly leave them out.

Fix typos, grammar and style issues, and punctuation.

Change-Id: Ib8f296f93976265bb93dbeab40c5b47156518122
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-09 12:55:00 +02:00
Tobias Hunger
52a41ecb0c Qt4BC: Simplify shadowbuild/builddirectory handling
Change-Id: Id46a239588d21b6aa5d4c43e4d85b52a04bd17ab
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-28 11:39:29 +02:00
Eike Ziller
6c8f87556a Fix build
Change-Id: I18dc32ca33f9ac50a3fc8411d075f16474d54f16
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-27 14:16:04 +02:00
Orgad Shaneh
76c30832de FileName: Support "~ -> homePath" substitution
Change-Id: Ie1ca69582cfd8893b0616e51d2d5c1b13e987b69
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-27 12:53:03 +02:00
Leena Miettinen
41411165ba Doc: use standard wording in \brief commands
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."

Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-20 11:22:47 +02:00
Tobias Hunger
c6cbc97a5c FileSaver: Do not rollback if we never opened the file
This will silence some warnings about removing files with empty
filenames which we get due to trying to remove a file we never
managed to open.

Calling finalize() unconditionally is the right thing to do here
as that processes and/or displays on error message to the user
if there is any.

Change-Id: Ibe7d07233f2c2698e53a7ad21041bc5cc4fcac0e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-05 10:40:41 +02:00
David Schulz
6c12a06029 Editor: Added Dialog for read only files.
Task-number: QTCREATORBUG-2851
Change-Id: Ic47a5a1833650e31b4e27d0a01259d6b398a6415
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-08 10:16:11 +02:00
Friedemann Kleint
aebf19eabd Clean headers in Utils.
Forward-declare QGraphicsOpacityEffect in DetailsButton,
QProcessEnvironment in Environment, QFileInfo in fileutils,
QUrl in IWelcomePage, FancyLineEdit in PathChooser and
remove unneeded headers.

Change-Id: I7d5f273530dd2059bbdaf0899f0a3bc7e49e8482
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-03-19 17:19:26 +01:00
Debao Zhang
7cebfa6c0b Cleanup preprocessor statements
Qt 4.8.0 or later is required to build Qt Creator.

Change-Id: I4d836d0f17fe8f0e3fc5757d4f08111b87edee67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-22 16:00:38 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +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
Oswald Buddenhagen
2e0e108670 cleanPath() already implies fromNativeSeparators()
Change-Id: I125e0394eadd130d7515614d7417479d2ccb5bdc
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-06 15:41:37 +01:00
Eike Ziller
d5d1c5e394 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/genericdirectuploadservice.cpp
	src/tools/qtcreatorcrashhandler/main.cpp

Change-Id: I830287691e7085fe9c94597e23ec7be64eb8be42
2012-10-09 11:50:17 +02:00
Tobias Hunger
32e486a9fe Fix copyRecursively not returning when it should
Change-Id: I5d81ede970340e11d789564d9153284236ea426d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-08 15:13:43 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
Eike Ziller
68c796e244 Merge origin/2.6
Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
	src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
	src/plugins/cmakeprojectmanager/makestep.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: I153295bad2d97609d96d28945e9f942c5b46b2da
2012-10-05 20:51:31 +02: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
Nikolai Kosjar
9483408fec Locator on Linux/Mac: Show ~ instead of $HOME in paths.
With this, you will see more of the "relevant" path.

Change-Id: I03c4c7bd2bdaa9148c70a68678306e259f9c7204
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-11 15:42:58 +02:00
Christian Kandeler
6e09fa8c70 Utils::FileUtils: Use Utils::FileName for file paths instead of QString.
Change-Id: I9ee4c0760820e9299e238c116936ce8ef140c727
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2012-09-07 09:53:14 +02:00
Christian Kandeler
3c6f76d16c HostOsInfo: Add some more useful abstractions.
Namely:
- path list separator
- executable suffix
- file name case sensitivity

All of these are duplicated in various places in the current Creator
code.

Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-05 13:54:48 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
The class' member functions are intended to be used
instead of the Q_OS_* macros in all contexts where
the latter are not syntactically required.
This lowers the likelihood of changes made on one
platform breaking the build on another, e.g. due to
the code model missing symbols in #ifdef'ed out code
when refactoring.

Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa
Reviewed-by: hjk <qthjk@ovi.com>
2012-08-27 17:00:03 +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
Konstantin Tokarev
9335392032 Added overload for FileName::isChildOf
Change-Id: I9c5b0e7f3eda13ef3b6903723c27267d090b9d24
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-07-18 13:19:23 +02:00
BogDan Vatra
dab8d6d0e7 Don't add a '/' if the filename is empty
Change-Id: I66d530d70cac17365f3d5925eb76318fe774470f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-07-09 14:23:35 +02:00
hjk
5b0bf61640 qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts.

Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-17 09:53:44 +02:00
Aurindam Jana
c1596926ea FileUtils: Remove symbolic links when removing a directory
Task-number: QTCREATORBUG-6898

Change-Id: Idef8eee191d6d5b8f66046a4e6c6891a54262d2e
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
2012-03-27 20:53:17 +02:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01: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
Eike Ziller
841d5a9939 Fix FileName::appendPath (and through that Qt abi detection on Mac)
appendPath was actually not ensuring a '/' between the parts, contrary
to what it claimed.

Change-Id: I80b703160fc05c099db9b461366c91a55525038b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-18 11:02:45 +01:00
Friedemann Kleint
ac54974b32 Utils: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: I5cd5607fcd3311915217a1615b948587ef808cfa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-06 09:31:14 +01:00
Daniel Teske
f5d4287123 Use Utils::FileName for various bits in QtVersion
Change-Id: I3afc3a4f2e0dd2671279c2d071779f1d7b277849
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-12-07 15:05:31 +01:00
Daniel Teske
e9c079a648 Add FileName isChildOf/relativePath and endsWith and appendPath
Needed by qtversionmanager

Change-Id: I4d455298e809b744ae3663493914db6e31f372a6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-12-06 15:54:24 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Daniel Teske
041fe253e3 Fix qt namespace compile, move qHash(Utils::FileName) to qt namespace
Change-Id: Ic099176bc204ef25de34e80d8e592c2229a41aab
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2011-11-09 15:18:29 +01:00
Daniel Teske
7daf1c58af Introduce Utils::FileName class
Change-Id: I1a0573ad8fcf2efc945ea74d9f9851ea7762a210
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-08 20:13:35 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Oswald Buddenhagen
1b9c9f74c7 move api docs to ... the api
\fn is a fallback for stuff from headers

Change-Id: I7c5a187bf2cfae2682fd267f30da479488d2592e
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
2011-10-21 15:59:20 +02:00
Vlad Brovko
7d22c10143 don't rewrite symlink on save, rewrite target instead
Merge-request: 399
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

Change-Id: If81446a8fd49e9de7611c2f09abd39af2c9c930d
2011-10-20 22:33:54 +02:00
Christian Kandeler
164cd970e5 FileUtils: Add some safety checks to removeRecursively().
Change-Id: I657f8416081ce7d253f4a3ef9722a39ac34b5f24
Reviewed-on: http://codereview.qt.nokia.com/1955
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-07-22 11:15:23 +02:00
Daniel Molkentin
15732d1bd2 RemoteLinux: Move generic Dir/File functions into Utils.
- Make error parameter an optional pointer
  for consistency with DirUtils::copyRecursively()
- Add documentation

Change-Id: I6671142341dbdcf2c8ca1118c35ea05548920609
Reviewed-on: http://codereview.qt.nokia.com/1090
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2011-07-06 12:38:11 +02:00