| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
bigger conflicts resolved at:
src/plugins/qmldesigner/CMakeLists.txt
src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
|
| |
| |
| |
| |
| |
| |
| |
| | |
Excluding the Qml parser, which needs to remain in sync with it's copy
in Qt.
Change-Id: I22f475f265dd74687e3239c4d6916c777798a447
Reviewed-by: hjk <hjk@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LinkPrivate::linkImports() would either load the <builtins> or the
<defaults> module, but only process the <defaults> module in
LinkPrivate::populateImportedTypes().
Note: The <defaults> module (from the package '<default>') is the
QtCreator magic replacement for the actual <builtins> modules
(from the package 'QML').
This means that if the <defaults> were loaded, then QtObject would
be recognized as an object from QtQuick.
On the other hand, if the <builtins> were found, then neither
<defaults> nor <builtins> would have been imported and QtObject
would not have been found in the imports (because neither <defaults>
nor <builtins> would have been imported).
The "<defaults>-found" situation happens right after a "reset code
model" while the "<builtins>-found" appears when the qml code finally
found the <builtins> package, usually after running cmake or when a
project was freshly opened in Qt Creator.
Instead, always try to load both <defaults> and <builtins> module.
Also, fix the builtins.qmltypes (that contains the qt creators magic
types) to reflect that Component and QtObject
are both available from the QML package (the <builtins> module), as
else one cannot import QtObject from QtQml after a code mode reset.
Fixes: QTCREATORBUG-28287
Fixes: QTCREATORBUG-28375
Change-Id: I67084a169dc5ca8ec2474b721dbef83cd47037c7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QtQuick.Controls has sub imports like QtQuick.Controls.macOS/windows
that wil lbe invalid on other platforms. In this case we do not want
to mark the original import as invalid, since it turns
off checks in QmlJSCheck.
Therefore moving the setting to invalid into the block that is only
executed for non optional sub imports.
Task-number: QDS-9094
Change-Id: If0ad4e32c14d608f88b8239f390208e51a93fbd8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
LinkPrivate::linkImports() would either load the <builtins> or the
<defaults> module, but only process the <defaults> module in
LinkPrivate::populateImportedTypes().
Note: The <defaults> module (from the package '<default>') is the
QtCreator magic replacement for the actual <builtins> modules
(from the package 'QML').
This means that if the <defaults> were loaded, then QtObject would
be recognized as an object from QtQuick.
On the other hand, if the <builtins> were found, then neither
<defaults> nor <builtins> would have been imported and QtObject
would not have been found in the imports (because neither <defaults>
nor <builtins> would have been imported).
The "<defaults>-found" situation happens right after a "reset code
model" while the "<builtins>-found" appears when the qml code finally
found the <builtins> package, usually after running cmake or when a
project was freshly opened in Qt Creator.
Instead, always try to load both <defaults> and <builtins> module.
Also, fix the builtins.qmltypes (that contains the qt creators magic
types) to reflect that Component and QtObject
are both available from the QML package (the <builtins> module), as
else one cannot import QtObject from QtQml after a code mode reset.
Fixes: QTCREATORBUG-28287
Fixes: QTCREATORBUG-28375
Change-Id: I67084a169dc5ca8ec2474b721dbef83cd47037c7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|/
|
|
|
|
|
|
|
| |
This reduces the CPU time of Export::visibleInVContext() from 50% to 15%
on Windows, when switching files.
Change-Id: Iff82924c47d1b696c9d3d7ca40f49d9d02bcb3e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: I528a6950dfa6e09eb7f7ada265c8c41dba816bfd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
| |
convert more QString containing paths to Utils::FilePath
Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
|
|
|
|
|
|
|
|
|
| |
Taking the Qt 6 branches, leaving some dummies until downstream
adapted.
Change-Id: Ib9b86568d73c341c8f740ba497c3cbfab830d8a1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
This fixes passing the hints from FindExportedCppTypes to
the actual cppeditor so they can be displayed to the
user.
Fixes: QTCREATORBUG-27243
Change-Id: Ibcb68296f044a9c6a96f40945d8a0e964be7f042
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
We need to search application directories as well since the new
QML Module API will generate modules there.
Task-number: QTCREATORBUG-24987
Change-Id: Ie67233ffece692c62921db13c49ae8cc2184422f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
| |
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ModelManagerInterface *ModelManagerInterface::instanceForFuture()
method. If the returned instance is not null, it's guaranteed
that it will be valid at least as long as the passed QFuture object
isn't finished.
Use instanceForFuture() in Link c'tor, as it's called from
non-gui thread.
Change-Id: I7e5ee6ad27e8f71cc0cef7fd9a91b710e2f8f662
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to import components of different paths to fill
a module.
Take further paths into account when looking up types.
Fixes: QTCREATORBUG-24405
Change-Id: I8d6bf0a324ea9c0d1fe9d91b40857f91f00dd662
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If the QtQuick import was less than 2.15 implicit dependencies
were not properly resolved.
For example if a type from a module derives from QtQml.QtObject.
Change-Id: I42a3320ee91496da0991de2018efcd124d56f6cd
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
| |
Suppress error message if either the current or the sub import are
optional.
Change-Id: I6ab8592c6aa8b20576bfa897e432d317f8a7e3b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: Ie6e0d3a5cbd97a9d15dc74b553bdc17d7d039bea
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add most changes to the qmldir parser of Qt6. This is not a direct
application of the changes because they rely on changes to QtBase that
are Q6 only.
Ignore load errors of optional dependencies.
Fixes: QTCREATORBUG-24772
Change-Id: I0b85818b602c8c7c1712e52318b4ca3f15364cc5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
| |
This helps with resolving QEasingCurve's prototype, which is only
available once QtQml has been loaded.
Task-number: QTCREATORBUG-24142
Change-Id: Icb19491071c195c16c527bd206ffdea6f5806b4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qmldir files can have lines like "import QtQml". These were already
parsed, but not stored in LibraryInfo. Store them.
When imports are resolved in Link and a library has such an import, also
load the module it refers to, with the same version and "as" scope.
Add a test to verify the behavior works.
Change-Id: I80b260bfaa36a9e5de0849fa5632b3361077ef01
Task-number: QTCREATORBUG-23986
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-82710
Change-Id: I876ec2b8e2b668a239248511b0fbd58389098de6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parser side support for annotations, inline components, new UiVersion
and all the things included in QT 5.15 parser
* SourceLocation moved from QmlJS:AST to QmlJS
* Visitors now need to handle throwRecursionDepthError
* BaseVisitor for visitors that want to override all visit
Task-number: QTCREATORBUG-23591
Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
app.qmltypes is being added as a new convention to Qt 5.15. These files
are to be found next to application binaries, and contain the QML types
those application register themselves, in contrast to QML types
registered from plugins loaded via the regular import mechanism.
lib.qmltypes works the same way, in principle, for libraries. This
change only adds it to the possible names for qmltypes files, though.
Change-Id: I1d7c5835c8c3e988d214c5cdb949ca677b48dfc5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
| |
Fix linter warnings, apply coding style, avoid foreach, drop dead code.
Change-Id: Ib98488725262c1bd3a04de0db0397a9129e21901
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
The reasoning in 1b4766e26c6b did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.
Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
| |
We'd like to make use of it in a more general context, and it's not
directly related to QML.
Change-Id: I025ec67829f85544667684cdb8c99d1ee4c18197
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-21042
Change-Id: I07093c240abb2f0fafe1a97fb4e81fd223551d43
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Types information for qbs is more limited that qml; this causes
qtcreator to raise false positives. This patch relax the checks and
provide some type information needed by qbs files generated by the
wizards.
Task-number: QTCREATORBUG-19757
Change-Id: I07a1dd9d8fedaf4c5c751c2f00643f15ae39127a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
|
|
|
|
|
|
|
|
|
| |
The designer has to be able to handle this error/warning
explicitly. To be able to identify the warning I added
a special severity.
Change-Id: I99571497f7327a7857244ef48334c14a254c8ca0
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
|
|
|
|
|
| |
Change-Id: Ic5b815061212f66af5e36396b9a2b94cfbdfbe52
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
| |
Change-Id: I25e525216bb6ad07c5491c7e9660c7d9becad1d4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: Id973d442e1770f453b16723f9cf75ee2169b33ad
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This is a real bottle neck on Windows
and I do not know of a case where it is required.
Change-Id: I99ebf3bfdd22cfb0ed82d6d39eeb83f079f654d6
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
|
|
|
|
|
|
|
| |
In standalone tests there is no instance of ExtensionSystem::PluginManager.
Change-Id: I890016c4e0d2fbb41cfc0a5614e936d31e43cd0f
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
|
|
|
|
|
|
| |
Change-Id: I1b7bade71226e4181b2643cabb53f934930afc81
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Modules used to be searched by name with optionally an attached
version. Now, if a module with version is not found, the version is
attached to the parent module.
Task-number: QTCREATORBUG-16145
Change-Id: Ie0f30d4df64d13b3ec4c5ee38e9ad9215ae56420
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch it is possible to specify QML_IMPORT_PATH in
CMake projects and QtCreator will scan those paths.
One only has to make sure that the variable which is set in the
CMakeLists.txt is also added to the CMakeCache.txt
Task-number: QTCREATORBUG-11328
Change-Id: I11c7694806664d3203d855983e7db4a89fac267d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously qrc paths of QML/JS documents were not considered for
implicit imports. Only the path of the document in the file system
was considered. The QML engine, however, doesn't know the original
path at all and only uses the qrc paths for import resolution. This
created a mismatch between what the QML engine could recognize and
what the code model suggested.
Without alias directives, any files imported from a qrc file would
have to reside in the same directory as the one implicitly importing
them, so this arrangement happened to work, most of the time.
In order to support aliases we have to search the files in the same
qrc path to figure out the imports. To do that, we keep a reverse
map of qrc paths to files in the QrcParser and iterate that when
resolving imports.
Change-Id: I84baae6cbfbe96ddd5322c81494c1e4a3f473f3f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
| |
* Update remaining files in src
Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I5d1235fc7c86b12127b4b7c6392a24a4f4de84c2
Reviewed-by: hjk <hjk@theqtcompany.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-14849
Change-Id: I26f69b5c6c421b5eb965c96d75df15d16e960237
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows a plugin to insert custom imports. These imports are
used by QtC for syntax highlighting and code completion. This way a
plugin can register types and objects that are available only at
runtime.
This is an example of an imports function implementation:
QList<Import> MyPlugin::imports(ValueOwner *valueOwner, const Document
*context) const
{
// context is needed to know from which project is the opened document
// in this example we don't care about multiple projects
Import import;
import.object = new QmlJS::ObjectValue(valueOwner, "<defaults>");
import.valid = true;
const ComponentVersion version(1, 0);
import.info = ImportInfo::moduleImport("MyPlugin", version,
QString());
auto myType = valueOwner->newObject(nullptr)
myType->setMember("myProperty", valueOwner->valueOwner->intValue());
// add more properties & methods/signals to myType
import.object->setMember("MyType", myType);
// in this example we return only one, but you care return more than
one
return QList<Import>(import);
}
Change-Id: I395c273c7b15a9e4ed5a89a81d70ff92db2b7c0c
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ib193113c2c6bf085765d20e4f8d0b89b43cca0e1
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
|