... and use it for the profiling report.
Instantiate a Utils::Benchmarker(...) to report a data point (which
will be created at destruction time, reporting the live-time of the
object).
Alternatively you can use Utils::Benchmarker::report(...) to record
your data point.
Independent of how you create a datapoint, it will be reported through
the qtc.benchmark logging category and can get pushed to a database
from a script parsing creator's output.
Note: The plugin-loading uses the existing -profiling infrastructure,
so you need to start Creator with -profile to see data points.
Change-Id: I18e6b84137d0f49ee5e12e7c3d75323005ce5a29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since the disabling of all plugins except tested onces was implemented
as an afterthought, it did not update the indirectly enabled plugins.
Instead, update the list of enabled/disabled plugins in the
optionsparser like for the -(no)load options, and trigger the update of
indirectly enabled plugins afterwards. Also take test dependencies into
account when indirectly enabling plugins directly.
Change-Id: I59d6c05de69a3073576155f7bd6201f1cd44697c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... to warn about situations where Mime types are registered too
late (i.e. after Plugin::initialize() or used too early (i.e. before
Plugin::extensionsInitialized())
Change-Id: I22681e94bfdd508e954bb3457b834ec3ad1f0fee
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
1) Make the font non-proportional, since qtDiag's output is formatted
with spaces
2) Make the dialog a window with maximize buttons
3) Fix the formatting for unloaded plugins
Change-Id: I911871b1ffc9dceebcbb04f544cc6d580b95c54e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Using Qt5.6 and Xcode 5 or Xcode 6 results in compile
issues.
Change-Id: I33af400f51991e043672712b531869c6a79d6ffd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Which outputs the information from qtdiag, installed plugins,
and general Qt Creator build information.
Task-number: QTCREATORBUG-16135
Change-Id: I618b9883369bae45006bb109f8757e89b091b882
Reviewed-by: David Schulz <david.schulz@qt.io>
There is no reason why it should be more than just a list of plugin
specs. Saves a few symbols. Also simplify some related code.
Change-Id: Ibaff64735e78e1454e1aca0b49cadb9e1030ee3c
Reviewed-by: hjk <hjk@qt.io>
On Windows disabling the crashhandler results in re-enabling the
Windows internal error reporting which causes trouble as well, so
limit disabling of crashhandler to Linux/OSX.
This patch more or less amends 80352d703c.
Change-Id: I0588cd22c2ff894e07378524baf03794963c92a1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Temporary workaround to avoid dead lock when executing
plugin unit test.
Change-Id: Ie6c3673d756ff3b67320bcc75d590933e58a5276
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The kits are restored in delayedInitialize now, but the file open event
from Finder was delivered before that. That lead to the projects mode
being opened with the kit configuration screen, but mostly no kits in
it, when double-clicking a .pro file while Qt Creator is not running.
Delay the remote open file command until plugin initialization is really
done.
Change-Id: I1a75f6b1f7bcefb4c53d594de11df0d3a0d2e5d3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is similar to "-noload" and prevents a plugin from being loaded
for testing. Nice to blacklist some problematic plugins.
Change-Id: Ib273d244333a9d275969c9608e556a11b7518386
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Output the list of available test functions.
Change-Id: I86578b9eeaa2f4cd5782de7ea2d90fae06e22542
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Now address sanitizer will not show false positives.
Change-Id: Ieeb4dc31697920ed1ca542f5647f4cb0b23a29ab
Task-number: QTCREATORBUG-14713
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Init all class member pointers to NULL.
This fixes possible crash on exit when dependent
plugin was not loaded (e.g. TextEditor was missing).
In this case plugin's constructor gets called,
initialize() method is _not_ called
and destructor gets called -> crash.
Properly delete dependent plugins on
a plugin which failed to initialize properly.
Fix labels of deleted plugins inside an error dialog
after pressing "Error Details" from "Installed Plugins"
dialog.
Change-Id: Iddc029a0f07dcba2501d734d142fb0e69e9383d3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Instead of implicitly disabling plugins if their dependencies are
disabled, implicitly enable plugins if some enabled plugin needs it.
That will avoid issues if people disable plugins (e.g. QmlJSTools et al)
and we later add one of these as a dependency to another plugin (e.g.
make QmakeProjectManager depend on QmlJSTools), which resulted in the
previously enabled plugin being implicitly disabled.
Enabling a plugin in About Plugins now asks for all required
dependencies to be enabled as well.
Disabling a plugin in About Plugins now asks for disabling all plugins
that require it.
Using the -noload command line option now disables all plugins that
require it in addition.
Using the -load command line option now implicitly enables all plugins
that are required.
Multiple -noload and -load options are handled in the order given on the
command line.
Task-number: QTCREATORBUG-9131
Change-Id: I0956106105060a7898a8992e0629009d5ec3ea4d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Prefer enabled state as a property as opposed to disabled state, and
make setter correspond to getter. Also move setters into private.
Change-Id: I5d002a12f4e540d5b38cc5865490d056ec75f296
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
By default, a clean settings path is used for test environment.
All the default plugins are loaded, although they're not needed.
This change significantly improves loading time for tests.
Change-Id: I24254f3e538e3f0e6d233d0989738dc1ce238209
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Instead of transforming to absolute paths in the client, pass the
working directory and leave it to the target.
Change-Id: I4f8724c8857e89a7ee77116c78cf8b25c56795fa
Reviewed-by: Eike Ziller <eike.ziller@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: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
If there is no plugin object, then the plugin was not loaded.
Change-Id: I793825640174ed8e3d07bf9393afe69818e19db0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
So far tests running within Qt Creator could be implemented with a
private slot in the plugin class starting with "test".
Binding the test functions to the plugin object/class is fine for test
functions without side effects. But as soon as side effects come into
play we need proper initialization and cleanup as it's provided by
init(), cleanup(), initTestCase() and cleanupTestCase(). However,
implementing these functions in the plugin class is not appropriate
since they would affect (potentially quite diverse) test functions.
This patch enables us to provide 'ordinary' test classes in which we can
handle initialization and clean up the usual way.
In addition to the current test invocations, e.g.:
# (1) Run all test functions of the plugin
./qtcreator -test CppTools
# (2) Run selected test functions of the plugin by stating them
./qtcreator -test CppTools,test_completion,test_builtinsymbolsearcher
# (3) Run selected test functions of the plugin by a wild card
# expression
./qtcreator -test "CppTools,*pointerdeclaration*"
# (4) Run a test function of the plugin with certain test data
./qtcreator -test CppTools,test_completion:template_1
it's now also possible to state the test class in order to execute all
test functions of that class:
# Run all test functions of a certain class:
./qtcreator -test CppTools,SomeClassWithTests
As long as the test class does not start with "test", there should not
be any problems.
Further, an invocation like (1) now additionally execute all test
functions of all test classes. For invocations of type (2), (3) and (4)
all test functions of all test classes are considered, too.
Change-Id: Ief08a6e9e451c599fd0109b8b8e57f92e3ee19f2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
De-noise loops, use QVector for items bigger than a pointer.
Change-Id: Idae68dc51a02cb6df9bdf2d920ae2de99c7bde6c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>