Merge remote-tracking branch 'origin/2.6'

This commit is contained in:
Eike Ziller
2012-07-31 10:59:24 +02:00
147 changed files with 769 additions and 635 deletions

View File

@@ -47,8 +47,8 @@
class, and header and source files for the class. class, and header and source files for the class.
To see how this works, rename wizard_sample.xml as wizard.xml in the 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\helloworld} and
\c {\share\qtcreator\templates\wizards\listmodel\listmodels} folders. After \c {\share\qtcreator\templates\wizards\listmodel} folders. After
you restart \QC, the \gui {Custom Classes} you restart \QC, the \gui {Custom Classes}
and \gui {Custom Projects} categories (1) appear in the \gui New dialog. For 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 each category, an icon (2), a display name (3), and a description (4) are

View File

@@ -110,7 +110,8 @@ while (my $line = <STDIN> ) {
$fullFileName = $fileHash{$fileName}; $fullFileName = $fileHash{$fileName};
$fullFileName = $fileName unless defined $fullFileName; $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"; print $fullFileName, "\t", $line, "\t", $type, "\t", $lastLine,"\n";
$failCount++; $failCount++;
} else { } else {

View File

@@ -200,7 +200,8 @@ void BoundingRectHighlighter::itemDestroyed(QObject *obj)
void BoundingRectHighlighter::highlightAll() void BoundingRectHighlighter::highlightAll()
{ {
foreach (BoundingBox *box, m_boxes) { foreach (BoundingBox *box, m_boxes) {
if (box && box->highlightedObject.isNull()) { Q_ASSERT(box);
if (box->highlightedObject.isNull()) {
// clear all highlights // clear all highlights
clear(); clear();
return; return;

View File

@@ -20,6 +20,7 @@ unix:DEFINES += BOTAN_TARGET_OS_HAS_GETTIMEOFDAY BOTAN_HAS_ALLOC_MMAP \
BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE BOTAN_HAS_DYNAMIC_LOADER BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE BOTAN_HAS_DYNAMIC_LOADER
macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN
*g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC *g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC
*clang*:DEFINES += BOTAN_BUILD_COMPILER_IS_CLANG
win32 { win32 {
DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \ DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \

View File

@@ -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 (x86)/sdk"
!exists($$CDB_PATH):CDB_PATH="$$(ProgramW6432)/Debugging Tools For Windows (x64)/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="$$(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=""
} }

View File

@@ -43,6 +43,7 @@
#include "qtcassert.h" #include "qtcassert.h"
#include <QFile> #include <QFile>
#include <QDir>
#include <QLibrary> #include <QLibrary>
#include <QDebug> #include <QDebug>
@@ -153,6 +154,12 @@ ElfData ElfReader::readHeaders()
return m_elfData; 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() ElfReader::Result ElfReader::readIt()
{ {
if (!m_elfData.sectionHeaders.isEmpty()) if (!m_elfData.sectionHeaders.isEmpty())
@@ -167,14 +174,12 @@ ElfReader::Result ElfReader::readIt()
const quint64 fdlen = mapper.fdlen; const quint64 fdlen = mapper.fdlen;
if (fdlen < 64) { if (fdlen < 64) {
m_errorString = QLibrary::tr("'%1' is not an ELF object (%2)") m_errorString = tr("'%1' is not an ELF object (file too small)").arg(QDir::toNativeSeparators(m_binary));
.arg(m_binary).arg(QLatin1String("file too small"));
return NotElf; return NotElf;
} }
if (strncmp(mapper.start, "\177ELF", 4) != 0) { if (strncmp(mapper.start, "\177ELF", 4) != 0) {
m_errorString = QLibrary::tr("'%1' is not an ELF object") m_errorString = tr("'%1' is not an ELF object").arg(QDir::toNativeSeparators(m_binary));
.arg(m_binary);
return NotElf; return NotElf;
} }
@@ -182,8 +187,7 @@ ElfReader::Result ElfReader::readIt()
m_elfData.elfclass = ElfClass(mapper.start[4]); m_elfData.elfclass = ElfClass(mapper.start[4]);
const bool is64Bit = m_elfData.elfclass == Elf_ELFCLASS64; const bool is64Bit = m_elfData.elfclass == Elf_ELFCLASS64;
if (m_elfData.elfclass != Elf_ELFCLASS32 && 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)") m_errorString = msgInvalidElfObject(m_binary, tr("odd cpu architecture"));
.arg(m_binary).arg(QLatin1String("odd cpu architecture"));
return Corrupt; return Corrupt;
} }
@@ -202,8 +206,7 @@ ElfReader::Result ElfReader::readIt()
// Read Endianess. // Read Endianess.
m_elfData.endian = ElfEndian(mapper.ustart[5]); m_elfData.endian = ElfEndian(mapper.ustart[5]);
if (m_elfData.endian != Elf_ELFDATA2LSB && m_elfData.endian != Elf_ELFDATA2MSB) { if (m_elfData.endian != Elf_ELFDATA2LSB && m_elfData.endian != Elf_ELFDATA2MSB) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") m_errorString = msgInvalidElfObject(m_binary, tr("odd endianess"));
.arg(m_binary).arg(QLatin1String("odd endianess"));
return Corrupt; return Corrupt;
} }
@@ -220,8 +223,7 @@ ElfReader::Result ElfReader::readIt()
quint32 e_shsize = getHalfWord(data, m_elfData); quint32 e_shsize = getHalfWord(data, m_elfData);
if (e_shsize > fdlen) { if (e_shsize > fdlen) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") m_errorString = msgInvalidElfObject(m_binary, tr("unexpected e_shsize"));
.arg(m_binary).arg(QLatin1String("unexpected e_shsize"));
return Corrupt; return Corrupt;
} }
@@ -232,8 +234,7 @@ ElfReader::Result ElfReader::readIt()
quint32 e_shentsize = getHalfWord(data, m_elfData); quint32 e_shentsize = getHalfWord(data, m_elfData);
if (e_shentsize % 4) { if (e_shentsize % 4) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") m_errorString = msgInvalidElfObject(m_binary, tr("unexpected e_shentsize"));
.arg(m_binary).arg(QLatin1String("unexpected e_shentsize"));
return Corrupt; return Corrupt;
} }
@@ -242,10 +243,9 @@ ElfReader::Result ElfReader::readIt()
QTC_CHECK(data == mapper.ustart + (is64Bit ? 64 : 52)); QTC_CHECK(data == mapper.ustart + (is64Bit ? 64 : 52));
if (quint64(e_shnum) * e_shentsize > fdlen) { if (quint64(e_shnum) * e_shentsize > fdlen) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") const QString reason = tr("announced %1 sections, each %2 bytes, exceed file size")
.arg(m_binary) .arg(e_shnum).arg(e_shentsize);
.arg(QLatin1String("announced %2 sections, each %3 bytes, exceed file size")) m_errorString = msgInvalidElfObject(m_binary, reason);
.arg(e_shnum).arg(e_shentsize);
return Corrupt; return Corrupt;
} }
@@ -266,10 +266,8 @@ ElfReader::Result ElfReader::readIt()
if (quint32(stringTableFileOffset + e_shentsize) >= fdlen if (quint32(stringTableFileOffset + e_shentsize) >= fdlen
|| stringTableFileOffset == 0) { || stringTableFileOffset == 0) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") const QString reason = tr("string table seems to be at 0x%1").arg(soff, 0, 16);
.arg(m_binary) m_errorString = msgInvalidElfObject(m_binary, reason);
.arg(QLatin1String("string table seems to be at %1"))
.arg(QString::number(soff, 16));
return Corrupt; return Corrupt;
} }
@@ -279,10 +277,9 @@ ElfReader::Result ElfReader::readIt()
parseSectionHeader(s, &sh, m_elfData); parseSectionHeader(s, &sh, m_elfData);
if (stringTableFileOffset + sh.index > fdlen) { if (stringTableFileOffset + sh.index > fdlen) {
m_errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)") const QString reason = tr("section name %1 of %2 behind end of file")
.arg(m_binary) .arg(i).arg(e_shnum);
.arg(QLatin1String("section name %2 of %3 behind end of file")) m_errorString = msgInvalidElfObject(m_binary, reason);
.arg(i).arg(e_shnum);
return Corrupt; return Corrupt;
} }

View File

@@ -47,6 +47,7 @@
#include <qendian.h> #include <qendian.h>
#include <qstring.h> #include <qstring.h>
#include <qvector.h> #include <qvector.h>
#include <qcoreapplication.h>
namespace Utils { namespace Utils {
@@ -167,6 +168,7 @@ public:
class QTCREATOR_UTILS_EXPORT ElfReader class QTCREATOR_UTILS_EXPORT ElfReader
{ {
Q_DECLARE_TR_FUNCTIONS(Utils::ElfReader)
public: public:
explicit ElfReader(const QString &binary); explicit ElfReader(const QString &binary);
enum Result { Ok, NotElf, Corrupt }; enum Result { Ok, NotElf, Corrupt };

View File

@@ -221,6 +221,7 @@ int main()
systemError("Wait for debugee failed, error %d\n"); systemError("Wait for debugee failed, error %d\n");
CloseHandle(pi.hProcess); CloseHandle(pi.hProcess);
CloseHandle(pi.hThread); CloseHandle(pi.hThread);
free(env);
doExit(0); doExit(0);
return 0; return 0;
} }

View File

@@ -1518,7 +1518,7 @@ void ServiceBrowserPrivate::startBrowsing(quint32 interfaceIndex)
if (failed || browsing) if (failed || browsing)
return; return;
if (mainConnection.isNull()) { if (mainConnection.isNull()) {
startupPhase(1, q->tr("Starting Zeroconf Browsing")); startupPhase(1, ServiceBrowser::tr("Starting Zeroconf Browsing"));
mainConnection = MainConnectionPtr(new MainConnection(this)); mainConnection = MainConnectionPtr(new MainConnection(this));
} else { } else {
mainConnection->addBrowser(this); mainConnection->addBrowser(this);

View File

@@ -1,6 +1,6 @@
<plugin name=\"AnalyzerBase\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"AnalyzerBase\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Code Analyzer</category> <category>Code Analyzer</category>
<description>Code Analyzer Base Plugin</description> <description>Code Analyzer Base Plugin</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -80,7 +80,7 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout; QFormLayout *formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); 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("Executable:"), d->executable);
formLayout->addRow(tr("Arguments:"), d->arguments); formLayout->addRow(tr("Arguments:"), d->arguments);
formLayout->addRow(tr("Working directory:"), d->workingDirectory); formLayout->addRow(tr("Working directory:"), d->workingDirectory);

View File

@@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Create a keystore and a cetificate</string> <string>Create a keystore and a certificate</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">

View File

@@ -250,12 +250,12 @@ bool AndroidDeployStep::deployPackage()
SLOT(handleBuildError())); SLOT(handleBuildError()));
if (m_runDeployAction == DeployLocal) { if (m_runDeployAction == DeployLocal) {
writeOutput(tr("Clean old qt libs")); writeOutput(tr("Clean old Qt libs"));
runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(), runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
QStringList() << QLatin1String("-s") << m_deviceSerialNumber QStringList() << QLatin1String("-s") << m_deviceSerialNumber
<< QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/qt")); << 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; const QString tempPath = QDir::tempPath() + QLatin1String("/android_qt_libs_") + m_packageName;
AndroidPackageCreationStep::removeDirectory(tempPath); AndroidPackageCreationStep::removeDirectory(tempPath);
QStringList stripFiles; QStringList stripFiles;

View File

@@ -26,7 +26,7 @@
<string>Use devices qt libs</string> <string>Use devices qt libs</string>
</property> </property>
<property name="text"> <property name="text">
<string>Use devices qt libs</string> <string>Use device's Qt libs</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
@@ -42,7 +42,7 @@
You must have Qt libs compiled for that platform</string> You must have Qt libs compiled for that platform</string>
</property> </property>
<property name="text"> <property name="text">
<string>Deploy local qt libs</string> <string>Deploy local Qt libs</string>
</property> </property>
</widget> </widget>
</item> </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> <string>Check this option to force the application to use local qt libs instead of system libs.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Use local qt libs</string> <string>Use local Qt libs</string>
</property> </property>
</widget> </widget>
</item> </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> 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>
<property name="text"> <property name="text">
<string>Install Ministro system wide qt shared libraries installer</string> <string>Install Ministro system wide Qt shared libraries installer</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -33,35 +33,37 @@
#include <QCoreApplication> #include <QCoreApplication>
using namespace ProjectExplorer;
namespace Android { namespace Android {
namespace Internal { namespace Internal {
AndroidDevice::AndroidDevice(): AndroidDevice::AndroidDevice()
ProjectExplorer::IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE), : IDevice(Core::Id(Constants::ANDROID_DEVICE_TYPE),
IDevice::AutoDetected, IDevice::AutoDetected,
IDevice::Hardware, IDevice::Hardware,
Core::Id(Constants::ANDROID_DEVICE_ID)) 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); setDeviceState(DeviceReadyToUse);
} }
AndroidDevice::AndroidDevice(const AndroidDevice &other): AndroidDevice::AndroidDevice(const AndroidDevice &other)
ProjectExplorer::IDevice(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 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; return 0;
} }
@@ -83,9 +85,26 @@ void AndroidDevice::executeAction(Core::Id actionId, QWidget *parent) const
Q_UNUSED(parent) 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 } // namespace Internal

View File

@@ -41,17 +41,19 @@ namespace Internal {
class AndroidDevice : public ProjectExplorer::IDevice class AndroidDevice : public ProjectExplorer::IDevice
{ {
public: public:
ProjectExplorer::IDevice::DeviceInfo deviceInformation() const; ProjectExplorer::IDevice::DeviceInfo deviceInformation() const;
virtual QString displayType() const; QString displayType() const;
virtual ProjectExplorer::IDeviceWidget *createWidget(); ProjectExplorer::IDeviceWidget *createWidget();
virtual QList<Core::Id> actionIds() const; QList<Core::Id> actionIds() const;
virtual QString displayNameForActionId(Core::Id actionId) const; QString displayNameForActionId(Core::Id actionId) const;
virtual void executeAction(Core::Id actionId, QWidget *parent = 0) 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: protected:
friend class AndroidDeviceFactory; friend class AndroidDeviceFactory;

View File

@@ -67,8 +67,7 @@ QList<Core::Id> AndroidPackageCreationFactory::availableCreationIds(ProjectExplo
QString AndroidPackageCreationFactory::displayNameForId(const Core::Id id) const QString AndroidPackageCreationFactory::displayNameForId(const Core::Id id) const
{ {
if (id == AndroidPackageCreationStep::CreatePackageId) if (id == AndroidPackageCreationStep::CreatePackageId)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageCreationFactory", return tr("Create Android (.apk) Package");
"Create Android (.apk) Package");
return QString(); return QString();
} }

View File

@@ -38,6 +38,7 @@ namespace Internal {
class AndroidPackageCreationFactory : public ProjectExplorer::IBuildStepFactory class AndroidPackageCreationFactory : public ProjectExplorer::IBuildStepFactory
{ {
Q_OBJECT
public: public:
explicit AndroidPackageCreationFactory(QObject *parent = 0); explicit AndroidPackageCreationFactory(QObject *parent = 0);

View File

@@ -65,8 +65,7 @@ QList<Core::Id> AndroidPackageInstallationFactory::availableCreationIds(BuildSte
QString AndroidPackageInstallationFactory::displayNameForId(const Core::Id id) const QString AndroidPackageInstallationFactory::displayNameForId(const Core::Id id) const
{ {
if (id == AndroidPackageInstallationStep::Id) if (id == AndroidPackageInstallationStep::Id)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageInstallationFactory", return tr("Deploy to device");
"Deploy to device");
return QString(); return QString();
} }

View File

@@ -34,8 +34,6 @@
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
#include <QCoreApplication>
using namespace Android::Internal; using namespace Android::Internal;
AndroidQtVersion::AndroidQtVersion() AndroidQtVersion::AndroidQtVersion()
@@ -77,7 +75,7 @@ QString AndroidQtVersion::invalidReason() const
{ {
QString tmp = BaseQtVersion::invalidReason(); QString tmp = BaseQtVersion::invalidReason();
if (tmp.isEmpty() && qtAbis().isEmpty()) 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; return tmp;
} }
@@ -90,7 +88,7 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
QString AndroidQtVersion::description() 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 Core::FeatureSet AndroidQtVersion::availableFeatures() const

View File

@@ -30,13 +30,17 @@
#ifndef ANDROIDQTVERSION_H #ifndef ANDROIDQTVERSION_H
#define ANDROIDQTVERSION_H #define ANDROIDQTVERSION_H
#include <qtsupport/baseqtversion.h> #include <qtsupport/baseqtversion.h>
#include <QCoreApplication>
namespace Android { namespace Android {
namespace Internal { namespace Internal {
class AndroidQtVersion : public QtSupport::BaseQtVersion class AndroidQtVersion : public QtSupport::BaseQtVersion
{ {
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidQtVersion)
public: public:
AndroidQtVersion(); AndroidQtVersion();
AndroidQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString()); AndroidQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());

View File

@@ -14,7 +14,7 @@
version 1.1, included in the file LGPL_EXCEPTION.txt in this package.</license> version 1.1, included in the file LGPL_EXCEPTION.txt in this package.</license>
<category>Build Systems</category> <category>Build Systems</category>
<description>Autotools project integration.</description> <description>Autotools project integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -304,7 +304,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments); param.setArguments(arguments);
m_summaryText = param.summary(displayName()); m_summaryText = param.summary(displayName());
} else { } 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(); emit updateSummary();

View File

@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Version Control</category> <category>Version Control</category>
<description>Bazaar integration.</description> <description>Bazaar integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"BinEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"BinEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Binary editor component.</description> <description>Binary editor component.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Bookmarks\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Bookmarks\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Bookmarks in text editors.</description> <description>Bookmarks in text editors.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>C++</category> <category>C++</category>
<description>Class View component.</description> <description>Class View component.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"CppTools\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"CMakeProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"CMakeProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Build Systems</category> <category>Build Systems</category>
<description>CMake support</description> <description>CMake support</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -413,7 +413,8 @@ void CMakeRunPage::initializePage()
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) { if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2005Flavor if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2005Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor || 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")) if (hasCodeBlocksGenerator && (cachedGenerator.isEmpty() || cachedGenerator == "NMake Makefiles"))
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant); m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(p->displayName()), profileVariant);
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) { } else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {

View File

@@ -322,7 +322,7 @@ void MakeStepConfigWidget::updateDetails()
param.setArguments(arguments); param.setArguments(arguments);
m_summaryText = param.summary(displayName()); m_summaryText = param.summary(displayName());
} else { } else {
m_summaryText = tr("<b>No tool chain set for this target</b>"); m_summaryText = QLatin1String("<b>") + ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
} }
emit updateSummary(); emit updateSummary();
} }

View File

@@ -1,6 +1,6 @@
<plugin name=\"Core\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Core\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>The core plugin for the Qt IDE.</description> <description>The core plugin for the Qt IDE.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<argumentList> <argumentList>
<argument name=\"-color\" parameter=\"color\">Override selected UI color</argument> <argument name=\"-color\" parameter=\"color\">Override selected UI color</argument>
<argument name=\"-presentationMode\">Enable presentation mode with pop-ups for key combos</argument> <argument name=\"-presentationMode\">Enable presentation mode with pop-ups for key combos</argument>

View File

@@ -216,7 +216,7 @@ RESOURCES += core.qrc \
win32 { win32 {
SOURCES += progressmanager/progressmanager_win.cpp SOURCES += progressmanager/progressmanager_win.cpp
greaterThan(QT_MAJOR_VERSION, 4): QT += gui-private # Uses QPlatformNativeInterface. greaterThan(QT_MAJOR_VERSION, 4): QT += gui-private # Uses QPlatformNativeInterface.
LIBS += -lole32 LIBS += -lole32 -luser32
} }
else:macx { else:macx {
HEADERS += macfullscreen.h HEADERS += macfullscreen.h

View File

@@ -30,7 +30,8 @@ QtcPlugin {
cpp.dynamicLibraries: { cpp.dynamicLibraries: {
if (qbs.targetOS == "windows") return [ if (qbs.targetOS == "windows") return [
"ole32" "ole32",
"user32"
] ]
} }

View File

@@ -134,6 +134,7 @@ void Core::Internal::ProgressManagerPrivate::setApplicationLabel(const QString &
const HICON icon = pix.toWinHICON(); const HICON icon = pix.toWinHICON();
#endif #endif
pITask->SetOverlayIcon(winId, icon, (wchar_t*)text.utf16()); pITask->SetOverlayIcon(winId, icon, (wchar_t*)text.utf16());
DestroyIcon(icon);
} }
} }

View File

@@ -326,17 +326,44 @@ bool VcsManager::promptToDelete(IVersionControl *vc, const QString &fileName)
return vc->vcsDelete(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) void VcsManager::promptToAdd(const QString &directory, const QStringList &fileNames)
{ {
IVersionControl *vc = findVersionControlForDirectory(directory); IVersionControl *vc = findVersionControlForDirectory(directory);
if (!vc || !vc->supportsOperation(Core::IVersionControl::AddOperation)) if (!vc || !vc->supportsOperation(Core::IVersionControl::AddOperation))
return; return;
const QString files = fileNames.join(QString(QLatin1Char('\n')));
QMessageBox::StandardButton button = QMessageBox::StandardButton button =
QMessageBox::question(Core::ICore::mainWindow(), tr("Add to Version Control"), QMessageBox::question(Core::ICore::mainWindow(), VcsManager::msgAddToVcsTitle(),
tr("Add files\n%1\nto version control (%2)?").arg(files, vc->displayName()), VcsManager::msgPromptToAddToVcs(fileNames, vc),
QMessageBox::Yes | QMessageBox::No); QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) { if (button == QMessageBox::Yes) {
QStringList notAddedToVc; QStringList notAddedToVc;
foreach (const QString &file, fileNames) { foreach (const QString &file, fileNames) {
@@ -345,10 +372,8 @@ void VcsManager::promptToAdd(const QString &directory, const QStringList &fileNa
} }
if (!notAddedToVc.isEmpty()) { if (!notAddedToVc.isEmpty()) {
const QString message = tr("Could not add following files to version control (%1)\n").arg(vc->displayName()); QMessageBox::warning(Core::ICore::mainWindow(), VcsManager::msgAddToVcsFailedTitle(),
const QString filesNotAdded = notAddedToVc.join(QString(QLatin1Char('\n'))); VcsManager::msgToAddToVcsFailed(notAddedToVc, vc));
QMessageBox::warning(Core::ICore::mainWindow(), tr("Adding to Version Control Failed"),
message + filesNotAdded);
} }
} }
} }

View File

@@ -87,6 +87,12 @@ public:
// added to revision control. Calls vcsAdd for each file. // added to revision control. Calls vcsAdd for each file.
void promptToAdd(const QString &directory, const QStringList &fileNames); 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: signals:
void repositoryChanged(const QString &repository); void repositoryChanged(const QString &repository);

View File

@@ -1,6 +1,6 @@
<plugin name=\"CodePaster\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"CodePaster\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage 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. 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> </license>
<description>Codepaster plugin for pushing/fetching diff from server</description> <description>Codepaster plugin for pushing/fetching diff from server</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"CppEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"CppEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>C++</category> <category>C++</category>
<description>C/C++ editor component.</description> <description>C/C++ editor component.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -77,7 +77,7 @@ private:
class FunctionDeclDefLink class FunctionDeclDefLink
{ {
Q_DECLARE_TR_FUNCTIONS(FunctionDeclDefLink) Q_DECLARE_TR_FUNCTIONS(CppEditor::Internal::FunctionDeclDefLink)
Q_DISABLE_COPY(FunctionDeclDefLink) Q_DISABLE_COPY(FunctionDeclDefLink)
public: public:
~FunctionDeclDefLink(); ~FunctionDeclDefLink();

View File

@@ -1,6 +1,6 @@
<plugin name=\"CppTools\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"CppTools\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>C++</category> <category>C++</category>
<description>Tools for analyzing C/C++ code.</description> <description>Tools for analyzing C/C++ code.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"CVS\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"CVS\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Version Control</category> <category>Version Control</category>
<description>CVS integration.</description> <description>CVS integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Debugger\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Debugger\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Debugger integration.</description> <description>Debugger integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -363,7 +363,8 @@ static inline bool isMsvcFlavor(Abi::OSFlavor osf)
{ {
return osf == Abi::WindowsMsvc2005Flavor return osf == Abi::WindowsMsvc2005Flavor
|| osf == Abi::WindowsMsvc2008Flavor || osf == Abi::WindowsMsvc2008Flavor
|| osf == Abi::WindowsMsvc2010Flavor; || osf == Abi::WindowsMsvc2010Flavor
|| osf == Abi::WindowsMsvc2012Flavor;
} }
bool checkCdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck *check) bool checkCdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck *check)

View File

@@ -204,7 +204,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
d(new AttachExternalDialogPrivate) d(new AttachExternalDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger", 0, QApplication::UnicodeUTF8)); setWindowTitle(tr("Start Debugger"));
setMinimumHeight(500); setMinimumHeight(500);
d->selfPid = QString::number(QCoreApplication::applicationPid()); d->selfPid = QString::number(QCoreApplication::applicationPid());
@@ -1243,7 +1243,7 @@ StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
QFormLayout *formLayout = new QFormLayout(); QFormLayout *formLayout = new QFormLayout();
formLayout->addRow(tr("&Host:"), d->host); 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("&Password:"), d->password);
formLayout->addRow(tr("&Engine path:"), d->enginePath); formLayout->addRow(tr("&Engine path:"), d->enginePath);
formLayout->addRow(tr("&Inferior path:"), d->inferiorPath); formLayout->addRow(tr("&Inferior path:"), d->inferiorPath);

View File

@@ -1604,11 +1604,15 @@ struct RemoteCdbMatcher : ProfileMatcher
ToolChain *tc = ToolChainProfileInformation::toolChain(profile); ToolChain *tc = ToolChainProfileInformation::toolChain(profile);
QTC_ASSERT(tc, return false); QTC_ASSERT(tc, return false);
Abi abi = tc->targetAbi(); Abi abi = tc->targetAbi();
return abi.architecture() == m_hostAbi.architecture() if (abi.architecture() != m_hostAbi.architecture()
&& abi.os() == Abi::WindowsOS || abi.os() != Abi::WindowsOS
&& abi.osFlavor() == Abi::WindowsMsvc2010Flavor || abi.binaryFormat() != Abi::PEFormat
&& abi.binaryFormat() == Abi::PEFormat || abi.wordWidth() != m_hostAbi.wordWidth())
&& abi.wordWidth() == m_hostAbi.wordWidth(); return false;
if (abi.osFlavor() == Abi::WindowsMSysFlavor
|| abi.osFlavor() == Abi::WindowsCEFlavor)
return false;
return true;
} }
Abi m_hostAbi; Abi m_hostAbi;

View File

@@ -1334,6 +1334,7 @@ QByteArray LocalNameNode::toByteArray() const
name = encodingNode->toByteArray(); name = encodingNode->toByteArray();
name.append("::{default arg#").append(QByteArray::number(argNumber)).append("}::") name.append("::{default arg#").append(QByteArray::number(argNumber)).append("}::")
.append(MY_CHILD_AT(childCount() - 1)->toByteArray()); .append(MY_CHILD_AT(childCount() - 1)->toByteArray());
hasDiscriminator = false;
} else if (m_isStringLiteral) { } else if (m_isStringLiteral) {
name = CHILD_TO_BYTEARRAY(0) + "::{string literal}"; name = CHILD_TO_BYTEARRAY(0) + "::{string literal}";
hasDiscriminator = childCount() == 2; hasDiscriminator = childCount() == 2;

View File

@@ -62,7 +62,7 @@ public:
quint64 address; quint64 address;
bool usable; bool usable;
Q_DECLARE_TR_FUNCTIONS(StackHandler) Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::StackHandler)
}; };
QDebug operator<<(QDebug d, const StackFrame &frame); QDebug operator<<(QDebug d, const StackFrame &frame);

