When the environment variable QTC_NO_FUNCTION_DECL_DEF_LINK_TRACKING is
set, no method declaration/definition tracking is performed. This is to
see if QTCREATORBUG-11262 is triggered due to the tracking.
Task-number: QTCREATORBUG-11262
Change-Id: Id4cb1fabf9304f8bf42393cb65c402adf8818e2a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The CppRefactoringChanges::fileNoEditor takes a Document from the
snapshot it has. Although this snapshot is a safe copy, it might have
been gotten right after it was updated by indexing. Such a document will
still have its AST. If this AST is used by any refactoring action
without retaining it, the pointers will be dangling after a short while
(specifically: after the locator has extracted all the information).
The fileNoEditor method is called by the declDefLinkFinder to search
the target document. The snapshot is obtained before, and contains the
document for the semantic info. However, the target document will not
come from the semantic info, but from the indexer.
Change-Id: I212ff41dde6910e94e80552b2c3e5911fe9496ae
Task-number: QTCREATORBUG-11262
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This will hopefully help a bit in resolving the crashes that happen in
QCoreApplication::notifyInternal.
Change-Id: Ib3aa8c1a1f50778bd89938d7c529d8399ccf91ea
Task-number: QTCREATORBUG-11262
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Qt draws lines on half-pixel boundaries. Because of
rounding, this is not visible with non-scaled aliased
painting. However, on a high-DPI screen with scaling
enabled, the line under the menu bar is drawn at a one
pixel offset, which causes it to overlap the menubar items.
This change draws the line at the mathematically correct position.
Task-number: QTBUG-38858
Change-Id: I0a2260507d346b52a36258d479cde87064d991ef
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
For some reason ApplicationWindow seems to be twice in the type hierarchy.
This means all properties specific to ApplicationWindow were
duplicated. This patch avoids adding a property twice.
Task-number: QTCREATORBUG-12910
Change-Id: I8a06fa15778335be8c6977369ece94385b25487c
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
extraSelections is a local variable as well as a member
function of BaseTextEditorWidget, but if the full
qualified name is used the compiler thinks that this
is a static function call, which happens with the
MSVC 2010. Use the this pointer to use the correct
function.
Change-Id: I44ce96b2c17e7259274f2103ce70ae9b2ae3a56b
Reviewed-by: hjk <hjk121@nokiamail.com>
Since the plugins moved in 6aad96d89b,
the rpath of the clang code model plugin was broken for deployed clang library.
Change-Id: I5d59390540918c73a2cd217bb5ebf8f947122f01
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Prevent failures in situations where Qbs project files are still write
protected, like e.g. in Perforce VCS.
Change-Id: I2828546adcc314b7c6b0b6720e1cf96733d62fa5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
it is entirely plausible that the precise evaluation would succeed,
while the cumulative would fail due to some serious inaccuracies
introduced by it. such problems would be particularly hard to debug, as
we suppress error messages from the cumulative parsing, so the user
would get a "Giving up" message without any context.
Change-Id: I826b3b1d838808464b551e8ee0d7375d239442a3
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The general idea is to find an item that matches closely what
is stored in the kit information, but also accept item based
on toolchain matching as fallback with a lower priority.
Change-Id: I41a00562fa4308eb834d853865c41873ef362bd8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Updating the completion list is done in a separate thread, and for the
all and current project filters that requires a slot to be synchronously
executed on the main thread.
Triggering the update first canceled a running update and waited for
it to finish, before starting the next update. If the first update
hadn't run its code on the main thread yet, it was never be able to,
and never finished.
The patch just removes the waitForFinished after the cancel. There is no
reason to wait, since we retrieve all results only when we get the
finished signal of a non-canceled update anyhow.
Broke with 05c267673f when fixing
QTCREATORBUG-12592
Task-number: QTCREATORBUG-12875
Change-Id: Iba9d46d469e6b2c7e894963d964c2eaca4bc4d93
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
If a qbs project gets closed (e.g. due to a session switch) while the
project is being loaded, the corresponding QFuture does not get deleted
and the progress bar will be around forever. This patch fixes that.
Note: The project resolving by qbs was already correctly canceled; this
is about the visual effect only.
Change-Id: If00aed949505088cfdb87d08e26f3b62ccea5fd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
If items are dragged into the navigator we should not set the position
to 0,0 expliticly, because this breaks layouts.
Change-Id: I6e7cd130390ab68d13904d379a35dc4fa4337231
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
The LineEdit in the ColorEditor is not binded to a backendvalue
and we react manually to isAccepted (writeValueManually is set to true).
Because of this (and the famous focus bugs), we do not set the color,
if the selection is changed or the user enters edit mode without
pressing enter.
This patch adds the signal onCommitData to LineEdit and we react to
the signal. Because the the change of the backendvalue is delayed by
a timer we set the color immediately on the backend if we are not in gradient
editing mode.
Task-number: QTCREATORBUG-12841
Change-Id: Ic98640398c2c46b5e529780b4a9638c90760063f
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
There is no easy way to convert an enum (e.g. Qt.Vertical) to the
integer value without the meta object/QMetaEnum.
For this reason we evluate the enum as an expression
if the target property is int.
Without this patch enums do not work at all for properties defined as int.
Change-Id: I9363a84eef1bf4a3ed2c40b35f7439e249e9bd98
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
...in CheckSymbols (highlighting backend). CheckSymbols might run
concurrently several times with the same CPlusPlus::Document and modify
the diagnostic messages in an unsave manner. See stack straces below.
While the generated diagnostic messages ("Only virtual functions can be
marked 'final'", "Too few arguments", ...) are useful, they weren't
propagated to the editor widget since several minor versions.
=================================================================
==23724==ERROR: AddressSanitizer: attempting double-free on 0x60c0072fcd00 in thread T528 (Thread (pooled)):
#0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
#1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
#2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
#3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
#4 0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
#5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
#6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
#7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
#8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
#9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
#10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
#11 0x7fa17f0ccab1 (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x98ab1)
#12 0x7fa17f0cfa5e (/home/nik/usr/qt-5.3.1/lib/libQt5Core.so.5+0x9ba5e)
#13 0x7fa17eaeb181 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8181)
#14 0x7fa17dbec38c (/lib/x86_64-linux-gnu/libc.so.6+0xfb38c)
0x60c0072fcd00 is located 0 bytes inside of 128-byte region [0x60c0072fcd00,0x60c0072fcd80)
freed by thread T539 (Thread (pooled)) here:
#0 0x4787c1 in __interceptor_free (/home/nik/dev/creator/creator-ut_clang-qt5/bin/qtcreator+0x4787c1)
#1 0x7fa15e5da4ac in QTypedArrayData<unsigned short>::deallocate(QArrayData*) /home/nik/usr/qt-5.3.1/include/QtCore/qarraydata.h:234
#2 0x7fa15e5d87db in QString::~QString() /home/nik/usr/qt-5.3.1/include/QtCore/qstring.h:995
#3 0x7fa15e5f4f6a in CPlusPlus::Document::DiagnosticMessage::~DiagnosticMessage() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:140
#4 0x7fa15e5f4de2 in QList<CPlusPlus::Document::DiagnosticMessage>::node_destruct(QList<CPlusPlus::Document::DiagnosticMessage>::Node*, QList<CPlusPlus::Document::DiagnosticMessage>::Node*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:432
#5 0x7fa15e5f4ae9 in QList<CPlusPlus::Document::DiagnosticMessage>::dealloc(QListData::Data*) /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:784
#6 0x7fa15e5f47ed in QList<CPlusPlus::Document::DiagnosticMessage>::~QList() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:760
#7 0x7fa15e7533c2 in QList<CPlusPlus::Document::DiagnosticMessage>::clear() /home/nik/usr/qt-5.3.1/include/QtCore/qlist.h:793
#8 0x7fa15e6f2ed2 in CPlusPlus::Document::clearDiagnosticMessages() /home/nik/dev/creator/creator-ut/src/libs/cplusplus/CppDocument.h:205
#9 0x7fa15e6c5f5b in CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:337
#10 0x7fa15e6c83c2 in non-virtual thunk to CppTools::CheckSymbols::run() /home/nik/dev/creator/creator-ut/src/plugins/cpptools/cppchecksymbols.cpp:348
Change-Id: Ifab2842ea43aeb26099835966b02d8afc4b85df4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Seems to be a behavior change between Qt 5.2 and Qt 5.3. Now we need to
set the menu role explicitly, text heuristic fails.
Change-Id: I54ecfea5910db4863699bb077b8f8a6c88b56237
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
To HEAD of 1.3 branch.
Task-number: QTCREATORBUG-12833
Change-Id: Ic19267265ccc9035a7e82f973fe894843ce054e0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Following Squish documentation. Capital letters even caused
problems in nativeType().
Change-Id: I902984da40c7b57c1c40d35c2cd183e95481f1cf
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
No declarator was provided but we assumed one.
Task-number: QTCREATORBUG-12853
Change-Id: I5faf96b63f39aff43c0165f7277345737e53f191
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
FunctionDeclDefLink::changes is called from
CPPEditorWidget::updateFunctionDeclDefLinkNow() where it receives the
snapshot by reference from the semantic info. The semantic info is
recalculated in a/the future, so it might change the snapshot or its
documents while it's still being used by the decl/def link finder.
So, this patch takes a copy of all relevant semantic info (snapshot and
document) before starting to calculate the changes.
Change-Id: I78244a4ca8149233403b3c35ee05a2d4ed4b2770
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Starting with Qt 5.4 we are packaging the gdbserver tool as libgdbserver.so,
otherwise gradle will refuse to add it to the package. Gdbserver is renamed
also for ant.
Change-Id: I4ef6408226ab05ea7b4e3d6f41dd368f5a602c7d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>