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>
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.
Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
...otherwise it might happen that no test functions will be executed,
which is highly confusing, especially since no error dialog will be
shown.
If there are errors, just print a warning and quit. If we do not quit,
the error dialog will be shown which might block build machines.
Change-Id: Ic347dfba8fefc0e0f375cf2363265008df56ee53
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
There is not even a guarantee that VERSION from os-release contains
"Linux" anywhere. Prepend "Linux" or "Unix" and add the version details
in parentheses instead.
Also remove unnecessary (and wrong) /etc/issues fallback.
Change-Id: I0457ad9e8cedeea35e0cad5ea8093652eb8428e1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Since no one is using it and it's faster this way.
Change-Id: Ib60d3a54aed98011b2fb4bb7d159e219abebfa7e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
Use standard wording and fix some and style issues.
Change-Id: I6c226f8b8600833666f1da34f1f1e71cb333f30a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The <platform> element may contain a regular expression
matching the names of the platforms on which the plugin works.
Task-number: QTCREATORBUG-9002
Change-Id: Ic816cfed69a5dd2c4112c976843b9106ba2cbd22
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
...if no settings path is specified by the user.
The default settins path for tests will be set to the system's temporary
directory + "/qtc-${IDE_VERSION_LONG}-test-settings".
Change-Id: Ibeaf8883c80169b4d6a3a97020a16f910292d67a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Example:
./qtcreator -test CppTools,"test_cpplocatorfilters_*"
If test data is specified, it will be applied to all matching test
functions.
Change-Id: I579d9aa6ac3d3808ea7e71db3c067d468125569b
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Usually the plugin tests are executed after the session manager
evaluated the command line arguments. This is just fine for the file and
token tests of the CppEditor (fileandtokenactions_test.cpp) since these
depend on the files and projects passed in via command line.
Running qtcreator within valgrind reverses the sequence and makes it
impossible to execute the mentioned tests. Fixed by starting the tests
after the plugin initialization is done.
Change-Id: I7cc392b7da7e0d98e0ce44edba2e3abceb84fad8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>