Merge remote-tracking branch 'origin/2.5'
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 816 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 203 KiB After Width: | Height: | Size: 32 KiB |
@@ -44,22 +44,22 @@
|
|||||||
|
|
||||||
\list
|
\list
|
||||||
|
|
||||||
\o \gui {Navigator} pane displays the QML elements in the current QML
|
\o \gui {Navigator} pane (1) displays the QML elements in the current QML
|
||||||
file as tree structure.
|
file as tree structure.
|
||||||
|
|
||||||
\o \gui {Library} pane displays the building blocks that you can use to
|
\o \gui {Library} pane (2) displays the building blocks that you can use to
|
||||||
design applications: predefined QML elements, your own QML
|
design applications: predefined QML elements, your own QML
|
||||||
components, Qt Quick components that you import to the project, and
|
components, Qt Quick components that you import to the project, and
|
||||||
other resources.
|
other resources.
|
||||||
|
|
||||||
\o \gui Canvas is the working area where you create QML components and
|
\o \gui Canvas (3) is the working area where you create QML components and
|
||||||
design applications.
|
design applications.
|
||||||
|
|
||||||
\o \gui {Properties} pane organizes the properties of the selected QML
|
\o \gui {Properties} pane (4) organizes the properties of the selected QML
|
||||||
element or QML component. You can change the properties also in the
|
element or QML component. You can change the properties also in the
|
||||||
code editor.
|
code editor.
|
||||||
|
|
||||||
\o \gui {State} pane displays the different states of the component.
|
\o \gui {State} pane (5) displays the different states of the component.
|
||||||
QML states typically describe user interface configurations, such as
|
QML states typically describe user interface configurations, such as
|
||||||
the UI elements, their properties and behavior and the available
|
the UI elements, their properties and behavior and the available
|
||||||
actions.
|
actions.
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
|
|
||||||
The \gui Navigator pane displays the
|
The \gui Navigator pane displays the
|
||||||
\l{http://doc.qt.nokia.com/4.7/qdeclarativeelements.html}{QML elements}
|
\l{http://doc.qt.nokia.com/4.7/qdeclarativeelements.html}{QML elements}
|
||||||
in the current QML file and their relationships. Elements are listed in a
|
in the current QML file and their relationships. Elements (1) are listed in a
|
||||||
tree structure, below their parent.
|
tree structure, below their parent (2).
|
||||||
|
|
||||||
\image qmldesigner-navigator.png "Navigator pane"
|
\image qmldesigner-navigator.png "Navigator pane"
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
Typically, child elements are located within the parent element on the
|
Typically, child elements are located within the parent element on the
|
||||||
canvas. However, they do not necessarily have to fit inside the parent
|
canvas. However, they do not necessarily have to fit inside the parent
|
||||||
element. For example, you might want to make a mouse area larger than the
|
element. For example, you might want to make a mouse area larger than the
|
||||||
rectangle or image beneath it.
|
rectangle or image beneath it (1).
|
||||||
|
|
||||||
\image qmldesigner-element-size.png "Mouse area for a button"
|
\image qmldesigner-element-size.png "Mouse area for a button"
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
To change the stacking order of an item, right-click it on the canvas and
|
To change the stacking order of an item, right-click it on the canvas and
|
||||||
select \gui {Stack (z)}. You can raise or lower the stack value of an item
|
select \gui {Stack (z)}. You can raise or lower the stack value of an item
|
||||||
or move the item to the front or back of all its siblings. To remove the
|
or move the item to the front or back of all its siblings. To remove the
|
||||||
\c z property, select \gui Reset.
|
\c z property, select \gui {Reset z Property}.
|
||||||
|
|
||||||
\section2 Switching Parent Elements
|
\section2 Switching Parent Elements
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
|
|
||||||
You can change the parent of an element also in the \gui Navigator pane.
|
You can change the parent of an element also in the \gui Navigator pane.
|
||||||
Drag and drop the element to another position in the tree or use the arrow
|
Drag and drop the element to another position in the tree or use the arrow
|
||||||
buttons to move the element in the tree.
|
buttons (1) to move the element in the tree.
|
||||||
|
|
||||||
\image qmldesigner-navigator-arrows.png "Navigator arrow buttons"
|
\image qmldesigner-navigator-arrows.png "Navigator arrow buttons"
|
||||||
|
|
||||||
@@ -154,7 +154,8 @@
|
|||||||
\list
|
\list
|
||||||
|
|
||||||
\if defined(qcmanual)
|
\if defined(qcmanual)
|
||||||
\o \c {import com.nokia.symbian 1.0} for Symbian
|
\o \c {import com.nokia.symbian 1.0} for Symbian (Qt 4.7)
|
||||||
|
\o \c {import com.nokia.symbian 1.1} for Symbian (Qt 4.8)
|
||||||
\endif
|
\endif
|
||||||
|
|
||||||
\o \c {import com.nokia.meego 1.0} for MeeGo
|
\o \c {import com.nokia.meego 1.0} for MeeGo
|
||||||
@@ -178,7 +179,7 @@
|
|||||||
|
|
||||||
The bottom part of the pane displays properties that are specific to each
|
The bottom part of the pane displays properties that are specific to each
|
||||||
element type. For example, the following image displays the properties you
|
element type. For example, the following image displays the properties you
|
||||||
can set for \gui Rectangle and \gui Text elements.
|
can set for \gui Rectangle (1) and \gui Text (2) elements.
|
||||||
|
|
||||||
\image qmldesigner-element-properties.png
|
\image qmldesigner-element-properties.png
|
||||||
|
|
||||||
@@ -202,12 +203,12 @@
|
|||||||
When editing states, you can easily see which values are explicitly set in
|
When editing states, you can easily see which values are explicitly set in
|
||||||
the current state and which values are derived from the base state.
|
the current state and which values are derived from the base state.
|
||||||
|
|
||||||
The following images illustrate this. In the base state, the \gui Position,
|
The following images illustrate this. In the base state, the \gui Size (1)
|
||||||
\gui Size, and \gui Colors values are explicitly set and highlighted.
|
and \gui Colors (2) values are explicitly set and highlighted.
|
||||||
|
|
||||||
\image qmldesigner-properties-explicit-base.png "Explicitly set properties"
|
\image qmldesigner-properties-explicit-base.png "Explicitly set properties"
|
||||||
|
|
||||||
In \gui State1, only the color is explicitly set and highlighted.
|
In \gui State1, only the color (1) is explicitly set and highlighted.
|
||||||
|
|
||||||
\image qmldesigner-properties-explicit-state1.png "Explicitly set properties"
|
\image qmldesigner-properties-explicit-state1.png "Explicitly set properties"
|
||||||
|
|
||||||
@@ -265,7 +266,7 @@
|
|||||||
\section2 Marking Text Elements for Translation
|
\section2 Marking Text Elements for Translation
|
||||||
|
|
||||||
To support translators, mark each text element that should be translated.
|
To support translators, mark each text element that should be translated.
|
||||||
In the \gui Properties pane, \gui Text field, select \gui tr.
|
In the \gui Properties pane, \gui Text field, select \gui tr (1).
|
||||||
|
|
||||||
\image qmldesigner-text-property-tr.png "Text properties"
|
\image qmldesigner-text-property-tr.png "Text properties"
|
||||||
|
|
||||||
@@ -360,8 +361,8 @@
|
|||||||
to the opposite side: \c {anchor.left: sibling.right}. This allows you to keep
|
to the opposite side: \c {anchor.left: sibling.right}. This allows you to keep
|
||||||
sibling elements together.
|
sibling elements together.
|
||||||
|
|
||||||
In the following image, \gui{Rectangle 2} is anchored to its siblings on its
|
In the following image, \gui{Rectangle 2} is anchored to \gui{Rectangle 1}
|
||||||
right and left and to the bottom of its parent.
|
on its left and to the bottom of its parent.
|
||||||
|
|
||||||
\image qmldesigner-anchors.png "Anchoring sibling elements"
|
\image qmldesigner-anchors.png "Anchoring sibling elements"
|
||||||
|
|
||||||
@@ -370,8 +371,6 @@
|
|||||||
\qml
|
\qml
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectangle2
|
id: rectangle2
|
||||||
anchors.right: rectangle3.left
|
|
||||||
anchors.rightMargin: 15
|
|
||||||
anchors.left: rectangle1.right
|
anchors.left: rectangle1.right
|
||||||
anchors.leftMargin: 15
|
anchors.leftMargin: 15
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
@@ -466,7 +465,8 @@
|
|||||||
\inlineimage qmldesigner-snap-to-guides-button.png
|
\inlineimage qmldesigner-snap-to-guides-button.png
|
||||||
button to have the elements snap to the guides.
|
button to have the elements snap to the guides.
|
||||||
|
|
||||||
Choose \gui {Tools > Options > Qt Quick} to specify settings for snap to
|
Choose \gui {Tools > Options > Qt Quick > Qt Quick Designer} to specify
|
||||||
|
settings for snap to
|
||||||
margins. In the \gui {Snap margin} field, specify the position of the guides
|
margins. In the \gui {Snap margin} field, specify the position of the guides
|
||||||
as pixels from the edge of the canvas. In the \gui {Item spacing} field,
|
as pixels from the edge of the canvas. In the \gui {Item spacing} field,
|
||||||
specify the space in pixels to leave between elements on the screen.
|
specify the space in pixels to leave between elements on the screen.
|
||||||
@@ -503,16 +503,17 @@
|
|||||||
bindings.
|
bindings.
|
||||||
|
|
||||||
To experiment with different element sizes, enter values in the
|
To experiment with different element sizes, enter values in the
|
||||||
\gui Height and \gui Width fields on the canvas toolbar. The changes are
|
\gui Height and \gui Width fields (1) on the canvas toolbar. The changes are
|
||||||
displayed in the \gui States pane and on the canvas, but the property
|
displayed in the \gui States pane (2) and on the canvas (3), but the property
|
||||||
values are not changed permanently in the QML file. You can permanently
|
values are not changed permanently in the QML file. You can permanently
|
||||||
change the property values in the \gui Properties pane.
|
change the property values in the \gui Properties pane (4).
|
||||||
|
|
||||||
\image qmldesigner-preview-size.png "Canvas width and height"
|
\image qmldesigner-preview-size.png "Canvas width and height"
|
||||||
|
|
||||||
\section1 Specifying Canvas Size
|
\section1 Specifying Canvas Size
|
||||||
|
|
||||||
To change the canvas size, select \gui {Tools > Options > Qt Quick} and
|
To change the canvas size, select \gui {Tools > Options > Qt Quick
|
||||||
|
> Qt Quick Designer} and
|
||||||
specify the canvas width and height in the \gui Canvas group.
|
specify the canvas width and height in the \gui Canvas group.
|
||||||
|
|
||||||
\section1 Refreshing the Canvas
|
\section1 Refreshing the Canvas
|
||||||
|
@@ -1115,6 +1115,7 @@ public slots:
|
|||||||
void maybeEnrichParameters(DebuggerStartParameters *sp);
|
void maybeEnrichParameters(DebuggerStartParameters *sp);
|
||||||
|
|
||||||
void gdbServerStarted(const QString &channel, const QString &sysroot, const QString &localExecutable);
|
void gdbServerStarted(const QString &channel, const QString &sysroot, const QString &localExecutable);
|
||||||
|
void attachedToProcess(const QString &channel, const QString &sysroot, const QString &localExecutable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DebuggerMainWindow *m_mainWindow;
|
DebuggerMainWindow *m_mainWindow;
|
||||||
@@ -1672,11 +1673,6 @@ void DebuggerPluginPrivate::attachToRemoteServer()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerPluginPrivate::attachToRemoteProcess()
|
|
||||||
{
|
|
||||||
startRemoteServer();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DebuggerPluginPrivate::startRemoteServer()
|
void DebuggerPluginPrivate::startRemoteServer()
|
||||||
{
|
{
|
||||||
PluginManager *pm = PluginManager::instance();
|
PluginManager *pm = PluginManager::instance();
|
||||||
@@ -1689,6 +1685,24 @@ void DebuggerPluginPrivate::startRemoteServer()
|
|||||||
|
|
||||||
void DebuggerPluginPrivate::gdbServerStarted(const QString &channel,
|
void DebuggerPluginPrivate::gdbServerStarted(const QString &channel,
|
||||||
const QString &sysroot, const QString &remoteCommandLine)
|
const QString &sysroot, const QString &remoteCommandLine)
|
||||||
|
{
|
||||||
|
Q_UNUSED(remoteCommandLine);
|
||||||
|
Q_UNUSED(sysroot);
|
||||||
|
showStatusMessage(tr("gdbserver is now listening at %1").arg(channel));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebuggerPluginPrivate::attachToRemoteProcess()
|
||||||
|
{
|
||||||
|
PluginManager *pm = PluginManager::instance();
|
||||||
|
QTC_ASSERT(pm, return);
|
||||||
|
QObject *rl = pm->getObjectByName(_("RemoteLinuxPlugin"));
|
||||||
|
QTC_ASSERT(rl, return);
|
||||||
|
QMetaObject::invokeMethod(rl, "attachToRemoteProcess", Qt::QueuedConnection);
|
||||||
|
// This will call back attachedtToProcess() below.
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebuggerPluginPrivate::attachedToProcess(const QString &channel,
|
||||||
|
const QString &sysroot, const QString &remoteCommandLine)
|
||||||
{
|
{
|
||||||
QString binary = remoteCommandLine.section(QLatin1Char(' '), 0, 0);
|
QString binary = remoteCommandLine.section(QLatin1Char(' '), 0, 0);
|
||||||
QString localExecutable;
|
QString localExecutable;
|
||||||
@@ -3075,7 +3089,7 @@ void DebuggerPluginPrivate::extensionsInitialized()
|
|||||||
connect(act, SIGNAL(triggered()), SLOT(attachToRemoteServer()));
|
connect(act, SIGNAL(triggered()), SLOT(attachToRemoteServer()));
|
||||||
|
|
||||||
act = m_startRemoteServerAction = new QAction(this);
|
act = m_startRemoteServerAction = new QAction(this);
|
||||||
act->setText(tr("Start Remote Debug Server..."));
|
act->setText(tr("Start Remote Debug Server Attached to Process..."));
|
||||||
connect(act, SIGNAL(triggered()), SLOT(startRemoteServer()));
|
connect(act, SIGNAL(triggered()), SLOT(startRemoteServer()));
|
||||||
|
|
||||||
act = m_attachToRemoteProcessAction = new QAction(this);
|
act = m_attachToRemoteProcessAction = new QAction(this);
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QFileInfo>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
@@ -646,6 +647,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect()
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detect CDB, return a pair of <32bit, 64bit> executables.
|
||||||
QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
|
QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
|
||||||
{
|
{
|
||||||
QPair<Utils::FileName, Utils::FileName> result;
|
QPair<Utils::FileName, Utils::FileName> result;
|
||||||
@@ -660,6 +662,29 @@ QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
|
|||||||
if (dirName.isEmpty())
|
if (dirName.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
QDir dir(dirName);
|
QDir dir(dirName);
|
||||||
|
// Windows SDK's starting from version 8 live in
|
||||||
|
// "ProgramDir\Windows Kits\<version>"
|
||||||
|
const QString windowsKitsFolderName = QLatin1String("Windows Kits");
|
||||||
|
if (dir.exists(windowsKitsFolderName)) {
|
||||||
|
QDir windowKitsFolder = dir;
|
||||||
|
if (windowKitsFolder.cd(windowsKitsFolderName)) {
|
||||||
|
// Check in reverse order (latest first)
|
||||||
|
const QFileInfoList kitFolders =
|
||||||
|
windowKitsFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot,
|
||||||
|
QDir::Time|QDir::Reversed);
|
||||||
|
foreach (const QFileInfo &kitFolderFi, kitFolders) {
|
||||||
|
const QString path = kitFolderFi.absoluteFilePath();
|
||||||
|
const QFileInfo cdb32(path + QLatin1String("/Debuggers/x86/cdb.exe"));
|
||||||
|
if (cdb32.isExecutable())
|
||||||
|
cdbs.push_back(Utils::FileName::fromString(cdb32.absoluteFilePath()));
|
||||||
|
const QFileInfo cdb64(path + QLatin1String("/Debuggers/x64/cdb.exe"));
|
||||||
|
if (cdb64.isExecutable())
|
||||||
|
cdbs.push_back(Utils::FileName::fromString(cdb64.absoluteFilePath()));
|
||||||
|
} // for Kits
|
||||||
|
} // can cd to "Windows Kits"
|
||||||
|
} // "Windows Kits" exists
|
||||||
|
|
||||||
|
// Pre Windows SDK 8: Check 'Debugging Tools for Windows'
|
||||||
foreach (const QFileInfo &fi, dir.entryInfoList(QStringList(QLatin1String("Debugging Tools for Windows*")),
|
foreach (const QFileInfo &fi, dir.entryInfoList(QStringList(QLatin1String("Debugging Tools for Windows*")),
|
||||||
QDir::Dirs | QDir::NoDotAndDotDot)) {
|
QDir::Dirs | QDir::NoDotAndDotDot)) {
|
||||||
Utils::FileName filePath(fi);
|
Utils::FileName filePath(fi);
|
||||||
|
@@ -286,7 +286,7 @@ void FormEditorView::nodeIdChanged(const ModelNode& node, const QString& newId,
|
|||||||
QmlModelView::nodeIdChanged(node, newId, oldId);
|
QmlModelView::nodeIdChanged(node, newId, oldId);
|
||||||
QmlItemNode itemNode(node);
|
QmlItemNode itemNode(node);
|
||||||
|
|
||||||
if (itemNode.isValid()) {
|
if (itemNode.isValid() && node.nodeSourceType() == ModelNode::NodeWithoutSource) {
|
||||||
FormEditorItem *item = m_scene->itemForQmlItemNode(itemNode);
|
FormEditorItem *item = m_scene->itemForQmlItemNode(itemNode);
|
||||||
item->update();
|
item->update();
|
||||||
}
|
}
|
||||||
|
@@ -91,41 +91,20 @@ RemoteLinuxPlugin::~RemoteLinuxPlugin()
|
|||||||
|
|
||||||
void RemoteLinuxPlugin::extensionsInitialized()
|
void RemoteLinuxPlugin::extensionsInitialized()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
using namespace Core;
|
|
||||||
ICore *core = ICore::instance();
|
|
||||||
ActionManager *am = core->actionManager();
|
|
||||||
ActionContainer *mstart =
|
|
||||||
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
|
||||||
|
|
||||||
const Context globalcontext(Core::Constants::C_GLOBAL);
|
|
||||||
|
|
||||||
QAction *act = 0;
|
|
||||||
Command *cmd = 0;
|
|
||||||
|
|
||||||
act = new QAction(tr("Start Remote Debug Server..."), 0);
|
|
||||||
cmd = am->registerAction(act, "StartGdbServer", globalcontext);
|
|
||||||
cmd->setDescription(tr("Start Gdbserver"));
|
|
||||||
mstart->addAction(cmd, Debugger::Constants::G_MANUAL_REMOTE);
|
|
||||||
connect(act, SIGNAL(triggered()), SLOT(startGdbServer()));
|
|
||||||
|
|
||||||
act = new QAction(tr("Attach to Running Remote Process..."), 0);
|
|
||||||
cmd = am->registerAction(act, "AttachRemoteProcess", globalcontext);
|
|
||||||
cmd->setDescription(tr("Attach to Remote Process"));
|
|
||||||
mstart->addAction(cmd, Debugger::Constants::G_AUTOMATIC_REMOTE);
|
|
||||||
connect(act, SIGNAL(triggered()), SLOT(startGdbServer()));
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxPlugin::startGdbServer()
|
void RemoteLinuxPlugin::startGdbServer()
|
||||||
{
|
{
|
||||||
StartGdbServerDialog dlg;
|
StartGdbServerDialog dlg;
|
||||||
int result = dlg.exec();
|
|
||||||
if (result == QDialog::Rejected)
|
|
||||||
return;
|
|
||||||
dlg.startGdbServer();
|
dlg.startGdbServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RemoteLinuxPlugin::attachToRemoteProcess()
|
||||||
|
{
|
||||||
|
StartGdbServerDialog dlg;
|
||||||
|
dlg.attachToRemoteProcess();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
|
||||||
|
@@ -52,6 +52,7 @@ public:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void startGdbServer();
|
void startGdbServer();
|
||||||
|
void attachToRemoteProcess();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -93,6 +93,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
StartGdbServerDialog *q;
|
StartGdbServerDialog *q;
|
||||||
|
bool startServerOnly;
|
||||||
AbstractRemoteLinuxProcessList *processList;
|
AbstractRemoteLinuxProcessList *processList;
|
||||||
QSortFilterProxyModel proxyModel;
|
QSortFilterProxyModel proxyModel;
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q)
|
StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q)
|
||||||
: q(q), processList(0)
|
: q(q), startServerOnly(true), processList(0)
|
||||||
{
|
{
|
||||||
settings = ICore::settings();
|
settings = ICore::settings();
|
||||||
|
|
||||||
@@ -321,13 +322,20 @@ void StartGdbServerDialog::portListReady()
|
|||||||
|
|
||||||
void StartGdbServerDialog::startGdbServer()
|
void StartGdbServerDialog::startGdbServer()
|
||||||
{
|
{
|
||||||
|
d->startServerOnly = true;
|
||||||
|
if (exec() == QDialog::Rejected)
|
||||||
|
return;
|
||||||
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
||||||
d->gatherer.start(SshConnection::create(device->sshParameters()), device);
|
d->gatherer.start(SshConnection::create(device->sshParameters()), device);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartGdbServerDialog::attachToRemoteProcess()
|
void StartGdbServerDialog::attachToRemoteProcess()
|
||||||
{
|
{
|
||||||
startGdbServer();
|
d->startServerOnly = false;
|
||||||
|
if (exec() == QDialog::Rejected)
|
||||||
|
return;
|
||||||
|
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
||||||
|
d->gatherer.start(SshConnection::create(device->sshParameters()), device);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartGdbServerDialog::handleConnectionError()
|
void StartGdbServerDialog::handleConnectionError()
|
||||||
@@ -351,29 +359,31 @@ void StartGdbServerDialog::handleProcessErrorOutput(const QByteArray &ba)
|
|||||||
logMessage(QString::fromUtf8(ba.trimmed()));
|
logMessage(QString::fromUtf8(ba.trimmed()));
|
||||||
// "Attached; pid = 16740"
|
// "Attached; pid = 16740"
|
||||||
// "Listening on port 10000"
|
// "Listening on port 10000"
|
||||||
int pos = ba.indexOf("Listening on port");
|
foreach (const QByteArray &line, ba.split('\n')) {
|
||||||
if (pos == -1)
|
if (line.startsWith("Listening on port")) {
|
||||||
return;
|
const int port = line.mid(18).trimmed().toInt();
|
||||||
const int port = ba.mid(pos + 18).trimmed().toInt();
|
reportOpenPort(port);
|
||||||
logMessage(tr("Port %1 is now accessible.").arg(port));
|
}
|
||||||
reportOpenPort(port);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartGdbServerDialog::reportOpenPort(int port)
|
void StartGdbServerDialog::reportOpenPort(int port)
|
||||||
{
|
{
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
logMessage(tr("Port %1 is now accessible.").arg(port));
|
||||||
QObject *ob = pm->getObjectByName("DebuggerCore");
|
|
||||||
if (!ob)
|
|
||||||
return;
|
|
||||||
|
|
||||||
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
||||||
QString channel = QString("%1:%2").arg(device->sshParameters().host).arg(port);
|
QString channel = QString("%1:%2").arg(device->sshParameters().host).arg(port);
|
||||||
logMessage(tr("Server started on %1").arg(channel));
|
logMessage(tr("Server started on %1").arg(channel));
|
||||||
|
|
||||||
QMetaObject::invokeMethod(ob, "gdbServerStarted", Qt::QueuedConnection,
|
const char *member = d->startServerOnly ? "gdbServerStarted" : "attachedToProcess";
|
||||||
Q_ARG(QString, channel),
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
Q_ARG(QString, d->sysrootPathChooser->path()),
|
QObject *ob = pm->getObjectByName("DebuggerCore");
|
||||||
Q_ARG(QString, d->remoteCommandLine));
|
if (ob) {
|
||||||
|
QMetaObject::invokeMethod(ob, member, Qt::QueuedConnection,
|
||||||
|
Q_ARG(QString, channel),
|
||||||
|
Q_ARG(QString, d->sysrootPathChooser->path()),
|
||||||
|
Q_ARG(QString, d->remoteCommandLine));
|
||||||
|
}
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartGdbServerDialog::handleProcessClosed(int status)
|
void StartGdbServerDialog::handleProcessClosed(int status)
|
||||||
|
@@ -122,8 +122,8 @@ def createTasksFile(list):
|
|||||||
# the following is currently a bad work-around
|
# the following is currently a bad work-around
|
||||||
fData = index.data(Qt.UserRole).toString() # file
|
fData = index.data(Qt.UserRole).toString() # file
|
||||||
lData = index.data(Qt.UserRole + 1).toString() # line -> linenumber or empty
|
lData = index.data(Qt.UserRole + 1).toString() # line -> linenumber or empty
|
||||||
tData = index.data(Qt.UserRole + 4).toString() # type -> 1==error 2==warning
|
tData = index.data(Qt.UserRole + 5).toString() # type -> 1==error 2==warning
|
||||||
dData = index.data(Qt.UserRole + 2).toString() # description
|
dData = index.data(Qt.UserRole + 3).toString() # description
|
||||||
if lData == "":
|
if lData == "":
|
||||||
lData = "-1"
|
lData = "-1"
|
||||||
if tData == "1":
|
if tData == "1":
|
||||||
|