Commit Graph

406 Commits

Author SHA1 Message Date
hjk
98917598d3 ProjectManager: Use Core::Id for progress types
Change-Id: I72993fda50ad70ad2d7c2f449923ac6e34b9e737
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-04 14:59:06 +02:00
hjk
df36184371 Core: Static pattern for ProgressManager, clean up all users
Change-Id: I4af8793ca69a3af9e99baeb7c31dad3864266f91
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 12:41:47 +02:00
hjk
e520c38f41 Core: Remove deprecated accessors
Also adjust user code.

Change-Id: I60935942a7012e6a0d6091ffbc89d69289366e35
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:25:59 +02:00
Tobias Hunger
95859289b8 KitManager: Use static API as other singletons do
Change-Id: Ia49c6552a5aae72870687ef9c64f2642fbe24155
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-21 16:55:16 +02:00
Tobias Hunger
5345c96ea5 UiCodeModelManager: Clean up API
Task-number: QTCREATORBUG-9763

Change-Id: Ie138f63b8abd5333262debf311aa3ebbd88c81d5
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-02 12:07:40 +02:00
Tobias Hunger
78d3191363 UiCodeModel: Simplify usage
Change-Id: Id274db9ed3022364e7b65788f8313ae6cfa73326
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-01 14:23:00 +02:00
Tobias Hunger
5422b2c4da Introduce Project::projectFilePath()
Use it instead of retrieving this information from the document.

Change-Id: I809fcb2daf59021cf503c371a5d40d75d7448796
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-01 11:42:41 +02:00
Oswald Buddenhagen
6896546ba5 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/plugins/cpptools/cppmodelmanager.cpp

Change-Id: I0e69dfad951eb81d8008f5ca05e8fb6999ae2c8a
2013-07-25 13:18:31 +02:00
Nikolai Kosjar
072b7c5718 CppTools: Check if project has changed before reparsing
This introduces an API change for the project managers. Those are not
expected to call updateSourceFiles() anymore.

Task-number: QTCREATORBUG-9581
Change-Id: I77befd29fb851c9acf87204d571da00183c9cd05
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-07-22 08:33:52 +02:00
Erik Verbruggen
1478e661ed Introduced mime-type for ObjC++.
Updated/fixed the code to treat treat text/x-objcsrc and
text/x-objc++src correctly.

Change-Id: I1ab97577c786a28381398e4e0fac177325d00d7b
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-07-18 16:45:27 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +02:00
Eike Ziller
99c383f3d0 Make IDocument::fileName a member with setter.
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.

Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 10:21:58 +02:00
Daniel Teske
77ddc869e0 Qt4Project: Use exact parse to decide which runconfigurations to create
Task-number: QTCREATORBUG-9549

Change-Id: Ib504073a3dfbdf8a66429b3fb6a8930d2284f76a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 17:13:05 +02:00
Daniel Teske
f8034a353f Qt4Project: Don't update runconfigurations for all targets
Change-Id: I383d0c5b7f01bf00be3249dc2721e69ed27dc148
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 17:13:01 +02:00
Daniel Teske
cdbbf37743 Qt4Project: Do not trigger updateCodeModels on folderChanged
This reverts commit 2fdb70bdce.
Be smarter about what to do on folder changes. Trigger at most
one codemodel update per folder change signal. (Thus still fixing
the original problem 2fdb70b fixed.) And only trigger one if the
actual file list changes. This could be further optimized to only
tell the code model about the new files, but that's for another
patch.

Task-number: QTCREATORBUG-9697
Change-Id: I78d134663f1455254caf812c27c048d4f0828242
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-02 10:33:04 +02:00
Nikolai Kosjar
dc5a0e3e5a Project managers: Force "Parsing" notification
...so parsing progress will also be reported for projects consisting of
only one source file.

Task-number: QTCREATORBUG-9597

Change-Id: If35a00b6f949258d64921f144919269fa0c81d36
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-06-24 13:11:16 +02:00
Oswald Buddenhagen
66802ef8bf implement simple VFS to support caching during project parsing
this tremendously speeds up loading of qt 5.1 based projects (including
qt itself) under mac os, as these look up the sdk dynamically, and use
caching to avoid doing that in every subproject.

Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-06-04 15:42:13 +02:00
Fawzi Mohamed
5a4cdc11cb qmljs: adding qrc support
Qmljs now keeps a cache of parsed qrc files, and can resolve "qrc:" links.

