Commit Graph

89 Commits

Author SHA1 Message Date
hjk
3b84a6dc88 Use ICore::dialogParent for message boxes without parent so far
Change-Id: I2ee35796b2c041e6ea2ae6bd677e10167451d1b8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-03-12 12:06:10 +01:00
Tobias Hunger
28feeca155 VcsManager: Add convenience signal for Vcs config changes
Change-Id: Iac7b80fca94eee428650f0a53af8c2c1c46e6f89
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-03-05 16:13:38 +01:00
Tobias Hunger
c5dfa1f2bf VcsManager: Add method to get additionalToolsPaths from all IVcsControls
Change-Id: I87910a5a3ccc8e9e00d1b9081ea860832b9fe576
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-03-05 16:13:31 +01:00
Eike Ziller
4251265a63 Unify text on buttons that open the options dialog
We have many buttons that open the options dialog, and many of these use
different terms.

Change-Id: I073fe2a23569c6f4174a2fb6567359c89cb2427c
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-02-25 16:55:25 +01:00
Christian Stenger
7695df58ea Core: Fix plugin unit test on Win
Change-Id: I92077290140c7f473c2f73ece5da1a30f17633d4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-02-25 11:31:38 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +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
Tobias Hunger
f82b12e36c VcsManager: Add unit tests
Add some unit tests to the VcsManager to test the detection and
caching of version control systems.

Change-Id: I2b3f9218c12aebde8a8120fc869efc76c36ae41a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-12-10 16:31:45 +01:00
Tobias Hunger
630e535658 VcsManager: Clear topLevel directory when necessary
Clear the topLevelDirectory when being asked to find the version
control system responsible for directory "".

Change-Id: I8806ebff1200f0fc936715ffab94acf1f10cb386
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-28 15:06:22 +01:00
Tobias Hunger
2acc80dfeb VcsManager: Make instance() method return VcsManager * again
This is more convenient as that fixes the code completion for slots
and does allow for calling slots on the singleton without casting.

Change-Id: I1233f449d2b9c9276a29f35d8f8c91c40ec5b352
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-27 16:36:29 +01:00
Tobias Hunger
d3e7123d79 VcsManager: Remove two unused methods
Change-Id: Ifbaad8bc772ed6911333efe324d9254b6bce5094
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-11-26 17:39:07 +01:00
Orgad Shaneh
0282b97c26 VcsManager: Fix soft assertion when directory is managed by 2 VCS
In case 2 VCS manage the same directory, topLevel will be the same
for both. Chopping tmpDir gives a wrong directory for the second VC.

Change-Id: Ie20c716cf8b713dae0d5d8ecc4c947f1c5029544
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-11-20 10:12:11 +01:00
Friedemann Kleint
50f522b2f7 Remove most trailing newlines from translated messages.
They are a hassle for translators and reviewers alike.

Change-Id: I07c1b61e8b6719e54fdc1f69cf63f573119a6776
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-22 08:05:09 +02:00
Orgad Shaneh
1cf1159f41 VCS: Prevent soft assertion for non-existent directories
Blame in a renamed directory then blaming some revision with the
previous name triggers an assertion

Change-Id: If89a268a776df1c6e0061fd5828492b0200237b4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-11 15:43:17 +02:00
Orgad Shaneh
fdb6ef90fc VCS: Do not try to add files that are already tracked
Task-number: QTCREATORBUG-2455
Change-Id: I4b1fa9676ad4a8d7293e035e4d6103251bef8aee
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Cristian Tibirna <tibirna@kde.org>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-10-11 12:43:25 +02:00
hjk
267e441af4 Apply 'static' pattern to VcsManager
Adapt user and surrounding code.

Change-Id: Id2648f82a9cbbd0ad0bfb91f6958b8cee7ea29cc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-03 12:01:24 +02:00
Christian Kandeler
72d173829c Remove superfluous include paths from project files.
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
    a) Paths that are already set in more general files
       such as qtcreator.pri.
    b) Paths that serve no purpose at all, possibly
       left over from earlier versions of the project.
    c) Paths that act as workarounds for wrong include
       statements of the form '#include "xyz.h"', where
       xyz.h is not in the same directory as the including
      file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.

Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-02 17:28:17 +02:00
Radovan Zivkovic
f6fc78eaea Dialog that prompts to add files to VCS is now resizable.
Change-Id: I8b440c76255b0cd2b952539ad4945443e293a661
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-08-15 14:22:45 +02:00
Eike Ziller
354cd410b0 Make document model static and add some document related methods
Change-Id: Ibcb863e67a2433529c9d2b6dec237f9d8b1d8d50
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-12 11:55:59 +02:00
Eike Ziller
2f8f083b40 Unify pattern used for privates and constructors
In the 'managers' from ICore

Change-Id: Iab98c9e0947b759843a62e3777ba46be3b304b06
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-07-01 11:52:35 +02:00
Eike Ziller
cabef7580e Fix possible crash when looking for version control for directory
Task-number: QTCREATORBUG-9656

Change-Id: If8babdb942830bd11fe360a311c57b75312248be
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2013-06-26 14:17:27 +02:00
Orgad Shaneh
dbb6bcf5b0 VcsManager: Hide unconfigured VCS message after VCS is configured
Still requires changing editor to refresh...

Change-Id: Ia8524bfcbdbc0f6b6cff02ff373d6edab129b38a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-17 10:43:30 +02:00
Orgad Shaneh
17106e69c4 Suggest configuring VCS if it is unconfigured
Change-Id: I6ef3c615070f055e688c94d6901d8c9a861b9928
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-11 13:34:04 +02:00
Orgad Shaneh
808f4492c5 VCS: Add a property to Command to indicate expected repo changes
Change-Id: Ia6c929ae64008dcb37695a5358c44096a893e0c4
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-10 10:37:36 +02:00
Tobias Hunger
d96535bd23 VCS: Clear directory cache when availability of VCSes changes
We could have gotten new VCSes or existing ones might have gone,
so clear the cache of which VCS manages which directory.

