Commit Graph

210 Commits

Author SHA1 Message Date
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
66bc398183 CMake: Fix build directory for "Add Buildconfiguration"
Task-number: QTCREATORBUG-8425

Change-Id: I58a47895fa882bcc53cad1ef764a307c714f2a1b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-01-17 16:54:45 +01:00
Daniel Teske
20cfccd753 Figure out compile flags for cmake by parsing flags.make files
Change-Id: I4dc3889fcc5b26e24b29a3a9fdbba37ddcb74a95
Note: This parses the first flags.make file that is found.
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-10 17:45:54 +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
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
Erik Verbruggen
964c01a460 C++: ProjectParts now contain everything that gets linked together.
Change-Id: Ib862e51897156a03a4a45e2a1690b00caeb03518
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-28 09:09:14 +01:00
hjk
cd7f8706e8 cmake: compile fix after QT_NO_CAST
Change-Id: Ia289d7cded868200f2894178ac725d11bb90783a
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-23 14:08:37 +01:00
Orgad Shaneh
862629c57a CMake: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I23134b7eef222dcdb3425e2f2f6d62ab863009fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-23 11:52:11 +01:00
Tobias Hunger
cb02dd812a CMake: Use default build directory
Change-Id: Ic7916c1ebe0f58ec61d47f1b87891263cce0f6c5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-21 13:27:08 +01:00
Tobias Hunger
75c36c9bb5 Gcc: Support -stdlib=whatever arguments for the code model
Switching the stdlib implementation is possible with clang and results
in different include pathes being used (and potentially different defines).

Change-Id: I9c856256f51ceded9dc7892c1dde2bcc8c1b024c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-21 12:48:12 +01:00
Daniel Teske
ea640a5aea BuildConfigWidget derived classes: Add missing tr()
Change-Id: I1861400c4d50191ed2fd2eba7c28f72628236f12
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:43:21 +01:00
Daniel Teske
3ef968097f BuildConfigWidget: Make displayName property instead of a virtual func
To make the interface the same as NamedWidget.

Change-Id: I5961b4e5aa7f5acf3a7f83e82b6fa4266b9ebf97
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:43:16 +01:00
Daniel Teske
b5bbdb38d9 Remove BuildConfigWidget::init()
It no longer serves a purpose.

Change-Id: Icdcb69c87112e295cefd4975dfa2b3d65818365a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:43:09 +01:00
Daniel Teske
e08b38ffd6 Move Project::subConfigWidgets to BuildConfiguration
Change-Id: Idf58ebbb02e9cd0ab4ff7e74fbed17250e274693
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:40:00 +01:00
Orgad Shaneh
10be8c9a48 InfoBar: Use Core::Id
Change-Id: I0918fbc20027a340facbedc685938a72d117d53b
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-09 15:34:50 +01:00
Eike Ziller
49d5c2381a Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/libs/3rdparty/botan/botan.qbs
	src/libs/ssh/ssh.qbs
	src/plugins/qnx/blackberryqtversion.cpp

Change-Id: Ie8d16d636528aab4006310eab47a342fdf2634d9
2012-10-18 10:40:11 +02:00
Daniel Teske
f6d5ba9b1a CMake: Reparse .cbp files on swtiching targets
Also fix the code to not reparse the wrong file if the bc for a non
active target would be changed.

Task-number: QTCREATORBUG-8063
Change-Id: I40be4bbb1a5ef6ccc78515f153534a7304cae0e1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-16 18:01:31 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02:00
Eike Ziller
68c796e244 Merge origin/2.6
Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.cpp
	src/plugins/cmakeprojectmanager/cmakeopenprojectwizard.h
	src/plugins/cmakeprojectmanager/cmakeproject.cpp
	src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp
	src/plugins/cmakeprojectmanager/makestep.cpp
	src/plugins/qtsupport/baseqtversion.cpp

Change-Id: I153295bad2d97609d96d28945e9f942c5b46b2da
2012-10-05 20:51:31 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Daniel Teske
9de676ce03 CMake and Kits: Fix interaction between them
On initial run we offer the user a choice between all the kits, which
are compatible with the cached generator. After the initial run, the
user can't change kits nor generators anymore.
Except if the builds into a new directory or adds a buildconfiguration,
then the user can choose between generators but not kits.