This breaks the assumption that the name that the qml files has on
the filesystem is the one that qml sees, and that contents of
directories can be found just looking at file whose path starts with the
directory path.

Currently the first file is used when multiple qrc files contain the same
path, but support for strict and weak path resolving is already there.

At the moment only qrc files for projects that call updateQmljsCodeModel
are updated.

ChangeLog: QmljsSupport: Imports using qrc links are resolved.

Task-number: QTCREATORBUG-8953
Change-Id: I695fac2692af2417d49c192c580a1c2e7b4873f4
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-06-03 10:32:13 +02:00
Kai Koehne
17539d670f Revert "Project: Set QML/C++ languages where both are possible"
This reverts commit 75691393ec. Otherwise
we'd enable QML debugging for virtually all projects.

Change-Id: I5518624a9973a9f61fbef6c680b5a83c74d0b4a9
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-28 13:59:16 +02:00
Orgad Shaneh
ec84dd058a Fix indentation
Mostly 3 leading spaces converted to 4

A few other indentation issues

Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-06 08:38:50 +02:00
Sergey Shambir
535bdcc9d9 Qt4Project: simplified C++ codemodel interaction.
Now it uses ProjectPart::evaluateToolchain() to read toolchain info with
given compiler flags.

Change-Id: I9afce7090eba6fc0662981dfd065603ac235a83f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-05-02 12:59:49 +02:00
Sergey Shambir
6faf45a465 ProjectExplorer: extended Toolchain::CompilerFlags
Now it provides information about C language standard and C++
extensions. No new behavior added to project managers.

Change-Id: Ib7c19641f452a75c9b14cd7e33d104dcd1603720
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-04-30 17:31:22 +02:00
Eike Ziller
bedc477943 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp

Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
2013-04-30 11:43:33 +02:00
Fawzi Mohamed
31223a55b7 qt4project/qmljs: get info from all subprojects
removes an incorrect break that limited the number of nodes processed
in updateQmljsCodeModel.

Change-Id: I82c254721ee92765cb65840c428ea08e97f587c6
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-04-25 14:04:33 +02:00
Daniel Teske
ca2c9b5c9c Qt4Project: Fix double restoreSettings on opening project
Task-number: QTCREATORBUG-9151

Change-Id: I9100fbb34eead6d5ef32e7cd0859ce6ed6ea6f78
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-04-22 13:55:45 +02:00
Daniel Teske
b45e7b01bf Qt4ProFileNode: Split up targetInformation
TargetInformation now contains no platform specific code anymore.

Change-Id: Id7b3b562e1046a1ea18127716532b1fc2614ef91
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-17 17:08:03 +02:00
Tobias Hunger
aff2518bd7 ProjectManagers: Update project languages based on data sent to the codemodel
Change-Id: Iecf61f66389fff6f3995c4f4bc893ffd190c50e6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-04-10 15:30:17 +02:00
Tobias Hunger
ddafdf55de CppTools: Rename files to comply with coding standard
Rename ModelManagerInterface.(h|cpp) to cppmodelmanagerinterface.(h|cpp).
Rename TypeHierarchyBuilder.(h|cpp) to typehierarchybuilder.(h|cpp).

Change-Id: I035d833fd205d7460819bd0fb7031294359032f9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-10 11:43:22 +02:00
Tobias Hunger
ea23948efb CppTools: Use namespace CppTools consistently
There were quite a few classes using CPlusPlus namespace in the
CppTools plugin. Rename them and do some other small namespace
related coding style fixups.

Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-04-08 13:21:31 +02:00
Tobias Hunger
75691393ec Project: Set QML/C++ languages where both are possible
Change-Id: I4bc5bd7a644c48dfa529f9f9f6052e401de76d40
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-05 14:56:59 +02:00
Friedemann Kleint
c0b6d1d3f2 Clean headers in Qt4ProjectManager.
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.