Change-Id: I87a1b9c894e2867773ea4df221e463adb14f4ee9
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-06-04 10:38:14 +02:00
Orgad Shaneh
7b5b5b13b4 Ignore unconfigured VCS
Change-Id: I4a63734793debfcb37283257bb7cbf4b1153197f
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-31 14:41:55 +02:00
Friedemann Kleint
cf5e615f6d Clean headers in Core-plugin.
Change-Id: Ie79d334765ca5c6a034fa2f5eccff5d45b481975
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-27 09:31:54 +01:00
Orgad Shaneh
29f8d15332 VcsManager: Prevent parents caching when VCS not found
Editing a file inside .git directory is intentionally not detected as
managed by Git. This causes cache override for the real toplevel with
a null version control

Change-Id: I8a333c38fb160e3dba4f0ee4677b68c4c619ac6d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-12 13:55:06 +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
Tobias Hunger
98aa0909ac Vcs: Fix cache-checking for non-existing directories
Change-Id: Id314a40372feeddc61de89eae3684d502ea20d02
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-30 11:38:13 +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
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
Orgad Shaneh
a44aa55502 Add whitespace after control keywords
find -name \*.cpp -o -name \*.h | \
  xargs sed -Ei 's/ (for|foreach|if|switch|while)\(/ \1 (/g'

Change-Id: I9efdff4bf0c8c01a52baaaeb75198483c77b0390
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 20:20:46 +01:00
Tobias Hunger
8c980f5a4e VCS: Work with canonical paths when looking for toplevel directories
Change-Id: I2b2f3f76f04af298dcc6f38e1c5f1dd4555e2024
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-10-22 16:08:30 +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
Friedemann Kleint
bf980649d2 tr()-Fixes for 2.6.
- ProjectExplorer::Profile should appear as 'Target' in the UI.
- Fix messagebox title capitalization
- Fix Q_DECLARE_TR_FUNCTIONS to contain fully qualified class
  names, add where applicable to replace
  QCoreApplication::translate().
- Introduce message utility function for the commonly used
  'No tool chain set up for this profile' message to
  ToolChainProfileInformation.
- Introduce message utility functions related to adding files
  to version control to VcsManager to be shared by QmlJsEditor.
- Fix typos.
- Remove QObject::tr(), QCoreApplication::tr().
- Do not translate diagnostic console warnings of
  QmlProfiler.

Change-Id: I6cee717a504796ef39f6eae58f552c5c8630adf3
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-27 17:08:12 +02:00
Konstantin Tokarev
728579ef52 Added VCS integration to ResourceEditor.
Made add and remove operations of ResourceEditor VCS-aware. Also, remove
operation now can remove files from filesystem.

FileUtils::removeFile() and VcsManager::promptToAdd functions were
extracted from ProjectExplorer to prevent code duplication.
RemoveFileDialog was also moved to coreplugin.

Change-Id: Ia51127288030e52ce9475b369e56ea034dfa5d1e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-07-19 22:26:47 +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
Eike Ziller
e3c354d8f2 Make PluginManager mostly static.
Change-Id: Ib938aa4999c7c418a82304c5cca2e8748ef9d228
Reviewed-by: hjk <qthjk@ovi.com>
2012-06-19 16:11:40 +02:00
Friedemann Kleint
2193915cca Start on a gerrit plugin as a sub-plugin of git.
- Add a gerrit window that shows a list of changes
  and buttons to display, apply or check out
  a change.
- Uses the new Qt 5 Json API or the utils/json
  classes for Qt 4.

Tested-by: Tobias Hunger <tobias.hunger@nokia.com>
Tested-by: Orgad Shaneh <orgads@gmail.com>

Change-Id: I14c6c2c2de8f95fb785752c7319be8638b386a1e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-04-26 14:34:41 +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
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01: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
21c0cdee40 Core::Filemanager: make some methods static
This follows suit to the ICore changes.

Change-Id: Iba2de1b1e3f2574fd1459892eae702e6af1cc7dc
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-25 19:23:11 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Tobias Hunger
fab53ac364 Replace Q_ASSERTs with QTC_ASSERTs
or even with QTC_CHECKs.

Change-Id: I6df67f088bb2f944f0a1abd751fdb192db2be298
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-13 14:34:22 +01:00
Tobias Hunger
e4a0bdd8e2 vcs: better sanity checking
Change-Id: I1d3b347d291e9f5bc6a873e5c99506371749c0ef
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-13 14:27:00 +01:00
Tobias Hunger
7d3ba0e9b4 VCSmanager: Fix QTC_ASSERTs
These tests are needed to make sure no broken data ends up in the cache,
causing inconsistencies in the cache. The asserts did a good job there,
catching a couple of issue, so I would like to keep them the way they are.

QDir is not needed at all as the data _should_ be perfectly fine already
anyway and should not be used if the asserts are not evaluated.

Change-Id: Icf113f8b02b6c7c7ba7498386b8465b2644daae8
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-13 14:16:45 +01:00
Friedemann Kleint
b82475b0e9 Change asserts() to soft-asserts in Vcs-Cache.
- Prevent crash when creating a project.
- Use QDir to normalize the path (as it is constrcuted in
  the assert anyway).
- Print proper warnings.

Change-Id: Ib6fa3c564aff20b73d6efc08ca3a13688fd97dce
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-12 11:20:57 +01:00