Commit Graph

35904 Commits

Author SHA1 Message Date
Tobias Hunger
0088aec7bd Vcs: Clean up checkout wizard in case of failure
Change-Id: I5fd2fbb660035e610b6093b744fd04608a6fa3c0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:44:23 +02:00
Tobias Hunger
dae8df0567 Vcs: Make checkout wizards work, even when VCS in unconfigured
They used to grab the first page in the set of pages and that
is the VCS setup page if the VCS was not configured before the
wizard was started. Then the wizards just stopped.

Change-Id: I8ea5bc373c07fb5c68a4814396864de6b8413747
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:44:16 +02:00
Tobias Hunger
6644a08c21 VcsBase: Remove BaseCheckoutWizard::setCustomLabels()
Also assert that d->wizard is not in use already and use d->wizard
consistently.

Change-Id: I85599f80e92edb2a0a0fc52c5fed1e484d0beac9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:44:08 +02:00
Tobias Hunger
e9526eadb8 Vcs: Add method to create a Wizard to the WizardFactory and use it
Implement it in all VCS that support this type of wizard

Change-Id: I78b0e4a37e6bf6b25d8cee4b1e96bcc76188047a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:44:00 +02:00
Tobias Hunger
67c2c77a99 Vcs: Append "Factory" to the variaus checkout wizards
Change-Id: I571717a389c63f4f0371570e22d3f2a834e8b900
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:43:48 +02:00
Tobias Hunger
043c193e3d VcsBase: Rename BaseCheckoutWizardPrivate to BaseCheckoutWizardFactoryPrivate
Rename a member while at it anyway.

Change-Id: Ic161acd7bb358cfeb29b2a050059cff5d7ca5cdd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:43:38 +02:00
Tobias Hunger
8140341fec VcsBase: Rename variable in basecheckoutwizardfactory
Change-Id: I386d37e62eebb0254bc20b5c55e9c55c04d1fe42
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:43:29 +02:00
Tobias Hunger
c10eb81a7c Rename checkoutwizarddialog.* to basecheckoutwizard.*
Change-Id: Ida36c5ad0a37091f0303bed49b7ade629640bd71
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:43:17 +02:00
Tobias Hunger
264b833fd6 VcsBase: Rename CheckoutWizardDialog to BaseCheckoutWizard
Change-Id: I4e2729e7e0f0a15d4943099cd7f02824f3dc43d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:43:07 +02:00
Tobias Hunger
b4965ba023 Rename basecheckoutwizard.* to vcsbase/basecheckoutwizardfactory.*
Change-Id: I9f607b9d27b52fbbc26ae601e7a36c30bcc3df59
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:42:58 +02:00
Tobias Hunger
8e7651db19 VcsBase: Export CheckoutWizardDialog
Change-Id: Ic6f0622d2f2ff100d1023ed94b461feb16fbb871
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:42:48 +02:00
Tobias Hunger
776eb92fa9 Rename BaseCheckoutWizard to BaseCheckoutWizardFactory
Change-Id: Ide131cbfa27640875bb16f82a1992cf2975c5083
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:42:39 +02:00
Tobias Hunger
a8e8910130 IWizard->IWizardFactory
Start at splitting up the wizard functionality a bit. Currently
it is a factory but also contains a lot of logic that is invoked by
the real wizard dialogs.

This change renames/moves a couple of things only.

Change-Id: I1fa114ee3ee262f7c0690841f361bbf09e674725
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-05-26 11:42:03 +02:00
David Schulz
ca41557613 Debugger: Fix crash in Cdb extension when enabling verbose log.
Change-Id: Id50cfe888ce54beaef24ceb72a1ccb917ff1d767
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-26 11:13:07 +02:00
Orgad Shaneh
2ce5b3bc0b Remove remaining PROVIDER references
Change-Id: I0bfcd7136ec0329cfe15983278c25f6b62415b68
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-05-26 08:21:14 +02:00
David Schulz
8d587fa816 Debugger: Allow breakpoints inside lambdas.
When the cdbengine is using the codemodel breakpoint correction.

Change-Id: I70efa3119ca36b4ffd658425132f3fdff3d3eecf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-26 07:19:10 +02:00
Thomas Hartmann
4a48bcbf0c QmlDesigner.Rewriter: Adding some more gloabl enums
Change-Id: Id6b2305f55ad73643ebf1bd73a9517ab8e837f40
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 17:38:30 +02:00
Thomas Hartmann
0885f90178 QmlDesigner.Rewriter: Use QmlJSEditor::Internal::Indenter to indent QML
This fixes indententation when using the designer/rewriting.

Change-Id: I698e05f3c36e962762cf4a4d75f6c7ab6a4df2f9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 17:38:13 +02:00
Thomas Hartmann
75264c9c85 QmlDesigner.Rewriter: Mark area as dirty if text is replaced
The dirty area is used by the indenter and replaced qml code should
be indented.

