Commit Graph

43 Commits

Author SHA1 Message Date
Ulf Hermann
95fc74ac52 RemoteLinux: Fix some line breaks
Change-Id: I11e13bc05be366c9dd1eb5449fc395c3098c012a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-15 17:23:13 +00:00
hjk
596017c43d ProjectExplorer: Dissolve one of the LinuxDevice constructors
Use the remaining one plus setters.

Change-Id: I21b11d6ace1c7e1e7a3e8691e22b43931137e9e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-15 13:04:39 +00:00
hjk
3f3eb40417 ProjectExplorer: Introduce a setter for IDevice origin and id
They are not completely orthogonal, so use one function for
now.

This is the step towards streamlining the IDevice::ctor/create
lines of functions.

Change-Id: I1fe9144c45c7da0c9dcbda3bf424e976e0519cd6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-15 13:02:28 +00:00
hjk
09c1c170d2 ProjectExplorer: Use setter for IDevice::type
Second step towards streamlining the IDevice::ctor/create lines
of functions.

Change-Id: I8b0f2270a9f6545ff9419ef8cf44b456c2233223
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 15:45:00 +00:00
hjk
75bce4332d ProjectExplorer: Use setter for IDevice::machineType
First step towards streamlining the IDevice::ctor/create lines
of functions.

Change-Id: I44226f8a05902cadd40c8820ab67752070d186c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 15:10:51 +00:00
hjk
a3c6d30b75 ProjectExplorer: Simplify IDevice extra device action setup
Function objects are easy nowadays.

Change-Id: Iec2b770b99d8f11b7a090fb3bd51af8aa60f6fe0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-01-14 12:55:51 +00:00
Christian Kandeler
b89865b967 RemoteLinux: Offer to open a remote shell
... in the settings dialog.
This allows users to poke around in the device they'be just configured,
e.g. for doing quick custom checks.

[ChangeLog] A remote shell can now be started for Linux devices.

Change-Id: I4570ca89d64606029759767a9f771168d7273510
Reviewed-by: hjk <hjk@qt.io>
2019-01-11 12:45:28 +00:00
Christian Kandeler
1dfa7279d4 RemoteLinux: Add an rsync deploy step
Using rsync enables proper incremental deployment and is particularly
helpful when larger files are involved.
We check whether rsync works as part of the device test. If it does, it
becomes the default deploy step, otherwise we fall back to SFTP.

Change-Id: I6ab938ccd5acd7e0cbe07b90b6938dccad19bba5
Reviewed-by: hjk <hjk@qt.io>
2018-12-17 13:42:25 +00:00
Alessandro Portale
f52f25e150 RemoteLinux: Modernize
modernize-*

Change-Id: Ifdf0e781c63941625ca032a8e1752082f4abc3ce
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-11-28 17:47:02 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
hjk
7f87e2af3c DeviceSupport: Implement DesktopDevice::portsGatheringMethod()
The feature is useful in a QtApplicationManager debugging context.

Internally, DeviceUsedPortsGatherer uses a DeviceProcess now,
not an SshRemoteProcess, to cover cases where the (Windows Desktop)
device not have ssh available.

Change-Id: I9d33ceac65a135123a376ebd2727dcb540563179
Reviewed-by: Wolfgang Bremer <wolfgang.bremer@pelagicore.com>
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-08-10 15:23:07 +00:00
hjk
7bc88000d9 ProjectExplorer: Introduce a Utils::OsType IDevice::osType() function
E.g. for easier construction of command lines in situations like

    if (isLocal())
        runnable.commandLineArguments = argumentString(Utils::HostOsInfo::hostOs());
    else
        runnable.commandLineArguments = argumentString(Utils::OsTypeLinux);

Change-Id: I5a35304e5d1b5a042952201f39f4134a5cd0ce24
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-06-28 15:49:56 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
Ulf Hermann
385237dbbd Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.

Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 11:06:34 +00:00
hjk
b7fabb290b RemoteLinux: Relax port gathering
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>
2016-04-18 09:57:33 +00:00
hjk
4d382811f1 ProjectExplorer: Introduce a DeviceEnvironmentFetcher
Also, provide implementations for desktop and remote linux.

Change-Id: Ib02202bf1829367334035a361ac73317338cd7a6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-04-06 14:27:12 +00:00
Friedemann Kleint
97af238656 Preferably use QStringRef::toInt().
Avoid allocations for converting to int.

Change-Id: Id8c79334f4809ec075ffe7e6b7635be4873eafd8
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-04 07:56:58 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Orgad Shaneh
3f1fd49c71 RemoteLinux: Remove unneeded qualifications
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>
2015-02-04 13:21:40 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Nikita Baryshnikov
12103e0f67 Reinvent deprecated qSort as Utils::sort
Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-19 14:00:32 +02:00
Christian Kandeler
b9c2475726 RemoteLinux: Fix process listing.
Creator decided to insert an additional quote, breaking the command.

Change-Id: I34d44674ca73cc6aff0e0a7adb5b64bf163d42b6
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-05 08:39:36 +02:00
Christian Kandeler
eccc1198d6 Use double quotes instead of single quotes as per our guidelines.
Change-Id: Ib608bb49e26781aef1914085a5d801fcdcd5eb56
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-04-22 10:06:40 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
David Schulz
a06af35631 ProjectExplorer: Introduce DeviceProcessSignalOperation.
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>
2013-09-20 10:48:47 +02:00
Christian Kandeler
2a3ef09473 Device support: Make IDevice::executeAction non-const.
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>
2013-09-17 13:36:08 +02:00
Christian Kandeler
22599094b0 Introduce the concept of a "device process".
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>
2013-08-19 16:13:21 +02:00
Christian Kandeler
b055c0e506 Device support: Rename DeviceProcess to DeviceProcessItem.
We want to introduce a new class that has more right to that name.

Change-Id: I9535632e10872a97a8555e885a80c383bc5dcd2b
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-08 12:24:40 +02:00
Christian Kandeler
5bca241afb Device support: Make device testing a "well-known" concept.
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>
2013-07-02 15:02:48 +02:00
Tobias Nätterlund
b90e3bbd8b QNX/RemoteLinux/Madde: Made device test more generic
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>
2013-05-31 14:51:02 +02:00
Aurindam Jana
23be3df051 DeviceSupport: Add canAutoDetectPorts() method
Use case: Devices such as Desktop device can
automatically choose an available port.

Change-Id: I6515425da3ae861b62d103885e2fde0e542d21d0
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-04-18 13:58:28 +02:00
Friedemann Kleint
ebfb3bbca7 Clean headers in RemoteLinux.
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>
2013-04-04 09:10:40 +02:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
73d60a5813 RemoteLinux: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I10541e999d6210caf6b88ecb5c1010e831b2f4d4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-11-27 14:01:49 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
hjk
83e573f2ec use new id comparison operators to reduce line noise and save cycles
Change-Id: I2e7d81a4efb75877901d29964df4f71314e951b4
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-08-06 10:37:43 +02:00
Christian Kandeler
1d00146e21 Device support: Move processes dialog creation to settings widget.
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>
2012-08-03 10:40:31 +02:00
Christian Kandeler
ed920f446c Device support: Let devices create project list model.
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>
2012-08-02 16:43:10 +02:00
Christian Kandeler
753c62d75e Device support: Introduce IDevice helper classes.
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>
2012-08-02 10:36:04 +02:00
hjk
6460254931 remotelinux: rename LinuxDeviceConfiguration to LinuxDevice
Change-Id: I7e8a99d3339d2040a23e4e78816b13b57197dcdb
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
2012-08-01 14:26:28 +02:00