The ObjectPool class template provides parts of the functionality
of the global PluginManager object pool but is intented to be
used with smaller set objects, typically with same base type (e.g.
factories) only.
The ObjectPool takes ownership of add items if and only if the item does
not have a QObject parent.
Items owned by the Object pool are destructed when the pool is
destructed, the other items are taken care of by their QObject parent
according to the usual parent/child behavior.
Change-Id: I60886095c8b04eae017e1fb56774b1bf66dbefa1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Qt Quick UI had been slightly renamed and Qt Quick Controls UI is
gone.
Change-Id: I990af2bc83513ad8d85838b037e79dc88bbfdb73
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
- Avoids the hassle of QRC files and manually registering mime types
- Avoids performance regressions because of mime types that are
registered after mime database has been used
- Makes it technically possible to detect that a disabled plugin could
handle a mime type if it was enabled
Change-Id: I373008b1b56e9c6b4853055f20b3eeb112a6eff9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Because we don't now if a *.h file is a C or C++ header we provide both
as project file if a C and C++ file is present. But C++ is not readable
by C compiler. So we skip that files and hope there is no non referenced
C header, which is very very unlikely.
Change-Id: I5505713e759749c8a0738e11b70bb6b309412966
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Some project wizards have nowadays build system support.
Change-Id: I2d7e9ffd5be2ec74a012fa977281e032596229b5
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
${AnyProject}::updateCppCodeModel() did two potentially not that cheap
operations in the ui thread:
(1) Querying the MimeDatabase for the mime type for the source files of
the project. In 99.9% of the cases no files need to be read for
this as the file extension will resolve the type. The expensiveness
comes from the sheer number of files that can occur.
(2) Calling compilers with the "(sub)project's compiler command line"
to determine the macros. While the caches avoid redundant calls,
the number of the unique compiler calls makes this still a
ui-freezing experience.
These two operations are moved into a worker thread. For this, the
expensive compiler calls are encapsulated in thread safe lambdas
("runners") in order to keep the "mutexed" data minimal. The original
API calls of the toolchains are implemented in terms of the runners.
While adapting the project managers, remove also the calls to
setProjectLanguage(). These are redundant because all of the project
managers already set a proper value in the constructor. Also, currently
there is no need (client) to report back detection of C sources in
project parts. This also keeps CppProjectUpdater simple.
There is still room for improvement:
* Run the compiler calls in parallel instead of sequence.
* Ensure that the mime type for a file is determined exactly once.
Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
To be secure that include is only called it the definition is true.
Change-Id: I04bae9860e64206a1c6886d7cf1682a87e9f9a07
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The argument parsing has some considerable overhead. We try to avoid that
with merging all content together in one file.
Change-Id: Icf426bb5d6a5569d59c180f94c7eab66a22a251c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Only the test clangstaticanalyzerlogfilereader makes use of that.
Change-Id: I5761ed023eab1b03dbb276d1798163fd2fb81e3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
...due to a not set master temporary directory.
Change-Id: I6668209e9b724f6560331f683b63e1c41616f060
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Additionally move common used code for interacting with the
Welcome page into separate file.
Change-Id: If863ae529c7c81d095f310f0a34926b324c77fa8
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
It worked with plain GDB (parse_and_eval), and was broken by
696b2d4261.
Change-Id: Ibc143efdbd90681a2f9f4d84b75063eb98078f2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
1f29242276 used the correct form for
CONFIG -= qt.
This revealed several cases that are missing CoreProfile configuration.
Change-Id: I8bb6d5156eb6beba91a8df7b948832f1e043d64f
Reviewed-by: hjk <hjk@qt.io>
Overwriting QMAKE_CXXFLAGS will remove the needed isysroot flag
for finding the standard headers.
Explicitly settings the standard lib on macOS is also no longer
necessary.
Change-Id: I8a5ae5df485785b473a435c7feb9f8fb3295952b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>