Task-number: QTCREATORBUG-7940
Task-number: QTCREATORBUG-7928

Change-Id: I9b663435cd2e021f7fe08379c1c487a6aebe8976
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
2012-10-05 12:17:03 +02:00
Peter Kümmel
264313ec90 CMake: add Ninja support
The cmake wizard proposes also ninja if ninja support is available

Ninja must be in PATH, but it is only called once, so it doesn't hurt.

Task-number: QTCREATORBUG-7720
Reviewed-by: Daniel Teske <daniel.teske@digia.com>

Change-Id: If3c9c7ae55e6990fa16b031fc2998a8d8d9ed17a
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-04 15:26:08 +02:00
Peter Kümmel
9107d8d768 CMake: add Ninja support
The cmake wizard proposes also ninja if ninja support is available

Ninja must be in PATH, but it is only called once, so it doesn't hurt.

Task-number: QTCREATORBUG-7720
Change-Id: If3c9c7ae55e6990fa16b031fc2998a8d8d9ed17a
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-09-24 14:22:15 +02:00
Christian Kandeler
3d9e492860 Do not use the fromAscii() and toAscii() functions.
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.

Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2012-09-21 21:03:48 +02:00
Orgad Shaneh
948abf10ae GCC: Actually use sysroot for header path detection
Function signature was prepared for that on
4c6b794774 but it wasn't really used

Change-Id: I1ee7059a00f0441d42a117b8f8d2c8c776d93815
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-05 12:18:33 +02:00
Tobias Hunger
8ba422d07c s/profile/kit/
* Rename profiles to kits.
* Update some strings:
   * projects mode has a Kits tab, not a Targets tab.
   * " Settings" was dropped from the sub-tabs of the Kits tab
   * menu entry "Build/Open Build/Run Target Selector" was renamed
     to "Build/Open Build and Run Kits Selector".
   * Use "Kit" instead of "Target" in miniprojecttargetselector.
     (The class was not renamed as it does indeed select targets,
      not kits)

Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-04 15:24:25 +02:00
Daniel Teske
36f6c02f1c Remove evaluateBuildSystem signal
It adds almost nothing and introduced some bugs.
This fixes:
Double evaluation in cmakeproject on build directory changes.
Wrong runconfiguration update in cmake for set_target_properties(target
PROPERTIES OUTPUT_NAME [..]) changes.

Unecessary runconfiguration removal in AutoTools and Generic projectmanager.

Reevaluation of .pro files on changing the active runconfiguration or deploy
configuration.

Task-number: QTCREATORBUG-7723
Task-number: QTCREATORBUG-7761

Change-Id: I50249b186917cd3a4f399f187f09ac8428ab6f9e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-24 12:13:48 +02:00
Daniel Teske
d342ea3678 CMakeProject: use static_cast not qojbect_cast
Change-Id: I5568316edb16fb3c797b8d403d75617279c1bcae
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-08-22 16:33:41 +02:00
Tobias Hunger
cac2819838 Fix crashes when no default profile is set
* Handle 0 when calling createTarget to avoid the crashes in the first place
* Do not try to create/add targets for 0 profiles to avoid creator writing
  a warning to the console
* Fix possible crashes in debugger when no default profile is set.

Task-number: QTCREATORBUG-7695
Change-Id: I9afc8e29c8b859ad078dad794ef5017168daac78
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-08-13 14:22:46 +02:00
Konstantin Tokarev
d18bf468ad Changed return type of :ICore::mainWindow() to QWidget*
Also removed all <QMainWindow> includes which are not needed
anymore.

Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-19 15:15:53 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Tobias Hunger
2431456216 Profile introduction
Introduce Profiles to store sets of values that describe a system/device.

These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.

This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.

Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-06-21 12:08:12 +02:00
Eike Ziller
e3c354d8f2 Make PluginManager mostly static.
Change-Id: Ib938aa4999c7c418a82304c5cca2e8748ef9d228
Reviewed-by: hjk <qthjk@ovi.com>
2012-06-19 16:11:40 +02:00
Peter Kuemmel
b3c4aa99da CMake: Read macro definitions
The CodeBlocks generator writes for each macro definition
<Add option=-D... />
(also make getters const)

