Commit Graph

41387 Commits

Author SHA1 Message Date
Knut Petter Svendsen
a49134c47a ClearCase: Add setting to not prompt for comment
Change-Id: I30807991e2a839088c9523280eab1dacd22a1bf4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-11 09:07:57 +00:00
Orgad Shaneh
a4890d838d Git: Always warn on hard reset when there are modified files
A warning is currently only displayed for reset via context-menu.

Change-Id: If01c6c58dfe8ad0d066f4c6fe02ea3d7bb2c8a55
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-11 09:02:52 +00:00
Orgad Shaneh
e0671c0d78 Git: Fix detection of line with whitespace in commit highlighter
Git strips trailing whitespace.

Change-Id: Ie0d3fa85007d4cd3646424faa772a904edc55966
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-11 08:59:54 +00:00
Tobias Hunger
5a2459d1e1 VcsBase: Make some slots protected and update users accordingly
Change-Id: If38be72e9037126b6b697c5064a07de29a2ef8e5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-11 08:41:01 +00:00
hjk
7c8d20ded7 Debugger: Pass request to sort struct members to {gdb,lldb}bridge.py
The request will be honored when creating the values
instead of re-sorting in the frontend.

Change-Id: I0ea13bd9b0700a4d2ae4f0b355c56ddd37557398
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-11 08:40:51 +00:00
Orgad Shaneh
a968940494 C++: Simplify Bind::asStringLiteral
Pass the expression directly

Change-Id: I44421fad0a0251641608d266fe681c05b3631064
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
2015-06-11 07:43:29 +00:00
Christian Kandeler
72a34d8359 ClangCodeModel: Fix build with namespaced Qt.
Change-Id: I8a8e92e9bbd441bac1b305248034f31e7a2ad5d7
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-11 07:09:00 +00:00
Christian Stenger
fa0bc96667 CMB: Fix compile on OSX
Change-Id: Iad4ac96233f46d9f76894ab06f8ee55530c1e739
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-11 06:55:16 +00:00
Marco Bubke
b29f69b944 Gerrit: Fix build
Change-Id: I0e0da912562ffafc92f45b96b0bdd61813ccb24e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-10 16:25:32 +00:00
Tobias Hunger
ea2bb656cd ResourceNode: Update to new ResourceFile::load return value
Change-Id: I8900225ecf4c69be7f9b6983edeb4cfdfebc0b77
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-10 16:25:22 +00:00
Eike Ziller
fef9d7ff94 Editor manager: Abort with a single message if file is not readable.
We show a dialog that offers opening a file in a different editor type
if opening a file fails, but we should not do that if opening the file
fails because it is not readable.
With this change, documents now specify if they failed to open a file
because reading failed, or because they could not handle the file
contents.

Task-number: QTCREATORBUG-14495
Change-Id: I5d4b7cfa74b87ef21b9b55bc30b3ebe2f8238dfa
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-06-10 15:32:55 +00:00
Tobias Hunger
be0aa40520 Gerrit: Remove method that is used only once
Change-Id: I6a65cf7dcb2e5e0f0cff46fd11092799254023be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 14:43:26 +00:00
Marco Bubke
29b96af1cb Cmb: Remove white spaces around operators
Change-Id: Icad10f930a5e67b90fc2addcf9625116069ff7a6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-10 14:41:13 +00:00
Christian Kandeler
7309e8bb64 Introduce and make use of qtcreatortool.pri.
To factor out things common to (most) tools.

Change-Id: I5a4605f230d35280eda71e5f195d49d7bb929ae0
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-10 14:26:13 +00:00
Nikolai Kosjar
973fabc782 Use RAII for crash handler setup/cleanup
Change-Id: I71205c45ee01eeaf1d2c991ec625f6a66be1e851
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-10 14:24:19 +00:00
Nikolai Kosjar
9554ef909f Doc: Clang: Do not mention build indication
This is not printed anymore.

