Commit Graph

25798 Commits

Author SHA1 Message Date
Thomas Hartmann 012fad1dfb QmlDesigner: compile fix for Qt5
Change-Id: Iff39fdf8a58c7e844b087dbab7c112630d6c50ad
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-25 15:00:20 +02:00
Thomas Hartmann 0f66d495e9 QmlDesigner: prepare the Model for QtQuick 2.0
We have to also check for the correct QtQuick 2.0 in a few places.
For Positioner I added a helper function.

Change-Id: Ie692f16d8d9433a0248854a3bc48b846138eff04
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-25 14:38:45 +02:00
Marco Bubke b9bbadcc7a White space fix
Change-Id: Id5c5af2ae6821e4d84895cbcdcea4c6fec2973eb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 14:03:55 +02:00
Marco Bubke a0f17e00e4 QmlDesigner.NodeInstances: Fix supported type because of qvariant changes
Change-Id: Iec63a16218420e546e612909380dcd4f5bdb4a30
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 14:03:49 +02:00
Marco Bubke c818858a37 QmlDesigner.Model: Detach NodeInstanceView before Rewriter
Change-Id: Idcf13d531ba0db0d944e98d126962b6445ffd433
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 14:03:42 +02:00
Marco Bubke d7bd46dbe6 QmlDesigner.NodeInstances: Add end puppet command
Change-Id: Ice3c6ce1bb0d16d4ffbc33557b12fa147ac6058c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 14:03:33 +02:00
Marco Bubke dc2527f342 QmlDesigner.NodeInstances: Fix timeout for tests
Change-Id: If024515cf43668569b625719f77cc30545453c59
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 13:01:15 +02:00
Thomas Hartmann 7fee2d7a34 Tests:QmlDesigner: fixing changeGradientId
Attaching a second RewriterView is not allowed.

Change-Id: I54055b36f86cd1cff0313edfd405c128c5783705
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:58:13 +02:00
Thomas Hartmann 2f0f887acc Tests.QmlDesigner: fixing testStatesBaseState
We have to process events to ensure that the correct
data is actually delivered by qmlpuppet.

Change-Id: I5a8b18d20ced5c7b9279868c53fbee698a752b74
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:58:02 +02:00
Thomas Hartmann facd24c6b5 Tests.QmlDesigner: fixing defaultPropertyValues
Image does not exist have a revision 1.1.

Change-Id: I012cf4e3636239665b45369717fba8c3c61c0352
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:57:49 +02:00
Christian Kamm 47d2558f6f C++11: Fix bug with parsing ctor initializers.
Task-number: QTCREATORBUG-7919

Change-Id: I12307c3fb6c20424c8b5aaf564a031924c755d25
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-25 11:03:18 +02:00
Christian Kandeler 89fa7823b3 Replace all remaining functions deprecated in Qt 5, if possible.
These are:
    - QInputDialog::getInteger() [-> getInt()]
    - QKeySequence::operator QString() [-> toString()]
    - QRegion::intersect() [-> intersected()]
    - qVariantCanConvert() [-> QVariant::canConvert()]

Plus some left-over occurrences of qFindChild() and
QAbstractItemModel::reset() that were missed by the
respective earlier patches.

All deprecated features still left are not trivially
replaceable, i.e. the code using them cannot be made
to compile with both Qt 4 and Qt 5.

Change-Id: I32541681bbf66b0fef78f5c7025521f9ff84f463
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-25 11:01:04 +02:00
Christian Kandeler aef4280bc1 Do not use QWeakPointer to track QObjects.
This use case is deprecated in Qt 5. Use QPointer instead.

Change-Id: Id6c32542032656d7cb31cf838d93a680ab9e9327
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-09-25 10:45:36 +02:00
Peter Kümmel f21a408b51 Setter: get argument by const reference
Without the const QVariant can't be constructed inline.

Change-Id: I80ff9eb677361dca2fd104ef85facf7b69e580d7
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-24 16:54:49 +02:00
Peter Kümmel 3a0798395f msvctoolchain: x64 and amd64 are the same
- show cross and native in gui
- add missing compilers

Change-Id: Id48579d4e5dae3a68ed92c0cd2f41309e4f96753
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-24 16:10:22 +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
hjk 1362f0d27b qmljstools: de-noise
De-pimpl qmljstoolssettings, no need to pimpl a simple pointer.
Add using namespace TextEditor. Remove direct instance access.

Change-Id: I6b07d209a387d31735b95bc35e60a49a3ace7ca2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2012-09-24 13:37:35 +02:00
Nikolai Kosjar 31682a0c13 Get rid of ifdefs for crash handler in main.cpp.
Adapt the *.pro and *.qbp files to build unconditionally since the
ifdefs are already inlined in the functions.

