Commit Graph

745 Commits

Author SHA1 Message Date
Oswald Buddenhagen
66a3553107 make library and plugin dependencies declarative
instead of directly including the respective pri files in
*_dependencies.pri, set variables and let qtcreator.pri resolve
them to includes.
this will allow us to re-use the dependency info elsewhere.

Change-Id: Iaa33924e428ac0409660f42df2f98a7978452d3e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 14:37:45 +02:00
Oswald Buddenhagen
9631fb88cf centralize assignment of TEMPLATE = lib
Change-Id: I4025539f3875e79f03743ba9ed3fd09cd31b998d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:13:17 +02:00
Oswald Buddenhagen
750616f7ac remove unnecessary include paths
the #include statements are supposed to be written in a way that makes
these unnecessary.

Change-Id: I6c9c0c3b00377cb8438036c96e5321ffd493523f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:10:37 +02:00
Oswald Buddenhagen
c61210089f define QT_CREATOR centrally
numerous "3rdparty" libraries have respective #ifdefs, and consequently
the define is added in several places. it's quite a mess with the .pr?
and .qbs files, though. solve the problem by sidestepping it.

Change-Id: I5a6b1ba7cfe96b44f0a4f4ef9738900906a44316
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 12:20:37 +02:00
Oswald Buddenhagen
7ce3362288 automatically include libs' and plugins' _dependencies.pri files
Change-Id: I25645bb625b467c6f9d895ff89a70acd6a25683e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 12:19:31 +02:00
Oswald Buddenhagen
37a64fb867 factor out all library dependencies to _dependencies.pri files
this makes it uniform for all libraries

Change-Id: I7a7665a2c74c8f212248c0400de04ca3eed1440a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 12:16:42 +02:00
Friedemann Kleint
af24ea9b92 Fix Krazy warnings about includes/header guards in QML-JS-code.
Change-Id: I18fc13b8ac2b2c7a3a50bea2be1434667bc5c56f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-03-12 16:19:06 +01:00
Friedemann Kleint
9f7a1e3d65 Fix Krazy warnings about QString::null/clear().
Change-Id: I11faa5af0c186a9126c4af6f86e56250030d6cd9
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-03-11 14:41:03 +01:00
Aurindam Jana
6bae47c5c0 ConsoleItem: Return copy of QString instead of ref
Change-Id: Ibe8d5aa103c2fd4c40fe4be8445e49ca822049a3
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2013-03-05 17:30:52 +01:00
Fawzi Mohamed
ef42f53f22 qmljs: do not show warnings for not fully supported languages
Change-Id: Ie153caefcbb0f5d6d627697fd324d0cd0e3fa31f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-05 15:30:23 +01:00
Aurindam Jana
7bba366482 QmlConsole: Remove zero width space
Zero width space is inserted at every punctuation to
serve as a potential line break. All occurrences should
be removed before sending the expression to JS engine
for evaluation.

Task-number: QTCREATORBUG-8859

Change-Id: I170dfd5fb0f1122ed945bb2e5f77ecaad925004b
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-03-05 14:37:26 +01:00
Kai Koehne
5ceeddf2b8 QmlBundle: Do not translate warnings
The warnings are just shown on console / through qWarning(), so
there's no need to translate them.

Change-Id: I27bc9a043d9dd76d41fcde6c253b04b69fef40ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-22 16:45:02 +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
Tobias Hunger
1951c86395 Reduce padding in often-used structs
Reduce the padding in some often-used structs for 64bit machines.
32bit machines should also profit from most changes, but to a
lesser degree.

Change-Id: Ic4c67b94e962731de4f31164c52a372d78944ccc
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-21 13:22:21 +01:00
Leena Miettinen
22caba4101 UI text: Fix QML JS static analytics messages
Fixed capitalization and punctuation. I will fix the docs in
another commit.

Change-Id: I2d9e34d8f2a3e48a55d29cb9610fed0e42e293c5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-02-13 16:49:12 +01:00
Robert Loehning
ccb917bf3d String improvements
Change-Id: I130f1f808720515d781733483b2e814c94f32461
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-02-12 12:18:39 +01:00
Fawzi Mohamed
01c865fe91 qmljs: fix "." gone astray
Change-Id: I5b43dbf44bed70af1d3a5fc407e88c9e3733316e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-02-11 16:19:33 +01:00
Leena Miettinen
62f13deaf3 UI text: fix qmljs messages
Added punctuation.

Change-Id: I737a66bb505221ff92d295c4e4b30446a099a15b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-02-11 15:39:07 +01:00
Leena Miettinen
419c6de735 Doc: replace deprecated QDoc commands
The \i and \o commands were replaced with \li and
\bold was replaced with \b in QDoc for Qt 5.

The \input command was replaced with \include in the docs.

Change-Id: I257d1bebb8ebc739ca20e0d29fcf0406ecb14534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-06 09:44:18 +01:00
Robert Loehning
a040424d2a Incremented year in copyright info
Change-Id: Ia11f4d7a94465de7f12cc390855e54e3256e5455
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-01 09:19:26 +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
Fawzi Mohamed
174baf5ea1 qmljs: differnt language constants for the different qml flavors
Added separated qbs, qmltypes, QtQuick1, and QtQuick2
and "generic" Qml languages.
Cleaned up the mime types a bit, preparing for registered mime
types.

Change-Id: I0e484c93e003176cd659acc546baa6d024defa19
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-01-31 11:50:35 +01:00
Friedemann Kleint
c0fe621127 Remove QT_BEGIN/END_HEADER, fixing compilation with Qt 5 (dev).
The macros were removed in
07e3bcdc106ac42703ae0fb88b6cac2d2bfdd072 .

