We might encounter the situation that protocol is given as IPv6
but the consumer of the free port information decides to open
an IPv4(only) port. As a result the next IPv6 scan will
report the port again as open (in IPv6 namespace), while the
same port in IPv4 namespace might still be blocked, and
re-use of this port fails.
Err on the safe side, and consider ports taken in either space
as blocked.
Change-Id: I2e4be40ab4df5398e26e197c12408efe905b1a2f
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Also, provide implementations for desktop and remote linux.
Change-Id: Ib02202bf1829367334035a361ac73317338cd7a6
Reviewed-by: Christian Kandeler <christian.kandeler@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: Id48e46fdfed83b82071551f4375fab3310ed1f6e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Creator decided to insert an additional quote, breaking the command.
Change-Id: I34d44674ca73cc6aff0e0a7adb5b64bf163d42b6
Reviewed-by: hjk <hjk121@nokiamail.com>
Every device can now return a DeviceProcessSignalOperation,
which allows to kill or interrupt processes running on the
device.
Change-Id: Idaa04ebc767e09ca167fa033ed93860b9b81479e
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Presumably this function is currently const because no current
implementation actually changes device properties, but there
is no reason why that should not be allowed.
Change-Id: I80e4355be70e40bca9df5e1287a1d1d3f60c6534
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Provide a QProcess-like abstraction that can be used
to implement processes running locally or on a remote
device. Objects of a concrete class implementing the functionality
are created by IDevice objects.
Current implementations are:
- Local execution (QProcess-based), provided via the DesktopDevice.
- Remote execution via SSH.
- A specialized case of the former for remote Linux systems (provided by
LinuxDevice).
The latter is already being used in a number of places. As a result, lots of
code dealing with details such as setting the remote environment could be
moved to a central location. These things are no longer the concern of whoever
is wishing to run a remote process.
Change-Id: I919260ee6e77a020ca47226a4a534e7b8398106f
Reviewed-by: hjk <hjk121@nokiamail.com>
We want to introduce a new class that has more right to that name.
Change-Id: I9535632e10872a97a8555e885a80c383bc5dcd2b
Reviewed-by: hjk <hjk121@nokiamail.com>
This entails the following:
- Rename AbstractLinuxDeviceTester to DeviceTester and
move it up into ProjectExplorer. The class stays
unchanged, as there was nothing Linux-specific about it.
The same goes for the associated dialog.
- Move the createDeviceTester() function from LinuxDevice
to IDevice and introduce IDevice::hasDeviceTester() to
enable generic code to make use of this feature.
- Move device testing out of the list of opaque
device-specific actions; instead, the device settings widget
now uses the device tester directly, if applicable.
Rationale:
- Device testing, just like remote process listing (if not more so),
is a general concept that implementors of device classes will
probably want to implement (and they should be encouraged to do so).
Without the mechanism provided here, they would all need to put
basically the same code into the actionIds(), displayNameForActionId()
and executeAction() functions.
This patch is the natural extension of b90e3bbd8b.
Change-Id: I94f2badb4ceeda9f5cd3b066c13626bb4f65505d
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Any device inheriting from LinuxDevice can now implement
a createDeviceTester() method to return their own
AbstractLinuxDeviceTester that runs when the device wizard
is completed, or when the Test Device button is pressed.
The MaddeDevice implementation of the device actions now completely
matches that of LinuxDevice, so those are removed.
The QNX device check was improved with additional tool checking.
Change-Id: Ie761b7cfc5591238aa2a18a74fe1843fb2cdbeaa
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Use case: Devices such as Desktop device can
automatically choose an available port.
Change-Id: I6515425da3ae861b62d103885e2fde0e542d21d0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: Ie7559562218ecab65da17f58e3515556a4a1d5c5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
With the process list model being publicly available from the IDevice
interface, there's no longer a need to force all subclasses to create
the dialog themselves via opaque handles.
Since clients can now check whether a device offers a process list,
the base process list model has been made abstract.
Change-Id: If4a0aa68a95b221862c287ad8397ebabe9be5909
Reviewed-by: hjk <qthjk@ovi.com>
Now each device gets to decide in what way a process list
is set up and how a process gets killed. This enables
e.g. non-SSH based devices to provide process lists.
The default implementation provides an empty list.
Change-Id: Ibb352cd8a5ea556951b02ba512208daeb3b1e1a6
Reviewed-by: hjk <qthjk@ovi.com>
These are for configuration of process and ports gathering activities,
respectively.
This couples related functionality more tightly, while keeping
the number of IDevice methods at a reasonable level.
For ports gathering, the patch also adds the ability to configure
both the command and the parsing function; the latter used to be
hardcoded in the PortsGatherer class.
Change-Id: I1b8940397a51efa7ddc05dd15cf861777d118c1a
Reviewed-by: hjk <qthjk@ovi.com>