Change-Id: I492f39600222a6174d4e16546bfa5a289965e8cb
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2012-09-24 12:31:48 +02:00
Thomas Hartmann c620ea67f0 Tests.QmlDesigner: compile fix
This header file is not needed and was moved
by recent refactoring.

Change-Id: I0899de93be4e6f03c42d94e128feaa203a12063d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:23:48 +02:00
Thomas Hartmann 102f915463 Tests.QmlDesigner: adding testBasicStatesQtQuick20
Testing basic states for Qt Quick 2.0.

Change-Id: I86b4dbaffa3ec340eb175a1cd687eef465d87efe
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:21:42 +02:00
Thomas Hartmann 3c42ca4138 Tests.QmlDesigner: adding testQtQuick20BasicRectangle
Basic test for Qt Quick 2.0.
This time using Rectangle (different prototype chain).

Change-Id: I5500fa5d1a6e2d049404944be81f0b5657cefe3c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:21:30 +02:00
Christian Kamm a81389356e C++11: Fix and add test for simple decltype uses.
Change-Id: I7f843fa96e33671ecb135b9db6f68d9f2cbf2fac
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-24 12:08:25 +02:00
Thomas Hartmann c060d778bb QmlDesigner.model: fix majorQtQuickVersion()
This function was broken for Item.

Change-Id: I772a2fd1b63933ba1134c824eb245b78d0270d9d
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-24 11:47:17 +02:00
Thomas Hartmann 3c5b64a722 Tests.QmlDesigner: adding basic test for Qt Quick 2.0
Change-Id: Id98be8ec130eb5adfcbd490600369e8353f168b8
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-24 11:47:07 +02:00
Thomas Hartmann 4757cfa975 QmlDesigner.textToModelMerger: cleanup
We do not need to support import Qt 4.7 anymore.

Change-Id: I34588117cdd54be17621a6fe102c98f105bc240e
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-24 11:46:58 +02:00
Marco Bubke f6f59c08d5 QmlDesigner.NodeInstances: Use the 4.8 QDataStream
The 4.8 Version of QDataStream is the lowest common denominator.        temporaryOutDataStream.setVersion(QDataStream::Qt_4_8);

Change-Id: I4aa681473b6349bd3e859f49d7233ff4a6d2911b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 11:46:34 +02:00
Marco Bubke d8d862f261 QmlDesigner.Instances: Fix type registration
Change-Id: I85378c0a2884a7c8886482f38bad24210ef33d69
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 11:46:28 +02:00
Marco Bubke 770ab68c45 QmlDesigner.Instances: Refactor the qml2 puppet
Change-Id: Iaa7a744ecf13e011addc573a381ea523d2d50a55
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 11:46:20 +02:00
David Schulz 51f847246e Debugger: Using gdb 7.5 in build scripts.
Adjusted makefiles and patches.
squashed some changes from orgad:
https://codereview.qt-project.org/#change,35419

Change-Id: I380e0199f1dca971b6018f6501e87070ee79fc76
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-24 11:05:20 +02:00
Thiago Macieira 40a5de8bf9 Do not abort Creator on SIGPIPE
This signal must be ignored. QProcess and QTcpSocket routinely
generate it and they have code to set this signal to ignored. Changing
it in the crash handler is a bad idea.

Change-Id: Ic8c020a0767ff0c5160d0ae470214de7fc569d5f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2012-09-24 09:29:17 +02:00
Thiago Macieira fa8763135b Fix compilation: don't call functions you didn't compile
These functions are only present on debug builds, on Linux. So don't
call them unless this is a debug build, on Linux.

Change-Id: I180c4a15fbfec15c585e4a8819a43065dba1e90c
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-23 16:18:11 +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
Nikolai Kosjar 903281b352 Linux: Add a crash handler providing a backtrace for debug builds.
Use case: You're working with a debug version of Qt Creator and you're
interested in getting a backtrace displayed as soon as Qt Creator
crashes without searching for the core file, starting your debugger, ...

Once a 'serious signal' (currently SIGILL, SIGFPE, SIGSEGV, SIGBUS,
SIGPIPE) is delivered, a popup displays the following debug information:

 - Qt Creator version (same as in the about dialog)
 - Kernel version (uname -a)
 - GNU/Linux Distribution (/etc/lsb-release)
 - Backtrace (by gdb)

Please note that this crash handler is built and used only in debug mode
on GNU/Linux. It's solely meant as a convenience tool for the developer.

In contrast to the breakpad integration, this crash handler operates
'offline'. There is no network i/o involved.

Change-Id: Idcfb1bf1ad68942615ecfe0dffc0d03154455049
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-21 15:57:41 +02:00
Christian Kandeler 6d06d47a6e Do not use qMemSet and qMemCopy.
They are deprecated in Qt 5. Call std::memset and std::memcpy instead.

