Commit Graph

27317 Commits

Author SHA1 Message Date
Orgad Shaneh
d3302d83a6 CMakeEditor: Replace member var with InfoBar call
This changes behavior. Editing a cmake file then building then editing
it again will display the warning again. It currently doesn't.

Change-Id: I8ecb31956102680e953a40dcb5e95bde819aa652
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-09 11:43:24 +01:00
Daniel Teske
68b9966bf2 Fix .ui code completion for some cmake projects
CMake generates the ui*h file in the directory that corresponds to the
CMakeLists.txt. Creator does not have the information whihch
CMakeLists.txt file includes the .ui file. This patch adds a crude
heuristic that searches for the right CMakeLists.txt.

Task-number: QTCREATORBUG-8509
Change-Id: I0f31d9766c6b5988a00ab618026ea052690dd649
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-09 11:38:39 +01:00
Orgad Shaneh
5f745365f1 AbiWidget: Hide abi selection if list is empty
It only contains a single options "<custom>".

Change-Id: Ifad2ea8cabdba6f302de5b2d6d49cb0b042bf4a9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-09 11:06:22 +01:00
Mehdi Fekari
75ab24a9fe Set a public GCCToolChain constructor
This allows to directly create a GCCToolChain with no need
to subclass/reimplement and register a related GCCToolChainFactory.
For some plugins (Qnx, Android), this enables to easily create and set
a GCCToolChain for a created Kit and avoid sublass ToolChain and ToolChainFactory.

Change-Id: I8a5865dcee6dbe3e20b976943a5cba75d162a962
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-09 10:31:38 +01:00
Friedemann Kleint
f9de22e4bd CDB: Fix dumping of QRect.
x2, y2 are inner points.

Change-Id: Ibbded22dd35da19894ad3678552519691b62e14f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-09 10:03:01 +01:00
Debao Zhang
4a32f1d821 use QSharedPointer instead of QRefCountPointer
Change-Id: Ie670448bf924e02720eae6db33f2a346e8ac0001
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-01-09 08:59:28 +01:00
Sergey Shambir
4435d55dee Qt4 project manager: removed extra call of variableValue()
Change-Id: I96a68aed65c868a8c57babc501ec746bc27c8781
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-08 18:24:53 +01:00
Sergey Shambir
06403e94ac Autotools: fixed crash when opening any project
Passed ctor param ignored, field set to 0 and than called

Change-Id: I34d8be9b11826d21506d8c1b2732e25f64593798
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-08 18:23:03 +01:00
hjk
18121bf420 Debugger: allow plain gdb's pretty printers to be used in Creator
Change-Id: If31fe1bce75bef4f4a687c51ef57381f5083814c
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 17:54:45 +01:00
hjk
7459f8805b Debugger: allow automatic script loading
Change-Id: I65c79a5cf226f9ce73ef4cb0ae66387fc1c74112
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 17:54:38 +01:00
Friedemann Kleint
78d134cdcd Debugger: Add Image viewer with color picker and context menu.
Change-Id: I31673da5ba85e87c9819059a9e6806b5deecff1e
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 17:16:28 +01:00
Orgad Shaneh
7bd95a4f7a Git: Force showing untracked files if needed
Might be disabled by configuration. Override it.

Change-Id: I262c5c34a840811b635b460c7759f4cfbe93ded6
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-08 16:32:55 +01:00
Francois Ferrand
5e8c3f4be7 C++: fix constructor definition parsing.
When a constructor is defined with a single, unnamed argument of a custom type without
extra type specifiers (const...), then the constructor was not identified as such.
There was an heuristic in case the constructor was in the class definition, but not if the
the constructor was defined later.

Examples:

class Arg;
class Other;

class Foo {
  Foo(Arg /*arg*/);               // working
  Foo(const Arg /*arg*/);         // working
  Foo(int /*arg*/);               // working
  Foo(Other /*arg*/)         {}   // working
};

Foo::Foo(Arg /*arg*/)        {}   // used not to work, fixed
Foo::Foo(Arg arg){}               // working
Foo::Foo(const Arg /*arg*/)  {}   // working
Foo::Foo(int arg)            {}   // working

Change-Id: I741e4ba62672ddc99a837fdcdc27996fba5ae6c7
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 13:36:43 +01:00
Christian Kandeler
110f0d8a9e Introduce new plugin attribute "disabledByDefault".
A plugin might be disabled by default for other reasons than being
experimental, e.g. because it is not expected to be needed by the
average user. This is probably becoming more relevant the more plugins
are added, since we want to keep the start-up time reasonable.

