Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This mainly takes CppEditorSupport apart.
* Parsing is now invoked by CPPEditorDocument itself by listening to
QTextDocument::contentsChanged().
* Upon construction and destruction CPPEditorDocument creates and
deletes an EditorDocumentHandle for (un)registration in the model
manager. This handle provides everything to generate the working copy
and to access the editor document processor.
* A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that
controls parsing, semantic info recalculation and the semantic
highlighting for the document. This is more or less what is left from
CppEditorSupport and can be considered as the backend of a
CPPEditorDocument. CPPEditorDocument itself is quite small.
* BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor
derive from BaseEditorDocumentProcessor and implement the gaps.
* Since the semantic info calculation was bound to the widget, it
also calculated the local uses, which depend on the cursor
position. This calculation got moved into the extracted class
UseSeletionsUpdater in the cppeditor plugin, which is run once the
cursor position changes or the semantic info document is updated.
* Some more logic got extracted:
- SemanticInfoUpdater (logic was in CppEditorSupport)
- SemanticHighlighter (logic was in CppEditorSupport)
* The *Parser and *Processor classes can be easily accessed by the
static function get().
* CppHighlightingSupport is gone since it turned out to be useless.
* The editor dependency in CompletionAssistProviders is gone since we
actually only need the file path now.
Change-Id: I49d3a7bd138c5ed9620123e34480772535156508
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Otherwise we get useless noise in the General Messages pane if clang
isn't installed.
Change-Id: I8d34f79f1054b87b8530fcf6f253524a4c73897c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Same patter. Plain is fully merged now, so remove the files, too.
Change-Id: Id8c0ba5689ad9980a0db3580cb9833344fd911f3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Rename to ProjectPanelFactory, hide list of factories from .h,
rename include guards.
Change-Id: I2e0befcaf847e5c3a0b493b58e7bcf3e9263f4f9
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Move the remaining contents to more appropriate places.
Change-Id: I55eed5c572bd33dafe2187523d9aa381c211fdd6
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The indirection via a factory is no longer useful, since the
targetsettingspanel is hardcoded for a build and run panel.
Change-Id: I75543f777a4a7df4cadf12667652424056829689
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This was the common base class of IProjectPanelFactory and
ITargetPanelFactory. Nothing was using the IPanelFactory interface, and
there's actually no common interface between those classes.
Of the old interface IPanelFactory:
id() => only used in ITargetPanelFactory
displayName() => only used in IProjectPanelFactory
priority() => only used in IProjectPanelFactory
This removes lots of boiler plate code for the unused functions.
Change-Id: I8488a4e5134fd451907f02c45b7847673e4dc714
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.
Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Works now again for the mainstream UNIX case (relying on llvm-config).
Change-Id: Ia928c363a43f54ca56d5371e755c00f4f10fe76f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
And move it into its own header and source files.
Change-Id: I37401badd819e028e1d767425759dc0ff27afe31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...instead an ITextEditor.
The ITextEditor was only used to access the file path and QTextDocument
via the BaseTextEditorWidget.
Change-Id: Idef2b8162b992fe3718e16e2a046e2ff214846f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
In the light of Obj-C properties this seems to annoy more than to help.
Change-Id: I48f92d505035369f48e8798d0972ef00306bdde0
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Latest LLVM release has Windows installer which installs it to Program Files.
Change-Id: I55d7e43d1333f3a7280020e0ebcb1e095acca9d0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This will avoid confusion when later more length and indices methods are
added.
In Token:
length() --> bytes()
begin() --> bytesBegin()
end() --> bytesEnd()
Change-Id: I244c69b022e239ee762b4114559e707f93ff344f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Move item model implementation to private, adjust user code.
Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
pchmanager.cpp:325:21: error: 'CppTools::ProjectPart::Ptr' has no member
named 'reset' projectPart.reset();
clangcompletion_test.cpp:305:59: error: no viable conversion from
'QLatin1Char' to 'const QString'
.arg(text).arg(texts.join(QLatin1Char(','))));
Task-Number: QTCREATORBUG-12122
Change-Id: Ie591594da1e3d357e38efe216d758f15ad6c2cd2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
qt4 qmake does not like spaces between 'for' and the opening paren.
Task-number: QTCREATORBUG-12024
Change-Id: I8697272b4f752495f3bf6ff2c6d01c4ac2ea837f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
it takes a variable, not a value.
the spec_pre.prf part is cherry-picked from qtbase/89a558d6b0fac.
Change-Id: Ie7e551cf0b889d7682f032124dd0466ada6972e4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Change the TypeMatcher to also match names, and use two "block" lists
in SafeMatcher to prevent infinite recursion.
Task-number: QTCREATORBUG-11240
Change-Id: I0367ae795ee6be579b83aeb8d46723c877e4aa75
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Format: QTC_*=(1|0).
Now it's easier to change them in the Run Configuration of Qt Creator.
Change-Id: Ifc45cecb89b33a31942b4c3e2d03851a1d72d0bf
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
The flags used by the project explorer to interrogate the toolchain for
compiler-defined #defines always indicate a C++ file. So, this will
always include a #define for __cplusplus. When editing C code with
the clang code model, this results in extern "C" linkage specifications,
which result in warnings or errors.
The proper fix is described in QTCREATORBUG-11709, but is too big to be
done within the 3.1 timeframe.
Task-number: QTCREATORBUG-11501
Change-Id: Id9e261fa8d429fead4a2cd5fd7398aa6e1e8c13d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...so we can easily check if the bug is in (lib)clang itself.
Change-Id: Id6dfd8014efc1c7704265b99697f19ab990286a7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Function-local variable 'updateParams' was referenced after destruction.
Change-Id: Iac9663ba4ca9c3a603bc530f57f419b734782694
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...since that's not thread-safe and thus leads to crashes from time to
time.
Change-Id: I907ae8b5c4d60bfc82bc97b55cc5d62d8bbeae04
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Do not use QObject::tr(), use native file paths,
use complete contexts.
Change-Id: Icc4990b4c2ca5b9ae6f6b639db9e1a45a93e0a65
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This field is used by the generic project manager which passes the
".config" file in it. The advantage is that both the SnapshotUpdater and
the clang code model do not need to do anything smart, but can pass it
directly to the preprocessor.
Task-number: QTCREATORBUG-11390
Change-Id: I44fc7b20afd28fb59608412f2cce86af6f7e7d6b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This speeds up the semantic highlighting significantly.
Task-number: QTCREATORBUG-11346
Change-Id: I968f066fff7002a9cc10dd9577a750644efe026b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>