Change-Id: I8921cb596fc7f8d1e73cf43294d16e9a15d086ec
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 17:38:02 +02:00
Thomas Hartmann
e518074a4b QmlDesigner.PropertyEditor: Allow "manual mapping" in combo box
Sometimes there is no trivial mapping between model and values.

Change-Id: I2617f14828b97ba7352aa3a8f3d2ebb9fd2f3809
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 17:37:34 +02:00
Joerg Bornemann
dac62dada3 qbs build: fix usages of toolInstallDir
This amends 6706659bb1.

Change-Id: Ia9d6eaea92747a804bd5df130017cbf39f8bf6ad
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-05-23 17:34:50 +02:00
Orgad Shaneh
c5af948623 CppTools: Optimize test for electric char in context
Change-Id: I34a03ec9e781656fd4f24a719fb2c2da2efa4681
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:53:55 +02:00
Nikolai Kosjar
b35686b968 CppTools: Move some static functions into the *.cpp
...since they are not referenced.

Change-Id: Ibe5906de6a3dcb9d6d69cade948eba98964e9a66
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:46:04 +02:00
Nikolai Kosjar
06e810767c CppTools: Remove qHash() and operator==() for ProjectPart
These days we rather use ProjectPart::Ptr.

Change-Id: I069ad47fe9dd62901e7ac7d43a1850af8cb15f5d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:45:32 +02:00
Nikolai Kosjar
a8690b61fe Cpp{Tools,Editor}: Tests: Use CppModelManager::document()
...instead CppModelManager::snapshot().document().

Change-Id: If79bc03d062d309bbf6d4b229255ba281cddf8d5
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:43:54 +02:00
Nikolai Kosjar
acbc4b9f07 C++: Get rid of {Name,Type}::isEqualTo()
...since it's superseded by the class Matcher.

For consistency, rename FullySpecifiedType::isEqualTo() to match().

Change-Id: I07640f9218d814e0350265de45f05929e5d595a9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:43:30 +02:00
Nikolai Kosjar
558f62ec71 C++: Fix some Matcher::match() functions
...before using Matcher instead of {Type,Name}::isEqualTo().

Change-Id: Iba1c04064799fe9c81fe997dbd54fc02b15cdec7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:42:06 +02:00
Nikolai Kosjar
194591da98 C++: Fix potential null pointer dereference
Change-Id: I38d99b27ff76f44535c02c64886bede0a99c6225
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:41:42 +02:00
Nikolai Kosjar
fffb3d4d58 Tests: Remove tests/manual/preprocessor
Auto tests should be preferred.

Change-Id: I9fb81c9e0e3b0e72226a3d1193978d6fd1afa6b1
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:41:28 +02:00
Nikolai Kosjar
7e99cf2b69 C++: Tests: Clean up tst_checksymbols
Change-Id: I9859ebbb57c1bb5b1382c7980bedb737df61542a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:34:45 +02:00
Nikolai Kosjar
c6358e5d38 C++: Add utf16 indices to Macro and Document::MacroUse
In most cases we need to work with the utf16 indices. Only in
cppfindreferences the byte interface is still needed since there we read
in files and work on a QByteArray to save memory.

Change-Id: I6ef6a93fc1875a8c9a305c075d51a9ca034c41bb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:34:01 +02:00
Nikolai Kosjar
bb7da966b8 Cpp{Tools,Editor}: Respect multi-QChar code points when handling identifiers
* Consolidate code dealing with C++ identifiers into cpptoolsreuse.h
* Handle code points that are represented with two QChars

Change-Id: I4fb4435aa539f65d88598cac0b50629f33f32440
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:33:34 +02:00
Christian Kandeler
dd61ed3345 qbs build: Simplify "ExternalTools" autotest project file.
Simply link to Core instead of duplicating all the files.
There is a warning on Windows because one translation unit
is present twice, but it seems to work anyway.

Change-Id: I6c5af590a6051f5c2d810d9449ff5410cf94e78a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-05-23 14:31:55 +02:00
Christian Kandeler
fbb0d12961 qbs build: Only pass "-stdlib=libc++" to clang on Mac.
This is also what the Qt mkspecs do.
Otherwise we get linker errors on some installations
(where libc++abi is required).

Change-Id: I1f204da8825ae4dfd4650b921c8e3f32e0ad6380
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-05-23 14:31:32 +02:00
Nikolai Kosjar
bea8fc8e6a Cpp{Tools,Editor}: Expect UTF-8 encoded literals
Change-Id: I9843c4163aad3fa3f1bfa33060c76328fc2dc25a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:24:23 +02:00
Nikolai Kosjar
cadc4b42ba Cpp{Tools,Editor}: Tests: Use QString instead of QByteArray
This is necessary in order to add tests with multi-byte UTF-8 code
points. Otherwise the initial and target source code marker positions
will be calculated on the QByteArray (test code) but used with a QString
(editor document).