Change-Id: I87927596d5c78e14793c5e8d6f0548eff6b58d59
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 13:19:03 +01:00
Christian Stenger
88052bc493 Compile fix for Win
Change-Id: I486caa6d2c141067e2ef098c1d78b8a36761568d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-01-08 12:36:34 +01:00
Christian Kandeler
869a51fd6f Revert "SSH: Work around issue with dynamic_cast."
This reverts commit 6f7ce3f48e.
The workaround turned out to be incomplete and has therefore
been superseded.

Change-Id: Ic60cd810f72ca833c1725024d2816baf5ce47372
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 11:22:24 +01:00
Orgad Shaneh
050dbabd23 Fix compiler warning
pFlags might be used uninitialized

Change-Id: I78b308c9894797ca6258c82cab9d8dffab7e47bb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-01-08 11:15:22 +01:00
David Schulz
a7323614a0 Editor: Fixed endless loop in BaseTextFind
...when trying to replace some regular expressions that could result in
empty search results like ^, $ or \b.

Task-number: QTCREATORBUG-8464
Change-Id: I91a304d3609c3ec20437c698d53e6a1819dfb924
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-08 10:58:19 +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
73a2717bed VCS: Replace Q_ASSERTs with QTC_ASSERT
Also rename m to model

Change-Id: Ibb283dc2d5d0c306cbac9109a7e5fc6481ac86a8
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:27:06 +01:00
Orgad Shaneh
5abce3ab9f Git: Make branch lookup more robust
It might fail because a particular branch points to an invalid commit.
We don't want that to prevent display of all other branches.

Change-Id: I8fe427735351fc458c99396dc1f9d77bc948468e
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 17:48:27 +01:00
Orgad Shaneh
0917a067af GccToolChain: Remove unused variable
Change-Id: Id11af855460f301b04afcddedbc8a2af6d2f4bd8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 17:46:02 +01:00
Erik Verbruggen
cbf7142ba4 Added a pre-compiled header to be used by platforms that support it.
Change-Id: I0ff6ef8c3e6e8f4a02c2135da30be2f03f82c648
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-07 15:51:55 +01:00
Petar Perisin
81bf2ec154 Git: Auto stash for branches
Allow user to handle local changes when switching branches.

Task-number: QTCREATORBUG-8417
Change-Id: I62d615aadfbd81c8ae03f3cd292b98773a36e1e7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 15:33:20 +01:00
Petar Perisin
7df112b687 Git: Added Merge and Rebase
Added git functions - "Merge" and "Rebase"
They are in the "Branches" dialog:
- Merge - merge selected branch into current one
- Rebase - rebase current branch on selected one

Task-number: QTCREATORBUG-8367

Change-Id: I9ed306c64d5d4b7bd1d58730a5e1009f0bd4ec0e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 15:26:47 +01:00
Orgad Shaneh
2396f34fda VCS: Generalize selections preserving on model refresh
Default implementation is between O(n) (for identical models) to
O(n*m) (for disjoint models). If sort order is known, this
can be reduced to O(n+m), like in Git implementation.

Change-Id: I44662a22961311cb882601d20efa9d445f74748b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-07 14:29:14 +01:00
Orgad Shaneh
01084aaa38 VCS: Use SubmitFileModel in SubmitEditorWidget
Much cleaner

Change-Id: I090e5d04e5afae1023fa58eca1ef416ddc069165
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-07 14:11:10 +01:00
Orgad Shaneh
34db64c752 Move SubmitEditorWidget from Utils to VcsBase
It belongs there

Change-Id: I4b4cdacf32b0eab299d4b2d5258cd4d91a759907
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-07 13:43:23 +01:00
Christian Kandeler
e174e24d58 CppTools: Fix qbs build.
Change-Id: I0ef6e4419596b7cc0f8a574917fec5af94ff8832
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-07 12:55:25 +01:00
hjk
39d93f4f45 QmlProfiler: Reduce number of calls to get the same result.
Change-Id: Iea772405ecb55a2f556a1b50ec3712ed91de3d9d
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2013-01-07 12:11:50 +01:00
Erik Verbruggen
d51055979f Added a pre-compiled header to be used by platforms that support it.
Change-Id: If87cd649267cd3a48973580acab2227ad9d5ac44
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-04 18:01:46 +01:00
hjk
140b502903 C++: Highlight argument to gcc's #include_next extension properly
Change-Id: I90097e11689fbbb964fc4344a1e3ba60c718a1cf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-04 17:50:29 +01:00
Erik Verbruggen
fcb7e80f15 Added a pre-compiled header to be used by platforms that support it.
Change-Id: I4dd00dca652c1cb60c952ebc11b3c5f8767d4ecc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-01-04 16:38:52 +01:00
Erik Verbruggen
a5327edb4a Added a pre-compiled header to be used by platforms that support it.
Change-Id: I68930a302faf056dfa5e67c3ccbe3c43ce1b8c0c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-01-04 16:38:44 +01:00
Thomas Hartmann
3ea79b0398 Utils: fixing the compile for Windows
Without unixutils Creator does not link on Windows anymore.
The reason is FileUtils::showInGraphicalShell()
which calls UnixUtils::fileBrowser() and
UnixUtils::substituteFileBrowserParameters().

