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: Id48e46fdfed83b82071551f4375fab3310ed1f6e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
The interface is static and the only slot that one can connect to is
private.
Change-Id: Iebd3747fecd24e0250d02e663de405e3f9217acb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
The guicontroller is managed by the diffeditor, which is the only one able
to access these objects, so there is no need to ever return the pointer.
Change-Id: I6388a78bcadae67dae669bf7e96298444983c3e8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Not needed, we can just get the controller from the document at any time
Change-Id: I4a4ad9e3e343a147096e46406b9175b3f52f31a6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Do not bother to check after that assert.
Change-Id: I4d8d8c8aa40420880824b7832005ab3f06df4aa7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Breakpoints are hit, stack frames are identified as JS or native.
No further data yet.
Change-Id: I84a02422fd36dc7645003114dd8519bedd913c06
Reviewed-by: hjk <hjk@theqtcompany.com>
Fix for auto completion in case of auto declaration inside if condition:
struct Foo { int bar; };
void func()
{
if (auto s = new Foo)
s->; // auto completion does not work
}
Task-number: QTCREATORBUG-13805
Change-Id: Ia1776e8cc04e6040a6bf5f43cf82cfd6ce6dde7a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
...since by now we get the defines in the correct format from
QMakeProject.
See the change this one depends on.
Tested with:
Qbs: cpp.defines: [ 'PATH1="/some/path"', "PATH2=\"/some/path\"" ]
QMake: DEFINES += PATH1=\\\"/some/path\\\" "PATH2=\\\"/some/path\\\""
CMake: add_definitions(-DPATH1="/some/path" "-DPATH2=\"/some/path\"")
All these lines translate to
#define PATH1 "/some/path"
#define PATH2 "/some/path"
for the code model.
Change-Id: Ifc3d3acff3abab6897ccbd0c5fafd5c415dfb53c
Reviewed-by: Erik Verbruggen <erik.verbruggen@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: I78a70180927d085822e215ffb2b8ad256301e4a7
Reviewed-by: hjk <hjk@theqtcompany.com>
Since valgrind only runs on POSIX systems, all the paths it produces are
normalized.
We have no mapping to local directory, so having a path like
\home\user\project\file.cpp is confusing.
Change-Id: Idff339729231ab662aa4fcb6bb732058c1a04f7c
Reviewed-by: hjk <hjk@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: I1aa1a2b6ccbafeb1a8f3053fffa39b3f96992591
Reviewed-by: hjk <hjk@theqtcompany.com>
The input can well be relative, and contain slashes at the end...
Change-Id: Id4fd65474f2b9c23824f7a822c6e29cf443e1058
Reviewed-by: Orgad Shaneh <orgads@gmail.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: I04454108cf2818bb88237849169a8359dd408de9
Reviewed-by: hjk <hjk@theqtcompany.com>
Otherwise, "remove" operations on a kit such as clearing out the sysroot
or removing the Qt version will leave the old entries in the profile.
Change-Id: I70be926472c8d290b80e3479fc49286113f71380
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Kit names can get quite long (default ones, too), so cut the name off
after eight characters. Then append the Core::Id to guarantee
uniqueness.
Change-Id: Id6a0c2c56c22a6092430d6906389ce70901cf337
Task-number: QBS-734
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The default mime type 'text/plain' is perfectly enough, since the mime
types that the generic highlighting files might be interested in must be
children of 'text/plain' anyhow.
Change-Id: I9fdaf67676ccb3d511d8ae4e514ab438c8e1e8a5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Make sure that the progress data object is deleted before the rule.
Task-number: QTCREATORBUG-13883
Change-Id: Ie0d1825e695f0bfa7d46ee6dd807a94c95a08cd7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Qmlscene and qmlviewer are GUI applications. The heuristic to detect
where to print application output (windows log or stderr) has changed
in Qt 5.4, which caused the qmlscene, qmlviewer external tools to
not print output anymore into General Messages.
Work around this by forcing the tools to always print to stderr.
Task-number: QTCREATORBUG-13753
Change-Id: Iceee600dd402032674fd3ee11e0bd920793659d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This fixes a regression introduced in a8ebf535b829dac. We shouldn't
send watcher evaluation commands while the QML engine hasn't actually
stopped, because this might lead to an assert on the server side.
Task-number: QTCREATORBUG-13916
Change-Id: I300e2f73c0a1a03e0e6187a5357abeba408f72a0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
If the removal is triggered from the view, the engine needs
to be informed. If it's triggered from the engine, the view
needs to be informed.
Change-Id: I3505130c5b4b0b3752401a94599af9a06662f002
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
So far we cheated by pretending removal always succeeds
immediately. Now just draw in grey in the view and remove
fully after the backend confirmed removal.
Change-Id: I0bd607774a3db0fe302b9654798be9dcc50abe8a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Internal paths are supposed to be normalized
Change-Id: Ic6943ce13ad389dfdb44054a9e6f03da8c6cd88d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
If TableWidget was sorted by user, position in QList of metadata and in
View differs.
Side effects:
- QTableWidget sorted by first column by default
- Connections are moved to Qt5 style
Change-Id: I4a15e2cc9394431719ed1e2dd88f713af43c40d0
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Looks like the proper handling of tooltips while debugging a QML app
is broken since commit 7f09d0b756 . Just disable the functionality
for now.
Task-number: QTCREATORBUG-13854
Change-Id: I346058f6f9753475ec209ec8befdd5425bbd83d0
Reviewed-by: hjk <hjk@theqtcompany.com>
- All except the one for "qbs build" were incomplete, which is fixed
now.
- The new implementation is centralized, so maintenance will be simpler.
- The command lines are also completely self-contained now, so they can
be pasted as-is into a shell with no assumptions about the working
directory etc.
Change-Id: I2c684141bcdc5c6da0e1af60ce60278fc4dcd088
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Instead of starting LLDB through a Python script this now starts
LLDB directly. This did not work a while ago but seems fine nowaday.
Change-Id: I20e915070cd6addf260817c311f4160d010aa861
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>