Change-Id: Ib55a06f642247ff33e092bee371276b187c6c8c8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-06-10 14:24:01 +00:00
Tobias Hunger
3abdad568d Gerrit: WS fix
Change-Id: Ic0b6a36033830f7f67fb3ba5eb8554cdbc295ba0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 14:12:06 +00:00
Tobias Hunger
467cb4a186 Gerrit: Use Qt5 style connects
Change-Id: I54f2f02f93fc99b896dc479f390f63611ab22e98
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-10 14:11:43 +00:00
Christian Kandeler
046fb9a000 API docs: Fix copy/paste artifact.
Change-Id: Ia9b3ba12c8fdd6864ffc2e44fda584bf06ef549f
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-06-10 14:03:42 +00:00
Christian Kandeler
fd10979bd2 Crash handler: Fix location of binary in build dir and when installing.
Change-Id: Id56b94436bc2df984e4c61595524638167c09842
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-10 14:00:26 +00:00
Tobias Hunger
f2be797696 ShellCommand: Allow setting working directory per job
Change-Id: I6d541f87b76bdc7f1503f202792079f833e8932c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 13:04:42 +00:00
Christian Kandeler
ccbc7f9ec1 DiffEditor: Silence warning about unused variable.
Change-Id: I18a6dd021bb29ca5eaa7727213c80458d903ee6c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-10 12:59:53 +00:00
Marco Bubke
0996cf0e9e Sqlite: Disable warnings for sqlite.c
Change-Id: Ida2e4f5397ee3e1f0a5d3ab0b48e419e2423aafa
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-10 12:59:44 +00:00
Christian Kandeler
b3a70d8b28 sqlite: Fix qbs build on Windows.
Change-Id: I68fe61206e40e953554b2066ff7f8e45222720bf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-10 12:09:02 +00:00
Tobias Hunger
ea476ffc39 ShellCommand: Store workingdirectory in the jobs
Not all jobs of one command can run in the same directory, so
prepare for having individual working directories per job.

Change-Id: Ice43361fe54f2b7153ccd38435f6108d83570082
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-06-10 12:05:31 +00:00
Tobias Hunger
2221636cfb Core: Add HostOs information to MacroExpander
Change-Id: Ibed6302ce82fce984e42f45eb77a9bb9c1a81f7c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-10 11:57:11 +00:00
Tobias Hunger
f733f1805a Core: Expose DocumentManager data to MacroExpander
Expose the last visited directory as well as the project directory
stored by the DocumentManager to the MacroExpander.

Change-Id: I7cdbe5e5471b5c96954c74f21187786de7bb9aa3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-06-10 11:57:05 +00:00
Eike Ziller
14ec0a63b9 IEditor: Remove unneeded empty virtual destructor.
QObject already has a virtual destructor.

Change-Id: Ie407226775d1690623ecc76adf29e1b3723abb0c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-10 11:29:19 +00:00
Eike Ziller
4f927e4c87 Move "open" from IEditor to IDocument
For non-editor documents it currently is not used, but for editors it
makes more sense to have that on the document instead of the editor.
Most actual implementations of "open" were done in the documents already
anyhow, because it is needed for reloading.

Change-Id: I29d4df2078995cbe80172b51a9bebeecb3afad3c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 11:21:17 +00:00
Marco Bubke
c916d250b3 Acknowledge SQlite
Change-Id: I85ae3a273160dad6ead9e722fcf4fb6d1835eb0c
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-06-10 10:29:19 +00:00
Nikolai Kosjar
23b8a3b2e8 Clang: Use completion through backend process
This makes us independent of libclang crashes for completion.
Re-parsing for highlighting still happens in the Qt Creator process.

Run in verbose mode:
    qtc.clangcodemodel.ipc=true

Run tests:
    -test "ClangCodeModel"

Task-number: QTCREATORBUG-14108
Task-number: QTCREATORBUG-12819
Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-10 10:15:40 +00:00
Marco Bubke
264132da27 CmbIpc: Call bytesAvailable after every manipulation
The saved bytesAvailable value has hidden the block size bug.

Change-Id: I751d6e11194a91c839be3dcf678e5fe4cc3f75b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-10 10:05:50 +00:00
Marco Bubke
e2d60fdcc3 Cmb: Workaround for gcc 4.7 bug
The default constructor has no noexcept specifier for gcc 4.7

Change-Id: If204c19e21bc368d755c8d6508fd490f71be6f6c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-10 10:02:41 +00:00
Nikolai Kosjar
6c780c765e Clang: Clean up / Improve *clang*.{pri,pro}
clang_installation.pri
* Remove pointless CLANG_COMPLETION, CLANG_HIGHLIGHTING defines
* Remove auto-detection of llvm-config-* variants in PATH. This does
  not make any sense if the user has to provide LLVM_INSTALL_DIR.
* If llvm-config is not found in LLVM_INSTALL_DIR, determine the clang
  version by looking into the lib dir (there should exist e.g.
  "clang/3.6.1")
* Check paths for existence
* Simplify logic
* Do not call error() in helper functions

clangcodemodel.pro
* Print detected version
* Sort HEADERS/SOURCES

Change-Id: I020d2e78aea37ef01a337e6da658d7f5e56b3ac5
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-10 09:56:24 +00:00
Christian Kandeler
9b0abb2489 Android: Remove unneeded variable assignments.
Change-Id: Ib00dfd415ca380039648d3c8333f7ff1c49ad9ec
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-10 09:55:16 +00:00
hjk
bac4667497 ProjectExplorer: Remove ExecutableAspect
It's unused, wrong, and unwanted.

Change-Id: I1ee5474338b4d7ea9455fa2c3b9671d6a83042c9
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-10 09:53:58 +00:00
Eike Ziller
72c83463f1 Move sort filter proxy model with category logic to utils
It is useful for other tree models as well.