Task-number: QTCREATORBUG-3922
Change-Id: I93e10397e76ad4f34126a76c4c36e4529d48d0ad
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-06-04 20:31:34 +02:00
Daniel Teske
e8ee898864 ProjectExplorer: Remove hack for virtual folders
Previously virtual folders, that is the "Sources", "Headers" folders used a
hack. This patch removes that hack, by introducing the following changes
- The FlatModel and the ProjectExplorer::Nodes now don't require path() to
  be unique. Thus allowing the virtual folders to all return the same for
  path(). [1]

- Introducing a new node type "VirtualFolder" which is sorted according to
  a priority.

- Introducing a few new virtuals for displayName and toolip(), which can
  be overriden.

[1] Note that all the project managers do require path() to be unique for
some types of nodes.

That also fixes:
Task-number: QTCREATORBUG-7100

Change-Id: I76b730f4c4254e2894467603bbe9a30e356a0bcc
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-05-08 13:12:17 +02:00
Daniel Teske
ce62c4bf91 CMakeProjectManager: Remove outdated todos
Most of them are done, or are not really todos but just notes on
the code.

Change-Id: Idc4836844ee7bc1444e1251f97118bd9103a6019
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-05-03 16:22:13 +02:00
Tobias Hunger
df5dab6382 Use Core::Id in project-related objects
Use Core::Id for all the project related objects in favor of plain
QStrings.

Change-Id: I790ab40cb29899efdb49c413a77609486f52e683
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-25 11:49:19 +02:00
hjk
5b0bf61640 qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts.

Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-17 09:53:44 +02:00
Konstantin Tokarev
ecbadbce24 Forward declare QFileSystemWatcher
Change-Id: I9ddfe95ea9e0df31c6737e11fe7b4b095b594d18
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-03-26 15:42:22 +02:00
Daniel Teske
2176599e74 Remove Project::dependsOn(), it's never called
I don't remember why I did leave it alone in the reafctoring some years
ago, but surely it serves no purpose.

Change-Id: Idf920faf3f8f7128cd410501f2c3748e100dfbfb
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-03-16 11:28:00 +01:00
Erik Verbruggen
f1b2100e34 Move the ModelManagerInterface out of the CPlusPlus library.
Change-Id: Iffaa18f848a22f6961b49dff048672b194570df6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-14 11:46:24 +01:00
Sergey Belyashov
cb6e324738 Added tr() for 2 messages in cmake plugin
Messages: "Build directory:" and "Run cmake"

Change-Id: Id9306d595cf9d539fd7acd22f0759e3726a4c376
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 19:07:21 +01:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
And adapt the other API respectively.

Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-20 13:32:49 +01:00
Erik Verbruggen
3aab8beaf4 Supply c++11 flags and per-project info to c++ code model.
A manual squash/merge of the changes below, plus a couple of subsequent
code fixes.

59085aa5fbb99e2d786cd2c1a06c24a111ccb49f:
    Modify CppModel::ProjectInfo

    Adding per project node information, to pass on the correct
    defines/includes for each file, instead of aggregating them incorrectly.

    Also split up SOURCES and OBJECTIVE_SOURCES.

    Also ask the toolchain to convert the compilerflags to flags the
    codemodel understands, for now only gcc and only c++11.

    Also make the toolchain aware of the flags used to compile, so that it
    can emit the correct defines.

    Note: No header files are passed on.

74028802314cd4e75b41b46407433e07090a304d:
    GCC: Evaluate cxxflags when checking for predefined macros

ebaaa4957e4c02cc9637a998eddae1d0acd74f83:
    MSVC: Take cxxflags into account when checking for predefined macros

9bfce7e889bcf7bcc47bf880e3ea25945ca7d0d7:
    Compile fixes

Change-Id: I9de94ad038dfc5dc1987732e84b13fb4419c96f5
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2012-02-16 15:17:17 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Eike Ziller
f916d38dce Make IFile::isReadOnly consistent.
It is supposed to refer to the property of the file on disk (if there is
any).

Task-number: QTCREATORBUG-4998
Change-Id: Iaed62c17d124b364aecec4d1f910046bade42d40
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-14 12:58:11 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
tomdeblauwe
a3e101639d fix whitespace in cmakeproject
Change-Id: I62e1f14793fbf994273a838f19b8a4846dcec466
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2011-12-05 10:59:40 +01:00