Change-Id: I4a43106ca85dc9ed97f75a4505888cb550305a8d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-01-30 18:20:07 +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
Friedemann Kleint
9d29b251e7 Fix spelling/blank errors discovered by the bots.
Change-Id: Id6b25e288ce4fe4299644f77db65911082e76262
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
2013-01-29 15:50:27 +01:00
Friedemann Kleint
8bb0134c50 tr()-Fixes: Fix translation contexts.
Change-Id: Ic043a097947a80e2fb5cb381c585375c4e5f5eef
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-01-29 13:58:36 +01:00
Fawzi Mohamed
259145f080 qmljs/parser: update to latest qt5 parser
fix error semicolon insertion of loops, strict mode

Change-Id: Ic67d6b1fff6f476ea7eb64ae0ee43515d29654a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-24 15:06:41 +01:00
Fawzi Mohamed
7b166ccc09 Revert "qmljs/parser: update to latest qt5 parser"
error 'QmlJS::Engine' does not have any field named 'directives to be fixed

This reverts commit 7d76f9040a933981ed44b2b4f0a6edcff034be6a

Change-Id: I24dbe6829ed3920af0f53f2ec31eba82ebdf749f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-23 15:20:56 +01:00
Fawzi Mohamed
f0e4df5826 qmljs/parser: update to latest qt5 parser
fix error semicolon insertion of loops, strict mode
Change-Id: I311733ffb34269d1cee7e576d05af78893b2bcbb
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-01-23 14:47:26 +01:00
Orgad Shaneh
88267a3299 Generalize QT_NO_CAST_FROM_ASCII
Change-Id: I2b6c5876cafb7cf19fc3040bc84fd88a90b6c0e0
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-16 01:14:08 +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
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
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
Robert Loehning
2b2f41db4f Compile fix
Change-Id: I58f23f78bbb3794103886d207e96483b108aa1e6
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2012-12-06 17:34:58 +01:00
Fawzi Mohamed
82a8e9bb86 qmljs: added persistent trie
Add a presistent trie to store imports, and provide a better (IMHO)
completion algorithm.
The trie is quite generic and it might be worth while to move it to utils.

Change-Id: I4081346af6215b1ee8ff14bd063c2a021d7c8218
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-12-06 12:57:48 +01:00
Fawzi Mohamed
66eb27e687 qmljs: indent expression in if condition and indent lambda expressions
* indent expressions (like function defs) in if condition
  fixes QTCREATORBUG-7243

Change-Id: I61197317a8dcba72a45b660600711748e2e2b962
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-03 13:41:22 +01:00
Orgad Shaneh
cd6302502b QmlJS: Revert CodeFormatter::stateToString return type to QString
Change-Id: I532327126dfdbe4d338d7afd0bcbe5e27ba206d9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2012-11-28 23:18:42 +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
Orgad Shaneh
3747e941ad Clean up whitespace before EOL
Change-Id: I385544a10b9be66589b0d1a48594128035836c8a
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 20:17:51 +01:00
David Schulz
2db4fb4bea Fix: build failure for qmljscheck an qmljscodeformatter
Change-Id: Iba9686506d971f92e525361e93d648dc940fe2d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2012-11-28 15:11:08 +01:00
Friedemann Kleint
e3d3cf987c Compile fix (QT_NO_CAST_FROM_ASCII).
Change-Id: I4db4135758f5cec8435fe0f11ab7141068b7cee3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-28 12:37:50 +01:00
Orgad Shaneh
5ea0937167 QmlJS: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I0c5654a978f47a4db5428936fd44633f21394830
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-28 11:11:47 +01:00
Thomas Hartmann
279cc09cc0 QmlJS::SimpleReader: simple bugfix (initialisation)
The user can use readFromSource repeatedly.

Change-Id: Ibb7da95743ae6ecfd4492bb0163ff3599d5bcdb5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-21 14:19:57 +01:00
Thomas Hartmann
6cf321a316 QmlJS:SimpleReader: adding support for arrays
Also adding test.

Change-Id: Idaf0aeacbb6f78e5c8404db740c2a8b7b297dad2
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-21 13:58:58 +01:00
Marcel Krems
2ed22524a7 QmlJS: Fixed potential crash in SimpleReader.
Change-Id: I21f5824e6d51391aa439188d70f9a8e0456f2f51
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-14 07:03:41 +01:00
Thomas Hartmann
5debabc410 QmlJS: adding SimpleReader
SimpleReader is a !simple! parser for json like qml files.
SimpleReader only parses literal properties for e.g. configuration
files.

SimpleAbstractStreamReader allows event based parsing and SimpleReader
stores the parsed data in a reference counted tree structure.

Change-Id: I0f6422a97f5c356149c516f227f8bbd7b736a6d0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-07 16:42:28 +01:00
Thomas Hartmann
33721a85fe Fix linking for MSVC
This was not linking for the debugger plugin.
Since the class has no actual symbol we cannot export it.

Change-Id: I7db7a779e30ca2b2870296874a3d35992be3f5fb
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
2012-10-10 12:20:55 +02:00
Thomas Hartmann
587adf5084 QmlJSEditor: crash fix
The typeStack has to stay in sync and initializers for
properties do not have a type.

Change-Id: I49f7d1679d083c994fd692a1c36e33ba7fce17ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-10 11:26:06 +02:00
Aurindam Jana
1d04c4c3df Debugger: Remove the dependence on QmlJSTools
Change-Id: I26765134c19b9a6cf1e7ad26f313e2d4f8faf258
Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
2012-10-09 18:22:00 +02:00
Eike Ziller
d5d1c5e394 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/libs/utils/fileutils.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/genericdirectuploadservice.cpp
	src/tools/qtcreatorcrashhandler/main.cpp

Change-Id: I830287691e7085fe9c94597e23ec7be64eb8be42
2012-10-09 11:50:17 +02:00