Change-Id: I48262c266229a91d61579ec1dc068fc18bc33ee0
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 09:31:38 +00:00
Eike Ziller
b1393d4778 TreeModel: takeItem should return the item
The usual Qt API for "takeXyz()" methods is to return the item that was
"taken".

Change-Id: Ie144051801487a301b3f13e2857735b65f58150b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-06-10 08:05:32 +00:00
hjk
5309e217e4 Debugger: Consolidate GDB and LLDB "updateLocals" code paths
This splits the bool setToolTipExpression() operation into
a bool canHandleToolTip(), and the actual processing of
the request, which is mostly identical to the handling of
a watcher.

Handling a watcher is now mostly the same as a full Locals
update, except for the 'partial' flag. Pushing the handling
of that down to the bridges gives identical code paths
in the gdb and lldbengine. Move that to the
DebuggerEngine base class.

Change-Id: I3861b43e8630c7e7bd57fcd549b2a2387e3d4869
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 07:40:27 +00:00
Orgad Shaneh
7d257acb4b GenericHighlighter: Update built-in definitions
Change-Id: I198af839da35f4057fbfda6226f1314127e59e48
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 07:20:36 +00:00
Orgad Shaneh
ef3896ea76 GenericHighlighter: Use a recent update url
Change-Id: Ib4fda739eb01a3098d03e0c2f12fd282d2759c62
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 07:20:34 +00:00
hjk
0c4e8328c9 Valgrind: Modernize test connections
Change-Id: I945bee28f04c1bba225a8c6a6f785b6cc5c9ac95
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 06:09:40 +00:00
hjk
94e3382756 Debugger: One more Qt 5 connection
Was forgotten in eaf718bdea.

Change-Id: Ia11999d708ca2d9ffd8d8955945361ce888d4330
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-10 06:09:29 +00:00
Marco Bubke
d217345456 CmbIpc: Fix wrong block size
The block size was one to big and so the command could only read after a
new command arrived.

Change-Id: I64ae47667d27d66e132031b10d4f130c53d3b0e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 15:10:40 +00:00
Marco Bubke
287a263083 CmbIpc: Remove workaround
Is fixed by the right block size.

Change-Id: If3b961625925cd82740fad0f469784b4d224bac1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 15:10:21 +00:00
Orgad Shaneh
97d3d9ac09 C++: Support default template argument lookup for specialization
This fixes std::vector, although it doesn't really resolve numeric
template arguments. It just picks the first specialization.

Use-case:
class Foo {};
template<class T1 = Foo> class Temp;
template<> class Temp<Foo> { int var; };
void func()
{
    Temp<> t;
    t.var; // var not highlighted
}

Task-number: QTCREATORBUG-8922
Change-Id: I593515beb3a6d901b6088db8bc1b8e16c39083d3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:18:17 +00:00
Orgad Shaneh
1c7e465c30 C++: Remove scope argument from initializeSubst
Use the template scope instead.

Change-Id: I8144427e14644697c709643da7c0ae0b0841e34d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:18:10 +00:00
Orgad Shaneh
997ab425ce C++: Improve accuracy in findSpecialization
* If a template type is specialized as a pointer, accept only pointers (of any
type)
* Same for references and arrays
* Only if the specialized type is not part of the template, match it
  against the input.

Fixes resolving of partial specialization with pointers.

Use-cases:
// 1
struct b {};
struct a : b {};
template<class X, class Y> struct s { float f; };
template<class X> struct s<X, b*> { int i; };
template<class X> struct s<X, a*> { char j; };

void f()
{
    s<int, a*> var;
    var.j; // j not highlighted
}

// 2
template <typename T> struct Temp { T variable; };
template <typename T> struct Temp<T &> { T reference; };
void func()
{
    Temp<int&> templ;
    templ.reference; // reference not highlighted
}

// 3
class false_type {};
class true_type {};
template<class T1, class T2> class and_type { false_type f; };
template<> class and_type<true_type, true_type> { true_type t; };
void func2()
{
    and_type<true_type, false_type> a;
    a.f; // f not highlighted
}

Task-number: QTCREATORBUG-14036
Change-Id: Idee5e3f41d15c0772318d3837cbcd442cb80293a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 14:17:38 +00:00
hjk
b61413fe0c BareMetal: Modernize connections
Change-Id: I1d504da25b44dc60be7dca2b07f5eadbc437826c
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-06-09 13:16:35 +00:00
Orgad Shaneh
3fe1b92566 CppTools: Fix highlighting and follow for template using argument
Use-case:
template<class T>
using Foo = Bar<T>; // T not highlighted

Task-number: QTCREATORBUG-9944
Change-Id: I04cb62ea6a21f158f7fb4fb7ac79ccd6eb1bbfbb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-06-09 11:31:40 +00:00