We get these thousands of times:
/usr/include/qt/QtCore/qbytearray.h:586: warning: definition of implicit
copy constructor for 'QByteRef' is deprecated because it has a user-
declared copy assignment operator [-Wdeprecated-copy]
inline QByteRef &operator=(const QByteRef &c)
^
/usr/include/qt/QtCore/5.14.2/QtCore/private/qmetatype_p.h:111: warning:
use of logical '||' with constant operand [-Wconstant-logical-operand]
Change-Id: I5f97f23d9b62ef1cd8d07495c46598d2a34a6d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Make sure to fix the path separators for the macro that gets passed on
the command line.
Change-Id: I444883e6fc5a2b49d73a1fa52aa1ea26b207185c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Is some situations, such as creating a new project, the item library
model can be updated too early, before the type information is
complete. In those cases, try again after a short delay.
Change-Id: I47d4766656280db46ef7473796dda961b765c026
Fixes: QDS-2023
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Adjust the info about exporting and importing assets.
Change-Id: Ibc66fac68e14483fda050b7501fc7e091115ce89
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
QMutex in Qt 6 cannot be recursive. So don't call the constructor to pass the
option that isn't needed.
Change-Id: I9709abb1c3734e10a7defffd1607e76745b5cf0a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This fixes the case when the navigator tree is collapsed and nothing
is selected, then a 3D object is dragged to the 3D editor. With this
fix, the tree is expanded and selection is shown. This also fixes
QDS-1892 partially (i.e. it still happens sometimes but less often).
Task-number: QDS-2024
Task-number: QDS-1892
Change-Id: If9233497d0f3c0daffafd939476d7bd64b005c79
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
... also when PROEVALUATOR_FULL is not defined.
For more correct parsing. We do not believe that this introduces
additional risk, because the replace version of system() has always been
enabled, and appears to be used more often.
Fixes: QTCREATORBUG-23940
Change-Id: I036a20fdab3f6c51c612912b60686a123440f397
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The BuildDirManager was used to switch between different
BuildDirReaders. Now that only the FileApiReader is left, that
infrastructure is no longer needed.
Change-Id: I2d339a3407bb633cff6a8f7502b7b09094f63fef
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Since we add more and more actions, updating the actions might become
a bottleneck. This patch adds more fine grained control.
Actions can ignore updates that do not apply.
Change-Id: I98dadfb39a5ec7423b00bf3fc69a9707fc162cba
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Hide the parameters behind yet another macro to get a uniform layout
and avoid parameter evaluation in the normal non-traced case.
Change-Id: Iaf24b0f1b285c8f664f8b3476ae82c39c1a2d7dd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Merge handleParsingSucceeded and handleParsingSuccess as well as
handleParsingFailed and handleParsingError.
Change-Id: If4f84bdfa2f59cfa0037a941372a1929996be3bd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Remove the code that switches between different types of
readers based on what the different CMake binaries support.
This is no longer needed since only file-api is supported now.
Change-Id: Ia86d143f5e2cecc2bcd68ab7d62503915a32d223
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
LD_PRELOAD is useful e.g. to preload custom malloc implementations
for profiling purposes. At times, it makes sense to not propagate
that to spawned child processes. This here allows to prevent that
by setting another variable, QTC_DO_NOT_PROPAGATE_LD_PRELOAD, in
the environment.
Change-Id: Ib8944685488a18a651d351b8a64dd8d7a7e48837
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... by using different icons in the tree.
So far, Qmake project nodes looked annoyingly uniform, which was a
hindrance to understanding their structure. We now use the same
differentiation as in qbs, that is "project" (SUBDIRS pro file),
"product" (app/lib/other) and "group" (pri file), which conveys much
more information at a quick glance.
Change-Id: I04ca2aeccb9240876c0fb5cd1310e0b199eb3e97
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Qt6 will require C++17, which has removed std::auto_ptr
Change-Id: I4f87ce0196799269735a878592ef3e930e94d4fc
Reviewed-by: David Schulz <david.schulz@qt.io>
When the language server reports diagnostics, it also reports to which
part of the code the diagnostic applies.
That part of the code wasn't emphasized before, there is only an icon
next to the line and part of the diagnostic message in the text editor,
but no exact clue of which word is targeted by the diagnostic.
This commit add information about the affected code by diagnostics using
extra selection of type CodeWarningsSelection as other plugins do (like
the clang code model).
If a diagnostic has no severity or is not Error, Warning is used (the word
will be underlined in yellow).
Diagnostics can be either Error, Warning, Information or Hint.
For example, clangd uses Hint for remarks and Information for notes.
Notes can be related to a warning or an error, for example
when a function call has an incorrect number of argument, the call site
will have an error diagnostic with red color and the called function
declaration will have a Hint diagnostic with a yellow color.
Change-Id: Ifa433553be95a4913541d5570a2758ac213e7075
Reviewed-by: David Schulz <david.schulz@qt.io>
The actual highlighting of the C++ code using clangd doesn't use many
colors to differentiate symbols (for example, fields of a class).
This commit makes symbols more visible for these categories:
- static methods
- preprocessor macros
- struct and class fields
- static fields
Change-Id: I001325cf5e48aa07d7397b2b7ac98a65501e1d5d
Reviewed-by: David Schulz <david.schulz@qt.io>
When the whole file contents are changed, for example because of changing
the highlight definition when there is several candidates, the language
server will behave as if the file's content was the result of
concatenating two times the file's content (leading to duplicate
declarations errors for C++).
The issue is that when this happens, the didChange message indicate
only the added portion of the change without the removal of the whole file
beforehand (ie: the range is empty and the text is the whole file content).
This is because charRemoved and charAdded are equal to the length of the
document which is not exactly the number of /visibles/ characters, but also
including some invisible formating characters according to QTBUG-80662.
This causes the QTextCursor to ignore the second setPosition because of
invalid position out of range.
Fix this using the same code as QWidgetTextControlPrivate::_q_contentsChanged
that is to use qMin to ensure the end position is not after the end of
the document according to QTextCursor.
For charsAdded, document->textAt takes care of that itself, via
Utils::Text::textAt.
See also: QTBUG-32583, QTBUG-80662
Change-Id: If781707d42253f4659005754efa73d872577f738
Reviewed-by: David Schulz <david.schulz@qt.io>
When doing Follow Symbol Under Cursor to a file that has a path with
spaces, QtCreator will show a message box with an error.
The issue is that the resolved file path can still have %20 encoding
after the QUrl::toString convertion to QString.
This is because toString does not support QUrl::FullyDecoded and fallback
to PrettyDecoded instead which won't replace %20 with a space.
To fix this, QUrl::fromPercentEncoding must be used.
Also, an existing use of QUrl::fromPercentEncoding is changed to have
an utf-8 input QByteArray instead of local8Bit as fromPercentEncoding
convert %-encoded values to raw values and then convert the result
from utf-8 to unicode QString.
Change-Id: I784bcc30a67b45dcd218170854d480ebeef4237e
Reviewed-by: David Schulz <david.schulz@qt.io>
When receiving textDocument/documentSymbol or
textDocument/symbolInformation, the outline widget and the outline
combobox is cleared and updated with received symbols.
This causes the selected index to become the first item of the list when
writing text.
Fix the issue by updating the selected index after having updated the
outline widget and outline combobox.
Change-Id: I52541940f8a979cbf130da4383db48c470fc94e1
Reviewed-by: David Schulz <david.schulz@qt.io>
When a document is opened that uses a language server, it would not gain
the completion assitance from the language server in some cases.
Instead, the default completion assist provider is used, which in case of
the TextEditor, will only provide basic autocompletion.
The reason is that Client::activateDocument is not called if the document
is not in LanguageClientManager::m_clientForDocument when
Client::openDocument is called. The check is at the end of that function.
When the issue happens, openDocument is called indirectly from
LanguageClientManager::documentOpened.
The fix is to change the order of instructions in
LanguageClientManager::documentOpened so m_clientForDocument is updated
before calling openDocumentWithClient.
This way, the language server's completion assist is really used as it
should.
Change-Id: I0d2b3b8573e97c0c0c4bd517775668d41a4a797b
Reviewed-by: David Schulz <david.schulz@qt.io>
When a string value's first line ends with an EOL the
line number for the next line got wrong which in turn
confused the syntax highlighter.
Fixes: QTCREATORBUG-23777
Change-Id: I37eed839a2e63cf470b9bc2ac0596ab8bc8d373c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The lexer handled escape sequences already, but not fully
correct.
This effectively reverts 63db0f271f and fixes the wrong
offset.
Task-number: QTCREATORBUG-23830
Change-Id: I2cc1e9df5c0218cf9ee80998adce69bbc2eb4dab
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>