Merge remote-tracking branch 'origin/2.6'
BIN
doc/images/qtcreator-android-application.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
doc/images/qtcreator-android-libraries.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
doc/images/qtcreator-android-manifest.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
doc/images/qtcreator-android-permissions.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
doc/images/qtcreator-android-sign-package.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
doc/images/qtcreator-deploy-android.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
doc/images/qtcreator-options-android.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
130
doc/src/android/androiddev.qdoc
Normal file
@@ -0,0 +1,130 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Free Documentation License
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of this
|
||||
** file.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
|
||||
\contentspage index.html
|
||||
\previouspage creator-developing-qnx.html
|
||||
\page creator-developing-android.html
|
||||
\nextpage creator-build-process-customizing.html
|
||||
|
||||
\title Connecting Android Devices
|
||||
|
||||
You can connect Android devices to the development PC to build, run, debug,
|
||||
and analyze applications on them from \QC.
|
||||
|
||||
If you have a tool chain for building applications for Android devices
|
||||
installed on the development PC, you can add it to \QC. You can then select
|
||||
the \gui {Android} target to run applications on Android devices.
|
||||
|
||||
\section1 Requirements
|
||||
|
||||
To use \QC to develop Qt applications for Android, you need the following:
|
||||
|
||||
\list
|
||||
|
||||
\o OpenJDK Java Development Kit
|
||||
|
||||
To check whether you have OpenJDK installed, enter the following
|
||||
command:
|
||||
|
||||
\c {java -version}
|
||||
|
||||
To install OpenJDK, enter the following command:
|
||||
|
||||
\c {sudo apt-get install openjdk-6-jdk}
|
||||
|
||||
\o \l{http://ant.apache.org/bindownload.cgi}{Apache Ant} 1.8.0, or
|
||||
later
|
||||
|
||||
To check the Ant version, enter the following command on the command
|
||||
line:
|
||||
|
||||
\c {ant -version}
|
||||
|
||||
\o \l{http://necessitas.kde.org/necessitas/necessitas_sdk_installer.php}
|
||||
{Necessitas SDK}
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Configuring Connections
|
||||
|
||||
The Qt for Android SDK automatically sets the paths to the required software
|
||||
in \QC.
|
||||
|
||||
To configure connections between \QC and Android devices:
|
||||
|
||||
\list 1
|
||||
|
||||
\o Select \gui Tools > \gui Options > \gui {Build & Run} >
|
||||
\gui {Qt Versions} > \gui Add to add Qt for Android.
|
||||
|
||||
\o In the \gui {qmake location} field, add the \c qmake path from the
|
||||
Qt for Android SDK
|
||||
(\c {/opt/necessitas/Android/<qtversion>/bin/qmake} by default).
|
||||
|
||||
\o Select \gui Tools > \gui Options > \gui Android to view and edit
|
||||
paths to the required software.
|
||||
|
||||
\image qtcreator-options-android.png "Android options"
|
||||
|
||||
\o Select \gui Tools > \gui Options > \gui {Build & Run} >
|
||||
\gui {Qt Versions} and build the GDB Helper to make the debugging
|
||||
output for Qt specific constructs clean and easy to read.
|
||||
|
||||
\o To build the GDB Helper, select Qt for Android, select \gui Details
|
||||
in the \gui Helpers section, and then select \gui Build in the
|
||||
\gui {GDB Helper} field.
|
||||
|
||||
\o Select \gui {Start Android AVD Manager} to create Android virtual
|
||||
devices (AVD) that enable you emulate device hardware and software
|
||||
on the Android Emulator.
|
||||
|
||||
\o To specify information for the Android manifest file, select
|
||||
\gui Projects > \gui Run, and then select \gui Details to view the
|
||||
\gui {Package configurations}. For more information about the
|
||||
options you have, see
|
||||
\l{Specifying Run Settings for Android Devices}.
|
||||
|
||||
\o To specify settings for deploying applications to Android, select
|
||||
\gui Details to view the \gui {Deploy configurations}. For more
|
||||
information about the options you have, see
|
||||
\l{Deploying Applications to Android Devices}.
|
||||
|
||||
\endlist
|
||||
|
||||
\section1 Debugging on Android Devices
|
||||
|
||||
Android devices support debugging multi-thread applications in version
|
||||
2.2.1 and later. If you use AVD, select Android 2.3, or later. For more
|
||||
information, see the Android documentation.
|
||||
|
||||
In addition, debugging is supported at android-10 API level, or higher. In
|
||||
the run settings for the project, in the \gui {Android target SDK} field,
|
||||
select android-10, or higher. For more information about Android API levels,
|
||||
see \l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels}
|
||||
{What is API Level?}.
|
||||
|
||||
\note Select a \l{glossary-build-config}{debug build configuration} to build
|
||||
the application for debugging.
|
||||
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
\section2 Specifying Run Settings for Android Devices
|
||||
|
||||
In \gui {Package configurations}, you can specify information for the
|
||||
Android manifest file. The Android system uses the information from the file
|
||||
to start application components.
|
||||
|
||||
\section3 Specifying Package Data
|
||||
|
||||
In the \gui Manifest tab, you can select the API level to use for the
|
||||
Android target SDK and the name and version number for the application
|
||||
package.
|
||||
|
||||
\image qtcreator-android-manifest.png "Manifest tab"
|
||||
|
||||
For more information about Android API levels, see
|
||||
\l{http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels}
|
||||
{What is API Level?}.
|
||||
|
||||
\note The android-4 API level does not support multitouch. If your
|
||||
application needs multitouch, select a higher API level.
|
||||
|
||||
In the \gui {Package name} field, enter a package name for the application.
|
||||
The application is launched by an automatically generated Java launcher that
|
||||
is packaged with the application into an Android package (.apk). For more
|
||||
information, see
|
||||
\l{http://developer.android.com/guide/components/fundamentals.html}
|
||||
{Android Application Fundamentals}.
|
||||
|
||||
\section3 Specifying Application Data
|
||||
|
||||
In the \gui Application tab, you can select an icon for the application and
|
||||
give the application a name.
|
||||
|
||||
\image qtcreator-android-application.png "Application tab"
|
||||
|
||||
\section3 Setting Permissions
|
||||
|
||||
In the \gui Permissions tab, you can specify the permissions that your
|
||||
application needs. Users are asked to grant the permissions when they
|
||||
install the application. Android OS then grants the application access to
|
||||
the appropriate data and features.
|
||||
|
||||
\image qtcreator-android-permissions.png "Permissions tab"
|
||||
|
||||
Select from existing Android permissions or add new ones to deploy the
|
||||
application to a particular Android OS.
|
||||
|
||||
\section3 Selecting Qt Libraries
|
||||
|
||||
In the \gui Libraries tab, specify which Qt libraries the application uses.
|
||||
To automatically determine this, select \gui {Read Infomation from
|
||||
Application (Must Be Compiled)}. Alternatively, you can manually select the
|
||||
Qt libraries and the external libraries you think your application needs.
|
||||
Make sure to arrange the libraries so that depended libraries appear before
|
||||
the ones that depend on them.
|
||||
|
||||
\image qtcreator-android-libraries.png "Libraries tab"
|
||||
|
||||
These entries are used by the Ministro tool to determine which Qt libraries
|
||||
to download.
|
||||
|
||||
In addition, the Java Loader uses this list to determine which Qt Libraries
|
||||
and other prebundled libraries to load with your application.
|
||||
|
||||
\section3 Signing Android Packages
|
||||
|
||||
In the \gui {Sign Package} tab, you can sign the Android package by using
|
||||
a private key from the keystore. To create new keys, select \gui Create.
|
||||
|
||||
\image qtcreator-android-sign-package.png "Sign Package tab"
|
||||
|
||||
64
doc/src/android/deploying-android.qdoc
Normal file
@@ -0,0 +1,64 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Free Documentation License
|
||||
**
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of this
|
||||
** file.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
|
||||
\contentspage index.html
|
||||
\previouspage creator-deployment-qnx.html
|
||||
\page creator-deploying-android.html
|
||||
\nextpage creator-connecting-mobile.html
|
||||
|
||||
\title Deploying Applications to Android Devices
|
||||
|
||||
To specify settings for deploying applications to Android devices, select
|
||||
\gui Projects > \gui Run.
|
||||
|
||||
\image qtcreator-deploy-android.png "Deploy configurations"
|
||||
|
||||
Select the \gui {Use device's Qt libs} option to use Qt libraries installed
|
||||
on the device. If you do not select the \gui {Use local Qt libs} option,
|
||||
the application needs the Ministro package to run. However, if you select
|
||||
the \gui {Use local Qt libs} option, \QC passes special parameters to the
|
||||
application, forcing it to use Qt libraries from the \c{/data/local/qt}
|
||||
folder on the device
|
||||
|
||||
Select the \gui {Deploy local Qt libs} option to deploy Qt libraries from
|
||||
the specified Qt for Android SDK (for exmple, android-lighthouse-4.8.0).
|
||||
This option enables you to develop on the Qt framework to test it.
|
||||
|
||||
The \gui {Deploy local Qt libs} option automatically selects the
|
||||
\gui {Use local Qt libs} option. It is deselected automatically after \QC
|
||||
pushes the Qt libs to the device. Select the option again to push your local
|
||||
Qt modifications to devices. This option takes the same effect as the
|
||||
\c{push_qt_libs.sh} script thas is located in the root folder of the
|
||||
Qt for Android SDK. You can also use the \gui {Use local Qt libs}
|
||||
independently of the \gui {Deploy local Qt libs} option.
|
||||
|
||||
\section1 Installing Ministro
|
||||
|
||||
To install Ministro, select the \gui {Install Ministro system} option. You
|
||||
can also use it to install any Android package (.apk). You can use this
|
||||
option to install applications on an Android Virtual Device (AVD). Download
|
||||
the Ministro .apk from the Google Market or from the
|
||||
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.
|
||||
|
||||
*/
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
When you deploy the application on the \gui{QNX} target, \QC generates
|
||||
a BAR package in the build directory and deploys it to the connected
|
||||
device. You can test and debug the application on the device.
|
||||
\o \l{Deploying Applications to Android Devices}
|
||||
|
||||
When you deploy the application on the Android target, \QC copies
|
||||
the application files to the device. In addition, you can determine
|
||||
the Qt libraries to use.
|
||||
\endlist
|
||||
|
||||
\section1 Related Topics
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/*!
|
||||
\contentspage index.html
|
||||
\previouspage index.html
|
||||
\previouspage creator-glossary.html
|
||||
\page creator-getting-started.html
|
||||
\nextpage creator-overview.html
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/*!
|
||||
\contentspage index.html
|
||||
\previouspage creator-deployment-qnx.html
|
||||
\previouspage creator-deploying-android.html
|
||||
\page creator-connecting-mobile.html
|
||||
\nextpage creator-developing-meego.html
|
||||
|
||||
@@ -81,6 +81,15 @@
|
||||
supported for BlackBerry Playbook, and requires the BlackBerry NDK
|
||||
to be installed on the development PC.
|
||||
|
||||
\o \l{Connecting Android Devices}
|
||||
|
||||
Qt applications for Android are compiled as \c {shared objects} that
|
||||
are loaded by a Java launcher generated by the Qt for Android SDK.
|
||||
This is totally transparent to users. As Qt is composed of libraries
|
||||
referencing each other, Qt applications are only supported on
|
||||
Android version 1.6, or later. You must install the Qt for Android
|
||||
SDK to develop for Android devices.
|
||||
|
||||
\endlist
|
||||
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
\o QNX
|
||||
|
||||
\o Android
|
||||
|
||||
\endlist
|
||||
|
||||
The following table summarizes operating system support for developing
|
||||
@@ -25,8 +27,8 @@
|
||||
|
||||
\table
|
||||
\header
|
||||
\o {1,7} Operating system
|
||||
\o {7,1} Platform
|
||||
\o {1,8} Operating system
|
||||
\o {8,1} Platform
|
||||
\header
|
||||
\o Desktop
|
||||
\o \QS
|
||||
@@ -35,6 +37,7 @@
|
||||
\o Generic Remote Linux
|
||||
\o Symbian
|
||||
\o QNX
|
||||
\o Android
|
||||
|
||||
\row
|
||||
\o Windows
|
||||
@@ -45,6 +48,8 @@
|
||||
\o Yes
|
||||
\o Yes
|
||||
\o Yes (see \l{Running on QNX Devices} for limitations)
|
||||
\o Yes
|
||||
|
||||
\row
|
||||
\o Linux
|
||||
\o Yes
|
||||
@@ -54,6 +59,7 @@
|
||||
\o Yes
|
||||
\o Yes (by using Remote Compiler for building)
|
||||
\o Yes
|
||||
\o Yes
|
||||
\row
|
||||
\o Mac OS X
|
||||
\o Yes
|
||||
@@ -63,4 +69,5 @@
|
||||
\o Yes
|
||||
\o Yes (by using Remote Compiler for building)
|
||||
\o Yes
|
||||
\o Yes
|
||||
\endtable
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/*!
|
||||
\contentspage index.html
|
||||
\previouspage creator-developing-qnx.html
|
||||
\previouspage creator-developing-android.html
|
||||
\page creator-build-process-customizing.html
|
||||
\nextpage creator-maemo-emulator.html
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
\input symbian/creator-projects-settings-run-symbian.qdocinc
|
||||
\input linux-mobile/creator-projects-settings-run-linux.qdocinc
|
||||
\input qnx/creator-projects-settings-run-qnx.qdocinc
|
||||
\input android/creator-projects-settings-run-android.qdocinc
|
||||
\endif
|
||||
|
||||
\section1 Specifying a Custom Executable to Run
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
\contentspage index.html
|
||||
\previouspage creator-deployment-maemo.html
|
||||
\page creator-deployment-qnx.html
|
||||
\nextpage creator-connecting-mobile.html
|
||||
\nextpage creator-deploying-android.html
|
||||
|
||||
\title Deploying Applications to QNX Devices
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
\contentspage index.html
|
||||
\previouspage creator-developing-symbian.html
|
||||
\page creator-developing-qnx.html
|
||||
\nextpage creator-build-process-customizing.html
|
||||
\nextpage creator-developing-android.html
|
||||
|
||||
\title Connecting QNX Devices
|
||||
|
||||
|
||||
@@ -239,6 +239,7 @@
|
||||
\o \l{Deploying Applications to Symbian Devices}
|
||||
\o \l{Deploying Applications to Linux-Based Devices}
|
||||
\o \l{Deploying Applications to QNX Devices}
|
||||
\o \l{Deploying Applications to Android Devices}
|
||||
\endlist
|
||||
\o \l{Connecting Mobile Targets}
|
||||
\list
|
||||
@@ -247,6 +248,7 @@
|
||||
\o \l{Connecting Maemo Devices}
|
||||
\o \l{Connecting Symbian Devices}
|
||||
\o \l{Connecting QNX Devices}
|
||||
\o \l{Connecting Android Devices}
|
||||
\endlist
|
||||
\o \l{Customizing the Build Process}
|
||||
\o \l{Using Maemo or MeeGo Harmattan Emulator}
|
||||
|
||||
@@ -84,7 +84,7 @@ int main(int argc, char **)
|
||||
// Get the command line and remove the call to this executable.
|
||||
wchar_t *strCommandLine = _wcsdup(GetCommandLine());
|
||||
const size_t strCommandLineLength = wcslen(strCommandLine);
|
||||
size_t pos = 1;
|
||||
size_t pos = 0;
|
||||
bool quoted = false;
|
||||
while (pos < strCommandLineLength) {
|
||||
if (strCommandLine[pos] == L'"') {
|
||||
|
||||
@@ -82,7 +82,6 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
||||
params.dumperLibrary = runConfig->dumperLib();
|
||||
params.executable = project(runConfig)->rootQt4ProjectNode()->buildDir() + QLatin1String("/app_process");
|
||||
params.remoteChannel = runConfig->remoteChannel();
|
||||
params.remoteArchitecture = QLatin1String("arm");
|
||||
params.useServerStartScript = true;
|
||||
|
||||
params.solibSearchPath.clear();
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "autotoolsbuildconfiguration.h"
|
||||
#include "autotoolsbuildsettingswidget.h"
|
||||
#include "makestep.h"
|
||||
#include "autotoolsproject.h"
|
||||
#include "autotoolsprojectconstants.h"
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#ifndef AUTOTOOLSBUILDCONFIGURATION_H
|
||||
#define AUTOTOOLSBUILDCONFIGURATION_H
|
||||
|
||||
#include "autotoolsbuildsettingswidget.h"
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
|
||||
@@ -35,17 +35,16 @@
|
||||
#ifndef AUTOTOOLSBUILDSETTINGSWIDGET_H
|
||||
#define AUTOTOOLSBUILDSETTINGSWIDGET_H
|
||||
|
||||
#include "autotoolsbuildconfiguration.h"
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/buildstep.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QComboBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Utils {
|
||||
class PathChooser;
|
||||
}
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include "autotoolsopenprojectwizard.h"
|
||||
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
#define AUTOTOOLSOPENPROJECTWIZARD_H
|
||||
|
||||
#include <utils/wizard.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
namespace Utils {
|
||||
class PathChooser;
|
||||
}
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <cpptools/ModelManagerInterface.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/filesystemwatcher.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QTimer>
|
||||
|
||||
@@ -35,14 +35,18 @@
|
||||
#ifndef AUTOTOOLSPROJECT_H
|
||||
#define AUTOTOOLSPROJECT_H
|
||||
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <utils/filesystemwatcher.h>
|
||||
|
||||
#include <QPointer>
|
||||
#include <QDir>
|
||||
QT_FORWARD_DECLARE_CLASS(QDir)
|
||||
|
||||
namespace Utils {
|
||||
class FileSystemWatcher;
|
||||
}
|
||||
|
||||
namespace ProjectExplorer {
|
||||
class Node;
|
||||
class FolderNode;
|
||||
}
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "autotoolsprojectnode.h"
|
||||
#include "autotoolsproject.h"
|
||||
|
||||
#include <coreplugin/idocument.h>
|
||||
|
||||
using namespace AutotoolsProjectManager;
|
||||
using namespace AutotoolsProjectManager::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
#define AUTOTOOLSPROJECTNODE_H
|
||||
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
|
||||
namespace Core {
|
||||
class IDocument;
|
||||
}
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QFileInfoList>
|
||||
#include <QMutexLocker>
|
||||
|
||||
|
||||
@@ -36,12 +36,11 @@
|
||||
#define MAKEFILEPARSER_H
|
||||
|
||||
#include <QMutex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTextStream>
|
||||
#include <QObject>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QDir)
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "makefileparser.h"
|
||||
|
||||
#include <QMutex>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QThread>
|
||||
|
||||
namespace AutotoolsProjectManager {
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include <QDockWidget>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QMenuBar>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QPixmapCache>
|
||||
@@ -98,7 +97,6 @@ bool panelWidget(const QWidget *widget)
|
||||
while (p) {
|
||||
if (qobject_cast<const QToolBar *>(p) ||
|
||||
qobject_cast<const QStatusBar *>(p) ||
|
||||
qobject_cast<const QMenuBar *>(p) ||
|
||||
p->property("panelwidget").toBool())
|
||||
return styleEnabled(widget);
|
||||
p = p->parentWidget();
|
||||
@@ -209,16 +207,12 @@ int ManhattanStyle::pixelMetric(PixelMetric metric, const QStyleOption *option,
|
||||
case PM_DockWidgetHandleExtent:
|
||||
case PM_DockWidgetSeparatorExtent:
|
||||
return 1;
|
||||
case PM_MenuPanelWidth:
|
||||
case PM_MenuBarHMargin:
|
||||
case PM_MenuBarVMargin:
|
||||
case PM_ToolBarFrameWidth:
|
||||
if (panelWidget(widget))
|
||||
retval = 1;
|
||||
break;
|
||||
case PM_ButtonShiftVertical:
|
||||
case PM_ButtonShiftHorizontal:
|
||||
case PM_MenuBarPanelWidth:
|
||||
case PM_ToolBarItemMargin:
|
||||
case PM_ToolBarItemSpacing:
|
||||
if (panelWidget(widget))
|
||||
@@ -643,52 +637,6 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
}
|
||||
break;
|
||||
|
||||
case CE_MenuBarItem:
|
||||
painter->save();
|
||||
if (const QStyleOptionMenuItem *mbi = qstyleoption_cast<const QStyleOptionMenuItem *>(option)) {
|
||||
QColor highlightOutline = Utils::StyleHelper::borderColor().lighter(120);
|
||||
bool act = mbi->state & State_Selected && mbi->state & State_Sunken;
|
||||
bool dis = !(mbi->state & State_Enabled);
|
||||
Utils::StyleHelper::menuGradient(painter, option->rect, option->rect);
|
||||
QStyleOptionMenuItem item = *mbi;
|
||||
item.rect = mbi->rect;
|
||||
QPalette pal = mbi->palette;
|
||||
pal.setBrush(QPalette::ButtonText, dis ? Qt::gray : Qt::black);
|
||||
item.palette = pal;
|
||||
QCommonStyle::drawControl(element, &item, painter, widget);
|
||||
QRect r = option->rect;
|
||||
|
||||
if (act) {
|
||||
// Fill|
|
||||
QColor baseColor = Utils::StyleHelper::baseColor();
|
||||
QLinearGradient grad(option->rect.topLeft(), option->rect.bottomLeft());
|
||||
grad.setColorAt(0, baseColor.lighter(120));
|
||||
grad.setColorAt(1, baseColor.lighter(130));
|
||||
painter->fillRect(option->rect.adjusted(1, 1, -1, 0), grad);
|
||||
|
||||
// Outline
|
||||
painter->setPen(QPen(highlightOutline, 0));
|
||||
painter->drawLine(QPoint(r.left(), r.top() + 1), QPoint(r.left(), r.bottom()));
|
||||
painter->drawLine(QPoint(r.right(), r.top() + 1), QPoint(r.right(), r.bottom()));
|
||||
painter->drawLine(QPoint(r.left() + 1, r.top()), QPoint(r.right() - 1, r.top()));
|
||||
highlightOutline.setAlpha(60);
|
||||
painter->setPen(QPen(highlightOutline, 0));
|
||||
painter->drawPoint(r.topLeft());
|
||||
painter->drawPoint(r.topRight());
|
||||
|
||||
QPalette pal = mbi->palette;
|
||||
uint alignment = Qt::AlignCenter | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine;
|
||||
if (!styleHint(SH_UnderlineShortcut, mbi, widget))
|
||||
alignment |= Qt::TextHideMnemonic;
|
||||
pal.setBrush(QPalette::Text, dis ? Qt::gray : QColor(0, 0, 0, 60));
|
||||
drawItemText(painter, item.rect.translated(0, 1), alignment, pal, mbi->state & State_Enabled, mbi->text, QPalette::Text);
|
||||
pal.setBrush(QPalette::Text, dis ? Qt::gray : Qt::white);
|
||||
drawItemText(painter, item.rect, alignment, pal, mbi->state & State_Enabled, mbi->text, QPalette::Text);
|
||||
}
|
||||
}
|
||||
painter->restore();
|
||||
break;
|
||||
|
||||
case CE_ComboBoxLabel:
|
||||
if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
|
||||
if (panelWidget(widget)) {
|
||||
@@ -769,15 +717,6 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
|
||||
}
|
||||
break;
|
||||
|
||||
case CE_MenuBarEmptyArea: {
|
||||
Utils::StyleHelper::menuGradient(painter, option->rect, option->rect);
|
||||
painter->save();
|
||||
painter->setPen(Utils::StyleHelper::borderColor());
|
||||
painter->drawLine(option->rect.bottomLeft(), option->rect.bottomRight());
|
||||
painter->restore();
|
||||
}
|
||||
break;
|
||||
|
||||
case CE_ToolBar:
|
||||
{
|
||||
QRect rect = option->rect;
|
||||
|
||||
@@ -706,19 +706,16 @@ class StartRemoteParameters
|
||||
public:
|
||||
StartRemoteParameters();
|
||||
bool equals(const StartRemoteParameters &rhs) const;
|
||||
QString displayName() const { return remoteChannel; }
|
||||
bool isValid() const { return !remoteChannel.isEmpty(); }
|
||||
QString displayName() const;
|
||||
|
||||
void toSettings(QSettings *) const;
|
||||
void fromSettings(const QSettings *settings);
|
||||
|
||||
Id profileId;
|
||||
QString localExecutable;
|
||||
QString remoteChannel;
|
||||
QString remoteArchitecture;
|
||||
QString overrideStartScript;
|
||||
bool useServerStartScript;
|
||||
QString serverStartScript;
|
||||
Id profileId;
|
||||
QString debugInfoLocation;
|
||||
};
|
||||
|
||||
@@ -747,8 +744,7 @@ StartRemoteParameters::StartRemoteParameters() :
|
||||
|
||||
bool StartRemoteParameters::equals(const StartRemoteParameters &rhs) const
|
||||
{
|
||||
return localExecutable == rhs.localExecutable && remoteChannel ==rhs.remoteChannel
|
||||
&& remoteArchitecture == rhs.remoteArchitecture
|
||||
return localExecutable == rhs.localExecutable
|
||||
&& overrideStartScript == rhs.overrideStartScript
|
||||
&& useServerStartScript == rhs.useServerStartScript
|
||||
&& serverStartScript == rhs.serverStartScript
|
||||
@@ -756,11 +752,15 @@ bool StartRemoteParameters::equals(const StartRemoteParameters &rhs) const
|
||||
&& debugInfoLocation == rhs.debugInfoLocation;
|
||||
}
|
||||
|
||||
QString StartRemoteParameters::displayName() const
|
||||
{
|
||||
Profile *profile = ProfileManager::instance()->find(profileId);
|
||||
return profile ? profile->displayName() : QString();
|
||||
}
|
||||
|
||||
void StartRemoteParameters::toSettings(QSettings *settings) const
|
||||
{
|
||||
settings->setValue(_("LastRemoteChannel"), remoteChannel);
|
||||
settings->setValue(_("LastLocalExecutable"), localExecutable);
|
||||
settings->setValue(_("LastRemoteArchitecture"), remoteArchitecture);
|
||||
settings->setValue(_("LastServerStartScript"), serverStartScript);
|
||||
settings->setValue(_("LastUseServerStartScript"), useServerStartScript);
|
||||
settings->setValue(_("LastRemoteStartScript"), overrideStartScript);
|
||||
@@ -770,7 +770,6 @@ void StartRemoteParameters::toSettings(QSettings *settings) const
|
||||
|
||||
void StartRemoteParameters::fromSettings(const QSettings *settings)
|
||||
{
|
||||
remoteChannel = settings->value(_("LastRemoteChannel")).toString();
|
||||
localExecutable = settings->value(_("LastLocalExecutable")).toString();
|
||||
const QString profileIdString = settings->value(_("LastProfileId")).toString();
|
||||
if (profileIdString.isEmpty()) {
|
||||
@@ -778,7 +777,6 @@ void StartRemoteParameters::fromSettings(const QSettings *settings)
|
||||
} else {
|
||||
profileId = Id(profileIdString);
|
||||
}
|
||||
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
|
||||
serverStartScript = settings->value(_("LastServerStartScript")).toString();
|
||||
useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool();
|
||||
overrideStartScript = settings->value(_("LastRemoteStartScript")).toString();
|
||||
@@ -791,8 +789,6 @@ class StartRemoteDialogPrivate
|
||||
public:
|
||||
ProfileChooser *profileChooser;
|
||||
PathChooser *executablePathChooser;
|
||||
QLineEdit *channelLineEdit;
|
||||
QComboBox *architectureComboBox;
|
||||
PathChooser *debuginfoPathChooser;
|
||||
PathChooser *overrideStartScriptPathChooser;
|
||||
QCheckBox *useServerStartScriptCheckBox;
|
||||
@@ -815,12 +811,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
|
||||
d->executablePathChooser->setExpectedKind(PathChooser::File);
|
||||
d->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
|
||||
|
||||
d->channelLineEdit = new QLineEdit(this);
|
||||
d->channelLineEdit->setText(QString::fromUtf8("localhost:5115"));
|
||||
|
||||
d->architectureComboBox = new QComboBox(this);
|
||||
d->architectureComboBox->setEditable(true);
|
||||
|
||||
d->debuginfoPathChooser = new PathChooser(this);
|
||||
d->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information"));
|
||||
|
||||
@@ -857,8 +847,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
|
||||
formLayout->addRow(tr("Target:"), d->profileChooser);
|
||||
formLayout->addRow(tr("Local &executable:"), d->executablePathChooser);
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
|
||||
formLayout->addRow(tr("&Host and port:"), d->channelLineEdit);
|
||||
formLayout->addRow(tr("&Architecture:"), d->architectureComboBox);
|
||||
formLayout->addRow(tr("Location of debugging &information:"), d->debuginfoPathChooser);
|
||||
formLayout->addRow(tr("Override host GDB s&tart script:"), d->overrideStartScriptPathChooser);
|
||||
formLayout->addRow(d->serverStartScriptLabel, d->useServerStartScriptCheckBox);
|
||||
@@ -893,19 +881,11 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
|
||||
const QString arrayName = useScript ?
|
||||
_("StartRemoteScript") : _("StartRemote");
|
||||
|
||||
QStringList arches;
|
||||
arches << _("i386:x86-64:intel") << _("i386") << _("arm");
|
||||
|
||||
QList<StartRemoteParameters> history =
|
||||
readParameterHistory<StartRemoteParameters>(settings, settingsGroup, arrayName);
|
||||
QTC_ASSERT(!history.isEmpty(), return false);
|
||||
|
||||
foreach (const StartRemoteParameters &h, history)
|
||||
if (!arches.contains(h.remoteArchitecture))
|
||||
arches.prepend(h.remoteArchitecture);
|
||||
|
||||
StartRemoteDialog dialog(parent, useScript);
|
||||
dialog.setRemoteArchitectures(arches);
|
||||
dialog.setHistory(history);
|
||||
dialog.setParameters(history.back());
|
||||
if (dialog.exec() != QDialog::Accepted)
|
||||
@@ -920,8 +900,6 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
|
||||
}
|
||||
|
||||
fillParameters(sp, dialog.profileId());
|
||||
sp->remoteChannel = newParameters.remoteChannel;
|
||||
sp->remoteArchitecture = newParameters.remoteArchitecture;
|
||||
sp->executable = newParameters.localExecutable;
|
||||
sp->displayName = tr("Remote: \"%1\"").arg(sp->remoteChannel);
|
||||
sp->overrideStartScript = newParameters.overrideStartScript;
|
||||
@@ -934,9 +912,7 @@ bool StartRemoteDialog::run(QWidget *parent, QSettings *settings,
|
||||
StartRemoteParameters StartRemoteDialog::parameters() const
|
||||
{
|
||||
StartRemoteParameters result;
|
||||
result.remoteChannel = d->channelLineEdit->text();
|
||||
result.localExecutable = d->executablePathChooser->path();
|
||||
result.remoteArchitecture = d->architectureComboBox->currentText();
|
||||
result.overrideStartScript = d->overrideStartScriptPathChooser->path();
|
||||
result.useServerStartScript = d->useServerStartScriptCheckBox->isChecked();
|
||||
result.serverStartScript = d->serverStartScriptPathChooser->path();
|
||||
@@ -947,11 +923,7 @@ StartRemoteParameters StartRemoteDialog::parameters() const
|
||||
|
||||
void StartRemoteDialog::setParameters(const StartRemoteParameters &p)
|
||||
{
|
||||
d->channelLineEdit->setText(p.remoteChannel);
|
||||
d->executablePathChooser->setPath(p.localExecutable);
|
||||
const int index = d->architectureComboBox->findText(p.remoteArchitecture);
|
||||
if (index != -1)
|
||||
d->architectureComboBox->setCurrentIndex(index);
|
||||
d->overrideStartScriptPathChooser->setPath(p.overrideStartScript);
|
||||
d->useServerStartScriptCheckBox->setChecked(p.useServerStartScript);
|
||||
d->serverStartScriptPathChooser->setPath(p.serverStartScript);
|
||||
@@ -962,10 +934,8 @@ void StartRemoteDialog::setParameters(const StartRemoteParameters &p)
|
||||
void StartRemoteDialog::setHistory(const QList<StartRemoteParameters> &l)
|
||||
{
|
||||
d->historyComboBox->clear();
|
||||
for (int i = l.size() - 1; i >= 0; --i)
|
||||
if (l.at(i).isValid())
|
||||
d->historyComboBox->addItem(l.at(i).displayName(),
|
||||
QVariant::fromValue(l.at(i)));
|
||||
for (int i = l.size(); --i >= 0; )
|
||||
d->historyComboBox->addItem(l.at(i).displayName(), QVariant::fromValue(l.at(i)));
|
||||
}
|
||||
|
||||
void StartRemoteDialog::historyIndexChanged(int index)
|
||||
@@ -982,15 +952,6 @@ Id StartRemoteDialog::profileId() const
|
||||
return d->profileChooser->currentProfileId();
|
||||
}
|
||||
|
||||
void StartRemoteDialog::setRemoteArchitectures(const QStringList &list)
|
||||
{
|
||||
d->architectureComboBox->clear();
|
||||
if (!list.isEmpty()) {
|
||||
d->architectureComboBox->insertItems(0, list);
|
||||
d->architectureComboBox->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
void StartRemoteDialog::updateState()
|
||||
{
|
||||
bool enabled = d->useServerStartScriptCheckBox->isChecked();
|
||||
|
||||
@@ -140,8 +140,6 @@ private:
|
||||
void setParameters(const StartRemoteParameters &);
|
||||
void setHistory(const QList<StartRemoteParameters> &);
|
||||
|
||||
void setRemoteArchitectures(const QStringList &list);
|
||||
|
||||
Core::Id profileId() const;
|
||||
|
||||
StartRemoteDialogPrivate *d;
|
||||
|
||||
@@ -126,7 +126,6 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &sp)
|
||||
<< " attachPID=" << sp.attachPID
|
||||
<< " useTerminal=" << sp.useTerminal
|
||||
<< " remoteChannel=" << sp.remoteChannel
|
||||
<< " remoteArchitecture=" << sp.remoteArchitecture
|
||||
<< " symbolFileName=" << sp.symbolFileName
|
||||
<< " useServerStartScript=" << sp.useServerStartScript
|
||||
<< " serverStartScript=" << sp.serverStartScript
|
||||
|
||||
@@ -550,9 +550,16 @@ void fillParameters(DebuggerStartParameters *sp, Id id)
|
||||
QTC_ASSERT(profile, return);
|
||||
sp->sysRoot = SysRootProfileInformation::sysRoot(profile).toString();
|
||||
sp->debuggerCommand = DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||
|
||||
ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
|
||||
if (tc)
|
||||
sp->toolChainAbi = tc->targetAbi();
|
||||
|
||||
IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||
if (device) {
|
||||
sp->connParams = device->sshParameters();
|
||||
sp->remoteChannel = QString("%1:%2").arg(sp->connParams.host).arg(sp->connParams.port);
|
||||
}
|
||||
}
|
||||
|
||||
static TextEditor::ITextEditor *currentTextEditor()
|
||||
@@ -777,7 +784,6 @@ public slots:
|
||||
Q_SLOT void attachExternalApplication(ProjectExplorer::RunControl *rc);
|
||||
void runScheduled();
|
||||
void attachCore();
|
||||
void attachToRemoteServer(const QString &spec);
|
||||
|
||||
void enableReverseDebuggingTriggered(const QVariant &value);
|
||||
void languagesChanged();
|
||||
@@ -1308,7 +1314,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
|
||||
{
|
||||
const QString &option = *it;
|
||||
// '-debug <pid>'
|
||||
// '-debug <exe>[,server=<server:port>|,core=<core>][,arch=<arch>][,profile=<profile>]'
|
||||
// '-debug <exe>[,server=<server:port>][,core=<core>][,profile=<profile>]'
|
||||
if (*it == _("-debug")) {
|
||||
++it;
|
||||
if (it == cend) {
|
||||
@@ -1346,8 +1352,6 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
|
||||
sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel);
|
||||
sp.startMessage = tr("Attaching to remote server %1.").arg(sp.remoteChannel);
|
||||
}
|
||||
else if (key == QLatin1String("arch"))
|
||||
sp.remoteArchitecture = val;
|
||||
else if (key == QLatin1String("core")) {
|
||||
sp.startMode = AttachCore;
|
||||
sp.closeMode = DetachAtClose;
|
||||
@@ -1591,22 +1595,6 @@ void DebuggerPluginPrivate::attachCore()
|
||||
startDebugger(rc);
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::attachToRemoteServer(const QString &spec)
|
||||
{
|
||||
// spec is: profile@server:port@executable@architecture
|
||||
const QChar delim(QLatin1Char('@'));
|
||||
DebuggerStartParameters sp;
|
||||
fillParameters(&sp, Id(spec.section(delim, 0, 0)));
|
||||
sp.remoteChannel = spec.section(delim, 1, 1);
|
||||
sp.executable = spec.section(delim, 2, 2);
|
||||
sp.remoteArchitecture = spec.section(delim, 3, 3);
|
||||
sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel);
|
||||
sp.startMode = AttachToRemoteServer;
|
||||
sp.closeMode = KillAtClose;
|
||||
if (DebuggerRunControl *rc = createDebugger(sp))
|
||||
startDebugger(rc);
|
||||
}
|
||||
|
||||
struct RemoteCdbMatcher : ProfileMatcher
|
||||
{
|
||||
RemoteCdbMatcher() : m_hostAbi(Abi::hostAbi()) {}
|
||||
@@ -2727,8 +2715,7 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
|
||||
str << "QML server: " << sp.qmlServerAddress << ':'
|
||||
<< sp.qmlServerPort << '\n';
|
||||
if (!sp.remoteChannel.isEmpty()) {
|
||||
str << "Remote: " << sp.remoteChannel << ", "
|
||||
<< sp.remoteArchitecture << '\n';
|
||||
str << "Remote: " << sp.remoteChannel << '\n';
|
||||
if (!sp.remoteDumperLib.isEmpty())
|
||||
str << "Remote dumpers: " << sp.remoteDumperLib << '\n';
|
||||
if (!sp.remoteSourcesDir.isEmpty())
|
||||
@@ -2737,8 +2724,6 @@ static QString formatStartParameters(DebuggerStartParameters &sp)
|
||||
str << "Remote mount point: " << sp.remoteMountPoint
|
||||
<< " Local: " << sp.localMountDir << '\n';
|
||||
}
|
||||
if (!sp.gnuTarget.isEmpty())
|
||||
str << "Gnu target: " << sp.gnuTarget << '\n';
|
||||
str << "Sysroot: " << sp.sysRoot << '\n';
|
||||
str << "Debug Source Location: " << sp.debugSourceLocation.join(QLatin1String(":")) << '\n';
|
||||
str << "Symbol file: " << sp.symbolFileName << '\n';
|
||||
|
||||
@@ -111,8 +111,6 @@ public:
|
||||
QString qtInstallPath;
|
||||
// Used by remote debugging.
|
||||
QString remoteChannel;
|
||||
QString remoteArchitecture;
|
||||
QString gnuTarget;
|
||||
QString symbolFileName;
|
||||
bool useServerStartScript;
|
||||
QString serverStartScript;
|
||||
|
||||
@@ -181,13 +181,10 @@ void GdbRemoteServerEngine::setupInferior()
|
||||
|
||||
//const QByteArray sysroot = sp.sysroot.toLocal8Bit();
|
||||
//const QByteArray remoteArch = sp.remoteArchitecture.toLatin1();
|
||||
//const QByteArray gnuTarget = sp.gnuTarget.toLatin1();
|
||||
const QString args = sp.processArgs;
|
||||
|
||||
// if (!remoteArch.isEmpty())
|
||||
// postCommand("set architecture " + remoteArch);
|
||||
// if (!gnuTarget.isEmpty())
|
||||
// postCommand("set gnutarget " + gnuTarget);
|
||||
const QString solibSearchPath = sp.solibSearchPath.join(QLatin1String(PATHSEP));
|
||||
if (!solibSearchPath.isEmpty())
|
||||
postCommand("set solib-search-path " + solibSearchPath.toLocal8Bit());
|
||||
|
||||
@@ -71,7 +71,7 @@ void GlobalParseState::addSubstitution(const ParseTreeNode *node)
|
||||
|
||||
void GlobalParseState::addSubstitution(const QByteArray &symbol)
|
||||
{
|
||||
if (!symbol.isEmpty() && !m_substitutions.contains(symbol))
|
||||
if (!symbol.isEmpty())
|
||||
m_substitutions.append(symbol);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,21 @@ bool NameDemanglerPrivate::demangle(const QString &mangledName)
|
||||
"expected one.").arg(m_parseState.m_parseStack.count()));
|
||||
}
|
||||
m_demangledName = m_parseState.m_parseStack.top()->toByteArray();
|
||||
|
||||
/*
|
||||
* FIXME: This is a hack we do because TypeNode::toByteArray() cannot catch all
|
||||
* all nested reference due to the way substitutions are currently implented.
|
||||
* Note that even with this hack, we do not catch things like
|
||||
* "reference to reference to array", because the operators do not follow each other
|
||||
* in the string.
|
||||
* For a correct solution, we'll probably have to clone substitution nodes instead of
|
||||
* just dumping their strings (which means adding a copy constructor and a clone function
|
||||
* to every node).
|
||||
*/
|
||||
m_demangledName.replace("&& &&", "&&");
|
||||
m_demangledName.replace("&& &", "&");
|
||||
m_demangledName.replace(" & &", "&");
|
||||
|
||||
success = true;
|
||||
} catch (const ParseException &p) {
|
||||
m_errorString = QString::fromLocal8Bit("Parse error at index %1 of mangled name '%2': %3.")
|
||||
|
||||
@@ -229,6 +229,7 @@ void BuiltinTypeNode::parse()
|
||||
if (next == 'u') {
|
||||
m_type = VendorType;
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SourceNameNode);
|
||||
parseState()->addSubstitution(this);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1581,6 +1582,7 @@ bool SubstitutionNode::mangledRepresentationStartsWith(char c)
|
||||
* ::= Si # ::std::basic_istream<char, std::char_traits<char> >
|
||||
* ::= So # ::std::basic_ostream<char, std::char_traits<char> >
|
||||
* ::= Sd # ::std::basic_iostream<char, std::char_traits<char> >
|
||||
* ::= St <unqualified-name> # ::std::
|
||||
*/
|
||||
void SubstitutionNode::parse()
|
||||
{
|
||||
@@ -1607,7 +1609,13 @@ void SubstitutionNode::parse()
|
||||
m_type = ActualSubstitutionType;
|
||||
m_substValue = parseState()->substitutionAt(0);
|
||||
break;
|
||||
case 't': m_type = StdType; break;
|
||||
case 't':
|
||||
m_type = StdType;
|
||||
if (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK())) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(UnqualifiedNameNode);
|
||||
parseState()->addSubstitution(this);
|
||||
}
|
||||
break;
|
||||
case 'a': m_type = StdAllocType; break;
|
||||
case 'b': m_type = StdBasicStringType; break;
|
||||
case 's': m_type = FullStdBasicStringType; break;
|
||||
@@ -1623,7 +1631,12 @@ QByteArray SubstitutionNode::toByteArray() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case ActualSubstitutionType: return m_substValue;
|
||||
case StdType: return "std";
|
||||
case StdType: {
|
||||
QByteArray repr = "std";
|
||||
if (childCount() > 0)
|
||||
repr.append("::").append(CHILD_TO_BYTEARRAY(0));
|
||||
return repr;
|
||||
}
|
||||
case StdAllocType: return "std::allocator";
|
||||
case StdBasicStringType: return "std::basic_string";
|
||||
case FullStdBasicStringType: return "std::basic_string<char, std::char_traits<char>, "
|
||||
@@ -2194,15 +2207,14 @@ void PrefixNode::parse()
|
||||
parseState()->addSubstitution(this);
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode);
|
||||
}
|
||||
if (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK())) {
|
||||
if (Prefix2Node::mangledRepresentationStartsWith(PEEK()))
|
||||
parseState()->addSubstitution(this);
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(Prefix2Node);
|
||||
}
|
||||
} else if (SubstitutionNode::mangledRepresentationStartsWith(next)) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode);
|
||||
if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode);
|
||||
if (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK()))
|
||||
if (Prefix2Node::mangledRepresentationStartsWith(PEEK()))
|
||||
parseState()->addSubstitution(this);
|
||||
}
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(Prefix2Node);
|
||||
@@ -2210,7 +2222,7 @@ void PrefixNode::parse()
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(SubstitutionNode);
|
||||
if (TemplateArgsNode::mangledRepresentationStartsWith(PEEK())) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateArgsNode);
|
||||
if (UnqualifiedNameNode::mangledRepresentationStartsWith(PEEK()))
|
||||
if (Prefix2Node::mangledRepresentationStartsWith(PEEK()))
|
||||
parseState()->addSubstitution(this);
|
||||
}
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(Prefix2Node);
|
||||
@@ -2289,8 +2301,10 @@ void TypeNode::parse()
|
||||
parseState()->addSubstitution(this);
|
||||
} else if (ArrayTypeNode::mangledRepresentationStartsWith(next)) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(ArrayTypeNode);
|
||||
parseState()->addSubstitution(this);
|
||||
} else if (PointerToMemberTypeNode::mangledRepresentationStartsWith(next)) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(PointerToMemberTypeNode);
|
||||
parseState()->addSubstitution(this);
|
||||
} else if (TemplateParamNode::mangledRepresentationStartsWith(next)) {
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(TemplateParamNode);
|
||||
// The type is now a substitution candidate, but the child node may contain a forward
|
||||
@@ -2378,8 +2392,10 @@ QByteArray TypeNode::toByteArray() const
|
||||
QList<const ParseTreeNode *> qualPtrRefList;
|
||||
const TypeNode *currentNode = this;
|
||||
bool leafType = false;
|
||||
Type lastType = TypeNode::OtherType;
|
||||
while (!leafType) {
|
||||
switch (currentNode->m_type) {
|
||||
Type currentType = currentNode->m_type;
|
||||
switch (currentType) {
|
||||
case QualifiedType: {
|
||||
const CvQualifiersNode * const cvNode
|
||||
= DEMANGLER_CAST(CvQualifiersNode, CHILD_AT(currentNode, 0));
|
||||
@@ -2389,13 +2405,32 @@ QByteArray TypeNode::toByteArray() const
|
||||
break;
|
||||
}
|
||||
case PointerType: case ReferenceType: case RValueType:
|
||||
/*
|
||||
* The Standard says (8.3.2/6) that nested references collapse according
|
||||
* to the following rules:
|
||||
* (1) Reference to reference -> reference
|
||||
* (2) Reference to rvalue -> reference
|
||||
* (3) Rvalue to reference -> reference
|
||||
* (4) Rvalue to Rvalue -> Rvalue
|
||||
*/
|
||||
if (currentType == ReferenceType
|
||||
&& (lastType == ReferenceType || lastType == RValueType)) { // (1) and (3)
|
||||
qualPtrRefList.removeLast();
|
||||
qualPtrRefList << currentNode;
|
||||
} else if (currentType == RValueType
|
||||
&& (lastType == ReferenceType || lastType == RValueType)) { // (2) and (4)
|
||||
// Ignore current element.
|
||||
currentType = lastType;
|
||||
} else {
|
||||
qualPtrRefList << currentNode;
|
||||
}
|
||||
currentNode = DEMANGLER_CAST(TypeNode, CHILD_AT(currentNode, 0));
|
||||
break;
|
||||
default:
|
||||
leafType = true;
|
||||
break;
|
||||
}
|
||||
lastType = currentType;
|
||||
}
|
||||
|
||||
if (qualPtrRefList.isEmpty()) {
|
||||
@@ -2471,6 +2506,7 @@ QByteArray TypeNode::qualPtrRefListToByteArray(const QList<const ParseTreeNode *
|
||||
repr.prepend(n->toByteArray());
|
||||
}
|
||||
}
|
||||
|
||||
return repr;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,10 +134,8 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
|
||||
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||
params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
|
||||
|
||||
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile)) {
|
||||
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
|
||||
params.toolChainAbi = tc->targetAbi();
|
||||
params.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
|
||||
}
|
||||
|
||||
params.executable = runConfig->localExecutableFilePath();
|
||||
params.remoteChannel = runConfig->deployConfiguration()->deviceHost() + QLatin1String(":8000");
|
||||
|
||||
@@ -132,10 +132,8 @@ Debugger::DebuggerStartParameters QnxRunControlFactory::startParameters(
|
||||
params.debuggerCommand = Debugger::DebuggerProfileInformation::debuggerCommand(profile).toString();
|
||||
params.sysRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(profile).toString();
|
||||
|
||||
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile)) {
|
||||
if (ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(profile))
|
||||
params.toolChainAbi = tc->targetAbi();
|
||||
params.remoteArchitecture = ProjectExplorer::Abi::toString(tc->targetAbi().architecture());
|
||||
}
|
||||
|
||||
params.symbolFileName = runConfig->localExecutableFilePath();
|
||||
params.remoteExecutable = runConfig->remoteExecutableFilePath();
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "unconfiguredsettingsoptionpage.h"
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/toolchainmanager.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
#include <qt4projectmanager/qt4projectmanager.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QIcon>
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
#include <QCheckBox>
|
||||
#include <QFormLayout>
|
||||
|
||||
using namespace Qt4ProjectManager;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
//////////////////////////
|
||||
// UnConfiguredSettingsWidget
|
||||
//////////////////////////
|
||||
|
||||
UnConfiguredSettingsWidget::UnConfiguredSettingsWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
QFormLayout *layout = new QFormLayout(this);
|
||||
|
||||
QLabel *descriptionLabel = new QLabel;
|
||||
descriptionLabel->setWordWrap(true);
|
||||
descriptionLabel->setText(tr("Qt Creator can open qmake projects without configuring them for building.\n"
|
||||
"The C++ and QML code models need a Qt version and tool chain to offer code completion.\n"));
|
||||
layout->addRow(descriptionLabel);
|
||||
|
||||
m_qtVersionComboBox = new QComboBox;
|
||||
layout->addRow(tr("Qt Version:"), m_qtVersionComboBox);
|
||||
|
||||
m_toolchainComboBox = new QComboBox;
|
||||
layout->addRow(tr("Tool Chain:"), m_toolchainComboBox);
|
||||
|
||||
Qt4Manager *qt4Manager = ExtensionSystem::PluginManager::getObject<Qt4Manager>();
|
||||
Internal::UnConfiguredSettings ucs = qt4Manager->unconfiguredSettings();
|
||||
|
||||
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
|
||||
foreach (QtSupport::BaseQtVersion *version, vm->validVersions())
|
||||
m_qtVersionComboBox->addItem(version->displayName(), version->uniqueId());
|
||||
|
||||
int index = ucs.version ? m_qtVersionComboBox->findData(ucs.version->uniqueId()) : 0;
|
||||
if (index == -1)
|
||||
index = 0;
|
||||
if (index < m_qtVersionComboBox->count())
|
||||
m_qtVersionComboBox->setCurrentIndex(index);
|
||||
|
||||
|
||||
ProjectExplorer::ToolChainManager *tm = ProjectExplorer::ToolChainManager::instance();
|
||||
foreach (ProjectExplorer::ToolChain *tc, tm->toolChains())
|
||||
m_toolchainComboBox->addItem(tc->displayName(), tc->id());
|
||||
|
||||
index = ucs.toolchain ? m_toolchainComboBox->findData(ucs.toolchain->id()) : 0;
|
||||
if (index == -1)
|
||||
index = 0;
|
||||
if (index < m_toolchainComboBox->count())
|
||||
m_toolchainComboBox->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void UnConfiguredSettingsWidget::apply()
|
||||
{
|
||||
Qt4Manager *qt4Manager = ExtensionSystem::PluginManager::getObject<Qt4Manager>();
|
||||
Internal::UnConfiguredSettings ucs;
|
||||
|
||||
int index = m_qtVersionComboBox->currentIndex();
|
||||
int qtVersionId = (index != -1) ? m_qtVersionComboBox->itemData(index).toInt() : -1;
|
||||
ucs.version = QtSupport::QtVersionManager::instance()->version(qtVersionId);
|
||||
index = m_toolchainComboBox->currentIndex();
|
||||
QString toolChainId = index != -1 ? m_toolchainComboBox->itemData(index).toString() : QString();
|
||||
ucs.toolchain = ProjectExplorer::ToolChainManager::instance()->findToolChain(toolChainId);
|
||||
qt4Manager->setUnconfiguredSettings(ucs);
|
||||
}
|
||||
|
||||
bool UnConfiguredSettingsWidget::matches(const QString &searchKeyword)
|
||||
{
|
||||
for (int i = 0; i < layout()->count(); ++i) {
|
||||
if (QLabel *l = qobject_cast<QLabel *>(layout()->itemAt(i)->widget()))
|
||||
if (l->text().contains(searchKeyword))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
// UnConfiguredSettingsOptionPage
|
||||
//////////////////////////
|
||||
|
||||
UnConfiguredSettingsOptionPage::UnConfiguredSettingsOptionPage()
|
||||
{
|
||||
setId(Constants::UNCONFIGURED_SETTINGS_PAGE_ID);
|
||||
setDisplayName(QCoreApplication::translate("Qt4ProjectManager", Constants::UNCONFIGURED_SETTINGS_PAGE_NAME));
|
||||
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool UnConfiguredSettingsOptionPage::matches(const QString &searchKeyword) const
|
||||
{
|
||||
return m_widget->matches(searchKeyword);
|
||||
}
|
||||
|
||||
QWidget *UnConfiguredSettingsOptionPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new UnConfiguredSettingsWidget(parent);
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
void UnConfiguredSettingsOptionPage::apply()
|
||||
{
|
||||
if (m_widget)
|
||||
m_widget->apply();
|
||||
}
|
||||
|
||||
void UnConfiguredSettingsOptionPage::finish()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -117,15 +117,6 @@ DebuggerStartParameters AbstractRemoteLinuxDebugSupport::startParameters(const R
|
||||
params.startMode = AttachToRemoteServer;
|
||||
params.executable = runConfig->localExecutableFilePath();
|
||||
params.remoteChannel = devConf->sshParameters().host + QLatin1String(":-1");
|
||||
|
||||
// TODO: This functionality should be inside the debugger.
|
||||
ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
|
||||
if (tc) {
|
||||
const Abi &abi = tc->targetAbi();
|
||||
params.remoteArchitecture = abi.toString();
|
||||
params.gnuTarget = QLatin1String(abi.architecture() == Abi::ArmArchitecture
|
||||
? "arm-none-linux-gnueabi": "i386-unknown-linux-gnu");
|
||||
}
|
||||
} else {
|
||||
params.startMode = AttachToRemoteServer;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <projectexplorer/profilechooser.h>
|
||||
#include <projectexplorer/devicesupport/devicemanager.h>
|
||||
#include <projectexplorer/devicesupport/devicemanagermodel.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/portlist.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -87,17 +86,16 @@ public:
|
||||
|
||||
LinuxDeviceConfiguration::ConstPtr currentDevice() const
|
||||
{
|
||||
return deviceManagerModel->device(deviceComboBox->currentIndex())
|
||||
.dynamicCast<const LinuxDeviceConfiguration>();
|
||||
Profile *profile = profileChooser->currentProfile();
|
||||
IDevice::ConstPtr device = DeviceProfileInformation::device(profile);
|
||||
return device.dynamicCast<const LinuxDeviceConfiguration>();
|
||||
}
|
||||
|
||||
StartGdbServerDialog *q;
|
||||
bool startServerOnly;
|
||||
AbstractRemoteLinuxProcessList *processList;
|
||||
QSortFilterProxyModel proxyModel;
|
||||
DeviceManagerModel *deviceManagerModel;
|
||||
|
||||
QComboBox *deviceComboBox;
|
||||
QLineEdit *processFilterLineEdit;
|
||||
QTableView *tableView;
|
||||
QPushButton *attachProcessButton;
|
||||
@@ -117,13 +115,7 @@ StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q
|
||||
{
|
||||
settings = ICore::settings();
|
||||
|
||||
deviceComboBox = new QComboBox(q);
|
||||
|
||||
profileChooser = new ProfileChooser(q, ProfileChooser::RemoteDebugging);
|
||||
// sysrootPathChooser = new PathChooser(q);
|
||||
// sysrootPathChooser->setExpectedKind(PathChooser::Directory);
|
||||
// sysrootPathChooser->setPromptDialogTitle(StartGdbServerDialog::tr("Select Sysroot"));
|
||||
// sysrootPathChooser->setPath(settings->value(LastSysroot).toString());
|
||||
|
||||
//executablePathChooser = new PathChooser(q);
|
||||
//executablePathChooser->setExpectedKind(PathChooser::File);
|
||||
@@ -152,7 +144,6 @@ StartGdbServerDialogPrivate::StartGdbServerDialogPrivate(StartGdbServerDialog *q
|
||||
textBrowser->setEnabled(false);
|
||||
|
||||
QFormLayout *formLayout = new QFormLayout();
|
||||
formLayout->addRow(StartGdbServerDialog::tr("Device:"), deviceComboBox);
|
||||
formLayout->addRow(StartGdbServerDialog::tr("Target:"), profileChooser);
|
||||
formLayout->addRow(StartGdbServerDialog::tr("&Filter entries:"), processFilterLineEdit);
|
||||
|
||||
@@ -176,17 +167,11 @@ StartGdbServerDialog::StartGdbServerDialog(QWidget *parent) :
|
||||
{
|
||||
setWindowTitle(tr("List of Remote Processes"));
|
||||
|
||||
d->deviceManagerModel = new DeviceManagerModel(DeviceManager::instance(), this);
|
||||
|
||||
QObject::connect(d->closeButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
|
||||
d->deviceComboBox->setModel(d->deviceManagerModel);
|
||||
d->deviceComboBox->setCurrentIndex(d->settings->value(LastDevice).toInt());
|
||||
connect(&d->gatherer, SIGNAL(error(QString)), SLOT(portGathererError(QString)));
|
||||
connect(&d->gatherer, SIGNAL(portListReady()), SLOT(portListReady()));
|
||||
if (d->deviceManagerModel->rowCount() == 0) {
|
||||
d->tableView->setEnabled(false);
|
||||
} else {
|
||||
|
||||
d->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
d->proxyModel.setDynamicSortFilter(true);
|
||||
d->proxyModel.setFilterKeyColumn(-1);
|
||||
@@ -204,11 +189,10 @@ StartGdbServerDialog::StartGdbServerDialog(QWidget *parent) :
|
||||
connect(d->attachProcessButton, SIGNAL(clicked()), SLOT(attachToProcess()));
|
||||
connect(&d->proxyModel, SIGNAL(layoutChanged()),
|
||||
SLOT(handleProcessListUpdated()));
|
||||
connect(d->deviceComboBox, SIGNAL(currentIndexChanged(int)),
|
||||
SLOT(attachToDevice(int)));
|
||||
connect(d->profileChooser, SIGNAL(currentIndexChanged(int)),
|
||||
SLOT(attachToDevice()));
|
||||
updateButtons();
|
||||
attachToDevice(d->deviceComboBox->currentIndex());
|
||||
}
|
||||
attachToDevice();
|
||||
}
|
||||
|
||||
StartGdbServerDialog::~StartGdbServerDialog()
|
||||
@@ -217,11 +201,9 @@ StartGdbServerDialog::~StartGdbServerDialog()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void StartGdbServerDialog::attachToDevice(int modelIndex)
|
||||
void StartGdbServerDialog::attachToDevice()
|
||||
{
|
||||
LinuxDeviceConfiguration::ConstPtr device
|
||||
= d->deviceManagerModel->device(modelIndex)
|
||||
.dynamicCast<const LinuxDeviceConfiguration>();
|
||||
LinuxDeviceConfiguration::ConstPtr device = d->currentDevice();
|
||||
// TODO: display error on non-matching device.
|
||||
if (!device)
|
||||
return;
|
||||
@@ -282,7 +264,6 @@ void StartGdbServerDialog::attachToProcess()
|
||||
}
|
||||
|
||||
d->settings->setValue(LastProfile, d->profileChooser->currentProfileId().toString());
|
||||
d->settings->setValue(LastDevice, d->deviceComboBox->currentIndex());
|
||||
d->settings->setValue(LastProcessName, d->processFilterLineEdit->text());
|
||||
|
||||
startGdbServerOnPort(port, process.pid);
|
||||
|
||||
@@ -54,7 +54,7 @@ signals:
|
||||
void processAborted();
|
||||
|
||||
private slots:
|
||||
void attachToDevice(int modelIndex);
|
||||
void attachToDevice();
|
||||
void handleRemoteError(const QString &errorMessage);
|
||||
void handleProcessListUpdated();
|
||||
void updateProcessList();
|
||||
|
||||
@@ -174,6 +174,13 @@ void NameDemanglerAutoTest::testCorrectlyMangledNames()
|
||||
TEST_CORRECTLY_MANGLED_NAME("_Z9weirdfuncIiEvT_DtfL0p_E", "void weirdfunc<int>(int, decltype({param#1}))");
|
||||
TEST_CORRECTLY_MANGLED_NAME("_Z9weirdfuncIiEvT_S0_S0_", "void weirdfunc<int>(int, int, int)");
|
||||
TEST_CORRECTLY_MANGLED_NAME("_Z9weirdfuncIiEvT_S0_DtfL0p0_E", "void weirdfunc<int>(int, int, decltype({param#2}))");
|
||||
TEST_CORRECTLY_MANGLED_NAME("_Z8toStringIiESsT_",
|
||||
"std::basic_string<char, std::char_traits<char>, std::allocator<char> > toString<int>(int)");
|
||||
|
||||
// TODO: The rvalue reference at the end has to actually collapse. Remove it once collapsing
|
||||
// is properly implemented.
|
||||
TEST_CORRECTLY_MANGLED_NAME("_ZSt9make_pairIiRA5_KcESt4pairINSt17__decay_and_stripIT_E6__typeENS4_IT0_E6__typeEEOS5_OS8_",
|
||||
"std::pair<std::__decay_and_strip<int>::__type, std::__decay_and_strip<char const (&)[5]>::__type> std::make_pair<int, char const (&)[5]>(int &&, char const (&)[5] &&)");
|
||||
|
||||
// All examples from the ABI spec.
|
||||
TEST_CORRECTLY_MANGLED_NAME("_ZN1S1xE", "S::x");
|
||||
|
||||