View File

@@ -394,7 +394,7 @@ QString WatchData::toToolTip() const
formatToolTipRow(str, tr("Referencing Address"), formatToolTipRow(str, tr("Referencing Address"),
QString::fromLatin1(hexReferencingAddress())); QString::fromLatin1(hexReferencingAddress()));
if (size) 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)); formatToolTipRow(str, tr("Internal ID"), QLatin1String(iname));
str << "</table></body></html>"; str << "</table></body></html>";
return res; return res;

View File

@@ -1,6 +1,6 @@
<plugin name=\"Designer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Designer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Qt Designer integration.</description> <description>Qt Designer integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<!-- For compiling with CPP support enabled --> <!-- For compiling with CPP support enabled -->

View File

@@ -9,11 +9,8 @@ include(designer_dependencies.pri)
INCLUDEPATH += ../../tools/utils INCLUDEPATH += ../../tools/utils
minQtVersion(5, 0, 0) { greaterThan(QT_MAJOR_VERSION, 4) {
CONFIG += designer QT += printsupport designer
# -- Fixme: Make tools available
INCLUDEPATH += $$QMAKE_INCDIR_QT/../../qttools/include
QT += printsupport
} else { } else {
# -- figure out shared dir location # -- figure out shared dir location
!exists($$[QT_INSTALL_HEADERS]/QtDesigner/private/qdesigner_integration_p.h) { !exists($$[QT_INSTALL_HEADERS]/QtDesigner/private/qdesigner_integration_p.h) {

View File

@@ -1,6 +1,6 @@
<plugin name=\"FakeVim\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"FakeVim\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage 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. 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> </license>
<description>VI-style keyboard navigation.</description> <description>VI-style keyboard navigation.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Find\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Find\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Provides the find widget and the hooks for find implementations.</description> <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> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList> </dependencyList>

View File

@@ -1,6 +1,6 @@
<plugin name=\"GenericProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"GenericProjectManager\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Build Systems</category> <category>Build Systems</category>
<description>Generic support</description> <description>Generic support</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Git\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Git\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Version Control</category> <category>Version Control</category>
<description>Git integration.</description> <description>Git integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -189,6 +189,7 @@ int GerritPatchSet::approvalLevel() const
QString GerritChange::toHtml() const QString GerritChange::toHtml() const
{ {
// Keep in sync with list model headers.
static const QString format = GerritModel::tr( static const QString format = GerritModel::tr(
"<html><head/><body><table>" "<html><head/><body><table>"
"<tr><td>Subject</td><td>%1</td></tr>" "<tr><td>Subject</td><td>%1</td></tr>"
@@ -381,9 +382,9 @@ GerritModel::GerritModel(const QSharedPointer<GerritParameters> &p, QObject *par
, m_parameters(p) , m_parameters(p)
, m_query(0) , m_query(0)
{ {
QStringList headers; QStringList headers; // Keep in sync with GerritChange::toHtml()
headers << QLatin1String("#") << tr("Title") << tr("Owner") headers << QLatin1String("#") << tr("Subject") << tr("Owner")
<< tr("Date") << tr("Project") << tr("Updated") << tr("Project")
<< tr("Approvals") << tr("Status"); << tr("Approvals") << tr("Status");
setHorizontalHeaderLabels(headers); setHorizontalHeaderLabels(headers);
} }

View File

@@ -1040,9 +1040,8 @@ bool GitClient::synchronousParentRevisions(const QString &workingDirectory,
QByteArray outputTextData; QByteArray outputTextData;
QByteArray errorText; QByteArray errorText;
QStringList arguments; QStringList arguments;
if (parents && (revision == QLatin1String("00000000"))) { // Not Committed Yet if (parents && !isValidRevision(revision)) { // Not Committed Yet
parents->clear(); *parents = QStringList(QLatin1String("HEAD"));
parents->append(QLatin1String("HEAD"));
return true; return true;
} }
arguments << QLatin1String("rev-list") << QLatin1String(GitClient::noColorOption) arguments << QLatin1String("rev-list") << QLatin1String(GitClient::noColorOption)
@@ -1450,6 +1449,16 @@ QProcessEnvironment GitClient::processEnvironment() const
return environment; 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 // Synchronous git execution using Utils::SynchronousProcess, with
// log windows updating. // log windows updating.
Utils::SynchronousProcessResponse GitClient::synchronousGit(const QString &workingDirectory, Utils::SynchronousProcessResponse GitClient::synchronousGit(const QString &workingDirectory,

View File

@@ -220,6 +220,8 @@ public:
QProcessEnvironment processEnvironment() const; QProcessEnvironment processEnvironment() const;
bool isValidRevision(const QString &revision) const;
static QString msgNoChangedFiles(); static QString msgNoChangedFiles();
static const char *noColorOption; static const char *noColorOption;

View File

@@ -250,6 +250,11 @@ QStringList GitEditor::annotationPreviousVersions(const QString &revision) const
return revisions; return revisions;
} }
bool GitEditor::isValidRevision(const QString &revision) const
{
return GitPlugin::instance()->gitClient()->isValidRevision(revision);
}
} // namespace Internal } // namespace Internal
} // namespace Git } // namespace Git

View File

@@ -63,6 +63,7 @@ private:
virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const; virtual QString fileNameFromDiffSpecification(const QTextBlock &diffFileName) const;
virtual QString decorateVersion(const QString &revision) const; virtual QString decorateVersion(const QString &revision) const;
virtual QStringList annotationPreviousVersions(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_changeNumberPattern8;
mutable QRegExp m_changeNumberPattern40; mutable QRegExp m_changeNumberPattern40;

View File

@@ -1,6 +1,6 @@
<plugin name=\"GLSLEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"GLSLEditor\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>GLSL</category> <category>GLSL</category>
<description>Editor for GLSL.</description> <description>Editor for GLSL.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"HelloWorld\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\" experimental=\"true\"> <plugin name=\"HelloWorld\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\" experimental=\"true\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage 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. 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> </license>
<description>Hello World sample plugin.</description> <description>Hello World sample plugin.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList> </dependencyList>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Help\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Help\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Help system.</description> <description>Help system.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -3,8 +3,10 @@ TARGET = Help
QT += network QT += network
greaterThan(QT_MAJOR_VERSION, 4) { greaterThan(QT_MAJOR_VERSION, 4) {
QT += printsupport QT += printsupport help
DEFINES += QT_NO_WEBKIT DEFINES += QT_NO_WEBKIT
} else {
CONFIG += help
} }
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
@@ -12,7 +14,6 @@ INCLUDEPATH += $$PWD
include(../../qtcreatorplugin.pri) include(../../qtcreatorplugin.pri)
include(help_dependencies.pri) include(help_dependencies.pri)
CONFIG += help
DEFINES += QT_CLUCENE_SUPPORT HELP_LIBRARY DEFINES += QT_CLUCENE_SUPPORT HELP_LIBRARY
HEADERS += \ HEADERS += \

View File

@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Image Viewer component.</description> <description>Image Viewer component.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList> </dependencyList>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Locator\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Locator\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Provides the Locator widget and the hooks for Locator filter implementations.</description> <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> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList> </dependencyList>

View File

@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>Macros in text editors.</description> <description>Macros in text editors.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Locator\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Locator\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Madde\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Madde\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<description>Support for MADDE-based platforms, including Fremantle and MeeGo 1.2 Harmattan.</description> <description>Support for MADDE-based platforms, including Fremantle and MeeGo 1.2 Harmattan.</description>
<category>Device Support</category> <category>Device Support</category>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"RemoteLinux\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"RemoteLinux\" version=\"$$QTCREATOR_VERSION\"/>
</dependencyList> </dependencyList>

View File

@@ -127,8 +127,7 @@ QByteArray section(Core::Id deviceType) {
void raiseError(const QString &reason) void raiseError(const QString &reason)
{ {
QMessageBox::critical(0, QCoreApplication::translate("Madde::DebianManager", QMessageBox::critical(0, Madde::Internal::DebianManager::tr("Error Creating Debian Project Templates"), reason);
"Error creating debian project templates"), reason);
} }
QString defaultPackageFileName(ProjectExplorer::Project *project) QString defaultPackageFileName(ProjectExplorer::Project *project)

View File

@@ -32,13 +32,14 @@
#include "maddedevicetester.h" #include "maddedevicetester.h"
#include "maemoconstants.h" #include "maemoconstants.h"
#include <projectexplorer/devicesupport/deviceprocessesdialog.h>
#include <projectexplorer/devicesupport/deviceprocesslist.h>
#include <remotelinux/linuxdevicetestdialog.h> #include <remotelinux/linuxdevicetestdialog.h>
#include <remotelinux/publickeydeploymentdialog.h> #include <remotelinux/publickeydeploymentdialog.h>
#include <remotelinux/remotelinuxprocessesdialog.h>
#include <remotelinux/remotelinuxprocesslist.h>
#include <remotelinux/remotelinux_constants.h> #include <remotelinux/remotelinux_constants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
using namespace ProjectExplorer;
using namespace RemoteLinux; using namespace RemoteLinux;
namespace Madde { namespace Madde {
@@ -106,14 +107,14 @@ void MaddeDevice::executeAction(Core::Id actionId, QWidget *parent) const
QTC_ASSERT(actionIds().contains(actionId), return); QTC_ASSERT(actionIds().contains(actionId), return);
QDialog *d = 0; QDialog *d = 0;
const LinuxDeviceConfiguration::ConstPtr device const IDevice::ConstPtr device = sharedFromThis();
= sharedFromThis().staticCast<const LinuxDeviceConfiguration>();
if (actionId == Core::Id(MaddeDeviceTestActionId)) if (actionId == Core::Id(MaddeDeviceTestActionId))
d = new LinuxDeviceTestDialog(device, new MaddeDeviceTester, parent); d = new LinuxDeviceTestDialog(device, new MaddeDeviceTester, parent);
else if (actionId == Core::Id(MaddeRemoteProcessesActionId)) 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)) else if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
d = PublicKeyDeploymentDialog::createDialog(device, parent); d = PublicKeyDeploymentDialog::createDialog(device, parent);
// FIXME: Leak?
if (d) if (d)
d->exec(); d->exec();
} }

View File

@@ -39,7 +39,7 @@ namespace Internal {
class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration class MaddeDevice : public RemoteLinux::LinuxDeviceConfiguration
{ {
Q_DECLARE_TR_FUNCTIONS(MaddeDevice) Q_DECLARE_TR_FUNCTIONS(Madde::Internal::MaddeDevice)
public: public:
typedef QSharedPointer<MaddeDevice> Ptr; typedef QSharedPointer<MaddeDevice> Ptr;
typedef QSharedPointer<const MaddeDevice> ConstPtr; typedef QSharedPointer<const MaddeDevice> ConstPtr;

View File

@@ -35,7 +35,6 @@
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/profileinformation.h> #include <projectexplorer/profileinformation.h>
#include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <ssh/sshconnection.h> #include <ssh/sshconnection.h>
@@ -49,8 +48,7 @@ namespace Internal {
MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent) MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
: QObject(parent), : QObject(parent),
m_state(Inactive), m_state(Inactive),
m_mounter(new MaemoRemoteMounter(this)), m_mounter(new MaemoRemoteMounter(this))
m_portsGatherer(new RemoteLinuxUsedPortsGatherer(this))
{ {
connect(m_mounter, SIGNAL(error(QString)), SLOT(handleMountError(QString))); connect(m_mounter, SIGNAL(error(QString)), SLOT(handleMountError(QString)));
connect(m_mounter, SIGNAL(mounted()), SLOT(handleMounted())); connect(m_mounter, SIGNAL(mounted()), SLOT(handleMounted()));
@@ -59,11 +57,6 @@ MaemoDeploymentMounter::MaemoDeploymentMounter(QObject *parent)
SIGNAL(reportProgress(QString))); SIGNAL(reportProgress(QString)));
connect(m_mounter, SIGNAL(debugOutput(QString)), connect(m_mounter, SIGNAL(debugOutput(QString)),
SIGNAL(debugOutput(QString))); SIGNAL(debugOutput(QString)));
connect(m_portsGatherer, SIGNAL(error(QString)),
SLOT(handlePortsGathererError(QString)));
connect(m_portsGatherer, SIGNAL(portListReady()),
SLOT(handlePortListReady()));
} }
MaemoDeploymentMounter::~MaemoDeploymentMounter() {} MaemoDeploymentMounter::~MaemoDeploymentMounter() {}
@@ -78,7 +71,7 @@ void MaemoDeploymentMounter::setupMounts(SshConnection *connection,
m_connection = connection; m_connection = connection;
m_profile = profile; m_profile = profile;
m_devConf = DeviceProfileInformation::device(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())); connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
setState(UnmountingOldDirs); setState(UnmountingOldDirs);
unmount(); unmount();
@@ -99,7 +92,6 @@ void MaemoDeploymentMounter::setupMounter()
setState(UnmountingCurrentDirs); setState(UnmountingCurrentDirs);
m_mounter->resetMountSpecifications(); m_mounter->resetMountSpecifications();
m_mounter->setProfile(m_profile);
foreach (const MaemoMountSpecification &mountSpec, m_mountSpecs) foreach (const MaemoMountSpecification &mountSpec, m_mountSpecs)
m_mounter->addMountSpecification(mountSpec, true); m_mounter->addMountSpecification(mountSpec, true);
unmount(); unmount();
@@ -137,8 +129,8 @@ void MaemoDeploymentMounter::handleUnmounted()
setupMounter(); setupMounter();
break; break;
case UnmountingCurrentDirs: case UnmountingCurrentDirs:
setState(GatheringPorts); setState(Mounting);
m_portsGatherer->start(m_devConf); m_mounter->mount();
break; break;
case UnmountingCurrentMounts: case UnmountingCurrentMounts:
setState(Inactive); 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) void MaemoDeploymentMounter::handleMountError(const QString &errorMsg)
{ {
QTC_ASSERT(m_state == UnmountingOldDirs || m_state == UnmountingCurrentDirs QTC_ASSERT(m_state == UnmountingOldDirs || m_state == UnmountingCurrentDirs

View File

@@ -40,7 +40,7 @@
namespace ProjectExplorer { class Profile; } namespace ProjectExplorer { class Profile; }
namespace QSsh { class SshConnection; } namespace QSsh { class SshConnection; }
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; } namespace Utils { class FileName; }
namespace Madde { namespace Madde {
namespace Internal { namespace Internal {
@@ -70,13 +70,11 @@ private slots:
void handleMounted(); void handleMounted();
void handleUnmounted(); void handleUnmounted();
void handleMountError(const QString &errorMsg); void handleMountError(const QString &errorMsg);
void handlePortsGathererError(const QString &errorMsg);
void handlePortListReady();
void handleConnectionError(); void handleConnectionError();
private: private:
enum State { enum State {
Inactive, UnmountingOldDirs, UnmountingCurrentDirs, GatheringPorts, Inactive, UnmountingOldDirs, UnmountingCurrentDirs,
Mounting, Mounted, UnmountingCurrentMounts Mounting, Mounted, UnmountingCurrentMounts
}; };
@@ -88,8 +86,6 @@ private:
QSsh::SshConnection *m_connection; QSsh::SshConnection *m_connection;
ProjectExplorer::IDevice::ConstPtr m_devConf; ProjectExplorer::IDevice::ConstPtr m_devConf;
MaemoRemoteMounter * const m_mounter; MaemoRemoteMounter * const m_mounter;
RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
Utils::PortList m_freePorts;
QList<MaemoMountSpecification> m_mountSpecs; QList<MaemoMountSpecification> m_mountSpecs;
const ProjectExplorer::Profile *m_profile; const ProjectExplorer::Profile *m_profile;
}; };

View File

@@ -176,6 +176,11 @@ QString MaemoGlobal::maddeRoot(const QString &qmakePath)
return dir.absolutePath(); return dir.absolutePath();
} }
Utils::FileName MaemoGlobal::maddeRoot(const Profile *profile)
{
return SysRootProfileInformation::sysRoot(profile).parentDir().parentDir();
}
QString MaemoGlobal::targetRoot(const QString &qmakePath) QString MaemoGlobal::targetRoot(const QString &qmakePath)
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN

View File

@@ -33,6 +33,7 @@
#include <coreplugin/id.h> #include <coreplugin/id.h>
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
#include <utils/fileutils.h>
#include <utils/portlist.h> #include <utils/portlist.h>
#include <utils/environment.h> #include <utils/environment.h>
@@ -98,6 +99,7 @@ public:
static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath); static void addMaddeEnvironment(Utils::Environment &env, const QString &qmakePath);
static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath); static void transformMaddeCall(QString &command, QStringList &args, const QString &qmakePath);
static QString maddeRoot(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 targetRoot(const QString &qmakePath);
static QString targetName(const QString &qmakePath); static QString targetName(const QString &qmakePath);
static QString madCommand(const QString &qmakePath); static QString madCommand(const QString &qmakePath);

View File

@@ -312,8 +312,10 @@ void MaemoPublisherFremantleFree::handleProcessFinished(bool failedToStart)
// Toolchain might be null! (yes because this sucks) // Toolchain might be null! (yes because this sucks)
ProjectExplorer::ToolChain *tc ProjectExplorer::ToolChain *tc
= ProjectExplorer::ToolChainProfileInformation::toolChain(m_buildConfig->target()->profile()); = ProjectExplorer::ToolChainProfileInformation::toolChain(m_buildConfig->target()->profile());
if (!tc) if (!tc) {
finishWithFailure(QString(), tr("Make distclean failed. No toolchain in profile.")); finishWithFailure(QString(), tr("Make distclean failed: %1")
.arg(ProjectExplorer::ToolChainProfileInformation::msgNoToolChainInTarget()));
}
m_process->start(tc->makeCommand(), QStringList() << QLatin1String("distclean")); m_process->start(tc->makeCommand(), QStringList() << QLatin1String("distclean"));
} }
break; break;

View File

@@ -33,10 +33,7 @@
#include "maemoglobal.h" #include "maemoglobal.h"
#include "maddedevice.h" #include "maddedevice.h"
#include <projectexplorer/profileinformation.h> #include <ssh/sshremoteprocessrunner.h>
#include <projectexplorer/target.h>
#include <ssh/sshconnection.h>
#include <ssh/sshremoteprocess.h>
#include <remotelinux/remotelinuxusedportsgatherer.h> #include <remotelinux/remotelinuxusedportsgatherer.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -51,10 +48,19 @@ namespace Madde {
namespace Internal { namespace Internal {
MaemoRemoteMounter::MaemoRemoteMounter(QObject *parent) 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, connect(m_utfsServerTimer, SIGNAL(timeout()), SLOT(handleUtfsServerTimeout()));
SLOT(handleUtfsServerTimeout())); connect(m_portsGatherer, SIGNAL(error(QString)),
SLOT(handlePortsGathererError(QString)));
connect(m_portsGatherer, SIGNAL(portListReady()),
SLOT(handlePortListReady()));
m_utfsServerTimer->setSingleShot(true); m_utfsServerTimer->setSingleShot(true);
} }
@@ -63,22 +69,12 @@ MaemoRemoteMounter::~MaemoRemoteMounter()
killAllUtfsServers(); killAllUtfsServers();
} }
void MaemoRemoteMounter::setConnection(SshConnection *connection, void MaemoRemoteMounter::setParameters(const IDevice::ConstPtr &devConf, const FileName &maddeRoot)
const IDevice::ConstPtr &devConf)
{ {
QTC_ASSERT(m_state == Inactive, return); QTC_ASSERT(m_state == Inactive, return);
m_connection = connection;
m_devConf = devConf; m_devConf = devConf;
} m_maddeRoot = maddeRoot;
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);
} }
void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec, void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mountSpec,
@@ -86,7 +82,7 @@ void MaemoRemoteMounter::addMountSpecification(const MaemoMountSpecification &mo
{ {
QTC_ASSERT(m_state == Inactive, return); QTC_ASSERT(m_state == Inactive, return);
if (m_remoteMountsAllowed && mountSpec.isValid()) if (MaddeDevice::allowsRemoteMounts(m_devConf->type()) && mountSpec.isValid())
m_mountSpecs << MountInfo(mountSpec, mountAsRoot); m_mountSpecs << MountInfo(mountSpec, mountAsRoot);
} }
@@ -95,22 +91,18 @@ bool MaemoRemoteMounter::hasValidMountSpecifications() const
return !m_mountSpecs.isEmpty(); return !m_mountSpecs.isEmpty();
} }
void MaemoRemoteMounter::mount(PortList *freePorts, void MaemoRemoteMounter::mount()
const RemoteLinuxUsedPortsGatherer *portsGatherer)
{ {
QTC_ASSERT(m_state == Inactive, return); QTC_ASSERT(m_state == Inactive, return);
Q_ASSERT(m_utfsServers.isEmpty()); Q_ASSERT(m_utfsServers.isEmpty());
Q_ASSERT(m_connection);
if (m_mountSpecs.isEmpty()) { if (m_mountSpecs.isEmpty()) {
setState(Inactive); setState(Inactive);
emit reportProgress(tr("No directories to mount")); emit reportProgress(tr("No directories to mount"));
emit mounted(); emit mounted();
} else { } else {
m_freePorts = freePorts; m_portsGatherer->start(m_devConf);
m_portsGatherer = portsGatherer;
startUtfsClients();
} }
} }
@@ -126,17 +118,15 @@ void MaemoRemoteMounter::unmount()
QString remoteCall; QString remoteCall;
const QString remoteSudo = MaemoGlobal::remoteSudo(m_devConf->type(), 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) { for (int i = 0; i < m_mountSpecs.count(); ++i) {
remoteCall += QString::fromLatin1("%1 umount %2 && %1 rmdir %2;") remoteCall += QString::fromLatin1("%1 umount %2 && %1 rmdir %2;")
.arg(remoteSudo, m_mountSpecs.at(i).mountSpec.remoteMountPoint); .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); 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) void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus)
@@ -153,8 +143,7 @@ void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus)
errorMsg = tr("Could not execute unmount request."); errorMsg = tr("Could not execute unmount request.");
break; break;
case SshRemoteProcess::CrashExit: case SshRemoteProcess::CrashExit:
errorMsg = tr("Failure unmounting: %1") errorMsg = tr("Failure unmounting: %1").arg(m_unmountProcess->processErrorString());
.arg(m_unmountProcess->errorString());
break; break;
case SshRemoteProcess::NormalExit: case SshRemoteProcess::NormalExit:
break; break;
@@ -183,17 +172,19 @@ void MaemoRemoteMounter::stop()
void MaemoRemoteMounter::startUtfsClients() 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(), const QString chmodFuse = MaemoGlobal::remoteSudo(m_devConf->type(),
userName) + QLatin1String(" chmod a+r+w /dev/fuse"); userName) + QLatin1String(" chmod a+r+w /dev/fuse");
const QString chmodUtfsClient const QString chmodUtfsClient
= QLatin1String("chmod a+x ") + utfsClientOnDevice(); = QLatin1String("chmod a+x ") + utfsClientOnDevice();
const QLatin1String andOp(" && "); const QLatin1String andOp(" && ");
QString remoteCall = chmodFuse + andOp + chmodUtfsClient; QString remoteCall = chmodFuse + andOp + chmodUtfsClient;
PortList ports = m_devConf->freePorts();
for (int i = 0; i < m_mountSpecs.count(); ++i) { for (int i = 0; i < m_mountSpecs.count(); ++i) {
MountInfo &mountInfo = m_mountSpecs[i]; MountInfo &mountInfo = m_mountSpecs[i];
mountInfo.remotePort mountInfo.remotePort = m_portsGatherer->getNextFreePort(&ports);
= m_portsGatherer->getNextFreePort(m_freePorts);
if (mountInfo.remotePort == -1) { if (mountInfo.remotePort == -1) {
setState(Inactive); setState(Inactive);
emit error(tr("Error: Not enough free ports on device to fulfill all mount requests.")); 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...")); 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); 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() void MaemoRemoteMounter::handleUtfsClientsStarted()
@@ -250,13 +237,12 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
return; return;
setState(Inactive); setState(Inactive);
if (exitStatus == SshRemoteProcess::NormalExit if (exitStatus == SshRemoteProcess::NormalExit && m_mountProcess->processExitCode() == 0) {
&& m_mountProcess->exitCode() == 0) {
emit reportProgress(tr("Mount operation succeeded.")); emit reportProgress(tr("Mount operation succeeded."));
emit mounted(); emit mounted();
} else { } else {
QString errMsg = tr("Failure running UTFS client: %1") QString errMsg = tr("Failure running UTFS client: %1")
.arg(m_mountProcess->errorString()); .arg(m_mountProcess->processErrorString());
const QByteArray &mountStderr = m_mountProcess->readAllStandardError(); const QByteArray &mountStderr = m_mountProcess->readAllStandardError();
if (!mountStderr.isEmpty()) if (!mountStderr.isEmpty())
errMsg += tr("\nstderr was: '%1'").arg(QString::fromUtf8(mountStderr)); errMsg += tr("\nstderr was: '%1'").arg(QString::fromUtf8(mountStderr));
@@ -282,7 +268,7 @@ void MaemoRemoteMounter::startUtfsServers()
const QString remoteSecretOpt = QLatin1String("-r"); const QString remoteSecretOpt = QLatin1String("-r");
const QStringList utfsServerArgs = QStringList() << localSecretOpt const QStringList utfsServerArgs = QStringList() << localSecretOpt
<< port << remoteSecretOpt << port << QLatin1String("-c") << port << remoteSecretOpt << port << QLatin1String("-c")
<< (m_connection->connectionParameters().host + QLatin1Char(':') + port) << (m_devConf->sshParameters().host + QLatin1Char(':') + port)
<< mountSpec.localDir; << mountSpec.localDir;
connect(utfsServerProc.data(), connect(utfsServerProc.data(),
SIGNAL(finished(int,QProcess::ExitStatus)), this, SIGNAL(finished(int,QProcess::ExitStatus)), this,
@@ -298,6 +284,21 @@ void MaemoRemoteMounter::startUtfsServers()
setState(UtfsServersStarted); 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() void MaemoRemoteMounter::handleUtfsServerStderr()
{ {
if (m_state != Inactive) { if (m_state != Inactive) {
@@ -373,16 +374,14 @@ void MaemoRemoteMounter::handleUtfsServerTimeout()
void MaemoRemoteMounter::setState(State newState) void MaemoRemoteMounter::setState(State newState)
{ {
if (newState == m_state)
return;
if (newState == Inactive) { if (newState == Inactive) {
m_utfsServerTimer->stop(); m_utfsServerTimer->stop();
if (m_mountProcess) { disconnect(m_mountProcess, 0, this, 0);
disconnect(m_mountProcess.data(), 0, this, 0); m_mountProcess->cancel();
m_mountProcess->close(); disconnect(m_unmountProcess, 0, this, 0);
} m_unmountProcess->cancel();
if (m_unmountProcess) {
disconnect(m_unmountProcess.data(), 0, this, 0);
m_unmountProcess->close();
}
} }
m_state = newState; m_state = newState;
} }

View File

@@ -44,14 +44,9 @@
QT_FORWARD_DECLARE_CLASS(QTimer) QT_FORWARD_DECLARE_CLASS(QTimer)
namespace QSsh { namespace QSsh { class SshRemoteProcessRunner; }
class SshConnection;
class SshRemoteProcess;
}
namespace ProjectExplorer { class Profile; }
namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; } namespace RemoteLinux { class RemoteLinuxUsedPortsGatherer; }
namespace Utils { class PortList; }
namespace Madde { namespace Madde {
namespace Internal { namespace Internal {
@@ -60,20 +55,16 @@ class MaemoRemoteMounter : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
MaemoRemoteMounter(QObject *parent); MaemoRemoteMounter(QObject *parent = 0);
~MaemoRemoteMounter(); ~MaemoRemoteMounter();
// Must already be connected. void setParameters(const ProjectExplorer::IDevice::ConstPtr &devConf,
void setConnection(QSsh::SshConnection *connection, const Utils::FileName &fileName);
const ProjectExplorer::IDevice::ConstPtr &devConf);
void setProfile(const ProjectExplorer::Profile *profile);
void addMountSpecification(const MaemoMountSpecification &mountSpec, void addMountSpecification(const MaemoMountSpecification &mountSpec,
bool mountAsRoot); bool mountAsRoot);
bool hasValidMountSpecifications() const; bool hasValidMountSpecifications() const;
void resetMountSpecifications() { m_mountSpecs.clear(); } void resetMountSpecifications() { m_mountSpecs.clear(); }
void mount(Utils::PortList *freePorts, void mount();
const RemoteLinux::RemoteLinuxUsedPortsGatherer *portsGatherer);
void unmount(); void unmount();
void stop(); void stop();
@@ -94,11 +85,13 @@ private slots:
void handleUtfsServerTimeout(); void handleUtfsServerTimeout();
void handleUtfsServerStderr(); void handleUtfsServerStderr();
void startUtfsServers(); void startUtfsServers();
void handlePortsGathererError(const QString &errorMsg);
void handlePortListReady();
private: private:
enum State { enum State {
Inactive, Unmounting, UtfsClientsStarting, UtfsClientsStarted, Inactive, Unmounting, UtfsClientsStarting, UtfsClientsStarted,
UtfsServersStarted UtfsServersStarted, GatheringPorts
}; };
void setState(State newState); void setState(State newState);
@@ -119,18 +112,15 @@ private:
int remotePort; int remotePort;
}; };
QSsh::SshConnection *m_connection;
ProjectExplorer::IDevice::ConstPtr m_devConf; ProjectExplorer::IDevice::ConstPtr m_devConf;
QList<MountInfo> m_mountSpecs; QList<MountInfo> m_mountSpecs;
QSharedPointer<QSsh::SshRemoteProcess> m_mountProcess; QSsh::SshRemoteProcessRunner * const m_mountProcess;
QSharedPointer<QSsh::SshRemoteProcess> m_unmountProcess; QSsh::SshRemoteProcessRunner * const m_unmountProcess;
typedef QSharedPointer<QProcess> ProcPtr; typedef QSharedPointer<QProcess> ProcPtr;
QList<ProcPtr> m_utfsServers; QList<ProcPtr> m_utfsServers;
Utils::PortList *m_freePorts; RemoteLinux::RemoteLinuxUsedPortsGatherer * const m_portsGatherer;
const RemoteLinux::RemoteLinuxUsedPortsGatherer *m_portsGatherer;
bool m_remoteMountsAllowed;
Utils::FileName m_maddeRoot; Utils::FileName m_maddeRoot;
State m_state; State m_state;

View File

@@ -28,6 +28,7 @@
**************************************************************************/ **************************************************************************/
#include "maemosshrunner.h" #include "maemosshrunner.h"
#include "maemoglobal.h"
#include "maemoqemumanager.h" #include "maemoqemumanager.h"
#include "maemoremotemounter.h" #include "maemoremotemounter.h"
#include "maemoremotemountsmodel.h" #include "maemoremotemountsmodel.h"
@@ -55,7 +56,7 @@ MaemoSshRunner::MaemoSshRunner(QObject *parent, MaemoRunConfiguration *runConfig
const BuildConfiguration * const bc = runConfig->target()->activeBuildConfiguration(); const BuildConfiguration * const bc = runConfig->target()->activeBuildConfiguration();
Profile *profile = bc ? bc->target()->profile() : 0; Profile *profile = bc ? bc->target()->profile() : 0;
m_qtId = QtSupport::QtProfileInformation::qtVersionId(profile); 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(mounted()), this, SLOT(handleMounted()));
connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted())); connect(m_mounter, SIGNAL(unmounted()), this, SLOT(handleUnmounted()));
connect(m_mounter, SIGNAL(error(QString)), this, connect(m_mounter, SIGNAL(error(QString)), this,
@@ -98,7 +99,6 @@ void MaemoSshRunner::doAdditionalInitialCleanup()
{ {
QTC_ASSERT(m_mountState == InactiveMountState, return); QTC_ASSERT(m_mountState == InactiveMountState, return);
m_mounter->setConnection(connection(), devConfig());
m_mounter->resetMountSpecifications(); m_mounter->resetMountSpecifications();
for (int i = 0; i < m_mountSpecs.count(); ++i) for (int i = 0; i < m_mountSpecs.count(); ++i)
m_mounter->addMountSpecification(m_mountSpecs.at(i), false); m_mounter->addMountSpecification(m_mountSpecs.at(i), false);
@@ -181,7 +181,7 @@ void MaemoSshRunner::mount()
m_mountState = Mounting; m_mountState = Mounting;
if (m_mounter->hasValidMountSpecifications()) { if (m_mounter->hasValidMountSpecifications()) {
emit reportProgress(tr("Mounting host directories...")); emit reportProgress(tr("Mounting host directories..."));
m_mounter->mount(freePorts(), usedPortsGatherer()); m_mounter->mount();
} else { } else {
handleMounted(); handleMounted();
} }

View File

@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Version Control</category> <category>Version Control</category>
<description>Mercurial integration.</description> <description>Mercurial integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"Perforce\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"Perforce\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Version Control</category> <category>Version Control</category>
<description>Perforce integration.</description> <description>Perforce integration.</description>
<url>http://qt.nokia.com</url> <url>http://www.qt-project.org</url>
<dependencyList> <dependencyList>
<dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"TextEditor\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -1,6 +1,6 @@
<plugin name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\"> <plugin name=\"ProjectExplorer\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\">
<vendor>Nokia Corporation</vendor> <vendor>Nokia Corporation</vendor>
<copyright>(C) 2011 Nokia Corporation</copyright> <copyright>(C) 2012 Nokia Corporation</copyright>
<license> <license>
Commercial Usage Commercial Usage
@@ -12,7 +12,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
</license> </license>
<category>Qt Creator</category> <category>Qt Creator</category>
<description>ProjectExplorer framework that can be extended with different kind of project types.</description> <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> <dependencyList>
<dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Core\" version=\"$$QTCREATOR_VERSION\"/>
<dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/> <dependency name=\"Find\" version=\"$$QTCREATOR_VERSION\"/>

View File

@@ -151,8 +151,11 @@ static QList<Abi> parseCoffHeader(const QByteArray &data)
case 10: case 10:
flavor = Abi::WindowsMsvc2010Flavor; flavor = Abi::WindowsMsvc2010Flavor;
break; break;
default: case 11:
// Keep unknown flavor flavor = Abi::WindowsMsvc2012Flavor;
break;
default: // Keep unknown flavor
qWarning("%s: Unknown MSVC flavour encountered.", Q_FUNC_INFO);
break; break;
} }
} }
@@ -403,6 +406,8 @@ Abi::Abi(const QString &abiString) :
m_osFlavor = WindowsMsvc2008Flavor; m_osFlavor = WindowsMsvc2008Flavor;
else if (abiParts.at(2) == QLatin1String("msvc2010") && m_os == WindowsOS) else if (abiParts.at(2) == QLatin1String("msvc2010") && m_os == WindowsOS)
m_osFlavor = WindowsMsvc2010Flavor; 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) else if (abiParts.at(2) == QLatin1String("msys") && m_os == WindowsOS)
m_osFlavor = WindowsMSysFlavor; m_osFlavor = WindowsMSysFlavor;
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS) else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
@@ -585,6 +590,8 @@ QString Abi::toString(const OSFlavor &of)
return QLatin1String("msvc2008"); return QLatin1String("msvc2008");
case ProjectExplorer::Abi::WindowsMsvc2010Flavor: case ProjectExplorer::Abi::WindowsMsvc2010Flavor:
return QLatin1String("msvc2010"); return QLatin1String("msvc2010");
case ProjectExplorer::Abi::WindowsMsvc2012Flavor:
return QLatin1String("msvc2012");
case ProjectExplorer::Abi::WindowsMSysFlavor: case ProjectExplorer::Abi::WindowsMSysFlavor:
return QLatin1String("msys"); return QLatin1String("msys");
case ProjectExplorer::Abi::WindowsCEFlavor: case ProjectExplorer::Abi::WindowsCEFlavor:
@@ -626,7 +633,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
case BsdOS: case BsdOS:
return result << FreeBsdFlavor << OpenBsdFlavor << NetBsdFlavor; return result << FreeBsdFlavor << OpenBsdFlavor << NetBsdFlavor;
case LinuxOS: case LinuxOS:
return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor; return result << GenericLinuxFlavor << HarmattanLinuxFlavor << MaemoLinuxFlavor << MeegoLinuxFlavor
<< AndroidLinuxFlavor;
case MacOS: case MacOS:
return result << GenericMacFlavor; return result << GenericMacFlavor;
case SymbianOS: case SymbianOS:
@@ -635,7 +643,7 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
return result << GenericUnixFlavor << SolarisUnixFlavor; return result << GenericUnixFlavor << SolarisUnixFlavor;
case WindowsOS: case WindowsOS:
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
<< WindowsMSysFlavor << WindowsCEFlavor; << WindowsMsvc2012Flavor << WindowsMSysFlavor << WindowsCEFlavor;
case UnknownOS: case UnknownOS:
return result << UnknownFlavor; return result << UnknownFlavor;
default: default:
@@ -653,7 +661,9 @@ Abi Abi::hostAbi()
#if defined (Q_OS_WIN) #if defined (Q_OS_WIN)
os = WindowsOS; os = WindowsOS;
#if _MSC_VER == 1600 #if _MSC_VER == 1700
subos = WindowsMsvc2012Flavor;
#elif _MSC_VER == 1600
subos = WindowsMsvc2010Flavor; subos = WindowsMsvc2010Flavor;
#elif _MSC_VER == 1500 #elif _MSC_VER == 1500
subos = WindowsMsvc2008Flavor; subos = WindowsMsvc2008Flavor;
@@ -673,7 +683,11 @@ Abi Abi::hostAbi()
format = MachOFormat; format = MachOFormat;
#endif #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) QList<Abi> Abi::abisOfBinary(const Utils::FileName &path)
@@ -806,6 +820,9 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiOfBinary_data()
QTest::newRow("dynamic QtCore: symbian") QTest::newRow("dynamic QtCore: symbian")
<< QString::fromLatin1("%1/dynamic/symbian.dll").arg(prefix) << QString::fromLatin1("%1/dynamic/symbian.dll").arg(prefix)
<< (QStringList() << QString::fromLatin1("arm-symbian-device-elf-32bit")); << (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") QTest::newRow("dynamic QtCore: win msvc2010 64bit")
<< QString::fromLatin1("%1/dynamic/win-msvc2010-64bit.dll").arg(prefix) << QString::fromLatin1("%1/dynamic/win-msvc2010-64bit.dll").arg(prefix)
<< (QStringList() << QString::fromLatin1("x86-windows-msvc2010-pe-64bit")); << (QStringList() << QString::fromLatin1("x86-windows-msvc2010-pe-64bit"));

View File

@@ -94,6 +94,7 @@ public:
WindowsMsvc2005Flavor, WindowsMsvc2005Flavor,
WindowsMsvc2008Flavor, WindowsMsvc2008Flavor,
WindowsMsvc2010Flavor, WindowsMsvc2010Flavor,
WindowsMsvc2012Flavor,
WindowsMSysFlavor, WindowsMSysFlavor,
WindowsCEFlavor, WindowsCEFlavor,

View File

@@ -30,11 +30,24 @@
#include "desktopdevice.h" #include "desktopdevice.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "deviceprocesslist.h"
#include <QCoreApplication> #include <QCoreApplication>
namespace ProjectExplorer { 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 IDevice::DeviceInfo DesktopDevice::deviceInformation() const
{ {
return DeviceInfo(); return DeviceInfo();
@@ -44,6 +57,7 @@ QString DesktopDevice::displayType() const
{ {
return QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop"); return QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Desktop");
} }
IDeviceWidget *DesktopDevice::createWidget() IDeviceWidget *DesktopDevice::createWidget()
{ {
return 0; return 0;
@@ -71,16 +85,21 @@ IDevice::Ptr DesktopDevice::clone() const
return Ptr(new DesktopDevice(*this)); return Ptr(new DesktopDevice(*this));
} }
DesktopDevice::DesktopDevice() : IDevice(Core::Id(Constants::DESKTOP_DEVICE_TYPE), QString DesktopDevice::listProcessesCommandLine() const
IDevice::AutoDetected,
IDevice::Hardware,
Core::Id(Constants::DESKTOP_DEVICE_ID))
{ {
setDisplayName(QCoreApplication::translate("ProjectExplorer::DesktopDevice", "Run locally")); return QString();
} }
DesktopDevice::DesktopDevice(const DesktopDevice &other) : QString DesktopDevice::killProcessCommandLine(const DeviceProcess &process) const
IDevice(other) {
{ } Q_UNUSED(process);
return QString();
}
QList<DeviceProcess> DesktopDevice::buildProcessList(const QString &listProcessesReply) const
{
Q_UNUSED(listProcessesReply);
return QList<DeviceProcess>();
}
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -54,6 +54,10 @@ public:
IDevice::Ptr clone() const; IDevice::Ptr clone() const;
QString listProcessesCommandLine() const;
QString killProcessCommandLine(const DeviceProcess &process) const;
QList<DeviceProcess> buildProcessList(const QString &listProcessesReply) const;
protected: protected:
DesktopDevice(); DesktopDevice();
DesktopDevice(const DesktopDevice &other); DesktopDevice(const DesktopDevice &other);

View File

@@ -27,26 +27,26 @@
** **
**************************************************************************/ **************************************************************************/
#include "remotelinuxprocessesdialog.h" #include "devicesupport/deviceprocessesdialog.h"
#include "ui_remotelinuxprocessesdialog.h" #include "devicesupport/deviceprocesslist.h"
#include "ui_deviceprocessesdialog.h"
#include "remotelinuxprocesslist.h"
#include <QMessageBox> #include <QMessageBox>
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>
namespace RemoteLinux { namespace ProjectExplorer {
namespace Internal { namespace Internal {
class RemoteLinuxProcessesDialogPrivate
class DeviceProcessesDialogPrivate
{ {
public: public:
RemoteLinuxProcessesDialogPrivate(AbstractRemoteLinuxProcessList *processList) DeviceProcessesDialogPrivate(DeviceProcessList *processList)
: processList(processList) : processList(processList)
{ {
} }
Ui::RemoteLinuxProcessesDialog ui; Ui::DeviceProcessesDialog ui;
AbstractRemoteLinuxProcessList * const processList; DeviceProcessList * const processList;
QSortFilterProxyModel proxyModel; QSortFilterProxyModel proxyModel;
}; };
@@ -54,9 +54,8 @@ public:
using namespace Internal; using namespace Internal;
RemoteLinuxProcessesDialog::RemoteLinuxProcessesDialog(AbstractRemoteLinuxProcessList *processList, DeviceProcessesDialog::DeviceProcessesDialog(DeviceProcessList *processList, QWidget *parent)
QWidget *parent) : QDialog(parent), d(new DeviceProcessesDialogPrivate(processList))
: QDialog(parent), d(new RemoteLinuxProcessesDialogPrivate(processList))
{ {
processList->setParent(this); processList->setParent(this);
@@ -88,32 +87,32 @@ RemoteLinuxProcessesDialog::RemoteLinuxProcessesDialog(AbstractRemoteLinuxProces
updateProcessList(); updateProcessList();
} }
RemoteLinuxProcessesDialog::~RemoteLinuxProcessesDialog() DeviceProcessesDialog::~DeviceProcessesDialog()
{ {
delete d; delete d;
} }
void RemoteLinuxProcessesDialog::handleRemoteError(const QString &errorMsg) void DeviceProcessesDialog::handleRemoteError(const QString &errorMsg)
{ {
QMessageBox::critical(this, tr("Remote Error"), errorMsg); QMessageBox::critical(this, tr("Remote Error"), errorMsg);
d->ui.updateListButton->setEnabled(true); d->ui.updateListButton->setEnabled(true);
handleSelectionChanged(); handleSelectionChanged();
} }
void RemoteLinuxProcessesDialog::handleProcessListUpdated() void DeviceProcessesDialog::handleProcessListUpdated()
{ {
d->ui.updateListButton->setEnabled(true); d->ui.updateListButton->setEnabled(true);
handleSelectionChanged(); handleSelectionChanged();
} }
void RemoteLinuxProcessesDialog::updateProcessList() void DeviceProcessesDialog::updateProcessList()
{ {
d->ui.updateListButton->setEnabled(false); d->ui.updateListButton->setEnabled(false);
d->ui.killProcessButton->setEnabled(false); d->ui.killProcessButton->setEnabled(false);
d->processList->update(); d->processList->update();
} }
void RemoteLinuxProcessesDialog::killProcess() void DeviceProcessesDialog::killProcess()
{ {
const QModelIndexList &indexes const QModelIndexList &indexes
= d->ui.treeView->selectionModel()->selectedIndexes(); = d->ui.treeView->selectionModel()->selectedIndexes();
@@ -124,12 +123,12 @@ void RemoteLinuxProcessesDialog::killProcess()
d->processList->killProcess(d->proxyModel.mapToSource(indexes.first()).row()); d->processList->killProcess(d->proxyModel.mapToSource(indexes.first()).row());
} }
void RemoteLinuxProcessesDialog::handleProcessKilled() void DeviceProcessesDialog::handleProcessKilled()
{ {
updateProcessList(); updateProcessList();
} }
void RemoteLinuxProcessesDialog::handleSelectionChanged() void DeviceProcessesDialog::handleSelectionChanged()
{ {
d->ui.killProcessButton->setEnabled(d->ui.treeView->selectionModel()->hasSelection()); d->ui.killProcessButton->setEnabled(d->ui.treeView->selectionModel()->hasSelection());
} }

View File

@@ -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> #include <QDialog>
namespace RemoteLinux { namespace ProjectExplorer {
class AbstractRemoteLinuxProcessList;
namespace Internal { class DeviceProcessList;
class RemoteLinuxProcessesDialogPrivate;
} // namespace Internal
class REMOTELINUX_EXPORT RemoteLinuxProcessesDialog : public QDialog namespace Internal { class DeviceProcessesDialogPrivate; }
class PROJECTEXPLORER_EXPORT DeviceProcessesDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
// Note: The dialog takes ownership of processList. // Note: The dialog takes ownership of processList.
explicit RemoteLinuxProcessesDialog(AbstractRemoteLinuxProcessList *processList, explicit DeviceProcessesDialog(DeviceProcessList *processList, QWidget *parent = 0);
QWidget *parent = 0); ~DeviceProcessesDialog();
~RemoteLinuxProcessesDialog();
private slots: private slots:
void updateProcessList(); void updateProcessList();
@@ -58,7 +58,7 @@ private slots:
void handleSelectionChanged(); void handleSelectionChanged();
private: private:
Internal::RemoteLinuxProcessesDialogPrivate * const d; Internal::DeviceProcessesDialogPrivate * const d;
}; };
} // namespace RemoteLinux } // namespace RemoteLinux

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>RemoteLinux::Internal::RemoteLinuxProcessesDialog</class> <class>ProjectExplorer::Internal::DeviceProcessesDialog</class>
<widget class="QDialog" name="RemoteLinux::Internal::RemoteLinuxProcessesDialog"> <widget class="QDialog" name="ProjectExplorer::Internal::DeviceProcessesDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@@ -99,7 +99,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>accepted()</signal> <signal>accepted()</signal>
<receiver>RemoteLinux::Internal::RemoteLinuxProcessesDialog</receiver> <receiver>ProjectExplorer::Internal::DeviceProcessesDialog</receiver>
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
@@ -115,7 +115,7 @@
<connection> <connection>
<sender>buttonBox</sender> <sender>buttonBox</sender>
<signal>rejected()</signal> <signal>rejected()</signal>
<receiver>RemoteLinux::Internal::RemoteLinuxProcessesDialog</receiver> <receiver>ProjectExplorer::Internal::DeviceProcessesDialog</receiver>
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">

View File

@@ -27,41 +27,29 @@
** **
**************************************************************************/ **************************************************************************/
#include "remotelinuxprocesslist.h" #include "deviceprocesslist.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <ssh/sshremoteprocessrunner.h> #include <ssh/sshremoteprocessrunner.h>
using namespace ProjectExplorer;
using namespace QSsh; using namespace QSsh;
namespace RemoteLinux { namespace ProjectExplorer {
namespace Internal { namespace Internal {
namespace {
enum State { Inactive, Listing, Killing }; enum State { Inactive, Listing, Killing };
const char Delimiter0[] = "x--";
const char Delimiter1[] = "---";
} // anonymous namespace
static QString visualizeNull(QString s) class DeviceProcessListPrivate
{
return s.replace(QLatin1Char('\0'), QLatin1String("<null>"));
}
class AbstractRemoteLinuxProcessListPrivate
{ {
public: public:
AbstractRemoteLinuxProcessListPrivate(const IDevice::ConstPtr &devConf) DeviceProcessListPrivate(const IDevice::ConstPtr &devConf)
: deviceConfiguration(devConf), : device(devConf),
state(Inactive) state(Inactive)
{ { }
}
const IDevice::ConstPtr device;
const IDevice::ConstPtr deviceConfiguration;
SshRemoteProcessRunner process; SshRemoteProcessRunner process;
QList<RemoteProcess> remoteProcesses; QList<DeviceProcess> remoteProcesses;
QString errorMsg; QString errorMsg;
State state; State state;
}; };
@@ -70,18 +58,17 @@ public:
using namespace Internal; using namespace Internal;
AbstractRemoteLinuxProcessList::AbstractRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig, DeviceProcessList::DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent)
QObject *parent) : QAbstractTableModel(parent), d(new DeviceProcessListPrivate(devConfig))
: QAbstractTableModel(parent), d(new AbstractRemoteLinuxProcessListPrivate(devConfig))
{ {
} }
AbstractRemoteLinuxProcessList::~AbstractRemoteLinuxProcessList() DeviceProcessList::~DeviceProcessList()
{ {
delete d; delete d;
} }
void AbstractRemoteLinuxProcessList::update() void DeviceProcessList::update()
{ {
QTC_ASSERT(d->state == Inactive, return); QTC_ASSERT(d->state == Inactive, return);
@@ -91,31 +78,36 @@ void AbstractRemoteLinuxProcessList::update()
endRemoveRows(); endRemoveRows();
} }
d->state = Listing; 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(row >= 0 && row < d->remoteProcesses.count(), return);
QTC_ASSERT(d->state == Inactive, return); QTC_ASSERT(d->state == Inactive, return);
d->state = Killing; 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); 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(); 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 int role) const
{ {
if (orientation != Qt::Horizontal || role != Qt::DisplayRole || section < 0 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"); 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()) if (!index.isValid() || index.row() >= rowCount(index.parent())
|| index.column() >= columnCount()) || index.column() >= columnCount())
return QVariant(); return QVariant();
if (role == Qt::DisplayRole || role == Qt::ToolTipRole) { 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) if (index.column() == 0)
return proc.pid; return proc.pid;
else else
@@ -140,7 +132,7 @@ QVariant AbstractRemoteLinuxProcessList::data(const QModelIndex &index, int role
return QVariant(); return QVariant();
} }
void AbstractRemoteLinuxProcessList::handleConnectionError() void DeviceProcessList::handleConnectionError()
{ {
QTC_ASSERT(d->state != Inactive, return); QTC_ASSERT(d->state != Inactive, return);
@@ -151,7 +143,7 @@ void AbstractRemoteLinuxProcessList::handleConnectionError()
setFinished(); setFinished();
} }
void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus) void DeviceProcessList::handleRemoteProcessFinished(int exitStatus)
{ {
QTC_ASSERT(d->state != Inactive, return); QTC_ASSERT(d->state != Inactive, return);
@@ -167,9 +159,8 @@ void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus)
case SshRemoteProcess::NormalExit: case SshRemoteProcess::NormalExit:
if (d->process.processExitCode() == 0) { if (d->process.processExitCode() == 0) {
if (d->state == Listing) { if (d->state == Listing) {
beginResetModel();
const QByteArray remoteStdout = d->process.readAllStandardOutput(); 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())); remoteStdout.count()));
if (!processes.isEmpty()) { if (!processes.isEmpty()) {
beginInsertRows(QModelIndex(), 0, processes.count()-1); beginInsertRows(QModelIndex(), 0, processes.count()-1);
@@ -200,90 +191,23 @@ void AbstractRemoteLinuxProcessList::handleRemoteProcessFinished(int exitStatus)
setFinished(); setFinished();
} }
void AbstractRemoteLinuxProcessList::startProcess(const QString &cmdLine) void DeviceProcessList::startProcess(const QString &cmdLine)
{ {
connect(&d->process, SIGNAL(connectionError()), SLOT(handleConnectionError())); connect(&d->process, SIGNAL(connectionError()), SLOT(handleConnectionError()));
connect(&d->process, SIGNAL(processClosed(int)), connect(&d->process, SIGNAL(processClosed(int)),
SLOT(handleRemoteProcessFinished(int))); SLOT(handleRemoteProcessFinished(int)));
d->errorMsg.clear(); 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); disconnect(&d->process, 0, this, 0);
d->state = Inactive; d->state = Inactive;
} }
GenericRemoteLinuxProcessList::GenericRemoteLinuxProcessList(const IDevice::ConstPtr &devConfig, bool DeviceProcess::operator <(const DeviceProcess &other) const
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
{ {
if (pid != other.pid) if (pid != other.pid)
return pid < other.pid; return pid < other.pid;
@@ -292,4 +216,4 @@ bool RemoteProcess::operator <(const RemoteProcess &other) const
return cmdLine < other.cmdLine; return cmdLine < other.cmdLine;
} }
} // namespace RemoteLinux } // namespace ProjectExplorer

View File

@@ -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 <QAbstractTableModel>
#include <QList> #include <QList>
#include <QSharedPointer> #include <QSharedPointer>
namespace RemoteLinux { namespace ProjectExplorer {
namespace Internal { namespace Internal { class DeviceProcessListPrivate; }
class AbstractRemoteLinuxProcessListPrivate;
}
class REMOTELINUX_EXPORT RemoteProcess class PROJECTEXPLORER_EXPORT DeviceProcessList : public QAbstractTableModel
{
public:
RemoteProcess() : pid(0) {}
bool operator<(const RemoteProcess &other) const;
int pid;
QString cmdLine;
QString exe;
};
class REMOTELINUX_EXPORT AbstractRemoteLinuxProcessList : public QAbstractTableModel
{ {
Q_OBJECT Q_OBJECT
friend class Internal::AbstractRemoteLinuxProcessListPrivate;
public: public:
~AbstractRemoteLinuxProcessList(); DeviceProcessList(const IDevice::ConstPtr &devConfig, QObject *parent = 0);
~DeviceProcessList();
void update(); void update();
void killProcess(int row); void killProcess(int row);
RemoteProcess at(int row) const; DeviceProcess at(int row) const;
IDevice::ConstPtr device() const;
signals: signals:
void processListUpdated(); void processListUpdated();
void error(const QString &errorMsg); void error(const QString &errorMsg);
void processKilled(); void processKilled();
protected:
AbstractRemoteLinuxProcessList(const ProjectExplorer::IDevice::ConstPtr &devConfig,
QObject *parent = 0);
private slots: private slots:
void handleConnectionError(); void handleConnectionError();
void handleRemoteProcessFinished(int exitStatus); void handleRemoteProcessFinished(int exitStatus);
@@ -85,30 +69,12 @@ private:
int role = Qt::DisplayRole) const; int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, 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 startProcess(const QString &cmdLine);
void setFinished(); void setFinished();
Internal::AbstractRemoteLinuxProcessListPrivate * const d; Internal::DeviceProcessListPrivate * const d;
}; };
} // namespace ProjectExplorer
class REMOTELINUX_EXPORT GenericRemoteLinuxProcessList : public AbstractRemoteLinuxProcessList #endif // DEVICEPROCESSLIST_H
{
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

View File

@@ -46,9 +46,22 @@ namespace QSsh { class SshConnectionParameters; }
namespace Utils { class PortList; } namespace Utils { class PortList; }
namespace ProjectExplorer { namespace ProjectExplorer {
namespace Internal { class IDevicePrivate; } namespace Internal { class IDevicePrivate; }
class IDeviceWidget; 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. // See cpp file for documentation.
class PROJECTEXPLORER_EXPORT IDevice class PROJECTEXPLORER_EXPORT IDevice
{ {
@@ -86,6 +99,10 @@ public:
virtual QString displayNameForActionId(Core::Id actionId) const = 0; virtual QString displayNameForActionId(Core::Id actionId) const = 0;
virtual void executeAction(Core::Id actionId, QWidget *parent = 0) 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 }; enum DeviceState { DeviceReadyToUse, DeviceConnected, DeviceDisconnected, DeviceStateUnknown };
DeviceState deviceState() const; DeviceState deviceState() const;
void setDeviceState(const DeviceState state); void setDeviceState(const DeviceState state);

View File

@@ -239,7 +239,8 @@ void EditorConfiguration::fromMap(const QVariantMap &map)
void EditorConfiguration::configureEditor(ITextEditor *textEditor) const void EditorConfiguration::configureEditor(ITextEditor *textEditor) const
{ {
BaseTextEditorWidget *baseTextEditor = qobject_cast<BaseTextEditorWidget *>(textEditor->widget()); BaseTextEditorWidget *baseTextEditor = qobject_cast<BaseTextEditorWidget *>(textEditor->widget());
baseTextEditor->setCodeStyle(codeStyle(baseTextEditor->languageSettingsId())); if (baseTextEditor)
baseTextEditor->setCodeStyle(codeStyle(baseTextEditor->languageSettingsId()));
if (!d->m_useGlobal) { if (!d->m_useGlobal) {
textEditor->setTextCodec(d->m_textCodec, ITextEditor::TextCodecFromProjectSetting); textEditor->setTextCodec(d->m_textCodec, ITextEditor::TextCodecFromProjectSetting);
if (baseTextEditor) if (baseTextEditor)

View File

@@ -109,14 +109,19 @@ static Abi findAbiOfMsvc(MsvcToolChain::Type type, MsvcToolChain::Platform platf
else else
msvcVersionString = QLatin1String("8.0"); 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; flavor = Abi::WindowsMsvc2010Flavor;
else if (msvcVersionString.startsWith(QLatin1String("9."))) else if (msvcVersionString.startsWith(QLatin1String("9.")))
flavor = Abi::WindowsMsvc2008Flavor; flavor = Abi::WindowsMsvc2008Flavor;
else else
flavor = Abi::WindowsMsvc2005Flavor; flavor = Abi::WindowsMsvc2005Flavor;
const Abi result = Abi(arch, Abi::WindowsOS, flavor, Abi::PEFormat, wordWidth);
return 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, static QString generateDisplayName(const QString &name,
@@ -341,12 +346,21 @@ QString MsvcToolChain::typeDisplayName() const
QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() 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")); 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")); 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")); 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>(); return QList<Utils::FileName>();
} }

View File

@@ -81,9 +81,10 @@ QList<Task> SysRootProfileInformation::validate(Profile *p) const
{ {
QList<Task> result; QList<Task> result;
const Utils::FileName dir = SysRootProfileInformation::sysRoot(p); const Utils::FileName dir = SysRootProfileInformation::sysRoot(p);
if (!dir.toFileInfo().isDir() && SysRootProfileInformation::hasSysRoot(p)) if (!dir.toFileInfo().isDir() && SysRootProfileInformation::hasSysRoot(p)) {
result << Task(Task::Error, QObject::tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()), result << Task(Task::Error, tr("Sys Root \"%1\" is not a directory.").arg(dir.toUserOutput()),
Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)); Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
}
return result; return result;
} }
@@ -165,7 +166,7 @@ QList<Task> ToolChainProfileInformation::validate(Profile *p) const
QList<Task> result; QList<Task> result;
if (!toolChain(p)) { if (!toolChain(p)) {
setToolChain(p, 0); // make sure to clear out no longer known tool chains 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)); Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM));
} }
return result; return result;
@@ -203,6 +204,11 @@ void ToolChainProfileInformation::setToolChain(Profile *p, ToolChain *tc)
p->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString()); p->setValue(Core::Id(TOOLCHAIN_INFORMATION), tc ? tc->id() : QString());
} }
QString ToolChainProfileInformation::msgNoToolChainInTarget()
{
return tr("No tool chain set in target.");
}
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// DeviceTypeInformation: // DeviceTypeInformation:
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
@@ -236,7 +242,7 @@ QList<Task> DeviceTypeProfileInformation::validate(Profile *p) const
IDevice::ConstPtr dev = DeviceProfileInformation::device(p); IDevice::ConstPtr dev = DeviceProfileInformation::device(p);
QList<Task> result; QList<Task> result;
if (!dev.isNull() && dev->type() != DeviceTypeProfileInformation::deviceTypeId(p)) 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))); Utils::FileName(), -1, Core::Id(Constants::TASK_CATEGORY_BUILDSYSTEM)));
return result; return result;
} }

View File

@@ -113,6 +113,8 @@ public:
static ToolChain *toolChain(const Profile *p); static ToolChain *toolChain(const Profile *p);
static void setToolChain(Profile *p, ToolChain *tc); static void setToolChain(Profile *p, ToolChain *tc);
static QString msgNoToolChainInTarget();
}; };
class PROJECTEXPLORER_EXPORT ToolChainMatcher : public ProfileMatcher class PROJECTEXPLORER_EXPORT ToolChainMatcher : public ProfileMatcher

View File

@@ -93,7 +93,7 @@ ProfileManagerConfigWidget::ProfileManagerConfigWidget(Profile *p, QWidget *pare
QString ProfileManagerConfigWidget::displayName() const QString ProfileManagerConfigWidget::displayName() const
{ {
return tr("Profiles"); return tr("Targets");
} }
void ProfileManagerConfigWidget::apply() void ProfileManagerConfigWidget::apply()

View File

@@ -336,16 +336,15 @@ void ProfileModel::apply()
if (removedSts.count() == 1) { if (removedSts.count() == 1) {
QMessageBox::warning(0, QMessageBox::warning(0,
tr("Duplicate profiles detected"), tr("Duplicate Target Detected"),
tr("The following profile was already configured:<br>" tr("The target<br>&nbsp;%1<br>"
"&nbsp;%1<br>" " was already configured. It was not configured again.")
"It was not configured again.")
.arg(removedSts.at(0))); .arg(removedSts.at(0)));
} else if (!removedSts.isEmpty()) { } else if (!removedSts.isEmpty()) {
QMessageBox::warning(0, QMessageBox::warning(0,
tr("Duplicate profile detected"), tr("Duplicate Targets Detected"),
tr("The following profiles were already configured:<br>" tr("The following targets were already configured:<br>"
"&nbsp;%1<br>" "&nbsp;%1<br>"
"They were not configured again.") "They were not configured again.")
.arg(removedSts.join(QLatin1String(",<br>&nbsp;")))); .arg(removedSts.join(QLatin1String(",<br>&nbsp;"))));

View File

@@ -122,7 +122,7 @@ QWidget *ProfileOptionsPage::createPage(QWidget *parent)
connect(m_delButton, SIGNAL(clicked()), this, SLOT(removeProfile())); connect(m_delButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
connect(m_makeDefaultButton, SIGNAL(clicked()), this, SLOT(makeDefaultProfile())); connect(m_makeDefaultButton, SIGNAL(clicked()), this, SLOT(makeDefaultProfile()));
m_searchKeywords = tr("Profiles"); m_searchKeywords = tr("Targets");
updateState(); updateState();

View File

@@ -1288,7 +1288,7 @@ void ProjectExplorerPlugin::openProjectWelcomePage(const QString &fileName)
QString errorMessage; QString errorMessage;
openProject(fileName, &errorMessage); openProject(fileName, &errorMessage);
if (!errorMessage.isEmpty()) 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) Project *ProjectExplorerPlugin::openProject(const QString &fileName, QString *errorString)

View File

@@ -121,6 +121,8 @@ HEADERS += projectexplorer.h \
devicesupport/devicemanager.h \ devicesupport/devicemanager.h \
devicesupport/devicemanagermodel.h \ devicesupport/devicemanagermodel.h \
devicesupport/devicefactoryselectiondialog.h \ devicesupport/devicefactoryselectiondialog.h \
devicesupport/deviceprocesslist.h \
devicesupport/deviceprocessesdialog.h \
devicesupport/devicesettingswidget.h \ devicesupport/devicesettingswidget.h \
devicesupport/devicesettingspage.h devicesupport/devicesettingspage.h
@@ -220,6 +222,8 @@ SOURCES += projectexplorer.cpp \
devicesupport/devicemanager.cpp \ devicesupport/devicemanager.cpp \
devicesupport/devicemanagermodel.cpp \ devicesupport/devicemanagermodel.cpp \
devicesupport/devicefactoryselectiondialog.cpp \ devicesupport/devicefactoryselectiondialog.cpp \
devicesupport/deviceprocesslist.cpp \
devicesupport/deviceprocessesdialog.cpp \
devicesupport/devicesettingswidget.cpp \ devicesupport/devicesettingswidget.cpp \
devicesupport/devicesettingspage.cpp devicesupport/devicesettingspage.cpp
@@ -233,6 +237,7 @@ FORMS += processstep.ui \
publishing/publishingwizardselectiondialog.ui \ publishing/publishingwizardselectiondialog.ui \
codestylesettingspropertiespage.ui \ codestylesettingspropertiespage.ui \
devicesupport/devicefactoryselectiondialog.ui \ devicesupport/devicefactoryselectiondialog.ui \
devicesupport/deviceprocessesdialog.ui \
devicesupport/devicesettingswidget.ui devicesupport/devicesettingswidget.ui
WINSOURCES += \ WINSOURCES += \

Some files were not shown because too many files have changed in this diff Show More