Change-Id: I108961b13d32912a4d3193cf26eb59f65d296f57
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:24:10 +02:00
Nikolai Kosjar
41aa2cb3bd C++: Use Token::utf16chars{Begin,End} where appropriate
...especially in CppTools/CppEditor where the offsets are used with a
QString/QTextDocument.

Change-Id: Ic6d18fbc01fb9cc899a9bd2d7424cd2edae487f1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:51 +02:00
Nikolai Kosjar
57ff992961 C++/CppTools: Pass UTF-8 encoded source to Lexer
The Lexer can handle it now.

Task-number: QTCREATORBUG-7356
Change-Id: I8c4b03a247656e013d44c3cedca4835e133d4036
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:41 +02:00
Nikolai Kosjar
587eb49c4e C++: TranslationUnit::getPosition takes utf16char offsets
...and not byte offsets anymore. This is necessary in order to calculate
the line and column numbers correctly with respect to unicode code
points.

Change-Id: I5d79857b3eaefeb8d563b4f1e3938a64debc5e08
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:24 +02:00
Nikolai Kosjar
70122b3061 C++: Support for UTF-8 in the lexer
This will save us toLatin1() conversations in CppTools (which already
holds UTF-8 encoded QByteArrays) and thus loss of information (see
QTCREATORBUG-7356). It also gives us support for non-latin1 identifiers.

API-wise the following functions are added to Token. In follow-up
patches these will become handy in combination with QStrings.
    utf16chars() - aequivalent of bytes()
    utf16charsBegin() - aequivalent of bytesBegin()
    utf16charsEnd() - aequivalent of bytesEnd()

Next steps:
 * Adapt functions from TranslationUnit. They should work with utf16
   chars in order to calculate lines and columns correctly also for
   UTF-8 multi-byte code points.
 * Adapt the higher level clients:
    * Cpp{Tools,Editor} should expect UTF-8 encoded Literals.
    * Cpp{Tools,Editor}: When dealing with identifiers on the
      QString/QTextDocument layer, code points
      represendet by two QChars need to be respected, too.
 * Ensure Macro::offsets() and Document::MacroUse::{begin,end}() report
   offsets usable in CppEditor/CppTools.

Addresses QTCREATORBUG-7356.

Change-Id: I0791b5236be8215d24fb8e38a1f7cb0d279454c0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:23:15 +02:00
hjk
4fefb1ca2a Debugger: Restrict non-negative display convention to non-decimal bases
Change-Id: I95421efa219a85cb81bf1d6a4acbc71eef5736ac
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-05-23 13:06:12 +02:00
Fawzi Mohamed
21dd82ed23 qmljs: codestyle fixes
Change-Id: I1b5a597d92e865d2235b15c62e3bbae362e5b7c0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 10:04:13 +02:00
Fawzi Mohamed
1d961d4ea4 qmljs: adding dumper for value types
Change-Id: I3ae420ea29ed32b08f95f388b0ced5b5293219da
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 10:03:43 +02:00
Fawzi Mohamed
35128701cd qmljs: exposing a bit more the existence of private value types
Change-Id: I85e29b0d60234407561ecbeb2883d68c1acb71d6
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 10:03:18 +02:00
Fawzi Mohamed
56080c4df2 languageutils: improve dumping of fakemetaobjects
adding functions to get a string description of fakemetaobjects
and related fakemeta* objects

Change-Id: Ic65033a245c028993dba1e8c65168a58fbdd8fbc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-05-23 10:02:59 +02:00
Christian Stenger
fc58d0abc8 Tests: Fix QUrl test for Qt4...
...by adding capabilities that allow a better differentiation between
Qt4 and Qt5 object structures.

Change-Id: I025d8301c13922e369862eefaad848bbecc76030
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-23 07:48:54 +02:00
Christian Kandeler
ca3c03c4d3 Autotests: Fix qbs build.
We accidentally added QT_NO_CAST_FROM_ASCII to the compiler command line
in the last patch.

Change-Id: I503d5b328d2ffb9812cd8cf79b5d52c8a76f07df
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-05-22 18:20:46 +02:00
El Mehdi Fekari
55c6351816 Qnx: Fix UI warnings
Change-Id: Ia48031a3347e6267d9f84b5850860903d40bc801
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-05-22 18:17:18 +02:00
Christian Kandeler
54f927fbb3 Qnx: Fix build.
Use the right type of include statement.

Change-Id: I1bfce500de00687fb4f947a2ccf69f464f798134
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-05-22 17:50:49 +02:00
hjk
62904f32ef Debugger: Also allow formatting negative numbers as hexadecimal
Change-Id: I0324c53b42424f25b1c70c10d3f31b515398712d
Reviewed-by: Tim Sander <tim@krieglstein.org>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-22 17:12:24 +02:00