Change-Id: I53fa1aafaf98fd3105ef35b595e4311854cf9cbc
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-28 13:38:30 +01:00
Daniel Teske
9abb4a8c1f Qt4Project: Adjust to MessageManager api change
Change-Id: I795ce7421c752911db7df6a98f315661ef6c9a44
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-22 16:05:35 +01:00
Sergey Shambir
2bb2628054 Qt4Projet: handle OBJECTIVE_HEADERS qmake var
Since there are no separate file extensions for Objective-C and
Objective-C++ headers, all headers can be parsed as Objective-C++.

Change-Id: I91500c53de0fc14ce7be0c7c534e443d1f1f725a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-22 12:39:13 +01:00
Sergey Shambir
63fe568b9b CppTools: improved languages support in ProjectPart
Please, read blueprint here:
http://qt-project.org/wiki/Blueprint-for-language-specs-system

Removed feature from QbsProjectManager: it not longer splits project on
separate C and C++ parts, because Qt version used only by clang parser
(not native) and can be ignored for pure C and Objective-C without C++.

Change-Id: I1c561f7f9f915cc6cb8579d19db74e8352f54c1e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-21 17:22:18 +01:00
Tobias Hunger
33f54d10c6 s/ProjectExpander/ProjectMacroExpander/g
The new name is a better description of what the class is all about,
it matches the filename and it does not conflict show up when trying
to expand "PE" to ProjectExplorer.

Change-Id: Ie6a10b9a83dc8bc529e35e3381f733dbe25847a3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-19 11:23:57 +01:00
Aurindam Jana
cb5503715e Qml Debugging: Setting debug option for QML applications
Skip checking for QML files. A project may be a QML project even
though no QML files have been added to pro/pri files.

Change-Id: Ifd41093bf69526147e0a3116380a14bfa534f681
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-03-04 16:06:44 +01:00
Fawzi Mohamed
942326ae9b qmljs: add infrastructure handling qml dialects better
QmlBundles enables us to treat the different qml
dialects differently.

Add imports completion.

Change-log: [Qml/JS Support] Corrected handling of QtQuick2 only features.
Change-log: [Qml/JS Support] Added import completion in editor.
Task-number: QTCREATORBUG-8750
Task-number: QTCREATORBUG-8624
Task-number: QTCREATORBUG-8584
Task-number: QTCREATORBUG-8583
Task-number: QTCREATORBUG-8429

Change-Id: I1384b1b23136a85b4d077895ea86f92960da9e71
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-21 17:22:16 +01:00
Aurindam Jana
5cf11e2bbd Qml Debugging: Default option for Qt Quick application
Qt Quick applications should have Qml Debugging enabled
by default.

Task-number: QTCREATORBUG-8208
Change-Id: I794249567b15071098f0ac8ba5f2a8e5f2be4ffb
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-02-20 21:03:23 +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
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
Daniel Teske
4fd25854de Move QtProjectExpander to ProjectExplorer
The cmake plugin needs the class, too. Also add a explicit projectName
parameter to it, since it differs how to extract that from the path.

Change-Id: Ic3d37b3a12ad73f3c7f898d27ad0e85629c38839
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-17 16:54:31 +01:00
Tobias Hunger
53703a3f41 Qt4: Remove some dead code
Change-Id: Ia9596fe16af1ea428482977092b58cb5a04db873
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-15 14:56:32 +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
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
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
Eike Ziller
a8a33b9a3b Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: I288eeb1137e1b08d6c0d69f394cbb0fe1a937b68
2012-12-14 08:20:49 +01:00
Sergey Shambir
e188244ff4 Set NoQt as qt version for non-qt projects
Change-Id: I292357c84f3633ffc3cb17f44b66d6de9c268966
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-12 15:04:49 +01:00
Fawzi Mohamed
e41d5c9a09 qmljs: add qt5 qmlpath to code model paths
Change-Id: Ie0fd6f74818def859ab5bcb6fa104c4eec1b67fb
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-12-12 11:40:51 +01:00
Erik Verbruggen
cfc1069c78 C++: Remove hard-coded configuration file name.
Change-Id: Ibe4cc69eafd14dab7707862b1068ce1e21b1d8e0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2012-12-04 08:33:33 +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