Commit Graph

60 Commits

Author SHA1 Message Date
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
jkobus
696b0a8b80 Introduce ExitCodeInterpreter, useful when exit code != 0 is valid
Task-number: QTCREATORBUG-10207

Change-Id: I3b440d40a968f09afc613b686ee50da6465ad88e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-26 14:25:39 +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
jkobus
87a5c100af Remove unneded break
Change-Id: I1dca1acc82f9718b62a6026dad564430d7fa65e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-24 14:18:49 +02:00
Orgad Shaneh
27e53f746f VCS: Enable terminating a command
Change-Id: I2160a22e300aca9b38e28257375c8e0be2026d12
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 11:49:08 +02:00
Orgad Shaneh
cc2610aa71 VCS: Enable calling runVcs from non-GUI threads
* Introduce a proxy class for thread synchronization
* Use signals for appending text to output window

Change-Id: Iecbb010e6b6e9dab27d9862a43dafa450f2bb1f8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-20 12:53:33 +02:00
Christian Kandeler
6d68422026 Utils: Introduce new class OsSpecificAspects.
This is basically a generalization of HostOsInfo for
a system that might not be the host system. HostOsInfo
is now implemented in terms of the new class.
Prospective use case: Untie Utils::Environment from
the host system.

Change-Id: If333b96674652109fcb0ad79f75aaaf5e86e17e3
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-08-16 08:05:41 +02:00
Orgad Shaneh
578d18691a SynchronousProcess: Replace last QByteArrays with QStrings
Matching \n in a QByteArray is wrong. For example, it detects Ċ (U+010A)
and ਛ (U+0A1B) as end-of-line

Change-Id: I9c03d0b19da3d328e706ff2c89f09713be870f34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-08 11:15:59 +02:00
Orgad Shaneh
208aeb79ed Introduce Utils::SynchronousProcess::normalizeNewlines
Replaces \r\n? with \n.

Some console applications (e.g. git-push, git-rebase) use \r alone to
move the cursor to the line's beginning. This should be replaced by \n
rather than just be erased.

Change-Id: I8d614d2b471e59decdbfa7f173ffa7fbdb11759b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 04:52:58 +02:00
Orgad Shaneh
3e117b125d SynchronousProcess: Use the same codec for stdout and stderr
Change-Id: I4a7e5a5748dd9e16b1e62b3879cce8ccab0f3e01
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-02 10:29:13 +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
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
Friedemann Kleint
747ba7f935 Synchronous process: Show binary in message box for Qt 5.
Change-Id: I74b1c568593eea92f52565221789224d7d0090eb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-02-20 16:22:55 +01:00
Orgad Shaneh
9dd3a14f28 Prevent infinite loop when user chooses not to terminate hanged process
Happens if the process is already terminated

Change-Id: I660779dc701d1fe8b41562f68f0ce95c6e87058f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-20 15:50:13 +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
Orgad Shaneh
2ab6416a34 SynchronousProcess: Show "process not responding" dialog once
Change-Id: I81834452d21f3f996103fb93b3b645f4f87d6251
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-15 17:21:25 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01: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
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
614bb33589 qbs files: Consolidate includePaths in QtcLibrary and QtcPlugin
Avoid using "." as includePath when it is unneeded

Change-Id: I9bc6f4ebe50409f49782520033fd5f098aed10d0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2012-10-05 10:18:56 +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
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
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
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
Tobias Hunger
359ebf3281 Use native separators in user visible string
Change-Id: Ic41e71e0f21fbf000202e8fc05262f5615b46c1d
Reviewed-on: http://codereview.qt-project.org/6066
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2011-10-05 15:33:54 +02:00
hjk
bfd9fcbb3c all: some m_d -> d style
Change-Id: Iac1f12980bf47666007817cfb2c64a6d1e9b780e
Reviewed-on: http://codereview.qt-project.org/4477
Reviewed-by: hjk <qthjk@ovi.com>
2011-09-08 17:42:14 +02:00
Tobias Hunger
cdb3162c60 Git: Use native separators in error messages
Change-Id: I52cdcd2b34311796eff80cebd0b56f8996186fd0
Reviewed-on: http://codereview.qt.nokia.com/1446
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
2011-07-12 12:38:49 +02:00
Orgad Shaneh
c8ca023b58 Close write channel of external processes
Prevents external process from waiting for user input.

Merge-request: 347
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

Change-Id: Icfd3e39a83ba945ebf89c1cbb2157e2a1c9f4d89
2011-06-14 16:47:51 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Tobias Hunger
72ae03ba80 Utils: Fix possible crash in SynchronousProcess
Disconnect before deleting our data: Otherwise we will get called
via our signals again and then access members that were already
deleted.

Task-number: QTCREATORBUG-4361
Reviewed-by: Friedemann Kleint
2011-04-15 13:33:13 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Friedemann Kleint
505256fab9 API-Documentation: Add the Utils-library.
Fix API after doc template change.
2011-03-02 17:14:19 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Jarek Kobus
da79614008 Translator corrections 2010-09-29 12:48:50 +02:00
Friedemann Kleint
91c4b0305c Synchronous Process: Add a message box for timeouts.
Optionally prompt the user whether a process should be killed
after being non-responsive. Do the same with readProcessData.
Add a way of creating a process without terminal (UNIX)
for suppressing SSH password prompts.
2010-05-21 17:41:51 +02:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Friedemann Kleint
196d7b0cf4 VCS[git]: Handle stderr in SynchronousProcess::readDataFromProcess
Timeout handling cannot rely on bytesAvailable(), which applies to
stdout only in the normal case. For 'git pull', which output its
progress on stderr, stderr needs to be checked separately.

Task-number: QTCREATORBUG-777
2010-03-01 12:29:10 +01:00
Friedemann Kleint
a1fed931c4 VCS: Fix time-out handling for synchronous processes.
Introduce static utilities to Utils::SynchronousProcess
for synchronous processes that mimicks the handling
of Utils::SynchronousProcess (apply timeout after no
more data are available on stdout/stderr as opposed
to waitForFinished()).

Task-number: QTCREATORBUG-777
2010-03-01 10:06:32 +01:00
Friedemann Kleint
f7cc04e25e Perforce: Use new VCSBasePlugin class.
Use relative paths with -d-option, check for symlinked depots.
Add revert-actions.
Use different context/kinds for editors, suppressing warnings.
Introduce common run-function.
2009-12-11 16:43:39 +01:00
Friedemann Kleint
5948e284bb Rename namespace Core::Utils into Utils
Also move Designer::Internal::FormWindowEditor ->
Designer::FormWindowEditor.
2009-10-05 11:06:05 +02:00
hjk
93cbef8724 long live the king 2009-08-14 09:30:56 +02:00
Friedemann Kleint
7ff46c0e53 Allow infinite timeout in synchronousprocess, make openProjects public. 2009-07-20 12:42:22 +02:00
Friedemann Kleint
9a1cafd1b4 Fix up the Subversion plugin.
Add some functionality needed for CVS.
2009-07-14 17:20:20 +02:00
Jason McDonald
884b7af769 Update license headers and sales contact details.
Reviewed-by: Trust Me
2009-06-17 00:01:27 +10:00
Alessandro Portale
c757c3f458 Rename QWORKBENCH_UTILS_EXPORT to QTCREATOR_UTILS_EXPORT
Rename QWORKBENCH_UTILS_LIBRARY to QTCREATOR_UTILS_LIBRARY
2009-05-08 16:42:50 +02:00