Since UnixUtils compile on Windows I added them.
Propably UnixUtils should be merged into FileUtils,
if they are used and make sense on all platforms.

Change-Id: I3fb49fb2c0c54fb9336298f006e2937ae29d413b
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-04 16:01:14 +01:00
Erik Verbruggen
38c940636e Fix compilation on Mac.
The methods Utils::UnixUtils::fileBrowser and
Utils::UnixUtils::substituteFileBrowserParameters are both declared when
compiling on MacOS, but their implementation is not compiled into
libutils. So this gives linker errors.

Change-Id: I0befb607dda0a83d681068f8236167ba88918460
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-04 11:09:28 +01:00
David Schulz
c385034502 Editor: Clean up source.
Change-Id: I37a430ba276b849666954bd164c2981aad1b4ee9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-04 10:53:19 +01:00
Erik Verbruggen
7b0f997963 C++: emit signal when project parts have been updated.
To be used in the ClangCodeModel, because there is no other way to find
out if the ProjectParts got changed.

Change-Id: Ie5681b4997adb9103499cf2864c81970cbd2be55
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-04 10:19:51 +01:00
Erik Verbruggen
b553055596 C++: Add ordering to the languages.
Change-Id: Id258e485a5875a15bf73af4e8cb6a5308227ff0f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-04 10:05:57 +01:00
hjk
678bfda7d5 C++: make CPlusPlus::TranslationUnit::PPLine private.
It's not used otherwise.

Change-Id: I926f5b3d5ea08a5768b61350f2d399eda702aad3
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-03 20:52:58 +01:00
hjk
67af9cf9a9 C++: Don't create unused values in the preprocessor.
Change-Id: Ic158cf3b88fb0f8c69c1bc5cf45963e2ae9296e5
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-03 20:52:40 +01:00
hjk
ad03ebab19 Debugger: QT += webkitwidgets in semi-manual test
Change-Id: I551d0f49d6da2555cfe2acbd28ad5f76f20ea29c
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-03 20:52:27 +01:00
hjk
ecf9704b25 Debugger: support for C99 complex/_Complex type
Task-number: QTCREATORBUG-8513

Change-Id: I1241c05c18f6fa7e1f22276253419c395ae9013b
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-03 14:45:59 +01:00
Thomas Hartmann
6c44aacf08 QmlDesigner: fix
Change-Id: Ia241c05c18f6fa7e1f22276253419c395ae9013b
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2013-01-03 13:12:53 +01:00
hjk
8b3c7f2b1b EditorManager: Compile fix after 4add39e31.
Change-Id: I57cd5295f7a3b58906e9b158e88d9128142d4311
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-02 13:41:39 +01:00
Thomas Hartmann
4add39e31b EditorManager: adding save (as/all) to editor list's context menu
It is confusing that save is missing in the context menu
of the editor manager.

Split mode requires to use different actions then the ones
in the File menu, since the editor in question might not be the
current editor.

Change-Id: I47cd5295f7a3b58906e9b158e88d9128142d4311
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2013-01-02 12:01:36 +01:00
Daniel Teske
f320426cd1 Use C++11 parsing mode for CMake, AutoTools and Generic project managers
Those 3 project managers can't easily figure out the right mode for code
parsing. The code we are parsing is predominantly C++98 code. But for
those using C++98 toolchains having valid C++11 code not be marked as a
error is probably not much of a problem, whereas the reverse, using a
C++11 toolchain and having valid code being marked as a error is
annoying.

Change-Id: I8dcc172029045cf591b3ba0adef1585f3f94fd39
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-01 15:19:43 +01:00
Ryan May
577fe8a49f Debugger: Make tabs in separate view closable.
Refactor the separate view from directly using a QTabWidget to a subclass
so that the necessary signal can be hooked up.

Change-Id: Ibc2653d554882a36a85162708021422843057bc1
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-01 01:09:31 +01:00
hjk
d973448f74 GSLSEditor: Fully qualify class name in Q_EXPORT_PLUGIN
Change-Id: I10c127852aa65958497d2b48af1d52c6a33c57ab
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-31 10:43:34 +01:00
Orgad Shaneh
f857feed0e Git: Eliminate double parentheses in 'detached' topic
And use a capital D for Detached

Change-Id: I406269c6498be07d18b2febd0635984cff76b122
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-12-30 21:48:18 +01:00