forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.6'
This commit is contained in:
@@ -47,8 +47,8 @@
|
||||
class, and header and source files for the class.
|
||||
|
||||
To see how this works, rename wizard_sample.xml as wizard.xml in the
|
||||
\c {\share\qtcreator\templates\wizards\listmodel\helloworld} and
|
||||
\c {\share\qtcreator\templates\wizards\listmodel\listmodels} folders. After
|
||||
\c {\share\qtcreator\templates\wizards\helloworld} and
|
||||
\c {\share\qtcreator\templates\wizards\listmodel} folders. After
|
||||
you restart \QC, the \gui {Custom Classes}
|
||||
and \gui {Custom Projects} categories (1) appear in the \gui New dialog. For
|
||||
each category, an icon (2), a display name (3), and a description (4) are
|
||||
|
||||
@@ -110,7 +110,8 @@ while (my $line = <STDIN> ) {
|
||||
$fullFileName = $fileHash{$fileName};
|
||||
$fullFileName = $fileName unless defined $fullFileName;
|
||||
}
|
||||
my $type = index($lastLine, 'FAIL') == 0 ? 'err' : 'unknown';
|
||||
my $type = index($lastLine, 'FAIL') == 0 || index($lastLine, 'XPASS') == 0 ?
|
||||
'err' : 'unknown';
|
||||
print $fullFileName, "\t", $line, "\t", $type, "\t", $lastLine,"\n";
|
||||
$failCount++;
|
||||
} else {
|
||||
|
||||
@@ -200,7 +200,8 @@ void BoundingRectHighlighter::itemDestroyed(QObject *obj)
|
||||
void BoundingRectHighlighter::highlightAll()
|
||||
{
|
||||
foreach (BoundingBox *box, m_boxes) {
|
||||
if (box && box->highlightedObject.isNull()) {
|
||||
Q_ASSERT(box);
|
||||
if (box->highlightedObject.isNull()) {
|
||||
// clear all highlights
|
||||
clear();
|
||||
return;
|
||||
|
||||
1
src/libs/3rdparty/botan/botan.pro
vendored
1
src/libs/3rdparty/botan/botan.pro
vendored
@@ -20,6 +20,7 @@ unix:DEFINES += BOTAN_TARGET_OS_HAS_GETTIMEOFDAY BOTAN_HAS_ALLOC_MMAP \
|
||||
BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE BOTAN_HAS_DYNAMIC_LOADER
|
||||
macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN
|
||||
*g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC
|
||||
*clang*:DEFINES += BOTAN_BUILD_COMPILER_IS_CLANG
|
||||
|
||||
win32 {
|
||||
DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \
|
||||
|
||||
@@ -11,5 +11,11 @@ win32-msvc* {
|
||||
!exists($$CDB_PATH):CDB_PATH="$$(ProgramW6432)/Debugging Tools For Windows (x86)/sdk"
|
||||
!exists($$CDB_PATH):CDB_PATH="$$(ProgramW6432)/Debugging Tools For Windows (x64)/sdk"
|
||||
!exists($$CDB_PATH):CDB_PATH="$$(ProgramW6432)/Debugging Tools For Windows 64-bit/sdk"
|
||||
!exists($$CDB_PATH)::CDB_PATH=""
|
||||
# Starting from Windows SDK 8, the headers and libs are under 'ProgramFiles (x86)'.
|
||||
# The libraries are under 'ProgramFiles'as well, so, check for existence of 'inc'.
|
||||
# 32bit qmake:
|
||||
!exists($$CDB_PATH):CDB_PATH="$$(ProgramFiles)/Windows Kits/8.0/Debuggers"
|
||||
# 64bit qmake:
|
||||
!exists($$CDB_PATH/inc):CDB_PATH="$$(ProgramFiles) (x86)/Windows Kits/8.0/Debuggers"
|
||||
!exists($$CDB_PATH/inc):CDB_PATH=""
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "qtcassert.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QLibrary>
|
||||
#include <QDebug>
|
||||
|
||||
@@ -153,6 +154,12 @@ ElfData ElfReader::readHeaders()
|
||||
return m_elfData;
|
||||
}
|
||||
|
||||
static inline QString msgInvalidElfObject(const QString &binary, const QString &why)
|
||||
{
|
||||
return ElfReader::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(QDir::toNativeSeparators(binary), why);
|
||||
}
|
||||
|
||||
ElfReader::Result ElfReader::readIt()
|
||||
{
|
||||
if (!m_elfData.sectionHeaders.isEmpty())
|
||||
@@ -167,14 +174,12 @@ ElfReader::Result ElfReader::readIt()
|
||||
const quint64 fdlen = mapper.fdlen;
|
||||
|
||||
if (fdlen < 64) {
|
||||
m_errorString = QLibrary::tr("'%1' is not an ELF object (%2)")
|
||||
.arg(m_binary).arg(QLatin1String("file too small"));
|
||||
m_errorString = tr("'%1' is not an ELF object (file too small)").arg(QDir::toNativeSeparators(m_binary));
|
||||
return NotElf;
|
||||
}
|
||||
|
||||
if (strncmp(mapper.start, "\177ELF", 4) != 0) {
|
||||
m_errorString = QLibrary::tr("'%1' is not an ELF object")
|
||||
.arg(m_binary);
|
||||
m_errorString = tr("'%1' is not an ELF object").arg(QDir::toNativeSeparators(m_binary));
|
||||
return NotElf;
|
||||
}
|
||||
|
||||
@@ -182,8 +187,7 @@ ElfReader::Result ElfReader::readIt()
|
||||
m_elfData.elfclass = ElfClass(mapper.start[4]);
|
||||
const bool is64Bit = m_elfData.elfclass == Elf_ELFCLASS64;
|
||||
if (m_elfData.elfclass != Elf_ELFCLASS32 && m_elfData.elfclass != Elf_ELFCLASS64) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary).arg(QLatin1String("odd cpu architecture"));
|
||||
m_errorString = msgInvalidElfObject(m_binary, tr("odd cpu architecture"));
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -202,8 +206,7 @@ ElfReader::Result ElfReader::readIt()
|
||||
// Read Endianess.
|
||||
m_elfData.endian = ElfEndian(mapper.ustart[5]);
|
||||
if (m_elfData.endian != Elf_ELFDATA2LSB && m_elfData.endian != Elf_ELFDATA2MSB) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary).arg(QLatin1String("odd endianess"));
|
||||
m_errorString = msgInvalidElfObject(m_binary, tr("odd endianess"));
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -220,8 +223,7 @@ ElfReader::Result ElfReader::readIt()
|
||||
quint32 e_shsize = getHalfWord(data, m_elfData);
|
||||
|
||||
if (e_shsize > fdlen) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary).arg(QLatin1String("unexpected e_shsize"));
|
||||
m_errorString = msgInvalidElfObject(m_binary, tr("unexpected e_shsize"));
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -232,8 +234,7 @@ ElfReader::Result ElfReader::readIt()
|
||||
quint32 e_shentsize = getHalfWord(data, m_elfData);
|
||||
|
||||
if (e_shentsize % 4) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary).arg(QLatin1String("unexpected e_shentsize"));
|
||||
m_errorString = msgInvalidElfObject(m_binary, tr("unexpected e_shentsize"));
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -242,10 +243,9 @@ ElfReader::Result ElfReader::readIt()
|
||||
QTC_CHECK(data == mapper.ustart + (is64Bit ? 64 : 52));
|
||||
|
||||
if (quint64(e_shnum) * e_shentsize > fdlen) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary)
|
||||
.arg(QLatin1String("announced %2 sections, each %3 bytes, exceed file size"))
|
||||
.arg(e_shnum).arg(e_shentsize);
|
||||
const QString reason = tr("announced %1 sections, each %2 bytes, exceed file size")
|
||||
.arg(e_shnum).arg(e_shentsize);
|
||||
m_errorString = msgInvalidElfObject(m_binary, reason);
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -266,10 +266,8 @@ ElfReader::Result ElfReader::readIt()
|
||||
|
||||
if (quint32(stringTableFileOffset + e_shentsize) >= fdlen
|
||||
|| stringTableFileOffset == 0) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary)
|
||||
.arg(QLatin1String("string table seems to be at %1"))
|
||||
.arg(QString::number(soff, 16));
|
||||
const QString reason = tr("string table seems to be at 0x%1").arg(soff, 0, 16);
|
||||
m_errorString = msgInvalidElfObject(m_binary, reason);
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
@@ -279,10 +277,9 @@ ElfReader::Result ElfReader::readIt()
|
||||
parseSectionHeader(s, &sh, m_elfData);
|
||||
|
||||
if (stringTableFileOffset + sh.index > fdlen) {
|
||||
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
|
||||
.arg(m_binary)
|
||||
.arg(QLatin1String("section name %2 of %3 behind end of file"))
|
||||
.arg(i).arg(e_shnum);
|
||||
const QString reason = tr("section name %1 of %2 behind end of file")
|
||||
.arg(i).arg(e_shnum);
|
||||
m_errorString = msgInvalidElfObject(m_binary, reason);
|
||||
return Corrupt;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <qendian.h>
|
||||
#include <qstring.h>
|
||||
#include <qvector.h>
|
||||
#include <qcoreapplication.h>
|
||||
|
||||
namespace Utils {
|
||||
|
||||
@@ -167,6 +168,7 @@ public:
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT ElfReader
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Utils::ElfReader)
|
||||
public:
|
||||
explicit ElfReader(const QString &binary);
|
||||
enum Result { Ok, NotElf, Corrupt };
|
||||
|
||||
@@ -221,6 +221,7 @@ int main()
|
||||
systemError("Wait for debugee failed, error %d\n");
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
free(env);
|
||||
doExit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1518,7 +1518,7 @@ void ServiceBrowserPrivate::startBrowsing(quint32 interfaceIndex)
|
||||
if (failed || browsing)
|
||||
return;
|
||||
if (mainConnection.isNull()) {
|
||||
startupPhase(1, q->tr("Starting Zeroconf Browsing"));
|
||||
startupPhase(1, ServiceBrowser::tr("Starting Zeroconf Browsing"));
|
||||
mainConnection = MainConnectionPtr(new MainConnection(this));
|
||||
} else {
|
||||
mainConnection->addBrowser(this);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"AnalyzerBase\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Code Analyzer</category>
|
||||
<description>Code Analyzer Base Plugin</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -80,7 +80,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
|
||||
|
||||
QFormLayout *formLayout = new QFormLayout;
|
||||
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||
formLayout->addRow(tr("Profile:"), d->profileChooser);
|
||||
formLayout->addRow(tr("Target:"), d->profileChooser);
|
||||
formLayout->addRow(tr("Executable:"), d->executable);
|
||||
formLayout->addRow(tr("Arguments:"), d->arguments);
|
||||
formLayout->addRow(tr("Working directory:"), d->workingDirectory);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Create a keystore and a cetificate</string>
|
||||
<string>Create a keystore and a certificate</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
|
||||
@@ -250,12 +250,12 @@ bool AndroidDeployStep::deployPackage()
|
||||
SLOT(handleBuildError()));
|
||||
|
||||
if (m_runDeployAction == DeployLocal) {
|
||||
writeOutput(tr("Clean old qt libs"));
|
||||
writeOutput(tr("Clean old Qt libs"));
|
||||
runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
|
||||
QStringList() << QLatin1String("-s") << m_deviceSerialNumber
|
||||
<< QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/qt"));
|
||||
|
||||
writeOutput(tr("Deploy qt libs ... this may take some time, please wait"));
|
||||
writeOutput(tr("Deploy Qt libs ... this may take some time, please wait"));
|
||||
const QString tempPath = QDir::tempPath() + QLatin1String("/android_qt_libs_") + m_packageName;
|
||||
AndroidPackageCreationStep::removeDirectory(tempPath);
|
||||
QStringList stripFiles;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<string>Use devices qt libs</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use devices qt libs</string>
|
||||
<string>Use device's Qt libs</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -42,7 +42,7 @@
|
||||
You must have Qt libs compiled for that platform</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deploy local qt libs</string>
|
||||
<string>Deploy local Qt libs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -52,7 +52,7 @@ You must have Qt libs compiled for that platform</string>
|
||||
<string>Check this option to force the application to use local qt libs instead of system libs.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use local qt libs</string>
|
||||
<string>Use local Qt libs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -74,7 +74,7 @@ You must have Qt libs compiled for that platform</string>
|
||||
This option is useful when you want to try your application on devices which don't have Android Market (e.g. Android Emulator).</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Install Ministro system wide qt shared libraries installer</string>
|
||||
<string>Install Ministro system wide Qt shared libraries installer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -33,35 +33,37 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
AndroidDevice::AndroidDevice():
|
||||
ProjectExplorer::IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE),
|
||||
AndroidDevice::AndroidDevice()
|
||||
: IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE),
|
||||
IDevice::AutoDetected,
|
||||
IDevice::Hardware,
|
||||
Core::Id(Constants::ANDROID_DEVICE_ID))
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("ProjectExplorer::AndroidDevice", "Run on Android"));
|
||||
setDisplayName(QCoreApplication::translate("Android::Internal::AndroidDevice", "Run on Android"));
|
||||
setDeviceState(DeviceReadyToUse);
|
||||
}
|
||||
|
||||
AndroidDevice::AndroidDevice(const AndroidDevice &other):
|
||||
ProjectExplorer::IDevice(other)
|
||||
AndroidDevice::AndroidDevice(const AndroidDevice &other)
|
||||
: ProjectExplorer::IDevice(other)
|
||||
{ }
|
||||
|
||||
|
||||
ProjectExplorer::IDevice::DeviceInfo AndroidDevice::deviceInformation() const
|
||||
IDevice::DeviceInfo AndroidDevice::deviceInformation() const
|
||||
{
|
||||
return ProjectExplorer::IDevice::DeviceInfo();
|
||||
return IDevice::DeviceInfo();
|
||||
}
|
||||
|
||||
QString AndroidDevice::displayType() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer::AndroidDevice", "Android");
|
||||
return QCoreApplication::translate("Android::Internal::AndroidDevice", "Android");
|
||||
}
|
||||
|
||||
ProjectExplorer::IDeviceWidget *AndroidDevice::createWidget()
|
||||
IDeviceWidget *AndroidDevice::createWidget()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -83,9 +85,26 @@ void AndroidDevice::executeAction(Core::Id actionId, QWidget *parent) const
|
||||
Q_UNUSED(parent)
|
||||
}
|
||||
|
||||
ProjectExplorer::IDevice::Ptr AndroidDevice::clone() const
|
||||
IDevice::Ptr AndroidDevice::clone() const
|
||||
{
|
||||
return ProjectExplorer::IDevice::Ptr(new AndroidDevice(*this));
|
||||
return IDevice::Ptr(new AndroidDevice(*this));
|
||||
}
|
||||
|
||||
QString AndroidDevice::listProcessesCommandLine() const
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString AndroidDevice::killProcessCommandLine(const DeviceProcess &process) const
|
||||
{
|
||||
Q_UNUSED(process);
|
||||
return QString();
|
||||
}
|
||||
|
||||
QList<DeviceProcess> AndroidDevice::buildProcessList(const QString &listProcessesReply) const
|
||||
{
|
||||
Q_UNUSED(listProcessesReply);
|
||||
return QList<DeviceProcess>();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -41,17 +41,19 @@ namespace Internal {
|
||||
class AndroidDevice : public ProjectExplorer::IDevice
|
||||
{
|
||||
public:
|
||||
|
||||
ProjectExplorer::IDevice::DeviceInfo deviceInformation() const;
|
||||
|
||||
virtual QString displayType() const;
|
||||
virtual ProjectExplorer::IDeviceWidget *createWidget();
|
||||
virtual QList<Core::Id> actionIds() const;
|
||||
virtual QString displayNameForActionId(Core::Id actionId) const;
|
||||
virtual void executeAction(Core::Id actionId, QWidget *parent = 0) const;
|
||||
QString displayType() const;
|
||||
ProjectExplorer::IDeviceWidget *createWidget();
|
||||
QList<Core::Id> actionIds() const;
|
||||
QString displayNameForActionId(Core::Id actionId) const;
|
||||
void executeAction(Core::Id actionId, QWidget *parent = 0) const;
|
||||
|
||||
virtual ProjectExplorer::IDevice::Ptr clone() const;
|
||||
ProjectExplorer::IDevice::Ptr clone() const;
|
||||
|
||||
QString listProcessesCommandLine() const;
|
||||
QString killProcessCommandLine(const ProjectExplorer::DeviceProcess &process) const;
|
||||
QList<ProjectExplorer::DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
|
||||
|
||||
protected:
|
||||
friend class AndroidDeviceFactory;
|
||||
|
||||
@@ -67,8 +67,7 @@ QList<Core::Id> AndroidPackageCreationFactory::availableCreationIds(ProjectExplo
|
||||
QString AndroidPackageCreationFactory::displayNameForId(const Core::Id id) const
|
||||
{
|
||||
if (id == AndroidPackageCreationStep::CreatePackageId)
|
||||
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageCreationFactory",
|
||||
"Create Android (.apk) Package");
|
||||
return tr("Create Android (.apk) Package");
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace Internal {
|
||||
|
||||
class AndroidPackageCreationFactory : public ProjectExplorer::IBuildStepFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AndroidPackageCreationFactory(QObject *parent = 0);
|
||||
|
||||
|
||||
@@ -65,8 +65,7 @@ QList<Core::Id> AndroidPackageInstallationFactory::availableCreationIds(BuildSte
|
||||
QString AndroidPackageInstallationFactory::displayNameForId(const Core::Id id) const
|
||||
{
|
||||
if (id == AndroidPackageInstallationStep::Id)
|
||||
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageInstallationFactory",
|
||||
"Deploy to device");
|
||||
return tr("Deploy to device");
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace Android::Internal;
|
||||
|
||||
AndroidQtVersion::AndroidQtVersion()
|
||||
@@ -77,7 +75,7 @@ QString AndroidQtVersion::invalidReason() const
|
||||
{
|
||||
QString tmp = BaseQtVersion::invalidReason();
|
||||
if (tmp.isEmpty() && qtAbis().isEmpty())
|
||||
return QCoreApplication::translate("QtVersion", "Failed to detect the ABI(s) used by the Qt version.");
|
||||
return tr("Failed to detect the ABI(s) used by the Qt version.");
|
||||
return tmp;
|
||||
}
|
||||
|
||||
@@ -90,7 +88,7 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
|
||||
|
||||
QString AndroidQtVersion::description() const
|
||||
{
|
||||
return QCoreApplication::translate("QtVersion", "Android", "Qt Version is meant for Android");
|
||||
return tr("Android::Internal::AndroidQtVersion", "Qt Version is meant for Android");
|
||||
}
|
||||
|
||||
Core::FeatureSet AndroidQtVersion::availableFeatures() const
|
||||
|
||||
@@ -30,13 +30,17 @@
|
||||
|
||||
#ifndef ANDROIDQTVERSION_H
|
||||
#define ANDROIDQTVERSION_H
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
class AndroidQtVersion : public QtSupport::BaseQtVersion
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidQtVersion)
|
||||
public:
|
||||
AndroidQtVersion();
|
||||
AndroidQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
version 1.1, included in the file LGPL_EXCEPTION.txt in this package.</license>
|
||||
<category>Build Systems</category>
|
||||
<description>Autotools project integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -304,7 +304,7 @@ void MakeStepConfigWidget::updateDetails()
|
||||
param.setArguments(arguments);
|
||||
m_summaryText = param.summary(displayName());
|
||||
} else {
|
||||
m_summaryText = tr("<b>No tool chain set up for this profile</b>");
|
||||
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
|
||||
}
|
||||
|
||||
emit updateSummary();
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Version Control</category>
|
||||
<description>Bazaar integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"BinEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Binary editor component.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Bookmarks\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Bookmarks in text editors.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>C++</category>
|
||||
<description>Class View component.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"CMakeProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Build Systems</category>
|
||||
<description>CMake support</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -413,7 +413,8 @@ void CMakeRunPage::initializePage()
|
||||
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
|
||||
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2005Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor) {
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|
||||
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor) {
|
||||
if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
|
||||
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
|
||||
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
|
||||
|
||||
@@ -322,7 +322,7 @@ void MakeStepConfigWidget::updateDetails()
|
||||
param.setArguments(arguments);
|
||||
m_summaryText = param.summary(displayName());
|
||||
} else {
|
||||
m_summaryText = tr("<b>No tool chain set for this target</b>");
|
||||
m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
|
||||
}
|
||||
emit updateSummary();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Core\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>The core plugin for the Qt IDE.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<argumentList>
|
||||
<argument name=\"-color\" parameter=\"color\">Override selected UI color</argument>
|
||||
<argument name=\"-presentationMode\">Enable presentation mode with pop-ups for key combos</argument>
|
||||
|
||||
@@ -216,7 +216,7 @@ RESOURCES += core.qrc \
|
||||
win32 {
|
||||
SOURCES += progressmanager/progressmanager_win.cpp
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += gui-private # Uses QPlatformNativeInterface.
|
||||
LIBS += -lole32
|
||||
LIBS += -lole32 -luser32
|
||||
}
|
||||
else:macx {
|
||||
HEADERS += macfullscreen.h
|
||||
|
||||
@@ -30,7 +30,8 @@ QtcPlugin {
|
||||
|
||||
cpp.dynamicLibraries: {
|
||||
if (qbs.targetOS == "windows") return [
|
||||
"ole32"
|
||||
"ole32",
|
||||
"user32"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ void Core::Internal::ProgressManagerPrivate::setApplicationLabel(const QString &
|
||||
const HICON icon = pix.toWinHICON();
|
||||
#endif
|
||||
pITask->SetOverlayIcon(winId, icon, (wchar_t*)text.utf16());
|
||||
DestroyIcon(icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -326,17 +326,44 @@ bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
|
||||
return vc->vcsDelete(fileName);
|
||||
}
|
||||
|
||||
QString VcsManager::msgAddToVcsTitle()
|
||||
{
|
||||
return tr("Add to Version Control");
|
||||
}
|
||||
|
||||
QString VcsManager::msgPromptToAddToVcs(const QStringList &files, const IVersionControl *vc)
|
||||
{
|
||||
return files.size() == 1
|
||||
? tr("Add the file\n%1\nto version control (%2)?")
|
||||
.arg(files.front(), vc->displayName())
|
||||
: tr("Add the files\n%1\nto version control (%2)?")
|
||||
.arg(files.join(QString(QLatin1Char('\n'))), vc->displayName());
|
||||
}
|
||||
|
||||
QString VcsManager::msgAddToVcsFailedTitle()
|
||||
{
|
||||
return tr("Adding to Version Control Failed");
|
||||
}
|
||||
|
||||
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
|
||||
{
|
||||
return files.size() == 1
|
||||
? tr("Could not add the file\n%1\nto version control (%2)\n")
|
||||
.arg(files.front(), vc->displayName())
|
||||
: tr("Could not add the following files to version control (%1)\n%2")
|
||||
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
|
||||
}
|
||||
|
||||
void VcsManager::promptToAdd(const QString &directory, const QStringList &fileNames)
|
||||
{
|
||||
IVersionControl *vc = findVersionControlForDirectory(directory);
|
||||
if (!vc || !vc->supportsOperation(Core::IVersionControl::AddOperation))
|
||||
return;
|
||||
|
||||
const QString files = fileNames.join(QString(QLatin1Char('\n')));
|
||||
QMessageBox::StandardButton button =
|
||||
QMessageBox::question(Core::ICore::mainWindow(), tr("Add to Version Control"),
|
||||
tr("Add files\n%1\nto version control (%2)?").arg(files, vc->displayName()),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
QMessageBox::question(Core::ICore::mainWindow(), VcsManager::msgAddToVcsTitle(),
|
||||
VcsManager::msgPromptToAddToVcs(fileNames, vc),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
if (button == QMessageBox::Yes) {
|
||||
QStringList notAddedToVc;
|
||||
foreach (const QString &file, fileNames) {
|
||||
@@ -345,10 +372,8 @@ void VcsManager::promptToAdd(const QString &directory, const QStringList &fileNa
|
||||
}
|
||||
|
||||
if (!notAddedToVc.isEmpty()) {
|
||||
const QString message = tr("Could not add following files to version control (%1)\n").arg(vc->displayName());
|
||||
const QString filesNotAdded = notAddedToVc.join(QString(QLatin1Char('\n')));
|
||||
QMessageBox::warning(Core::ICore::mainWindow(), tr("Adding to Version Control Failed"),
|
||||
message + filesNotAdded);
|
||||
QMessageBox::warning(Core::ICore::mainWindow(), VcsManager::msgAddToVcsFailedTitle(),
|
||||
VcsManager::msgToAddToVcsFailed(notAddedToVc, vc));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,12 @@ public:
|
||||
// added to revision control. Calls vcsAdd for each file.
|
||||
void promptToAdd(const QString &directory, const QStringList &fileNames);
|
||||
|
||||
// Utility messages for adding files
|
||||
static QString msgAddToVcsTitle();
|
||||
static QString msgPromptToAddToVcs(const QStringList &files, const IVersionControl *vc);
|
||||
static QString msgAddToVcsFailedTitle();
|
||||
static QString msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc);
|
||||
|
||||
signals:
|
||||
void repositoryChanged(const QString &repository);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"CodePaster\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -11,7 +11,7 @@ GNU Lesser General Public License Usage
|
||||
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
|
||||
</license>
|
||||
<description>Codepaster plugin for pushing/fetching diff from server</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"CppEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>C++</category>
|
||||
<description>C/C++ editor component.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -77,7 +77,7 @@ private:
|
||||
|
||||
class FunctionDeclDefLink
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(FunctionDeclDefLink)
|
||||
Q_DECLARE_TR_FUNCTIONS(CppEditor::Internal::FunctionDeclDefLink)
|
||||
Q_DISABLE_COPY(FunctionDeclDefLink)
|
||||
public:
|
||||
~FunctionDeclDefLink();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"CppTools\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>C++</category>
|
||||
<description>Tools for analyzing C/C++ code.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"CVS\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Version Control</category>
|
||||
<description>CVS integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Debugger\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Debugger integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -363,7 +363,8 @@ static inline bool isMsvcFlavor(Abi::OSFlavor osf)
|
||||
{
|
||||
return osf == Abi::WindowsMsvc2005Flavor
|
||||
|| osf == Abi::WindowsMsvc2008Flavor
|
||||
|| osf == Abi::WindowsMsvc2010Flavor;
|
||||
|| osf == Abi::WindowsMsvc2010Flavor
|
||||
|| osf == Abi::WindowsMsvc2012Flavor;
|
||||
}
|
||||
|
||||
bool checkCdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck *check)
|
||||
|
||||
@@ -204,7 +204,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
|
||||
d(new AttachExternalDialogPrivate)
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
setWindowTitle(tr("Start Debugger", 0, QApplication::UnicodeUTF8));
|
||||
setWindowTitle(tr("Start Debugger"));
|
||||
setMinimumHeight(500);
|
||||
|
||||
d->selfPid = QString::number(QCoreApplication::applicationPid());
|
||||
@@ -1243,7 +1243,7 @@ StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
|
||||
|
||||
QFormLayout *formLayout = new QFormLayout();
|
||||
formLayout->addRow(tr("&Host:"), d->host);
|
||||
formLayout->addRow(tr("&Usename:"), d->username);
|
||||
formLayout->addRow(tr("&Username:"), d->username);
|
||||
formLayout->addRow(tr("&Password:"), d->password);
|
||||
formLayout->addRow(tr("&Engine path:"), d->enginePath);
|
||||
formLayout->addRow(tr("&Inferior path:"), d->inferiorPath);
|
||||
|
||||
@@ -1604,11 +1604,15 @@ struct RemoteCdbMatcher : ProfileMatcher
|
||||
ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
|
||||
QTC_ASSERT(tc, return false);
|
||||
Abi abi = tc->targetAbi();
|
||||
return abi.architecture() == m_hostAbi.architecture()
|
||||
&& abi.os() == Abi::WindowsOS
|
||||
&& abi.osFlavor() == Abi::WindowsMsvc2010Flavor
|
||||
&& abi.binaryFormat() == Abi::PEFormat
|
||||
&& abi.wordWidth() == m_hostAbi.wordWidth();
|
||||
if (abi.architecture() != m_hostAbi.architecture()
|
||||
|| abi.os() != Abi::WindowsOS
|
||||
|| abi.binaryFormat() != Abi::PEFormat
|
||||
|| abi.wordWidth() != m_hostAbi.wordWidth())
|
||||
return false;
|
||||
if (abi.osFlavor() == Abi::WindowsMSysFlavor
|
||||
|| abi.osFlavor() == Abi::WindowsCEFlavor)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Abi m_hostAbi;
|
||||
|
||||
@@ -1334,6 +1334,7 @@ QByteArray LocalNameNode::toByteArray() const
|
||||
name = encodingNode->toByteArray();
|
||||
name.append("::{default arg#").append(QByteArray::number(argNumber)).append("}::")
|
||||
.append(MY_CHILD_AT(childCount() - 1)->toByteArray());
|
||||
hasDiscriminator = false;
|
||||
} else if (m_isStringLiteral) {
|
||||
name = CHILD_TO_BYTEARRAY(0) + "::{string literal}";
|
||||
hasDiscriminator = childCount() == 2;
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
quint64 address;
|
||||
bool usable;
|
||||
|
||||
Q_DECLARE_TR_FUNCTIONS(StackHandler)
|
||||
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::StackHandler)
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug d, const StackFrame &frame);
|
||||
|
||||
@@ -394,7 +394,7 @@ QString WatchData::toToolTip() const
|
||||
formatToolTipRow(str, tr("Referencing Address"),
|
||||
QString::fromLatin1(hexReferencingAddress()));
|
||||
if (size)
|
||||
formatToolTipRow(str, tr("Static Object Size"), tr("%1 bytes").arg(size));
|
||||
formatToolTipRow(str, tr("Static Object Size"), tr("%n bytes", 0, size));
|
||||
formatToolTipRow(str, tr("Internal ID"), QLatin1String(iname));
|
||||
str << "</table></body></html>";
|
||||
return res;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Designer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Qt Designer integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<!-- For compiling with CPP support enabled -->
|
||||
|
||||
@@ -9,11 +9,8 @@ include(designer_dependencies.pri)
|
||||
|
||||
INCLUDEPATH += ../../tools/utils
|
||||
|
||||
minQtVersion(5, 0, 0) {
|
||||
CONFIG += designer
|
||||
# -- Fixme: Make tools available
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_QT/../../qttools/include
|
||||
QT += printsupport
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += printsupport designer
|
||||
} else {
|
||||
# -- figure out shared dir location
|
||||
!exists($$[QT_INSTALL_HEADERS]/QtDesigner/private/qdesigner_integration_p.h) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"FakeVim\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -11,7 +11,7 @@ GNU Lesser General Public License Usage
|
||||
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
|
||||
</license>
|
||||
<description>VI-style keyboard navigation.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Find\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Provides the find widget and the hooks for find implementations.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
</dependencyList>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"GenericProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Build Systems</category>
|
||||
<description>Generic support</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Git\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Version Control</category>
|
||||
<description>Git integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -189,6 +189,7 @@ int GerritPatchSet::approvalLevel() const
|
||||
|
||||
QString GerritChange::toHtml() const
|
||||
{
|
||||
// Keep in sync with list model headers.
|
||||
static const QString format = GerritModel::tr(
|
||||
"<html><head/><body><table>"
|
||||
"<tr><td>Subject</td><td>%1</td></tr>"
|
||||
@@ -381,9 +382,9 @@ GerritModel::GerritModel(const QSharedPointer<GerritParameters> &p, QObject *par
|
||||
, m_parameters(p)
|
||||
, m_query(0)
|
||||
{
|
||||
QStringList headers;
|
||||
headers << QLatin1String("#") << tr("Title") << tr("Owner")
|
||||
<< tr("Date") << tr("Project")
|
||||
QStringList headers; // Keep in sync with GerritChange::toHtml()
|
||||
headers << QLatin1String("#") << tr("Subject") << tr("Owner")
|
||||
<< tr("Updated") << tr("Project")
|
||||
<< tr("Approvals") << tr("Status");
|
||||
setHorizontalHeaderLabels(headers);
|
||||
}
|
||||
|
||||
@@ -1040,9 +1040,8 @@ bool GitClient::synchronousParentRevisions(const QString &workingDirectory,
|
||||
QByteArray outputTextData;
|
||||
QByteArray errorText;
|
||||
QStringList arguments;
|
||||
if (parents && (revision == QLatin1String("00000000"))) { // Not Committed Yet
|
||||
parents->clear();
|
||||
parents->append(QLatin1String("HEAD"));
|
||||
if (parents && !isValidRevision(revision)) { // Not Committed Yet
|
||||
*parents = QStringList(QLatin1String("HEAD"));
|
||||
return true;
|
||||
}
|
||||
arguments << QLatin1String("rev-list") << QLatin1String(GitClient::noColorOption)
|
||||
@@ -1450,6 +1449,16 @@ QProcessEnvironment GitClient::processEnvironment() const
|
||||
return environment;
|
||||
}
|
||||
|
||||
bool GitClient::isValidRevision(const QString &revision) const
|
||||
{
|
||||
if (revision.length() < 1)
|
||||
return false;
|
||||
for (int i = 0; i < revision.length(); ++i)
|
||||
if (revision.at(i) != QLatin1Char('0'))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Synchronous git execution using Utils::SynchronousProcess, with
|
||||
// log windows updating.
|
||||
Utils::SynchronousProcessResponse GitClient::synchronousGit(const QString &workingDirectory,
|
||||
|
||||
@@ -220,6 +220,8 @@ public:
|
||||
|
||||
QProcessEnvironment processEnvironment() const;
|
||||
|
||||
bool isValidRevision(const QString &revision) const;
|
||||
|
||||
static QString msgNoChangedFiles();
|
||||
|
||||
static const char *noColorOption;
|
||||
|
||||
@@ -250,6 +250,11 @@ QStringList GitEditor::annotationPreviousVersions(const QString &revision) const
|
||||
return revisions;
|
||||
}
|
||||
|
||||
bool GitEditor::isValidRevision(const QString &revision) const
|
||||
{
|
||||
return GitPlugin::instance()->gitClient()->isValidRevision(revision);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Git
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ private:
|
||||
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
|
||||
virtual QString decorateVersion(const QString &revision) const;
|
||||
virtual QStringList annotationPreviousVersions(const QString &revision) const;
|
||||
virtual bool isValidRevision(const QString &revision) const;
|
||||
|
||||
mutable QRegExp m_changeNumberPattern8;
|
||||
mutable QRegExp m_changeNumberPattern40;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"GLSLEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>GLSL</category>
|
||||
<description>Editor for GLSL.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"HelloWorld\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\" experimental=\"true\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -11,7 +11,7 @@ GNU Lesser General Public License Usage
|
||||
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. 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.
|
||||
</license>
|
||||
<description>Hello World sample plugin.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
</dependencyList>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Help\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Help system.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -3,8 +3,10 @@ TARGET = Help
|
||||
|
||||
QT += network
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += printsupport
|
||||
QT += printsupport help
|
||||
DEFINES += QT_NO_WEBKIT
|
||||
} else {
|
||||
CONFIG += help
|
||||
}
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
@@ -12,7 +14,6 @@ INCLUDEPATH += $$PWD
|
||||
include(../../qtcreatorplugin.pri)
|
||||
include(help_dependencies.pri)
|
||||
|
||||
CONFIG += help
|
||||
DEFINES += QT_CLUCENE_SUPPORT HELP_LIBRARY
|
||||
|
||||
HEADERS += \
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Image Viewer component.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
</dependencyList>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Locator\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Provides the Locator widget and the hooks for Locator filter implementations.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
</dependencyList>
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>Macros in text editors.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Locator\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Madde\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<description>Support for MADDE-based platforms, including Fremantle and MeeGo 1.2 Harmattan.</description>
|
||||
<category>Device Support</category>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"RemoteLinux\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
</dependencyList>
|
||||
|
||||
@@ -127,8 +127,7 @@ QByteArray section(Core::Id deviceType) {
|
||||
|
||||
void raiseError(const QString &reason)
|
||||
{
|
||||
QMessageBox::critical(0, QCoreApplication::translate("Madde::DebianManager",
|
||||
"Error creating debian project templates"), reason);
|
||||
QMessageBox::critical(0, Madde::Internal::DebianManager::tr("Error Creating Debian Project Templates"), reason);
|
||||
}
|
||||
|
||||
QString defaultPackageFileName(ProjectExplorer::Project *project)
|
||||
|
||||
@@ -32,13 +32,14 @@
|
||||
#include "maddedevicetester.h"
|
||||
#include "maemoconstants.h"
|
||||
|
||||
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
|
||||
#include <projectexplorer/devicesupport/deviceprocesslist.h>
|
||||
#include <remotelinux/linuxdevicetestdialog.h>
|
||||
#include <remotelinux/publickeydeploymentdialog.h>
|
||||
#include <remotelinux/remotelinuxprocessesdialog.h>
|
||||
#include <remotelinux/remotelinuxprocesslist.h>
|
||||
#include <remotelinux/remotelinux_constants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
namespace Madde {
|
||||
@@ -106,14 +107,14 @@ void MaddeDevice::executeAction(Core::Id actionId, QWidget *parent) const
|
||||
QTC_ASSERT(actionIds().contains(actionId), return);
|
||||
|
||||
QDialog *d = 0;
|
||||
const LinuxDeviceConfiguration::ConstPtr device
|
||||
= sharedFromThis().staticCast<const LinuxDeviceConfiguration>();
|
||||
const IDevice::ConstPtr device = sharedFromThis();
|
||||
if (actionId == Core::Id(MaddeDeviceTestActionId))
|
||||
d = new LinuxDeviceTestDialog(device, new MaddeDeviceTester, parent);
|
||||
else if (actionId == Core::Id(MaddeRemoteProcessesActionId))
|
||||
d = new RemoteLinuxProcessesDialog(new GenericRemoteLinuxProcessList(device), parent);
|
||||
d = new DeviceProcessesDialog(new DeviceProcessList(device), parent);
|
||||
else if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
|
||||
d = PublicKeyDeploymentDialog::createDialog(device, parent);
|
||||
// FIXME: Leak?
|
||||
if (d)
|
||||
d->exec();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Internal {
|
||||
|
||||
class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(MaddeDevice)
|
||||
Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
|
||||
public:
|
||||
typedef QSharedPointer<MaddeDevice> Ptr;
|
||||
typedef QSharedPointer<const MaddeDevice> ConstPtr;
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
|
||||
@@ -49,8 +48,7 @@ namespace Internal {
|
||||
MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
|
||||
: QObject(parent),
|
||||
m_state(Inactive),
|
||||
m_mounter(new MaemoRemoteMounter(this)),
|
||||
m_portsGatherer(new RemoteLinuxUsedPortsGatherer(this))
|
||||
m_mounter(new MaemoRemoteMounter(this))
|
||||
{
|
||||
connect(m_mounter, SIGNAL(error(QString)), SLOT(handleMountError(QString)));
|
||||
connect(m_mounter, SIGNAL(mounted()), SLOT(handleMounted()));
|
||||
@@ -59,11 +57,6 @@ MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
|
||||
SIGNAL(reportProgress(QString)));
|
||||
connect(m_mounter, SIGNAL(debugOutput(QString)),
|
||||
SIGNAL(debugOutput(QString)));
|
||||
|
||||
connect(m_portsGatherer, SIGNAL(error(QString)),
|
||||
SLOT(handlePortsGathererError(QString)));
|
||||
connect(m_portsGatherer, SIGNAL(portListReady()),
|
||||
SLOT(handlePortListReady()));
|
||||
}
|
||||
|
||||
MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
|
||||
@@ -78,7 +71,7 @@ void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
|
||||
m_connection = connection;
|
||||
m_profile = profile;
|
||||
m_devConf = DeviceProfileInformation::device(profile);
|
||||
m_mounter->setConnection(m_connection, m_devConf);
|
||||
m_mounter->setParameters(m_devConf, MaemoGlobal::maddeRoot(profile));
|
||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
||||
setState(UnmountingOldDirs);
|
||||
unmount();
|
||||
@@ -99,7 +92,6 @@ void MaemoDeploymentMounter::setupMounter()
|
||||
setState(UnmountingCurrentDirs);
|
||||
|
||||
m_mounter->resetMountSpecifications();
|
||||
m_mounter->setProfile(m_profile);
|
||||
foreach (const MaemoMountSpecification &mountSpec, m_mountSpecs)
|
||||
m_mounter->addMountSpecification(mountSpec, true);
|
||||
unmount();
|
||||
@@ -137,8 +129,8 @@ void MaemoDeploymentMounter::handleUnmounted()
|
||||
setupMounter();
|
||||
break;
|
||||
case UnmountingCurrentDirs:
|
||||
setState(GatheringPorts);
|
||||
m_portsGatherer->start(m_devConf);
|
||||
setState(Mounting);
|
||||
m_mounter->mount();
|
||||
break;
|
||||
case UnmountingCurrentMounts:
|
||||
setState(Inactive);
|
||||
@@ -150,30 +142,6 @@ void MaemoDeploymentMounter::handleUnmounted()
|
||||
}
|
||||
}
|
||||
|
||||
void MaemoDeploymentMounter::handlePortsGathererError(const QString &errorMsg)
|
||||
{
|
||||
QTC_ASSERT(m_state == GatheringPorts || m_state == Inactive, return);
|
||||
|
||||
if (m_state == Inactive)
|
||||
return;
|
||||
|
||||
setState(Inactive);
|
||||
m_mounter->resetMountSpecifications();
|
||||
emit error(errorMsg);
|
||||
}
|
||||
|
||||
void MaemoDeploymentMounter::handlePortListReady()
|
||||
{
|
||||
QTC_ASSERT(m_state == GatheringPorts || m_state == Inactive, return);
|
||||
|
||||
if (m_state == Inactive)
|
||||
return;
|
||||
|
||||
setState(Mounting);
|
||||
m_freePorts = MaemoGlobal::freePorts(m_profile);
|
||||
m_mounter->mount(&m_freePorts, m_portsGatherer);
|
||||
}
|
||||
|
||||
void MaemoDeploymentMounter::handleMountError(const QString &errorMsg)
|
||||
{
|
||||
QTC_ASSERT(m_state == UnmountingOldDirs || m_state == UnmountingCurrentDirs
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
namespace ProjectExplorer { class Profile; }
|
||||
namespace QSsh { class SshConnection; }
|
||||
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
|
||||
namespace Utils { class FileName; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
@@ -70,13 +70,11 @@ private slots:
|
||||
void handleMounted();
|
||||
void handleUnmounted();
|
||||
void handleMountError(const QString &errorMsg);
|
||||
void handlePortsGathererError(const QString &errorMsg);
|
||||
void handlePortListReady();
|
||||
void handleConnectionError();
|
||||
|
||||
private:
|
||||
enum State {
|
||||
Inactive, UnmountingOldDirs, UnmountingCurrentDirs, GatheringPorts,
|
||||
Inactive, UnmountingOldDirs, UnmountingCurrentDirs,
|
||||
Mounting, Mounted, UnmountingCurrentMounts
|
||||
};
|
||||
|
||||
@@ -88,8 +86,6 @@ private:
|
||||
QSsh::SshConnection *m_connection;
|
||||
ProjectExplorer::IDevice::ConstPtr m_devConf;
|
||||
MaemoRemoteMounter * const m_mounter;
|
||||
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
||||
Utils::PortList m_freePorts;
|
||||
QList<MaemoMountSpecification> m_mountSpecs;
|
||||
const ProjectExplorer::Profile *m_profile;
|
||||
};
|
||||
|
||||
@@ -176,6 +176,11 @@ QString MaemoGlobal::maddeRoot(const QString &qmakePath)
|
||||
return dir.absolutePath();
|
||||
}
|
||||
|
||||
Utils::FileName MaemoGlobal::maddeRoot(const Profile *profile)
|
||||
{
|
||||
return SysRootProfileInformation::sysRoot(profile).parentDir().parentDir();
|
||||
}
|
||||
|
||||
QString MaemoGlobal::targetRoot(const QString &qmakePath)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/portlist.h>
|
||||
#include <utils/environment.h>
|
||||
|
||||
@@ -98,6 +99,7 @@ public:
|
||||
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
|
||||
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);
|
||||
static QString maddeRoot(const QString &qmakePath);
|
||||
static Utils::FileName maddeRoot(const ProjectExplorer::Profile *profile);
|
||||
static QString targetRoot(const QString &qmakePath);
|
||||
static QString targetName(const QString &qmakePath);
|
||||
static QString madCommand(const QString &qmakePath);
|
||||
|
||||
@@ -312,8 +312,10 @@ void MaemoPublisherFremantleFree::handleProcessFinished(bool failedToStart)
|
||||
// Toolchain might be null! (yes because this sucks)
|
||||
ProjectExplorer::ToolChain *tc
|
||||
= ProjectExplorer::ToolChainProfileInformation::toolChain(m_buildConfig->target()->profile());
|
||||
if (!tc)
|
||||
finishWithFailure(QString(), tr("Make distclean failed. No toolchain in profile."));
|
||||
if (!tc) {
|
||||
finishWithFailure(QString(), tr("Make distclean failed: %1")
|
||||
.arg(ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget()));
|
||||
}
|
||||
m_process->start(tc->makeCommand(), QStringList() << QLatin1String("distclean"));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -33,10 +33,7 @@
|
||||
#include "maemoglobal.h"
|
||||
#include "maddedevice.h"
|
||||
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <ssh/sshremoteprocess.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <remotelinux/remotelinuxusedportsgatherer.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -51,10 +48,19 @@ namespace Madde {
|
||||
namespace Internal {
|
||||
|
||||
MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent)
|
||||
: QObject(parent), m_utfsServerTimer(new QTimer(this)), m_state(Inactive)
|
||||
: QObject(parent),
|
||||
m_utfsServerTimer(new QTimer(this)),
|
||||
m_mountProcess(new SshRemoteProcessRunner(this)),
|
||||
m_unmountProcess(new SshRemoteProcessRunner(this)),
|
||||
m_portsGatherer(new RemoteLinuxUsedPortsGatherer(this)),
|
||||
m_state(Inactive)
|
||||
{
|
||||
connect(m_utfsServerTimer, SIGNAL(timeout()), this,
|
||||
SLOT(handleUtfsServerTimeout()));
|
||||
connect(m_utfsServerTimer, SIGNAL(timeout()), SLOT(handleUtfsServerTimeout()));
|
||||
connect(m_portsGatherer, SIGNAL(error(QString)),
|
||||
SLOT(handlePortsGathererError(QString)));
|
||||
connect(m_portsGatherer, SIGNAL(portListReady()),
|
||||
SLOT(handlePortListReady()));
|
||||
|
||||
m_utfsServerTimer->setSingleShot(true);
|
||||
}
|
||||
|
||||
@@ -63,22 +69,12 @@ MaemoRemoteMounter::~MaemoRemoteMounter()
|
||||
killAllUtfsServers();
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::setConnection(SshConnection *connection,
|
||||
const IDevice::ConstPtr &devConf)
|
||||
void MaemoRemoteMounter::setParameters(const IDevice::ConstPtr &devConf, const FileName &maddeRoot)
|
||||
{
|
||||
QTC_ASSERT(m_state == Inactive, return);
|
||||
|
||||
m_connection = connection;
|
||||
m_devConf = devConf;
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::setProfile(const Profile *profile)
|
||||
{
|
||||
QTC_ASSERT(m_state == Inactive, return);
|
||||
|
||||
Core::Id typeId = DeviceTypeProfileInformation::deviceTypeId(profile);
|
||||
m_remoteMountsAllowed = MaddeDevice::allowsRemoteMounts(typeId);
|
||||
m_maddeRoot = SysRootProfileInformation::sysRoot(profile);
|
||||
m_maddeRoot = maddeRoot;
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec,
|
||||
@@ -86,7 +82,7 @@ void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mo
|
||||
{
|
||||
QTC_ASSERT(m_state == Inactive, return);
|
||||
|
||||
if (m_remoteMountsAllowed && mountSpec.isValid())
|
||||
if (MaddeDevice::allowsRemoteMounts(m_devConf->type()) && mountSpec.isValid())
|
||||
m_mountSpecs << MountInfo(mountSpec, mountAsRoot);
|
||||
}
|
||||
|
||||
@@ -95,22 +91,18 @@ bool MaemoRemoteMounter::hasValidMountSpecifications() const
|
||||
return !m_mountSpecs.isEmpty();
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::mount(PortList *freePorts,
|
||||
const RemoteLinuxUsedPortsGatherer *portsGatherer)
|
||||
void MaemoRemoteMounter::mount()
|
||||
{
|
||||
QTC_ASSERT(m_state == Inactive, return);
|
||||
|
||||
Q_ASSERT(m_utfsServers.isEmpty());
|
||||
Q_ASSERT(m_connection);
|
||||
|
||||
if (m_mountSpecs.isEmpty()) {
|
||||
setState(Inactive);
|
||||
emit reportProgress(tr("No directories to mount"));
|
||||
emit mounted();
|
||||
} else {
|
||||
m_freePorts = freePorts;
|
||||
m_portsGatherer = portsGatherer;
|
||||
startUtfsClients();
|
||||
m_portsGatherer->start(m_devConf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,17 +118,15 @@ void MaemoRemoteMounter::unmount()
|
||||
|
||||
QString remoteCall;
|
||||
const QString remoteSudo = MaemoGlobal::remoteSudo(m_devConf->type(),
|
||||
m_connection->connectionParameters().userName);
|
||||
m_devConf->sshParameters().userName);
|
||||
for (int i = 0; i < m_mountSpecs.count(); ++i) {
|
||||
remoteCall += QString::fromLatin1("%1 umount %2 && %1 rmdir %2;")
|
||||
.arg(remoteSudo, m_mountSpecs.at(i).mountSpec.remoteMountPoint);
|
||||
}
|
||||
|
||||
m_unmountProcess = m_connection->createRemoteProcess(remoteCall.toUtf8());
|
||||
connect(m_unmountProcess.data(), SIGNAL(closed(int)), this,
|
||||
SLOT(handleUnmountProcessFinished(int)));
|
||||
setState(Unmounting);
|
||||
m_unmountProcess->start();
|
||||
connect(m_unmountProcess, SIGNAL(processClosed(int)), SLOT(handleUnmountProcessFinished(int)));
|
||||
m_unmountProcess->run(remoteCall.toUtf8(), m_devConf->sshParameters());
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus)
|
||||
@@ -153,8 +143,7 @@ void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus)
|
||||
errorMsg = tr("Could not execute unmount request.");
|
||||
break;
|
||||
case SshRemoteProcess::CrashExit:
|
||||
errorMsg = tr("Failure unmounting: %1")
|
||||
.arg(m_unmountProcess->errorString());
|
||||
errorMsg = tr("Failure unmounting: %1").arg(m_unmountProcess->processErrorString());
|
||||
break;
|
||||
case SshRemoteProcess::NormalExit:
|
||||
break;
|
||||
@@ -183,17 +172,19 @@ void MaemoRemoteMounter::stop()
|
||||
|
||||
void MaemoRemoteMounter::startUtfsClients()
|
||||
{
|
||||
const QString userName = m_connection->connectionParameters().userName;
|
||||
QTC_ASSERT(m_state == GatheringPorts, return);
|
||||
|
||||
const QString userName = m_devConf->sshParameters().userName;
|
||||
const QString chmodFuse = MaemoGlobal::remoteSudo(m_devConf->type(),
|
||||
userName) + QLatin1String(" chmod a+r+w /dev/fuse");
|
||||
const QString chmodUtfsClient
|
||||
= QLatin1String("chmod a+x ") + utfsClientOnDevice();
|
||||
const QLatin1String andOp(" && ");
|
||||
QString remoteCall = chmodFuse + andOp + chmodUtfsClient;
|
||||
PortList ports = m_devConf->freePorts();
|
||||
for (int i = 0; i < m_mountSpecs.count(); ++i) {
|
||||
MountInfo &mountInfo = m_mountSpecs[i];
|
||||
mountInfo.remotePort
|
||||
= m_portsGatherer->getNextFreePort(m_freePorts);
|
||||
mountInfo.remotePort = m_portsGatherer->getNextFreePort(&ports);
|
||||
if (mountInfo.remotePort == -1) {
|
||||
setState(Inactive);
|
||||
emit error(tr("Error: Not enough free ports on device to fulfill all mount requests."));
|
||||
@@ -221,14 +212,10 @@ void MaemoRemoteMounter::startUtfsClients()
|
||||
}
|
||||
|
||||
emit reportProgress(tr("Starting remote UTFS clients..."));
|
||||
m_mountProcess = m_connection->createRemoteProcess(remoteCall.toUtf8());
|
||||
connect(m_mountProcess.data(), SIGNAL(started()), this,
|
||||
SLOT(handleUtfsClientsStarted()));
|
||||
connect(m_mountProcess.data(), SIGNAL(closed(int)), this,
|
||||
SLOT(handleUtfsClientsFinished(int)));
|
||||
m_mountProcess->start();
|
||||
|
||||
setState(UtfsClientsStarting);
|
||||
connect(m_mountProcess, SIGNAL(processStarted()), SLOT(handleUtfsClientsStarted()));
|
||||
connect(m_mountProcess, SIGNAL(processClosed(int)), SLOT(handleUtfsClientsFinished(int)));
|
||||
m_mountProcess->run(remoteCall.toUtf8(), m_devConf->sshParameters());
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handleUtfsClientsStarted()
|
||||
@@ -250,13 +237,12 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
|
||||
return;
|
||||
|
||||
setState(Inactive);
|
||||
if (exitStatus == SshRemoteProcess::NormalExit
|
||||
&& m_mountProcess->exitCode() == 0) {
|
||||
if (exitStatus == SshRemoteProcess::NormalExit && m_mountProcess->processExitCode() == 0) {
|
||||
emit reportProgress(tr("Mount operation succeeded."));
|
||||
emit mounted();
|
||||
} else {
|
||||
QString errMsg = tr("Failure running UTFS client: %1")
|
||||
.arg(m_mountProcess->errorString());
|
||||
.arg(m_mountProcess->processErrorString());
|
||||
const QByteArray &mountStderr = m_mountProcess->readAllStandardError();
|
||||
if (!mountStderr.isEmpty())
|
||||
errMsg += tr("\nstderr was: '%1'").arg(QString::fromUtf8(mountStderr));
|
||||
@@ -282,7 +268,7 @@ void MaemoRemoteMounter::startUtfsServers()
|
||||
const QString remoteSecretOpt = QLatin1String("-r");
|
||||
const QStringList utfsServerArgs = QStringList() << localSecretOpt
|
||||
<< port << remoteSecretOpt << port << QLatin1String("-c")
|
||||
<< (m_connection->connectionParameters().host + QLatin1Char(':') + port)
|
||||
<< (m_devConf->sshParameters().host + QLatin1Char(':') + port)
|
||||
<< mountSpec.localDir;
|
||||
connect(utfsServerProc.data(),
|
||||
SIGNAL(finished(int,QProcess::ExitStatus)), this,
|
||||
@@ -298,6 +284,21 @@ void MaemoRemoteMounter::startUtfsServers()
|
||||
setState(UtfsServersStarted);
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handlePortsGathererError(const QString &errorMsg)
|
||||
{
|
||||
QTC_ASSERT(m_state == GatheringPorts, return);
|
||||
|
||||
setState(Inactive);
|
||||
emit error(errorMsg);
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handlePortListReady()
|
||||
{
|
||||
QTC_ASSERT(m_state == GatheringPorts, return);
|
||||
|
||||
startUtfsClients();
|
||||
}
|
||||
|
||||
void MaemoRemoteMounter::handleUtfsServerStderr()
|
||||
{
|
||||
if (m_state != Inactive) {
|
||||
@@ -373,16 +374,14 @@ void MaemoRemoteMounter::handleUtfsServerTimeout()
|
||||
|
||||
void MaemoRemoteMounter::setState(State newState)
|
||||
{
|
||||
if (newState == m_state)
|
||||
return;
|
||||
if (newState == Inactive) {
|
||||
m_utfsServerTimer->stop();
|
||||
if (m_mountProcess) {
|
||||
disconnect(m_mountProcess.data(), 0, this, 0);
|
||||
m_mountProcess->close();
|
||||
}
|
||||
if (m_unmountProcess) {
|
||||
disconnect(m_unmountProcess.data(), 0, this, 0);
|
||||
m_unmountProcess->close();
|
||||
}
|
||||
disconnect(m_mountProcess, 0, this, 0);
|
||||
m_mountProcess->cancel();
|
||||
disconnect(m_unmountProcess, 0, this, 0);
|
||||
m_unmountProcess->cancel();
|
||||
}
|
||||
m_state = newState;
|
||||
}
|
||||
|
||||
@@ -44,14 +44,9 @@
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QTimer)
|
||||
|
||||
namespace QSsh {
|
||||
class SshConnection;
|
||||
class SshRemoteProcess;
|
||||
}
|
||||
namespace QSsh { class SshRemoteProcessRunner; }
|
||||
|
||||
namespace ProjectExplorer { class Profile; }
|
||||
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
|
||||
namespace Utils { class PortList; }
|
||||
|
||||
namespace Madde {
|
||||
namespace Internal {
|
||||
@@ -60,20 +55,16 @@ class MaemoRemoteMounter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MaemoRemoteMounter(QObject *parent);
|
||||
MaemoRemoteMounter(QObject *parent = 0);
|
||||
~MaemoRemoteMounter();
|
||||
|
||||
// Must already be connected.
|
||||
void setConnection(QSsh::SshConnection *connection,
|
||||
const ProjectExplorer::IDevice::ConstPtr &devConf);
|
||||
|
||||
void setProfile(const ProjectExplorer::Profile *profile);
|
||||
void setParameters(const ProjectExplorer::IDevice::ConstPtr &devConf,
|
||||
const Utils::FileName &fileName);
|
||||
void addMountSpecification(const MaemoMountSpecification &mountSpec,
|
||||
bool mountAsRoot);
|
||||
bool hasValidMountSpecifications() const;
|
||||
void resetMountSpecifications() { m_mountSpecs.clear(); }
|
||||
void mount(Utils::PortList *freePorts,
|
||||
const RemoteLinux::RemoteLinuxUsedPortsGatherer *portsGatherer);
|
||||
void mount();
|
||||
void unmount();
|
||||
void stop();
|
||||
|
||||
@@ -94,11 +85,13 @@ private slots:
|
||||
void handleUtfsServerTimeout();
|
||||
void handleUtfsServerStderr();
|
||||
void startUtfsServers();
|
||||
void handlePortsGathererError(const QString &errorMsg);
|
||||
void handlePortListReady();
|
||||
|
||||
private:
|
||||
enum State {
|
||||
Inactive, Unmounting, UtfsClientsStarting, UtfsClientsStarted,
|
||||
UtfsServersStarted
|
||||
UtfsServersStarted, GatheringPorts
|
||||
};
|
||||
|
||||
void setState(State newState);
|
||||
@@ -119,18 +112,15 @@ private:
|
||||
int remotePort;
|
||||
};
|
||||
|
||||
QSsh::SshConnection *m_connection;
|
||||
ProjectExplorer::IDevice::ConstPtr m_devConf;
|
||||
QList<MountInfo> m_mountSpecs;
|
||||
QSharedPointer<QSsh::SshRemoteProcess> m_mountProcess;
|
||||
QSharedPointer<QSsh::SshRemoteProcess> m_unmountProcess;
|
||||
QSsh::SshRemoteProcessRunner * const m_mountProcess;
|
||||
QSsh::SshRemoteProcessRunner * const m_unmountProcess;
|
||||
|
||||
typedef QSharedPointer<QProcess> ProcPtr;
|
||||
QList<ProcPtr> m_utfsServers;
|
||||
|
||||
Utils::PortList *m_freePorts;
|
||||
const RemoteLinux::RemoteLinuxUsedPortsGatherer *m_portsGatherer;
|
||||
bool m_remoteMountsAllowed;
|
||||
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
|
||||
Utils::FileName m_maddeRoot;
|
||||
|
||||
State m_state;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
**************************************************************************/
|
||||
#include "maemosshrunner.h"
|
||||
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoqemumanager.h"
|
||||
#include "maemoremotemounter.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
@@ -55,7 +56,7 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
|
||||
const BuildConfiguration * const bc = runConfig->target()->activeBuildConfiguration();
|
||||
Profile *profile = bc ? bc->target()->profile() : 0;
|
||||
m_qtId = QtSupport::QtProfileInformation::qtVersionId(profile);
|
||||
m_mounter->setProfile(profile);
|
||||
m_mounter->setParameters(devConfig(), MaemoGlobal::maddeRoot(profile));
|
||||
connect(m_mounter, SIGNAL(mounted()), this, SLOT(handleMounted()));
|
||||
connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted()));
|
||||
connect(m_mounter, SIGNAL(error(QString)), this,
|
||||
@@ -98,7 +99,6 @@ void MaemoSshRunner::doAdditionalInitialCleanup()
|
||||
{
|
||||
QTC_ASSERT(m_mountState == InactiveMountState, return);
|
||||
|
||||
m_mounter->setConnection(connection(), devConfig());
|
||||
m_mounter->resetMountSpecifications();
|
||||
for (int i = 0; i < m_mountSpecs.count(); ++i)
|
||||
m_mounter->addMountSpecification(m_mountSpecs.at(i), false);
|
||||
@@ -181,7 +181,7 @@ void MaemoSshRunner::mount()
|
||||
m_mountState = Mounting;
|
||||
if (m_mounter->hasValidMountSpecifications()) {
|
||||
emit reportProgress(tr("Mounting host directories..."));
|
||||
m_mounter->mount(freePorts(), usedPortsGatherer());
|
||||
m_mounter->mount();
|
||||
} else {
|
||||
handleMounted();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Version Control</category>
|
||||
<description>Mercurial integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"Perforce\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Version Control</category>
|
||||
<description>Perforce integration.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<plugin name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
|
||||
<vendor>Nokia Corporation</vendor>
|
||||
<copyright>(C) 2011 Nokia Corporation</copyright>
|
||||
<copyright>(C) 2012 Nokia Corporation</copyright>
|
||||
<license>
|
||||
Commercial Usage
|
||||
|
||||
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
|
||||
</license>
|
||||
<category>Qt Creator</category>
|
||||
<description>ProjectExplorer framework that can be extended with different kind of project types.</description>
|
||||
<url>http://qt.nokia.com</url>
|
||||
<url>http://www.qt-project.org</url>
|
||||
<dependencyList>
|
||||
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>
|
||||
|
||||
@@ -151,8 +151,11 @@ static QList<Abi> parseCoffHeader(const QByteArray &data)
|
||||
case 10:
|
||||
flavor = Abi::WindowsMsvc2010Flavor;
|
||||
break;
|
||||
default:
|
||||
// Keep unknown flavor
|
||||
case 11:
|
||||
flavor = Abi::WindowsMsvc2012Flavor;
|
||||
break;
|
||||
default: // Keep unknown flavor
|
||||
qWarning("%s: Unknown MSVC flavour encountered.", Q_FUNC_INFO);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -403,6 +406,8 @@ Abi::Abi(const QString &abiString) :
|
||||
m_osFlavor = WindowsMsvc2008Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msvc2010") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMsvc2010Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msvc2012") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMsvc2012Flavor;
|
||||
else if (abiParts.at(2) == QLatin1String("msys") && m_os == WindowsOS)
|
||||
m_osFlavor = WindowsMSysFlavor;
|
||||
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
|
||||
@@ -585,6 +590,8 @@ QString Abi::toString(const OSFlavor &of)
|
||||
return QLatin1String("msvc2008");
|
||||
case ProjectExplorer::Abi::WindowsMsvc2010Flavor:
|
||||
return QLatin1String("msvc2010");
|
||||
case ProjectExplorer::Abi::WindowsMsvc2012Flavor:
|
||||
return QLatin1String("msvc2012");
|
||||
case ProjectExplorer::Abi::WindowsMSysFlavor:
|
||||
return QLatin1String("msys");
|
||||
case ProjectExplorer::Abi::WindowsCEFlavor:
|
||||
@@ -626,7 +633,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
||||
case BsdOS:
|
||||
return result << FreeBsdFlavor << OpenBsdFlavor << NetBsdFlavor;
|
||||
case LinuxOS:
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor;
|
||||
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor
|
||||
<< AndroidLinuxFlavor;
|
||||
case MacOS:
|
||||
return result << GenericMacFlavor;
|
||||
case SymbianOS:
|
||||
@@ -635,7 +643,7 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
|
||||
return result << GenericUnixFlavor << SolarisUnixFlavor;
|
||||
case WindowsOS:
|
||||
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
|
||||
<< WindowsMSysFlavor << WindowsCEFlavor;
|
||||
<< WindowsMsvc2012Flavor << WindowsMSysFlavor << WindowsCEFlavor;
|
||||
case UnknownOS:
|
||||
return result << UnknownFlavor;
|
||||
default:
|
||||
@@ -653,7 +661,9 @@ Abi Abi::hostAbi()
|
||||
|
||||
#if defined (Q_OS_WIN)
|
||||
os = WindowsOS;
|
||||
#if _MSC_VER == 1600
|
||||
#if _MSC_VER == 1700
|
||||
subos = WindowsMsvc2012Flavor;
|
||||
#elif _MSC_VER == 1600
|
||||
subos = WindowsMsvc2010Flavor;
|
||||
#elif _MSC_VER == 1500
|
||||
subos = WindowsMsvc2008Flavor;
|
||||
@@ -673,7 +683,11 @@ Abi Abi::hostAbi()
|
||||
format = MachOFormat;
|
||||
#endif
|
||||
|
||||
return Abi(arch, os, subos, format, QSysInfo::WordSize);
|
||||
const Abi result(arch, os, subos, format, QSysInfo::WordSize);
|
||||
if (!result.isValid())
|
||||
qWarning("Unable to completely determine the host ABI (%s).",
|
||||
qPrintable(result.toString()));
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<Abi> Abi::abisOfBinary(const Utils::FileName &path)
|
||||
@@ -806,6 +820,9 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
|
||||
QTest::newRow("dynamic QtCore: symbian")
|
||||
<< QString::fromLatin1("%1/dynamic/symbian.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("arm-symbian-device-elf-32bit"));
|
||||
QTest::newRow("dynamic QtCore: win msvc2012 64bit")
|
||||
<< QString::fromLatin1("/tmp/win-msvc2012-64bit.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2012-pe-64bit"));
|
||||
QTest::newRow("dynamic QtCore: win msvc2010 64bit")
|
||||
<< QString::fromLatin1("%1/dynamic/win-msvc2010-64bit.dll").arg(prefix)
|
||||
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2010-pe-64bit"));
|
||||
|
||||
@@ -94,6 +94,7 @@ public:
|
||||
WindowsMsvc2005Flavor,
|
||||
WindowsMsvc2008Flavor,
|
||||
WindowsMsvc2010Flavor,
|
||||
WindowsMsvc2012Flavor,
|
||||
WindowsMSysFlavor,
|
||||
WindowsCEFlavor,
|
||||
|
||||
|
||||
@@ -30,11 +30,24 @@
|
||||
|
||||
#include "desktopdevice.h"
|
||||
#include "projectexplorerconstants.h"
|
||||
#include "deviceprocesslist.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
DesktopDevice::DesktopDevice() : IDevice(Core::Id(Constants::DESKTOP_DEVICE_TYPE),
|
||||
IDevice::AutoDetected,
|
||||
IDevice::Hardware,
|
||||
Core::Id(Constants::DESKTOP_DEVICE_ID))
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Run locally"));
|
||||
}
|
||||
|
||||
DesktopDevice::DesktopDevice(const DesktopDevice &other) :
|
||||
IDevice(other)
|
||||
{ }
|
||||
|
||||
IDevice::DeviceInfo DesktopDevice::deviceInformation() const
|
||||
{
|
||||
return DeviceInfo();
|
||||
@@ -44,6 +57,7 @@ QString DesktopDevice::displayType() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop");
|
||||
}
|
||||
|
||||
IDeviceWidget *DesktopDevice::createWidget()
|
||||
{
|
||||
return 0;
|
||||
@@ -71,16 +85,21 @@ IDevice::Ptr DesktopDevice::clone() const
|
||||
return Ptr(new DesktopDevice(*this));
|
||||
}
|
||||
|
||||
DesktopDevice::DesktopDevice() : IDevice(Core::Id(Constants::DESKTOP_DEVICE_TYPE),
|
||||
IDevice::AutoDetected,
|
||||
IDevice::Hardware,
|
||||
Core::Id(Constants::DESKTOP_DEVICE_ID))
|
||||
QString DesktopDevice::listProcessesCommandLine() const
|
||||
{
|
||||
setDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Run locally"));
|
||||
return QString();
|
||||
}
|
||||
|
||||
DesktopDevice::DesktopDevice(const DesktopDevice &other) :
|
||||
IDevice(other)
|
||||
{ }
|
||||
QString DesktopDevice::killProcessCommandLine(const DeviceProcess &process) const
|
||||
{
|
||||
Q_UNUSED(process);
|
||||
return QString();
|
||||
}
|
||||
|
||||
QList<DeviceProcess> DesktopDevice::buildProcessList(const QString &listProcessesReply) const
|
||||
{
|
||||
Q_UNUSED(listProcessesReply);
|
||||
return QList<DeviceProcess>();
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -54,6 +54,10 @@ public:
|
||||
|
||||
IDevice::Ptr clone() const;
|
||||
|
||||
QString listProcessesCommandLine() const;
|
||||
QString killProcessCommandLine(const DeviceProcess &process) const;
|
||||
QList<DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
|
||||
|
||||
protected:
|
||||
DesktopDevice();
|
||||
DesktopDevice(const DesktopDevice &other);
|
||||
|
||||
@@ -27,26 +27,26 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "remotelinuxprocessesdialog.h"
|
||||
#include "ui_remotelinuxprocessesdialog.h"
|
||||
|
||||
#include "remotelinuxprocesslist.h"
|
||||
#include "devicesupport/deviceprocessesdialog.h"
|
||||
#include "devicesupport/deviceprocesslist.h"
|
||||
#include "ui_deviceprocessesdialog.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
class RemoteLinuxProcessesDialogPrivate
|
||||
|
||||
class DeviceProcessesDialogPrivate
|
||||
{
|
||||
public:
|
||||
RemoteLinuxProcessesDialogPrivate(AbstractRemoteLinuxProcessList *processList)
|
||||
DeviceProcessesDialogPrivate(DeviceProcessList *processList)
|
||||
: processList(processList)
|
||||
{
|
||||
}
|
||||
|
||||
Ui::RemoteLinuxProcessesDialog ui;
|
||||
AbstractRemoteLinuxProcessList * const processList;
|
||||
Ui::DeviceProcessesDialog ui;
|
||||
DeviceProcessList * const processList;
|
||||
QSortFilterProxyModel proxyModel;
|
||||
};
|
||||
|
||||
@@ -54,9 +54,8 @@ public:
|
||||
|
||||
using namespace Internal;
|
||||
|
||||
RemoteLinuxProcessesDialog::RemoteLinuxProcessesDialog(AbstractRemoteLinuxProcessList *processList,
|
||||
QWidget *parent)
|
||||
: QDialog(parent), d(new RemoteLinuxProcessesDialogPrivate(processList))
|
||||
DeviceProcessesDialog::DeviceProcessesDialog(DeviceProcessList *processList, QWidget *parent)
|
||||
: QDialog(parent), d(new DeviceProcessesDialogPrivate(processList))
|
||||
{
|
||||
processList->setParent(this);
|
||||
|
||||
@@ -88,32 +87,32 @@ RemoteLinuxProcessesDialog::RemoteLinuxProcessesDialog(AbstractRemoteLinuxProces
|
||||
updateProcessList();
|
||||
}
|
||||
|
||||
RemoteLinuxProcessesDialog::~RemoteLinuxProcessesDialog()
|
||||
DeviceProcessesDialog::~DeviceProcessesDialog()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::handleRemoteError(const QString &errorMsg)
|
||||
void DeviceProcessesDialog::handleRemoteError(const QString &errorMsg)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Remote Error"), errorMsg);
|
||||
d->ui.updateListButton->setEnabled(true);
|
||||
handleSelectionChanged();
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::handleProcessListUpdated()
|
||||
void DeviceProcessesDialog::handleProcessListUpdated()
|
||||
{
|
||||
d->ui.updateListButton->setEnabled(true);
|
||||
handleSelectionChanged();
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::updateProcessList()
|
||||
void DeviceProcessesDialog::updateProcessList()
|
||||
{
|
||||
d->ui.updateListButton->setEnabled(false);
|
||||
d->ui.killProcessButton->setEnabled(false);
|
||||
d->processList->update();
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::killProcess()
|
||||
void DeviceProcessesDialog::killProcess()
|
||||
{
|
||||
const QModelIndexList &indexes
|
||||
= d->ui.treeView->selectionModel()->selectedIndexes();
|
||||
@@ -124,12 +123,12 @@ void RemoteLinuxProcessesDialog::killProcess()
|
||||
d->processList->killProcess(d->proxyModel.mapToSource(indexes.first()).row());
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::handleProcessKilled()
|
||||
void DeviceProcessesDialog::handleProcessKilled()
|
||||
{
|
||||
updateProcessList();
|
||||
}
|
||||
|
||||
void RemoteLinuxProcessesDialog::handleSelectionChanged()
|
||||
void DeviceProcessesDialog::handleSelectionChanged()
|
||||
{
|
||||
d->ui.killProcessButton->setEnabled(d->ui.treeView->selectionModel()->hasSelection());
|
||||
}
|
||||
@@ -26,28 +26,28 @@
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#ifndef REMOTELINUXPROCESSESDIALOG_H
|
||||
#define REMOTELINUXPROCESSESDIALOG_H
|
||||
|
||||
#include "remotelinux_export.h"
|
||||
#ifndef DEVICEPROCESSESDIALOG_H
|
||||
#define DEVICEPROCESSESDIALOG_H
|
||||
|
||||
#include "../projectexplorer_export.h"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace RemoteLinux {
|
||||
class AbstractRemoteLinuxProcessList;
|
||||
namespace ProjectExplorer {
|
||||
|
||||
namespace Internal {
|
||||
class RemoteLinuxProcessesDialogPrivate;
|
||||
} // namespace Internal
|
||||
class DeviceProcessList;
|
||||
|
||||
class REMOTELINUX_EXPORT RemoteLinuxProcessesDialog : public QDialog
|
||||
namespace Internal { class DeviceProcessesDialogPrivate; }
|
||||
|
||||
class PROJECTEXPLORER_EXPORT DeviceProcessesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// Note: The dialog takes ownership of processList.
|
||||
explicit RemoteLinuxProcessesDialog(AbstractRemoteLinuxProcessList *processList,
|
||||
QWidget *parent = 0);
|
||||
~RemoteLinuxProcessesDialog();
|
||||
explicit DeviceProcessesDialog(DeviceProcessList *processList, QWidget *parent = 0);
|
||||
~DeviceProcessesDialog();
|
||||
|
||||
private slots:
|
||||
void updateProcessList();
|
||||
@@ -58,7 +58,7 @@ private slots:
|
||||
void handleSelectionChanged();
|
||||
|
||||
private:
|
||||
Internal::RemoteLinuxProcessesDialogPrivate * const d;
|
||||
Internal::DeviceProcessesDialogPrivate * const d;
|
||||
};
|
||||
|
||||
} // namespace RemoteLinux
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RemoteLinux::Internal::RemoteLinuxProcessesDialog</class>
|
||||
<widget class="QDialog" name="RemoteLinux::Internal::RemoteLinuxProcessesDialog">
|
||||
<class>ProjectExplorer::Internal::DeviceProcessesDialog</class>
|
||||
<widget class="QDialog" name="ProjectExplorer::Internal::DeviceProcessesDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -99,7 +99,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>RemoteLinux::Internal::RemoteLinuxProcessesDialog</receiver>
|
||||
<receiver>ProjectExplorer::Internal::DeviceProcessesDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -115,7 +115,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>RemoteLinux::Internal::RemoteLinuxProcessesDialog</receiver>
|
||||
<receiver>ProjectExplorer::Internal::DeviceProcessesDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -27,41 +27,29 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "remotelinuxprocesslist.h"
|
||||
#include "deviceprocesslist.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace QSsh;
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
namespace {
|
||||
|
||||
enum State { Inactive, Listing, Killing };
|
||||
const char Delimiter0[] = "x--";
|
||||
const char Delimiter1[] = "---";
|
||||
} // anonymous namespace
|
||||
|
||||
static QString visualizeNull(QString s)
|
||||
{
|
||||
return s.replace(QLatin1Char('\0'), QLatin1String("<null>"));
|
||||
}
|
||||
|
||||
|
||||
class AbstractRemoteLinuxProcessListPrivate
|
||||
class DeviceProcessListPrivate
|
||||
{
|
||||
public:
|
||||
AbstractRemoteLinuxProcessListPrivate(const IDevice::ConstPtr &devConf)
|
||||
: deviceConfiguration(devConf),
|
||||
DeviceProcessListPrivate(const IDevice::ConstPtr &devConf)
|
||||
: device(devConf),
|
||||
state(Inactive)
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
|
||||
const IDevice::ConstPtr deviceConfiguration;
|
||||
const IDevice::ConstPtr device;
|
||||
SshRemoteProcessRunner process;
|
||||
QList<RemoteProcess> remoteProcesses;
|
||||
QList<DeviceProcess> remoteProcesses;
|
||||
QString errorMsg;
|
||||
State state;
|
||||
};
|
||||
@@ -70,18 +58,17 @@ public:
|
||||
|
||||
using namespace Internal;
|
||||
|
||||
AbstractRemoteLinuxProcessList::AbstractRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig,
|
||||
QObject *parent)
|
||||
: QAbstractTableModel(parent), d(new AbstractRemoteLinuxProcessListPrivate(devConfig))
|
||||
DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent)
|
||||
: QAbstractTableModel(parent), d(new DeviceProcessListPrivate(devConfig))
|
||||
{
|
||||
}
|
||||
|
||||
AbstractRemoteLinuxProcessList::~AbstractRemoteLinuxProcessList()
|
||||
DeviceProcessList::~DeviceProcessList()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::update()
|
||||
void DeviceProcessList::update()
|
||||
{
|
||||
QTC_ASSERT(d->state == Inactive, return);
|
||||
|
||||
@@ -91,31 +78,36 @@ void AbstractRemoteLinuxProcessList::update()
|
||||
endRemoveRows();
|
||||
}
|
||||
d->state = Listing;
|
||||
startProcess(listProcessesCommandLine());
|
||||
startProcess(d->device->listProcessesCommandLine());
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::killProcess(int row)
|
||||
void DeviceProcessList::killProcess(int row)
|
||||
{
|
||||
QTC_ASSERT(row >= 0 && row < d->remoteProcesses.count(), return);
|
||||
QTC_ASSERT(d->state == Inactive, return);
|
||||
|
||||
d->state = Killing;
|
||||
startProcess(killProcessCommandLine(d->remoteProcesses.at(row)));
|
||||
startProcess(d->device->killProcessCommandLine(d->remoteProcesses.at(row)));
|
||||
}
|
||||
|
||||
RemoteProcess AbstractRemoteLinuxProcessList::at(int row) const
|
||||
DeviceProcess DeviceProcessList::at(int row) const
|
||||
{
|
||||
return d->remoteProcesses.at(row);
|
||||
}
|
||||
|
||||
int AbstractRemoteLinuxProcessList::rowCount(const QModelIndex &parent) const
|
||||
IDevice::ConstPtr DeviceProcessList::device() const
|
||||
{
|
||||
return d->device;
|
||||
}
|
||||
|
||||
int DeviceProcessList::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
return parent.isValid() ? 0 : d->remoteProcesses.count();
|
||||
}
|
||||
|
||||
int AbstractRemoteLinuxProcessList::columnCount(const QModelIndex &) const { return 2; }
|
||||
int DeviceProcessList::columnCount(const QModelIndex &) const { return 2; }
|
||||
|
||||
QVariant AbstractRemoteLinuxProcessList::headerData(int section, Qt::Orientation orientation,
|
||||
QVariant DeviceProcessList::headerData(int section, Qt::Orientation orientation,
|
||||
int role) const
|
||||
{
|
||||
if (orientation != Qt::Horizontal || role != Qt::DisplayRole || section < 0
|
||||
@@ -124,14 +116,14 @@ QVariant AbstractRemoteLinuxProcessList::headerData(int section, Qt::Orientation
|
||||
return section == 0? tr("PID") : tr("Command Line");
|
||||
}
|
||||
|
||||
QVariant AbstractRemoteLinuxProcessList::data(const QModelIndex &index, int role) const
|
||||
QVariant DeviceProcessList::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid() || index.row() >= rowCount(index.parent())
|
||||
|| index.column() >= columnCount())
|
||||
return QVariant();
|
||||
|
||||
if (role == Qt::DisplayRole || role == Qt::ToolTipRole) {
|
||||
const RemoteProcess &proc = d->remoteProcesses.at(index.row());
|
||||
const DeviceProcess &proc = d->remoteProcesses.at(index.row());
|
||||
if (index.column() == 0)
|
||||
return proc.pid;
|
||||
else
|
||||
@@ -140,7 +132,7 @@ QVariant AbstractRemoteLinuxProcessList::data(const QModelIndex &index, int role
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::handleConnectionError()
|
||||
void DeviceProcessList::handleConnectionError()
|
||||
{
|
||||
QTC_ASSERT(d->state != Inactive, return);
|
||||
|
||||
@@ -151,7 +143,7 @@ void AbstractRemoteLinuxProcessList::handleConnectionError()
|
||||
setFinished();
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus)
|
||||
void DeviceProcessList::handleRemoteProcessFinished(int exitStatus)
|
||||
{
|
||||
QTC_ASSERT(d->state != Inactive, return);
|
||||
|
||||
@@ -167,9 +159,8 @@ void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus)
|
||||
case SshRemoteProcess::NormalExit:
|
||||
if (d->process.processExitCode() == 0) {
|
||||
if (d->state == Listing) {
|
||||
beginResetModel();
|
||||
const QByteArray remoteStdout = d->process.readAllStandardOutput();
|
||||
QList<RemoteProcess> processes = buildProcessList(QString::fromUtf8(remoteStdout.data(),
|
||||
QList<DeviceProcess> processes = d->device->buildProcessList(QString::fromUtf8(remoteStdout.data(),
|
||||
remoteStdout.count()));
|
||||
if (!processes.isEmpty()) {
|
||||
beginInsertRows(QModelIndex(), 0, processes.count()-1);
|
||||
@@ -200,90 +191,23 @@ void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus)
|
||||
setFinished();
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::startProcess(const QString &cmdLine)
|
||||
void DeviceProcessList::startProcess(const QString &cmdLine)
|
||||
{
|
||||
connect(&d->process, SIGNAL(connectionError()), SLOT(handleConnectionError()));
|
||||
connect(&d->process, SIGNAL(processClosed(int)),
|
||||
SLOT(handleRemoteProcessFinished(int)));
|
||||
d->errorMsg.clear();
|
||||
d->process.run(cmdLine.toUtf8(), d->deviceConfiguration->sshParameters());
|
||||
d->process.run(cmdLine.toUtf8(), d->device->sshParameters());
|
||||
}
|
||||
|
||||
void AbstractRemoteLinuxProcessList::setFinished()
|
||||
void DeviceProcessList::setFinished()
|
||||
{
|
||||
disconnect(&d->process, 0, this, 0);
|
||||
d->state = Inactive;
|
||||
}
|
||||
|
||||
|
||||
GenericRemoteLinuxProcessList::GenericRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig,
|
||||
QObject *parent)
|
||||
: AbstractRemoteLinuxProcessList(devConfig, parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString GenericRemoteLinuxProcessList::listProcessesCommandLine() const
|
||||
{
|
||||
return QString::fromLatin1(
|
||||
"for dir in `ls -d /proc/[0123456789]*`; do "
|
||||
"test -d $dir || continue;" // Decrease the likelihood of a race condition.
|
||||
"echo $dir;"
|
||||
"cat $dir/cmdline;echo;" // cmdline does not end in newline
|
||||
"cat $dir/stat;"
|
||||
"readlink $dir/exe;"
|
||||
"printf '%1''%2';"
|
||||
"done").arg(Delimiter0).arg(Delimiter1);
|
||||
}
|
||||
|
||||
QString GenericRemoteLinuxProcessList::killProcessCommandLine(const RemoteProcess &process) const
|
||||
{
|
||||
return QLatin1String("kill -9 ") + QString::number(process.pid);
|
||||
}
|
||||
|
||||
QList<RemoteProcess> GenericRemoteLinuxProcessList::buildProcessList(const QString &listProcessesReply) const
|
||||
{
|
||||
QList<RemoteProcess> processes;
|
||||
const QStringList lines = listProcessesReply.split(QString::fromLatin1(Delimiter0)
|
||||
+ QString::fromLatin1(Delimiter1), QString::SkipEmptyParts);
|
||||
foreach (const QString &line, lines) {
|
||||
const QStringList elements = line.split(QLatin1Char('\n'));
|
||||
if (elements.count() < 4) {
|
||||
qDebug("%s: Expected four list elements, got %d. Line was '%s'.", Q_FUNC_INFO,
|
||||
elements.count(), qPrintable(visualizeNull(line)));
|
||||
continue;
|
||||
}
|
||||
bool ok;
|
||||
const int pid = elements.first().mid(6).toInt(&ok);
|
||||
if (!ok) {
|
||||
qDebug("%s: Expected number in %s. Line was '%s'.", Q_FUNC_INFO,
|
||||
qPrintable(elements.first()), qPrintable(visualizeNull(line)));
|
||||
continue;
|
||||
}
|
||||
QString command = elements.at(1);
|
||||
command.replace(QLatin1Char('\0'), QLatin1Char(' '));
|
||||
if (command.isEmpty()) {
|
||||
const QString &statString = elements.at(2);
|
||||
const int openParenPos = statString.indexOf(QLatin1Char('('));
|
||||
const int closedParenPos = statString.indexOf(QLatin1Char(')'), openParenPos);
|
||||
if (openParenPos == -1 || closedParenPos == -1)
|
||||
continue;
|
||||
command = QLatin1Char('[')
|
||||
+ statString.mid(openParenPos + 1, closedParenPos - openParenPos - 1)
|
||||
+ QLatin1Char(']');
|
||||
}
|
||||
|
||||
RemoteProcess process;
|
||||
process.pid = pid;
|
||||
process.cmdLine = command;
|
||||
process.exe = elements.at(3);
|
||||
processes.append(process);
|
||||
}
|
||||
|
||||
qSort(processes);
|
||||
return processes;
|
||||
}
|
||||
|
||||
bool RemoteProcess::operator <(const RemoteProcess &other) const
|
||||
bool DeviceProcess::operator <(const DeviceProcess &other) const
|
||||
{
|
||||
if (pid != other.pid)
|
||||
return pid < other.pid;
|
||||
@@ -292,4 +216,4 @@ bool RemoteProcess::operator <(const RemoteProcess &other) const
|
||||
return cmdLine < other.cmdLine;
|
||||
}
|
||||
|
||||
} // namespace RemoteLinux
|
||||
} // namespace ProjectExplorer
|
||||
@@ -26,54 +26,38 @@
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
#ifndef REMOTELINUXPROCESSLIST_H
|
||||
#define REMOTELINUXPROCESSLIST_H
|
||||
|
||||
#include "remotelinux_export.h"
|
||||
#ifndef DEVICEPROCESSLIST_H
|
||||
#define DEVICEPROCESSLIST_H
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include "idevice.h"
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QList>
|
||||
#include <QSharedPointer>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace ProjectExplorer {
|
||||
|
||||
namespace Internal {
|
||||
class AbstractRemoteLinuxProcessListPrivate;
|
||||
}
|
||||
namespace Internal { class DeviceProcessListPrivate; }
|
||||
|
||||
class REMOTELINUX_EXPORT RemoteProcess
|
||||
{
|
||||
public:
|
||||
RemoteProcess() : pid(0) {}
|
||||
bool operator<(const RemoteProcess &other) const;
|
||||
|
||||
int pid;
|
||||
QString cmdLine;
|
||||
QString exe;
|
||||
};
|
||||
|
||||
class REMOTELINUX_EXPORT AbstractRemoteLinuxProcessList : public QAbstractTableModel
|
||||
class PROJECTEXPLORER_EXPORT DeviceProcessList : public QAbstractTableModel
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class Internal::AbstractRemoteLinuxProcessListPrivate;
|
||||
|
||||
public:
|
||||
~AbstractRemoteLinuxProcessList();
|
||||
DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent = 0);
|
||||
~DeviceProcessList();
|
||||
|
||||
void update();
|
||||
void killProcess(int row);
|
||||
RemoteProcess at(int row) const;
|
||||
DeviceProcess at(int row) const;
|
||||
IDevice::ConstPtr device() const;
|
||||
|
||||
signals:
|
||||
void processListUpdated();
|
||||
void error(const QString &errorMsg);
|
||||
void processKilled();
|
||||
|
||||
protected:
|
||||
AbstractRemoteLinuxProcessList(const ProjectExplorer::IDevice::ConstPtr &devConfig,
|
||||
QObject *parent = 0);
|
||||
|
||||
private slots:
|
||||
void handleConnectionError();
|
||||
void handleRemoteProcessFinished(int exitStatus);
|
||||
@@ -85,30 +69,12 @@ private:
|
||||
int role = Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
|
||||
virtual QString listProcessesCommandLine() const = 0;
|
||||
virtual QString killProcessCommandLine(const RemoteProcess &process) const = 0;
|
||||
virtual QList<RemoteProcess> buildProcessList(const QString &listProcessesReply) const = 0;
|
||||
|
||||
void startProcess(const QString &cmdLine);
|
||||
void setFinished();
|
||||
|
||||
Internal::AbstractRemoteLinuxProcessListPrivate * const d;
|
||||
Internal::DeviceProcessListPrivate * const d;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
class REMOTELINUX_EXPORT GenericRemoteLinuxProcessList : public AbstractRemoteLinuxProcessList
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GenericRemoteLinuxProcessList(const ProjectExplorer::IDevice::ConstPtr &devConfig,
|
||||
QObject *parent = 0);
|
||||
|
||||
protected:
|
||||
QString listProcessesCommandLine() const;
|
||||
QString killProcessCommandLine(const RemoteProcess &process) const;
|
||||
QList<RemoteProcess> buildProcessList(const QString &listProcessesReply) const;
|
||||
};
|
||||
|
||||
} // namespace RemoteLinux
|
||||
|
||||
#endif // REMOTELINUXPROCESSLIST_H
|
||||
#endif // DEVICEPROCESSLIST_H
|
||||
@@ -46,9 +46,22 @@ namespace QSsh { class SshConnectionParameters; }
|
||||
namespace Utils { class PortList; }
|
||||
|
||||
namespace ProjectExplorer {
|
||||
|
||||
namespace Internal { class IDevicePrivate; }
|
||||
|
||||
class IDeviceWidget;
|
||||
|
||||
class PROJECTEXPLORER_EXPORT DeviceProcess
|
||||
{
|
||||
public:
|
||||
DeviceProcess() : pid(0) {}
|
||||
bool operator<(const DeviceProcess &other) const;
|
||||
|
||||
int pid;
|
||||
QString cmdLine;
|
||||
QString exe;
|
||||
};
|
||||
|
||||
// See cpp file for documentation.
|
||||
class PROJECTEXPLORER_EXPORT IDevice
|
||||
{
|
||||
@@ -86,6 +99,10 @@ public:
|
||||
virtual QString displayNameForActionId(Core::Id actionId) const = 0;
|
||||
virtual void executeAction(Core::Id actionId, QWidget *parent = 0) const = 0;
|
||||
|
||||
virtual QString listProcessesCommandLine() const = 0;
|
||||
virtual QString killProcessCommandLine(const DeviceProcess &process) const = 0;
|
||||
virtual QList<DeviceProcess> buildProcessList(const QString &listProcessesReply) const = 0;
|
||||
|
||||
enum DeviceState { DeviceReadyToUse, DeviceConnected, DeviceDisconnected, DeviceStateUnknown };
|
||||
DeviceState deviceState() const;
|
||||
void setDeviceState(const DeviceState state);
|
||||
|
||||
@@ -239,7 +239,8 @@ void EditorConfiguration::fromMap(const QVariantMap &map)
|
||||
void EditorConfiguration::configureEditor(ITextEditor *textEditor) const
|
||||
{
|
||||
BaseTextEditorWidget *baseTextEditor = qobject_cast<BaseTextEditorWidget *>(textEditor->widget());
|
||||
baseTextEditor->setCodeStyle(codeStyle(baseTextEditor->languageSettingsId()));
|
||||
if (baseTextEditor)
|
||||
baseTextEditor->setCodeStyle(codeStyle(baseTextEditor->languageSettingsId()));
|
||||
if (!d->m_useGlobal) {
|
||||
textEditor->setTextCodec(d->m_textCodec, ITextEditor::TextCodecFromProjectSetting);
|
||||
if (baseTextEditor)
|
||||
|
||||
@@ -109,14 +109,19 @@ static Abi findAbiOfMsvc(MsvcToolChain::Type type, MsvcToolChain::Platform platf
|
||||
else
|
||||
msvcVersionString = QLatin1String("8.0");
|
||||
}
|
||||
if (msvcVersionString.startsWith(QLatin1String("10.")))
|
||||
if (msvcVersionString.startsWith(QLatin1String("11.")))
|
||||
flavor = Abi::WindowsMsvc2012Flavor;
|
||||
else if (msvcVersionString.startsWith(QLatin1String("10.")))
|
||||
flavor = Abi::WindowsMsvc2010Flavor;
|
||||
else if (msvcVersionString.startsWith(QLatin1String("9.")))
|
||||
flavor = Abi::WindowsMsvc2008Flavor;
|
||||
else
|
||||
flavor = Abi::WindowsMsvc2005Flavor;
|
||||
|
||||
return Abi(arch, Abi::WindowsOS, flavor, Abi::PEFormat, wordWidth);
|
||||
const Abi result = Abi(arch, Abi::WindowsOS, flavor, Abi::PEFormat, wordWidth);
|
||||
if (!result.isValid())
|
||||
qWarning("Unable to completely determine the ABI of MSVC version %s (%s).",
|
||||
qPrintable(version), qPrintable(result.toString()));
|
||||
return result;
|
||||
}
|
||||
|
||||
static QString generateDisplayName(const QString &name,
|
||||
@@ -341,12 +346,21 @@ QString MsvcToolChain::typeDisplayName() const
|
||||
|
||||
QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
|
||||
{
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2005Flavor)
|
||||
switch (m_abi.osFlavor()) {
|
||||
case ProjectExplorer::Abi::WindowsMsvc2005Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2005"));
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2008Flavor)
|
||||
case ProjectExplorer::Abi::WindowsMsvc2008Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2008"));
|
||||
if (m_abi.osFlavor() == Abi::WindowsMsvc2010Flavor)
|
||||
case ProjectExplorer::Abi::WindowsMsvc2010Flavor:
|
||||
return QList<Utils::FileName>() << Utils::FileName::fromString(QLatin1String("win32-msvc2010"));
|
||||
case ProjectExplorer::Abi::WindowsMsvc2012Flavor:
|
||||
QList<Utils::FileName>()
|
||||
<< Utils::FileName::fromString(QLatin1String("win32-msvc2012"))
|
||||
<< Utils::FileName::fromString(QLatin1String("win32-msvc2010"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return QList<Utils::FileName>();
|
||||
}
|
||||
|
||||
|
||||
@@ -81,9 +81,10 @@ QList<Task> SysRootProfileInformation::validate(Profile *p) const
|
||||
{
|
||||
QList<Task> result;
|
||||
const Utils::FileName dir = SysRootProfileInformation::sysRoot(p);
|
||||
if (!dir.toFileInfo().isDir() && SysRootProfileInformation::hasSysRoot(p))
|
||||
result << Task(Task::Error, QObject::tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
|
||||
if (!dir.toFileInfo().isDir() && SysRootProfileInformation::hasSysRoot(p)) {
|
||||
result << Task(Task::Error, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
|
||||
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -165,7 +166,7 @@ QList<Task> ToolChainProfileInformation::validate(Profile *p) const
|
||||
QList<Task> result;
|
||||
if (!toolChain(p)) {
|
||||
setToolChain(p, 0); // make sure to clear out no longer known tool chains
|
||||
result << Task(Task::Error, QObject::tr("No tool chain set up."),
|
||||
result << Task(Task::Error, ToolChainProfileInformation::msgNoToolChainInTarget(),
|
||||
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
return result;
|
||||
@@ -203,6 +204,11 @@ void ToolChainProfileInformation::setToolChain(Profile *p, ToolChain *tc)
|
||||
p->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString());
|
||||
}
|
||||
|
||||
QString ToolChainProfileInformation::msgNoToolChainInTarget()
|
||||
{
|
||||
return tr("No tool chain set in target.");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// DeviceTypeInformation:
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -236,7 +242,7 @@ QList<Task> DeviceTypeProfileInformation::validate(Profile *p) const
|
||||
IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
|
||||
QList<Task> result;
|
||||
if (!dev.isNull() && dev->type() != DeviceTypeProfileInformation::deviceTypeId(p))
|
||||
result.append(Task(Task::Error, QObject::tr("Device does not match device type."),
|
||||
result.append(Task(Task::Error, tr("Device does not match device type."),
|
||||
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ public:
|
||||
|
||||
static ToolChain *toolChain(const Profile *p);
|
||||
static void setToolChain(Profile *p, ToolChain *tc);
|
||||
|
||||
static QString msgNoToolChainInTarget();
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT ToolChainMatcher : public ProfileMatcher
|
||||
|
||||
@@ -93,7 +93,7 @@ ProfileManagerConfigWidget::ProfileManagerConfigWidget(Profile *p, QWidget *pare
|
||||
|
||||
QString ProfileManagerConfigWidget::displayName() const
|
||||
{
|
||||
return tr("Profiles");
|
||||
return tr("Targets");
|
||||
}
|
||||
|
||||
void ProfileManagerConfigWidget::apply()
|
||||
|
||||
@@ -336,16 +336,15 @@ void ProfileModel::apply()
|
||||
|
||||
if (removedSts.count() == 1) {
|
||||
QMessageBox::warning(0,
|
||||
tr("Duplicate profiles detected"),
|
||||
tr("The following profile was already configured:<br>"
|
||||
" %1<br>"
|
||||
"It was not configured again.")
|
||||
tr("Duplicate Target Detected"),
|
||||
tr("The target<br> %1<br>"
|
||||
" was already configured. It was not configured again.")
|
||||
.arg(removedSts.at(0)));
|
||||
|
||||
} else if (!removedSts.isEmpty()) {
|
||||
QMessageBox::warning(0,
|
||||
tr("Duplicate profile detected"),
|
||||
tr("The following profiles were already configured:<br>"
|
||||
tr("Duplicate Targets Detected"),
|
||||
tr("The following targets were already configured:<br>"
|
||||
" %1<br>"
|
||||
"They were not configured again.")
|
||||
.arg(removedSts.join(QLatin1String(",<br> "))));
|
||||
|
||||
@@ -122,7 +122,7 @@ QWidget *ProfileOptionsPage::createPage(QWidget *parent)
|
||||
connect(m_delButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
|
||||
connect(m_makeDefaultButton, SIGNAL(clicked()), this, SLOT(makeDefaultProfile()));
|
||||
|
||||
m_searchKeywords = tr("Profiles");
|
||||
m_searchKeywords = tr("Targets");
|
||||
|
||||
updateState();
|
||||
|
||||
|
||||
@@ -1288,7 +1288,7 @@ void ProjectExplorerPlugin::openProjectWelcomePage(const QString &fileName)
|
||||
QString errorMessage;
|
||||
openProject(fileName, &errorMessage);
|
||||
if (!errorMessage.isEmpty())
|
||||
QMessageBox::critical(Core::ICore::mainWindow(), tr("Failed to open project"), errorMessage);
|
||||
QMessageBox::critical(Core::ICore::mainWindow(), tr("Failed to Open Project"), errorMessage);
|
||||
}
|
||||
|
||||
Project *ProjectExplorerPlugin::openProject(const QString &fileName, QString *errorString)
|
||||
|
||||
@@ -121,6 +121,8 @@ HEADERS += projectexplorer.h \
|
||||
devicesupport/devicemanager.h \
|
||||
devicesupport/devicemanagermodel.h \
|
||||
devicesupport/devicefactoryselectiondialog.h \
|
||||
devicesupport/deviceprocesslist.h \
|
||||
devicesupport/deviceprocessesdialog.h \
|
||||
devicesupport/devicesettingswidget.h \
|
||||
devicesupport/devicesettingspage.h
|
||||
|
||||
@@ -220,6 +222,8 @@ SOURCES += projectexplorer.cpp \
|
||||
devicesupport/devicemanager.cpp \
|
||||
devicesupport/devicemanagermodel.cpp \
|
||||
devicesupport/devicefactoryselectiondialog.cpp \
|
||||
devicesupport/deviceprocesslist.cpp \
|
||||
devicesupport/deviceprocessesdialog.cpp \
|
||||
devicesupport/devicesettingswidget.cpp \
|
||||
devicesupport/devicesettingspage.cpp
|
||||
|
||||
@@ -233,6 +237,7 @@ FORMS += processstep.ui \
|
||||
publishing/publishingwizardselectiondialog.ui \
|
||||
codestylesettingspropertiespage.ui \
|
||||
devicesupport/devicefactoryselectiondialog.ui \
|
||||
devicesupport/deviceprocessesdialog.ui \
|
||||
devicesupport/devicesettingswidget.ui
|
||||
|
||||
WINSOURCES += \
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user