Change-Id: I53c22283208b4d6fdfcba870c3b141f3c02001bd
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-09-21 15:40:27 +02:00
Christian Kandeler 0b28569ec6 Fix qbs build.
Was broken by f1962c9bd5.

Change-Id: I27ba26497b787829c444f3b7760f7b1fd1d198f8
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-21 10:54:05 +02:00
Christian Kandeler 2b293691aa Do not use qFindChild() and qFindChildren().
These are deprecated in Qt 5 and can be trivially rewritten using
a construct compatible with Qt 4 as well.

Change-Id: I9cb9ab8b7b4ee75c7510ec2648b69dd204c87da4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-09-20 17:18:51 +02:00
Christian Kandeler 2e81773c1d Fix merge artifact in qbs file.
Change-Id: I1c30c49bc3e5d000a97591e300f23fe55698adfe
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-20 14:35:16 +02:00
Thomas Hartmann e4114505ee QmlDesigner: fix regression uncovered by tests
Fixing a regression in the meta info system.

We follow now Qthe Declarative1StateOperation convention (note the 1).
Since this data is provided by Qt Creator it is independent from any Qt
version. (4.8/5.1)

Also the type comparison was broken in NodeMetaInfo for <cpp> types.
PackageName() does retrieve the package name of the cpp type which might
be different from the one used in qualfiedTypeName().

Change-Id: I5cdae37c2024cdc89824e68168c16e2050051d06
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-20 12:01:20 +02:00
Thomas Hartmann 73d119f3c8 QmlDesigner: fix regression in string rewriting
A regression was triggered by testGradientsRewriter().
Trailing "0" are not nice.

Change-Id: I0243ee8250c98cd5742b79af0d0cfef74357b074
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-20 12:01:13 +02:00
Thomas Hartmann 79ca107a1f Test.QmlDesigner: fix for windows
On Windows the exectuable is in either the debug/ or release/
subdirectory.

Change-Id: Ic4a155a5d0cd5024c3d8aedf86e8def094a2a84e
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-20 12:01:06 +02:00
Christian Kandeler 938612c35e Do not use QAbstractItemModel::reset().
Change-Id: Ie49bdf576a6d3543aef6df133b27c8827775c935
Rationale:
    a) It is conceptually cleaner to do the changes to the model
       in between calls to beginResetModel() and endResetModel,
       respectively.
    b) The function is deprecated in Qt 5, for exactly that reason.
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-20 11:11:45 +02:00
Christian Kandeler 1b3d637c1b Replace qVariantValue() with qvariant_cast().
qVariantvalue() is deprecated in Qt 5. qvariant_cast() does
the same thing and works in Qt 4 and Qt 5.

Change-Id: I922329d3a47fe394669f5d97a25f0825d3d2dea5
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-20 09:41:37 +02:00
Christian Kamm 5f6f880a32 Fix bug with expression list parsing.
Empty lists would have a single null entry, instead of being null
entirely.

Change-Id: I5114cf1e0ecdbcde5631511ad03a8d559668ea80
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-20 09:36:02 +02:00
Eike Ziller b947861c59 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.qbp
	src/libs/QtcLibrary.qbs
	src/plugins/QtcPlugin.qbs
	src/tools/QtcTool.qbs

Change-Id: I3acea26888febe8f96d2131932266ed88b9f55f5
2012-09-19 18:02:46 +02:00
Christian Kandeler c0321ac305 Replace some Q_OS_* constructs with their HostOsInfo equivalents.
Change-Id: I023ba83f3dfc8ba51a6dda6236d0156358a2e592
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-09-19 16:37:01 +02:00
David Schulz 44177392ec Debugger: Add missing continue to simple test
Change-Id: Ief142db796db9392d7d910c98c0dd1425e5f1230
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 16:35:40 +02:00
Thomas Hartmann 6fb9e90920 Tests.QmlDesigner: adding some QApplication::processEvents();
This is needed process all the events created by NodeInstanceView.

Change-Id: Ia2df51f5aafdc670e60a47064092123a1a100049
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:45 +02:00
Thomas Hartmann 96a41678c8 Tests.QmlDesigner: remove QSkip for working tests
Change-Id: I85f61ff4b0ff5abcbff4ef766c4ca7706069bdbc
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:35 +02:00
Thomas Hartmann 4cc46ef904 Tests.QmlDesigner: fix testSubComponentManager()
Types names changed.

Change-Id: Ide7cc23289ab490ff272ca99ee048ccc6c99d335
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:29 +02:00
Thomas Hartmann 55b7759a93 Tests.QmlDesigner: fix loadEmptyCoreModel()
Attaching more then one rewriter is not a good idea.

Change-Id: I3ec000836dc21029b43003c4636927086f267d10
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:22 +02:00