forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3'
Change-Id: I4a21e9a9f4c5c2f96ad03ee6ea65afcd0ca511f9
This commit is contained in:
@@ -4,7 +4,7 @@ QTCREATOR_PRI_INCLUDED = 1
|
|||||||
QTCREATOR_VERSION = 4.2.82
|
QTCREATOR_VERSION = 4.2.82
|
||||||
QTCREATOR_COMPAT_VERSION = 4.2.82
|
QTCREATOR_COMPAT_VERSION = 4.2.82
|
||||||
VERSION = $$QTCREATOR_VERSION
|
VERSION = $$QTCREATOR_VERSION
|
||||||
BINARY_ARTIFACTS_BRANCH = master
|
BINARY_ARTIFACTS_BRANCH = 4.3
|
||||||
|
|
||||||
CONFIG += c++14
|
CONFIG += c++14
|
||||||
|
|
||||||
|
@@ -473,6 +473,8 @@ QRectF QuickItemNodeInstance::boundingRectWithStepChilds(QQuickItem *parentItem)
|
|||||||
{
|
{
|
||||||
QRectF boundingRect = parentItem->boundingRect();
|
QRectF boundingRect = parentItem->boundingRect();
|
||||||
|
|
||||||
|
boundingRect = boundingRect.united(QRectF(QPointF(0, 0), size()));
|
||||||
|
|
||||||
foreach (QQuickItem *childItem, parentItem->childItems()) {
|
foreach (QQuickItem *childItem, parentItem->childItems()) {
|
||||||
if (!nodeInstanceServer()->hasInstanceForObject(childItem)) {
|
if (!nodeInstanceServer()->hasInstanceForObject(childItem)) {
|
||||||
QRectF transformedRect = childItem->mapRectToItem(parentItem, boundingRectWithStepChilds(childItem));
|
QRectF transformedRect = childItem->mapRectToItem(parentItem, boundingRectWithStepChilds(childItem));
|
||||||
|
@@ -60,8 +60,7 @@ public:
|
|||||||
QStringList mimeTypes() const;
|
QStringList mimeTypes() const;
|
||||||
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||||
|
|
||||||
public Q_SLOTS:
|
void rebuild(Document::Ptr doc);
|
||||||
void rebuild(CPlusPlus::Document::Ptr doc);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool hasDocument() const;
|
bool hasDocument() const;
|
||||||
|
@@ -77,7 +77,8 @@ public:
|
|||||||
|
|
||||||
void exec()
|
void exec()
|
||||||
{
|
{
|
||||||
if (schedule()) // do not enter event loop for empty containers
|
// do not enter event loop for empty containers or if already canceled
|
||||||
|
if (!m_futureInterface.isCanceled() && schedule())
|
||||||
m_loop.exec();
|
m_loop.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -148,8 +148,7 @@ void BareMetalDebugSupport::startExecution()
|
|||||||
auto dev = qSharedPointerCast<const BareMetalDevice>(m_runControl->device());
|
auto dev = qSharedPointerCast<const BareMetalDevice>(m_runControl->device());
|
||||||
QTC_ASSERT(dev, return);
|
QTC_ASSERT(dev, return);
|
||||||
|
|
||||||
const GdbServerProvider *p = GdbServerProviderManager::instance()->findProvider(
|
const GdbServerProvider *p = GdbServerProviderManager::findProvider(dev->gdbServerProviderId());
|
||||||
dev->gdbServerProviderId());
|
|
||||||
QTC_ASSERT(p, return);
|
QTC_ASSERT(p, return);
|
||||||
|
|
||||||
m_state = StartingRunner;
|
m_state = StartingRunner;
|
||||||
|
@@ -43,7 +43,9 @@ public:
|
|||||||
explicit BareMetalDebugSupport(Debugger::DebuggerRunControl *runControl);
|
explicit BareMetalDebugSupport(Debugger::DebuggerRunControl *runControl);
|
||||||
~BareMetalDebugSupport();
|
~BareMetalDebugSupport();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
|
enum State { Inactive, StartingRunner, Running };
|
||||||
|
|
||||||
void remoteSetupRequested();
|
void remoteSetupRequested();
|
||||||
void debuggingFinished();
|
void debuggingFinished();
|
||||||
void remoteOutputMessage(const QByteArray &output);
|
void remoteOutputMessage(const QByteArray &output);
|
||||||
@@ -53,9 +55,6 @@ private slots:
|
|||||||
void progressReport(const QString &progressOutput);
|
void progressReport(const QString &progressOutput);
|
||||||
void appRunnerError(const QString &error);
|
void appRunnerError(const QString &error);
|
||||||
|
|
||||||
private:
|
|
||||||
enum State { Inactive, StartingRunner, Running };
|
|
||||||
|
|
||||||
void adapterSetupDone();
|
void adapterSetupDone();
|
||||||
void adapterSetupFailed(const QString &error);
|
void adapterSetupFailed(const QString &error);
|
||||||
|
|
||||||
@@ -66,7 +65,7 @@ private:
|
|||||||
|
|
||||||
ProjectExplorer::ApplicationLauncher *m_appLauncher;
|
ProjectExplorer::ApplicationLauncher *m_appLauncher;
|
||||||
const QPointer<Debugger::DebuggerRunControl> m_runControl;
|
const QPointer<Debugger::DebuggerRunControl> m_runControl;
|
||||||
BareMetalDebugSupport::State m_state;
|
State m_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -59,6 +59,12 @@ BareMetalDevice::Ptr BareMetalDevice::create(const BareMetalDevice &other)
|
|||||||
return Ptr(new BareMetalDevice(other));
|
return Ptr(new BareMetalDevice(other));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BareMetalDevice::~BareMetalDevice()
|
||||||
|
{
|
||||||
|
if (GdbServerProvider *provider = GdbServerProviderManager::findProvider(m_gdbServerProviderId))
|
||||||
|
provider->unregisterDevice(this);
|
||||||
|
}
|
||||||
|
|
||||||
QString BareMetalDevice::gdbServerProviderId() const
|
QString BareMetalDevice::gdbServerProviderId() const
|
||||||
{
|
{
|
||||||
return m_gdbServerProviderId;
|
return m_gdbServerProviderId;
|
||||||
@@ -66,8 +72,26 @@ QString BareMetalDevice::gdbServerProviderId() const
|
|||||||
|
|
||||||
void BareMetalDevice::setGdbServerProviderId(const QString &id)
|
void BareMetalDevice::setGdbServerProviderId(const QString &id)
|
||||||
{
|
{
|
||||||
|
if (id == m_gdbServerProviderId)
|
||||||
|
return;
|
||||||
|
if (GdbServerProvider *currentProvider = GdbServerProviderManager::findProvider(m_gdbServerProviderId))
|
||||||
|
currentProvider->unregisterDevice(this);
|
||||||
m_gdbServerProviderId = id;
|
m_gdbServerProviderId = id;
|
||||||
GdbServerProvider *provider = GdbServerProviderManager::instance()->findProvider(id);
|
if (GdbServerProvider *provider = GdbServerProviderManager::findProvider(id)) {
|
||||||
|
setChannelByServerProvider(provider);
|
||||||
|
provider->registerDevice(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void BareMetalDevice::providerUpdated(GdbServerProvider *provider)
|
||||||
|
{
|
||||||
|
GdbServerProvider *myProvider = GdbServerProviderManager::findProvider(m_gdbServerProviderId);
|
||||||
|
if (provider == myProvider)
|
||||||
|
setChannelByServerProvider(provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BareMetalDevice::setChannelByServerProvider(GdbServerProvider *provider)
|
||||||
|
{
|
||||||
QTC_ASSERT(provider, return);
|
QTC_ASSERT(provider, return);
|
||||||
const QString channel = provider->channel();
|
const QString channel = provider->channel();
|
||||||
const int colon = channel.indexOf(QLatin1Char(':'));
|
const int colon = channel.indexOf(QLatin1Char(':'));
|
||||||
@@ -85,8 +109,7 @@ void BareMetalDevice::fromMap(const QVariantMap &map)
|
|||||||
QString gdbServerProvider = map.value(QLatin1String(gdbServerProviderIdKeyC)).toString();
|
QString gdbServerProvider = map.value(QLatin1String(gdbServerProviderIdKeyC)).toString();
|
||||||
if (gdbServerProvider.isEmpty()) {
|
if (gdbServerProvider.isEmpty()) {
|
||||||
const QString name = displayName();
|
const QString name = displayName();
|
||||||
if (GdbServerProvider *provider =
|
if (GdbServerProvider *provider = GdbServerProviderManager::findByDisplayName(name)) {
|
||||||
GdbServerProviderManager::instance()->findByDisplayName(name)) {
|
|
||||||
gdbServerProvider = provider->id();
|
gdbServerProvider = provider->id();
|
||||||
} else {
|
} else {
|
||||||
const QSsh::SshConnectionParameters sshParams = sshParameters();
|
const QSsh::SshConnectionParameters sshParams = sshParameters();
|
||||||
@@ -94,7 +117,7 @@ void BareMetalDevice::fromMap(const QVariantMap &map)
|
|||||||
newProvider->setDisplayName(name);
|
newProvider->setDisplayName(name);
|
||||||
newProvider->m_host = sshParams.host;
|
newProvider->m_host = sshParams.host;
|
||||||
newProvider->m_port = sshParams.port;
|
newProvider->m_port = sshParams.port;
|
||||||
if (GdbServerProviderManager::instance()->registerProvider(newProvider))
|
if (GdbServerProviderManager::registerProvider(newProvider))
|
||||||
gdbServerProvider = newProvider->id();
|
gdbServerProvider = newProvider->id();
|
||||||
else
|
else
|
||||||
delete newProvider;
|
delete newProvider;
|
||||||
|
@@ -31,6 +31,8 @@
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class GdbServerProvider;
|
||||||
|
|
||||||
class BareMetalDevice : public ProjectExplorer::IDevice
|
class BareMetalDevice : public ProjectExplorer::IDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -42,6 +44,7 @@ public:
|
|||||||
Origin origin = ManuallyAdded, Core::Id id = Core::Id());
|
Origin origin = ManuallyAdded, Core::Id id = Core::Id());
|
||||||
static Ptr create(const BareMetalDevice &other);
|
static Ptr create(const BareMetalDevice &other);
|
||||||
|
|
||||||
|
~BareMetalDevice();
|
||||||
QString displayType() const override;
|
QString displayType() const override;
|
||||||
ProjectExplorer::IDeviceWidget *createWidget() override;
|
ProjectExplorer::IDeviceWidget *createWidget() override;
|
||||||
QList<Core::Id> actionIds() const override;
|
QList<Core::Id> actionIds() const override;
|
||||||
@@ -56,6 +59,7 @@ public:
|
|||||||
|
|
||||||
QString gdbServerProviderId() const;
|
QString gdbServerProviderId() const;
|
||||||
void setGdbServerProviderId(const QString &id);
|
void setGdbServerProviderId(const QString &id);
|
||||||
|
void providerUpdated(GdbServerProvider *provider);
|
||||||
|
|
||||||
virtual void fromMap(const QVariantMap &map) override;
|
virtual void fromMap(const QVariantMap &map) override;
|
||||||
virtual QVariantMap toMap() const override;
|
virtual QVariantMap toMap() const override;
|
||||||
@@ -67,6 +71,7 @@ protected:
|
|||||||
BareMetalDevice(const BareMetalDevice &other);
|
BareMetalDevice(const BareMetalDevice &other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setChannelByServerProvider(GdbServerProvider *provider);
|
||||||
BareMetalDevice &operator=(const BareMetalDevice &);
|
BareMetalDevice &operator=(const BareMetalDevice &);
|
||||||
QString m_gdbServerProviderId;
|
QString m_gdbServerProviderId;
|
||||||
};
|
};
|
||||||
|
@@ -42,10 +42,8 @@ public:
|
|||||||
explicit BareMetalDeviceConfigurationWidget(
|
explicit BareMetalDeviceConfigurationWidget(
|
||||||
const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0);
|
const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void gdbServerProviderChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void gdbServerProviderChanged();
|
||||||
void updateDeviceFromUi();
|
void updateDeviceFromUi();
|
||||||
|
|
||||||
GdbServerProviderChooser *m_gdbServerProviderChooser;
|
GdbServerProviderChooser *m_gdbServerProviderChooser;
|
||||||
|
@@ -68,8 +68,6 @@ class BareMetalGdbCommandsDeployStepWidget: public ProjectExplorer::BuildStepCon
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BareMetalGdbCommandsDeployStepWidget(BareMetalGdbCommandsDeployStep &step);
|
explicit BareMetalGdbCommandsDeployStepWidget(BareMetalGdbCommandsDeployStep &step);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -67,6 +67,7 @@ bool BareMetalPlugin::initialize(const QStringList &arguments, QString *errorStr
|
|||||||
addAutoReleasedObject(new BareMetalRunControlFactory);
|
addAutoReleasedObject(new BareMetalRunControlFactory);
|
||||||
addAutoReleasedObject(new BareMetalRunConfigurationFactory);
|
addAutoReleasedObject(new BareMetalRunConfigurationFactory);
|
||||||
addAutoReleasedObject(new GdbServerProvidersSettingsPage);
|
addAutoReleasedObject(new GdbServerProvidersSettingsPage);
|
||||||
|
addAutoReleasedObject(new GdbServerProviderManager);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -50,11 +50,9 @@ public:
|
|||||||
|
|
||||||
Q_SLOT void runConfigurationEnabledChange();
|
Q_SLOT void runConfigurationEnabledChange();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateTargetInformation();
|
void updateTargetInformation();
|
||||||
void handleWorkingDirectoryChanged();
|
void handleWorkingDirectoryChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void setLabelText(QLabel &label, const QString ®ularText, const QString &errorText);
|
void setLabelText(QLabel &label, const QString ®ularText, const QString &errorText);
|
||||||
|
|
||||||
BareMetalRunConfigurationWidgetPrivate * const d;
|
BareMetalRunConfigurationWidgetPrivate * const d;
|
||||||
|
@@ -103,8 +103,7 @@ RunControl *BareMetalRunControlFactory::create(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GdbServerProvider *p = GdbServerProviderManager::instance()->findProvider(
|
const GdbServerProvider *p = GdbServerProviderManager::findProvider(dev->gdbServerProviderId());
|
||||||
dev->gdbServerProviderId());
|
|
||||||
if (!p) {
|
if (!p) {
|
||||||
*errorMessage = tr("Cannot debug: Device has no GDB server provider configuration.");
|
*errorMessage = tr("Cannot debug: Device has no GDB server provider configuration.");
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -25,7 +25,9 @@
|
|||||||
|
|
||||||
#include "gdbserverprovider.h"
|
#include "gdbserverprovider.h"
|
||||||
#include "gdbserverprovidermanager.h"
|
#include "gdbserverprovidermanager.h"
|
||||||
|
#include "baremetaldevice.h"
|
||||||
|
|
||||||
|
#include <utils/asconst.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
|
|
||||||
@@ -74,6 +76,9 @@ GdbServerProvider::GdbServerProvider(const GdbServerProvider &other)
|
|||||||
|
|
||||||
GdbServerProvider::~GdbServerProvider()
|
GdbServerProvider::~GdbServerProvider()
|
||||||
{
|
{
|
||||||
|
const QSet<BareMetalDevice *> devices = m_devices;
|
||||||
|
for (BareMetalDevice *device : devices)
|
||||||
|
device->setGdbServerProviderId(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GdbServerProvider::displayName() const
|
QString GdbServerProvider::displayName() const
|
||||||
@@ -173,9 +178,21 @@ bool GdbServerProvider::canStartupMode(StartupMode m) const
|
|||||||
return m == NoStartup;
|
return m == NoStartup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GdbServerProvider::registerDevice(BareMetalDevice *device)
|
||||||
|
{
|
||||||
|
m_devices.insert(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GdbServerProvider::unregisterDevice(BareMetalDevice *device)
|
||||||
|
{
|
||||||
|
m_devices.remove(device);
|
||||||
|
}
|
||||||
|
|
||||||
void GdbServerProvider::providerUpdated()
|
void GdbServerProvider::providerUpdated()
|
||||||
{
|
{
|
||||||
GdbServerProviderManager::instance()->notifyAboutUpdate(this);
|
GdbServerProviderManager::notifyAboutUpdate(this);
|
||||||
|
for (BareMetalDevice *device : Utils::asConst(m_devices))
|
||||||
|
device->providerUpdated(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GdbServerProvider::fromMap(const QVariantMap &data)
|
bool GdbServerProvider::fromMap(const QVariantMap &data)
|
||||||
|
@@ -26,8 +26,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QSet>
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
@@ -44,6 +44,7 @@ QT_END_NAMESPACE
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class BareMetalDevice;
|
||||||
class GdbServerProviderConfigWidget;
|
class GdbServerProviderConfigWidget;
|
||||||
class GdbServerProviderManager;
|
class GdbServerProviderManager;
|
||||||
|
|
||||||
@@ -85,6 +86,9 @@ public:
|
|||||||
virtual bool isValid() const;
|
virtual bool isValid() const;
|
||||||
virtual bool canStartupMode(StartupMode) const;
|
virtual bool canStartupMode(StartupMode) const;
|
||||||
|
|
||||||
|
void registerDevice(BareMetalDevice *);
|
||||||
|
void unregisterDevice(BareMetalDevice *);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit GdbServerProvider(const QString &id);
|
explicit GdbServerProvider(const QString &id);
|
||||||
explicit GdbServerProvider(const GdbServerProvider &);
|
explicit GdbServerProvider(const GdbServerProvider &);
|
||||||
@@ -103,6 +107,7 @@ private:
|
|||||||
StartupMode m_startupMode;
|
StartupMode m_startupMode;
|
||||||
QString m_initCommands;
|
QString m_initCommands;
|
||||||
QString m_resetCommands;
|
QString m_resetCommands;
|
||||||
|
QSet<BareMetalDevice *> m_devices;
|
||||||
|
|
||||||
friend class GdbServerProviderConfigWidget;
|
friend class GdbServerProviderConfigWidget;
|
||||||
};
|
};
|
||||||
@@ -145,14 +150,12 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
|
|
||||||
protected slots:
|
|
||||||
void setErrorMessage(const QString &);
|
|
||||||
void clearErrorMessage();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void applyImpl() = 0;
|
virtual void applyImpl() = 0;
|
||||||
virtual void discardImpl() = 0;
|
virtual void discardImpl() = 0;
|
||||||
|
|
||||||
|
void setErrorMessage(const QString &);
|
||||||
|
void clearErrorMessage();
|
||||||
void addErrorLabel();
|
void addErrorLabel();
|
||||||
|
|
||||||
GdbServerProvider::StartupMode startupModeFromIndex(int idx) const;
|
GdbServerProvider::StartupMode startupModeFromIndex(int idx) const;
|
||||||
|
@@ -105,8 +105,7 @@ void GdbServerProviderChooser::populate()
|
|||||||
m_chooser->clear();
|
m_chooser->clear();
|
||||||
m_chooser->addItem(tr("None"));
|
m_chooser->addItem(tr("None"));
|
||||||
|
|
||||||
foreach (const GdbServerProvider *p,
|
for (const GdbServerProvider *p : GdbServerProviderManager::providers()) {
|
||||||
GdbServerProviderManager::instance()->providers()) {
|
|
||||||
if (!providerMatches(p))
|
if (!providerMatches(p))
|
||||||
continue;
|
continue;
|
||||||
m_chooser->addItem(providerText(p), qVariantFromValue(p->id()));
|
m_chooser->addItem(providerText(p), qVariantFromValue(p->id()));
|
||||||
|
@@ -49,22 +49,17 @@ public:
|
|||||||
|
|
||||||
QString currentProviderId() const;
|
QString currentProviderId() const;
|
||||||
void setCurrentProviderId(const QString &id);
|
void setCurrentProviderId(const QString &id);
|
||||||
|
void populate();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void providerChanged();
|
void providerChanged();
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void populate();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void currentIndexChanged(int index);
|
void currentIndexChanged(int index);
|
||||||
void manageButtonClicked();
|
void manageButtonClicked();
|
||||||
|
|
||||||
protected:
|
|
||||||
bool providerMatches(const GdbServerProvider *) const;
|
bool providerMatches(const GdbServerProvider *) const;
|
||||||
QString providerText(const GdbServerProvider *) const;
|
QString providerText(const GdbServerProvider *) const;
|
||||||
|
|
||||||
private:
|
|
||||||
QComboBox *m_chooser;
|
QComboBox *m_chooser;
|
||||||
QPushButton *m_manageButton;
|
QPushButton *m_manageButton;
|
||||||
};
|
};
|
||||||
|
@@ -34,9 +34,10 @@
|
|||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
#include <utils/persistentsettings.h>
|
|
||||||
#include <utils/qtcassert.h>
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/asconst.h>
|
||||||
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/persistentsettings.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
@@ -63,6 +64,7 @@ GdbServerProviderManager::GdbServerProviderManager(QObject *parent)
|
|||||||
new OpenOcdGdbServerProviderFactory,
|
new OpenOcdGdbServerProviderFactory,
|
||||||
new StLinkUtilGdbServerProviderFactory})
|
new StLinkUtilGdbServerProviderFactory})
|
||||||
{
|
{
|
||||||
|
m_instance = this;
|
||||||
m_writer = new Utils::PersistentSettingsWriter(
|
m_writer = new Utils::PersistentSettingsWriter(
|
||||||
m_configFile, QLatin1String("QtCreatorGdbServerProviders"));
|
m_configFile, QLatin1String("QtCreatorGdbServerProviders"));
|
||||||
|
|
||||||
@@ -87,8 +89,6 @@ GdbServerProviderManager::~GdbServerProviderManager()
|
|||||||
|
|
||||||
GdbServerProviderManager *GdbServerProviderManager::instance()
|
GdbServerProviderManager *GdbServerProviderManager::instance()
|
||||||
{
|
{
|
||||||
if (!m_instance)
|
|
||||||
m_instance = new GdbServerProviderManager;
|
|
||||||
return m_instance;
|
return m_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,60 +149,61 @@ void GdbServerProviderManager::saveProviders()
|
|||||||
m_writer->save(data, Core::ICore::mainWindow());
|
m_writer->save(data, Core::ICore::mainWindow());
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<GdbServerProvider *> GdbServerProviderManager::providers() const
|
QList<GdbServerProvider *> GdbServerProviderManager::providers()
|
||||||
{
|
{
|
||||||
return m_providers;
|
return m_instance->m_providers;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<GdbServerProviderFactory *> GdbServerProviderManager::factories() const
|
QList<GdbServerProviderFactory *> GdbServerProviderManager::factories()
|
||||||
{
|
{
|
||||||
return m_factories;
|
return m_instance->m_factories;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdbServerProvider *GdbServerProviderManager::findProvider(const QString &id) const
|
GdbServerProvider *GdbServerProviderManager::findProvider(const QString &id)
|
||||||
{
|
{
|
||||||
if (id.isEmpty())
|
if (id.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return Utils::findOrDefault(m_providers, Utils::equal(&GdbServerProvider::id, id));
|
return Utils::findOrDefault(m_instance->m_providers, Utils::equal(&GdbServerProvider::id, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
GdbServerProvider *GdbServerProviderManager::findByDisplayName(const QString &displayName) const
|
GdbServerProvider *GdbServerProviderManager::findByDisplayName(const QString &displayName)
|
||||||
{
|
{
|
||||||
if (displayName.isEmpty())
|
if (displayName.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return Utils::findOrDefault(m_providers, Utils::equal(&GdbServerProvider::displayName, displayName));
|
return Utils::findOrDefault(m_instance->m_providers,
|
||||||
|
Utils::equal(&GdbServerProvider::displayName, displayName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbServerProviderManager::notifyAboutUpdate(GdbServerProvider *provider)
|
void GdbServerProviderManager::notifyAboutUpdate(GdbServerProvider *provider)
|
||||||
{
|
{
|
||||||
if (!provider || !m_providers.contains(provider))
|
if (!provider || !m_instance->m_providers.contains(provider))
|
||||||
return;
|
return;
|
||||||
emit providerUpdated(provider);
|
emit m_instance->providerUpdated(provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GdbServerProviderManager::registerProvider(GdbServerProvider *provider)
|
bool GdbServerProviderManager::registerProvider(GdbServerProvider *provider)
|
||||||
{
|
{
|
||||||
if (!provider || m_providers.contains(provider))
|
if (!provider || m_instance->m_providers.contains(provider))
|
||||||
return true;
|
return true;
|
||||||
foreach (const GdbServerProvider *current, m_providers) {
|
for (const GdbServerProvider *current : Utils::asConst(m_instance->m_providers)) {
|
||||||
if (*provider == *current)
|
if (*provider == *current)
|
||||||
return false;
|
return false;
|
||||||
QTC_ASSERT(current->id() != provider->id(), return false);
|
QTC_ASSERT(current->id() != provider->id(), return false);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_providers.append(provider);
|
m_instance->m_providers.append(provider);
|
||||||
emit providerAdded(provider);
|
emit m_instance->providerAdded(provider);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbServerProviderManager::deregisterProvider(GdbServerProvider *provider)
|
void GdbServerProviderManager::deregisterProvider(GdbServerProvider *provider)
|
||||||
{
|
{
|
||||||
if (!provider || !m_providers.contains(provider))
|
if (!provider || !m_instance->m_providers.contains(provider))
|
||||||
return;
|
return;
|
||||||
m_providers.removeOne(provider);
|
m_instance->m_providers.removeOne(provider);
|
||||||
emit providerRemoved(provider);
|
emit m_instance->providerRemoved(provider);
|
||||||
delete provider;
|
delete provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -47,12 +47,12 @@ public:
|
|||||||
static GdbServerProviderManager *instance();
|
static GdbServerProviderManager *instance();
|
||||||
~GdbServerProviderManager();
|
~GdbServerProviderManager();
|
||||||
|
|
||||||
QList<GdbServerProvider *> providers() const;
|
static QList<GdbServerProvider *> providers();
|
||||||
QList<GdbServerProviderFactory *> factories() const;
|
static QList<GdbServerProviderFactory *> factories();
|
||||||
GdbServerProvider *findProvider(const QString &id) const;
|
static GdbServerProvider *findProvider(const QString &id);
|
||||||
GdbServerProvider *findByDisplayName(const QString &displayName) const;
|
static GdbServerProvider *findByDisplayName(const QString &displayName);
|
||||||
bool registerProvider(GdbServerProvider *);
|
static bool registerProvider(GdbServerProvider *);
|
||||||
void deregisterProvider(GdbServerProvider *);
|
static void deregisterProvider(GdbServerProvider *);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void providerAdded(GdbServerProvider *);
|
void providerAdded(GdbServerProvider *);
|
||||||
@@ -66,7 +66,7 @@ private:
|
|||||||
explicit GdbServerProviderManager(QObject *parent = 0);
|
explicit GdbServerProviderManager(QObject *parent = 0);
|
||||||
|
|
||||||
void restoreProviders();
|
void restoreProviders();
|
||||||
void notifyAboutUpdate(GdbServerProvider *);
|
static void notifyAboutUpdate(GdbServerProvider *);
|
||||||
|
|
||||||
Utils::PersistentSettingsWriter *m_writer;
|
Utils::PersistentSettingsWriter *m_writer;
|
||||||
QList<GdbServerProvider *> m_providers;
|
QList<GdbServerProvider *> m_providers;
|
||||||
|
@@ -107,7 +107,7 @@ GdbServerProviderModel::GdbServerProviderModel(QObject *parent)
|
|||||||
connect(manager, &GdbServerProviderManager::providerRemoved,
|
connect(manager, &GdbServerProviderManager::providerRemoved,
|
||||||
this, &GdbServerProviderModel::removeProvider);
|
this, &GdbServerProviderModel::removeProvider);
|
||||||
|
|
||||||
foreach (GdbServerProvider *p, manager->providers())
|
for (GdbServerProvider *p : GdbServerProviderManager::providers())
|
||||||
addProvider(p);
|
addProvider(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ void GdbServerProviderModel::apply()
|
|||||||
{
|
{
|
||||||
// Remove unused providers
|
// Remove unused providers
|
||||||
foreach (GdbServerProvider *provider, m_providersToRemove)
|
foreach (GdbServerProvider *provider, m_providersToRemove)
|
||||||
GdbServerProviderManager::instance()->deregisterProvider(provider);
|
GdbServerProviderManager::deregisterProvider(provider);
|
||||||
QTC_ASSERT(m_providersToRemove.isEmpty(), m_providersToRemove.clear());
|
QTC_ASSERT(m_providersToRemove.isEmpty(), m_providersToRemove.clear());
|
||||||
|
|
||||||
// Update providers
|
// Update providers
|
||||||
@@ -151,7 +151,7 @@ void GdbServerProviderModel::apply()
|
|||||||
// Add new (and already updated) providers
|
// Add new (and already updated) providers
|
||||||
QStringList skippedProviders;
|
QStringList skippedProviders;
|
||||||
foreach (GdbServerProvider *provider, m_providersToAdd) {
|
foreach (GdbServerProvider *provider, m_providersToAdd) {
|
||||||
if (!GdbServerProviderManager::instance()->registerProvider(provider))
|
if (!GdbServerProviderManager::registerProvider(provider))
|
||||||
skippedProviders << provider->displayName();
|
skippedProviders << provider->displayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ GdbServerProvidersSettingsWidget::GdbServerProvidersSettingsWidget
|
|||||||
// Set up add menu:
|
// Set up add menu:
|
||||||
auto addMenu = new QMenu(m_addButton);
|
auto addMenu = new QMenu(m_addButton);
|
||||||
|
|
||||||
foreach (const auto f, GdbServerProviderManager::instance()->factories()) {
|
for (const auto f : GdbServerProviderManager::factories()) {
|
||||||
auto action = new QAction(addMenu);
|
auto action = new QAction(addMenu);
|
||||||
action->setText(f->displayName());
|
action->setText(f->displayName());
|
||||||
connect(action, &QAction::triggered, this, [this, f] { createProvider(f); });
|
connect(action, &QAction::triggered, this, [this, f] { createProvider(f); });
|
||||||
|
@@ -95,10 +95,9 @@ class OpenOcdGdbServerProviderConfigWidget : public GdbServerProviderConfigWidge
|
|||||||
public:
|
public:
|
||||||
explicit OpenOcdGdbServerProviderConfigWidget(OpenOcdGdbServerProvider *);
|
explicit OpenOcdGdbServerProviderConfigWidget(OpenOcdGdbServerProvider *);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void startupModeChanged();
|
void startupModeChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void applyImpl() final;
|
void applyImpl() final;
|
||||||
void discardImpl() final;
|
void discardImpl() final;
|
||||||
|
|
||||||
|
@@ -101,10 +101,9 @@ class StLinkUtilGdbServerProviderConfigWidget : public GdbServerProviderConfigWi
|
|||||||
public:
|
public:
|
||||||
explicit StLinkUtilGdbServerProviderConfigWidget(StLinkUtilGdbServerProvider *);
|
explicit StLinkUtilGdbServerProviderConfigWidget(StLinkUtilGdbServerProvider *);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void startupModeChanged();
|
void startupModeChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void applyImpl() final;
|
void applyImpl() final;
|
||||||
void discardImpl() final;
|
void discardImpl() final;
|
||||||
|
|
||||||
|
@@ -91,10 +91,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
static ClangEditorDocumentProcessor *get(const QString &filePath);
|
static ClangEditorDocumentProcessor *get(const QString &filePath);
|
||||||
|
|
||||||
private slots:
|
|
||||||
void onParserFinished();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void onParserFinished();
|
||||||
void updateProjectPartAndTranslationUnitForEditor();
|
void updateProjectPartAndTranslationUnitForEditor();
|
||||||
void registerTranslationUnitForEditor(CppTools::ProjectPart *projectPart);
|
void registerTranslationUnitForEditor(CppTools::ProjectPart *projectPart);
|
||||||
void updateTranslationUnitIfProjectPartExists();
|
void updateTranslationUnitIfProjectPartExists();
|
||||||
|
@@ -47,7 +47,6 @@ public:
|
|||||||
Core::Id warningConfigId() const;
|
Core::Id warningConfigId() const;
|
||||||
void setWarningConfigId(const Core::Id &warningConfigId);
|
void setWarningConfigId(const Core::Id &warningConfigId);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void load();
|
void load();
|
||||||
void store();
|
void store();
|
||||||
|
|
||||||
|
@@ -46,11 +46,9 @@ class ClangProjectSettingsWidget: public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit ClangProjectSettingsWidget(ProjectExplorer::Project *project);
|
explicit ClangProjectSettingsWidget(ProjectExplorer::Project *project);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void onCurrentWarningConfigChanged(const Core::Id ¤tConfigId);
|
void onCurrentWarningConfigChanged(const Core::Id ¤tConfigId);
|
||||||
void onCustomWarningConfigsChanged(const CppTools::ClangDiagnosticConfigs &customConfigs);
|
void onCustomWarningConfigsChanged(const CppTools::ClangDiagnosticConfigs &customConfigs);
|
||||||
|
|
||||||
private:
|
|
||||||
void refreshDiagnosticConfigsWidgetFromSettings();
|
void refreshDiagnosticConfigsWidgetFromSettings();
|
||||||
void connectToCppCodeModelSettingsChanged();
|
void connectToCppCodeModelSettingsChanged();
|
||||||
void disconnectFromCppCodeModelSettingsChanged();
|
void disconnectFromCppCodeModelSettingsChanged();
|
||||||
|
@@ -37,7 +37,6 @@
|
|||||||
#include <cpptools/cppmodelmanager.h>
|
#include <cpptools/cppmodelmanager.h>
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
|
||||||
#include <projectexplorer/session.h>
|
#include <projectexplorer/session.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
|
|
||||||
|
@@ -310,13 +310,15 @@ QString CMakeProject::displayName() const
|
|||||||
QStringList CMakeProject::files(FilesMode fileMode) const
|
QStringList CMakeProject::files(FilesMode fileMode) const
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
rootProjectNode()->forEachNode([&](const FileNode *fn) {
|
if (ProjectNode *rpn = rootProjectNode()) {
|
||||||
const bool isGenerated = fn->isGenerated();
|
rpn->forEachNode([&](const FileNode *fn) {
|
||||||
if (fileMode == Project::SourceFiles && !isGenerated)
|
const bool isGenerated = fn->isGenerated();
|
||||||
result.append(fn->filePath().toString());
|
if (fileMode == Project::SourceFiles && !isGenerated)
|
||||||
if (fileMode == Project::GeneratedFiles && isGenerated)
|
result.append(fn->filePath().toString());
|
||||||
result.append(fn->filePath().toString());
|
if (fileMode == Project::GeneratedFiles && isGenerated)
|
||||||
});
|
result.append(fn->filePath().toString());
|
||||||
|
});
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,8 +68,8 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void fileOpenRequest(const QString&);
|
void fileOpenRequest(const QString&);
|
||||||
|
|
||||||
private slots:
|
|
||||||
#if defined(WITH_TESTS)
|
#if defined(WITH_TESTS)
|
||||||
|
private slots:
|
||||||
void testVcsManager_data();
|
void testVcsManager_data();
|
||||||
void testVcsManager();
|
void testVcsManager();
|
||||||
void testSplitLineAndColumnNumber();
|
void testSplitLineAndColumnNumber();
|
||||||
|
@@ -2983,12 +2983,14 @@ bool EditorManager::restoreState(const QByteArray &state)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EditorManager::showEditorStatusBar(const QString &id,
|
void EditorManager::showEditorStatusBar(const QString &id,
|
||||||
const QString &infoText,
|
const QString &infoText,
|
||||||
const QString &buttonText,
|
const QString &buttonText,
|
||||||
QObject *object, const char *member)
|
QObject *object,
|
||||||
|
const std::function<void()> &function)
|
||||||
{
|
{
|
||||||
|
|
||||||
EditorManagerPrivate::currentEditorView()->showEditorStatusBar(id, infoText, buttonText, object, member);
|
EditorManagerPrivate::currentEditorView()->showEditorStatusBar(
|
||||||
|
id, infoText, buttonText, object, function);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorManager::hideEditorStatusBar(const QString &id)
|
void EditorManager::hideEditorStatusBar(const QString &id)
|
||||||
|
@@ -152,9 +152,10 @@ public:
|
|||||||
static bool hasSplitter();
|
static bool hasSplitter();
|
||||||
|
|
||||||
static void showEditorStatusBar(const QString &id,
|
static void showEditorStatusBar(const QString &id,
|
||||||
const QString &infoText,
|
const QString &infoText,
|
||||||
const QString &buttonText = QString(),
|
const QString &buttonText = QString(),
|
||||||
QObject *object = 0, const char *member = 0);
|
QObject *object = nullptr,
|
||||||
|
const std::function<void()> &function = nullptr);
|
||||||
static void hideEditorStatusBar(const QString &id);
|
static void hideEditorStatusBar(const QString &id);
|
||||||
|
|
||||||
static EditorFactoryList editorFactories(const Utils::MimeType &mimeType, bool bestMatchOnly = true);
|
static EditorFactoryList editorFactories(const Utils::MimeType &mimeType, bool bestMatchOnly = true);
|
||||||
|
@@ -218,15 +218,15 @@ void EditorView::closeCurrentEditor()
|
|||||||
void EditorView::showEditorStatusBar(const QString &id,
|
void EditorView::showEditorStatusBar(const QString &id,
|
||||||
const QString &infoText,
|
const QString &infoText,
|
||||||
const QString &buttonText,
|
const QString &buttonText,
|
||||||
QObject *object, const char *member)
|
QObject *object, const std::function<void()> &function)
|
||||||
{
|
{
|
||||||
m_statusWidgetId = id;
|
m_statusWidgetId = id;
|
||||||
m_statusWidgetLabel->setText(infoText);
|
m_statusWidgetLabel->setText(infoText);
|
||||||
m_statusWidgetButton->setText(buttonText);
|
m_statusWidgetButton->setText(buttonText);
|
||||||
m_statusWidgetButton->setToolTip(buttonText);
|
m_statusWidgetButton->setToolTip(buttonText);
|
||||||
m_statusWidgetButton->disconnect();
|
m_statusWidgetButton->disconnect();
|
||||||
if (object && member)
|
if (object && function)
|
||||||
connect(m_statusWidgetButton, SIGNAL(clicked()), object, member);
|
connect(m_statusWidgetButton, &QToolButton::clicked, object, function);
|
||||||
m_statusWidget->setVisible(true);
|
m_statusWidget->setVisible(true);
|
||||||
m_statusHLine->setVisible(true);
|
m_statusHLine->setVisible(true);
|
||||||
//m_editorForInfoWidget = currentEditor();
|
//m_editorForInfoWidget = currentEditor();
|
||||||
|
@@ -38,6 +38,8 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAction;
|
class QAction;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
@@ -95,7 +97,7 @@ public:
|
|||||||
void showEditorStatusBar(const QString &id,
|
void showEditorStatusBar(const QString &id,
|
||||||
const QString &infoText,
|
const QString &infoText,
|
||||||
const QString &buttonText,
|
const QString &buttonText,
|
||||||
QObject *object, const char *member);
|
QObject *object, const std::function<void()> &function);
|
||||||
void hideEditorStatusBar(const QString &id);
|
void hideEditorStatusBar(const QString &id);
|
||||||
void setCloseSplitEnabled(bool enable);
|
void setCloseSplitEnabled(bool enable);
|
||||||
void setCloseSplitIcon(const QIcon &icon);
|
void setCloseSplitIcon(const QIcon &icon);
|
||||||
|
@@ -46,14 +46,12 @@ public:
|
|||||||
explicit FormClassWizardDialog(const Core::BaseFileWizardFactory *factory, QWidget *parent = 0);
|
explicit FormClassWizardDialog(const Core::BaseFileWizardFactory *factory, QWidget *parent = 0);
|
||||||
|
|
||||||
QString path() const;
|
QString path() const;
|
||||||
|
void setPath(const QString &);
|
||||||
|
|
||||||
Designer::FormClassWizardParameters parameters() const;
|
Designer::FormClassWizardParameters parameters() const;
|
||||||
|
|
||||||
bool validateCurrentPage();
|
bool validateCurrentPage();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setPath(const QString &);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initializePage(int id);
|
void initializePage(int id);
|
||||||
|
|
||||||
|
@@ -48,6 +48,8 @@ public:
|
|||||||
virtual bool isComplete () const;
|
virtual bool isComplete () const;
|
||||||
virtual bool validatePage();
|
virtual bool validatePage();
|
||||||
|
|
||||||
|
void setClassName(const QString &suggestedClassName);
|
||||||
|
void setPath(const QString &);
|
||||||
QString path() const;
|
QString path() const;
|
||||||
|
|
||||||
// Fill out applicable parameters
|
// Fill out applicable parameters
|
||||||
@@ -58,11 +60,7 @@ public:
|
|||||||
|
|
||||||
static bool lowercaseHeaderFiles();
|
static bool lowercaseHeaderFiles();
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void setClassName(const QString &suggestedClassName);
|
|
||||||
void setPath(const QString &);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotValidChanged();
|
void slotValidChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -63,8 +63,6 @@ public:
|
|||||||
SharedTools::WidgetHost *formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const;
|
SharedTools::WidgetHost *formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const;
|
||||||
|
|
||||||
EditorData activeEditor() const;
|
EditorData activeEditor() const;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void resetToDefaultLayout();
|
void resetToDefaultLayout();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -47,14 +47,14 @@ public:
|
|||||||
bool initialize(const QStringList &arguments, QString *errorMessage = 0) override;
|
bool initialize(const QStringList &arguments, QString *errorMessage = 0) override;
|
||||||
void extensionsInitialized() override;
|
void extensionsInitialized() override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
private slots:
|
||||||
void test_gotoslot();
|
void test_gotoslot();
|
||||||
void test_gotoslot_data();
|
void test_gotoslot_data();
|
||||||
#endif
|
#endif
|
||||||
void switchSourceForm();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void switchSourceForm();
|
||||||
void initializeTemplates();
|
void initializeTemplates();
|
||||||
|
|
||||||
QAction *m_actionSwitchSource;
|
QAction *m_actionSwitchSource;
|
||||||
|
@@ -62,15 +62,13 @@ public:
|
|||||||
|
|
||||||
EditorData activeEditor() const;
|
EditorData activeEditor() const;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void removeFormWindowEditor(QObject *);
|
void removeFormWindowEditor(QObject *);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateFormWindowSelectionHandles();
|
void updateFormWindowSelectionHandles();
|
||||||
void modeAboutToChange(Core::Id mode);
|
void modeAboutToChange(Core::Id mode);
|
||||||
void formSizeChanged(int w, int h);
|
void formSizeChanged(int w, int h);
|
||||||
|
|
||||||
private:
|
|
||||||
inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const;
|
inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const;
|
||||||
inline int indexOfFormEditor(const QObject *xmlEditor) const;
|
inline int indexOfFormEditor(const QObject *xmlEditor) const;
|
||||||
|
|
||||||
|
@@ -68,10 +68,9 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void templateActivated();
|
void templateActivated();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotCurrentTemplateChanged(bool);
|
void slotCurrentTemplateChanged(bool);
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_templateContents;
|
QString m_templateContents;
|
||||||
QDesignerNewFormWidgetInterface *m_newFormWidget;
|
QDesignerNewFormWidgetInterface *m_newFormWidget;
|
||||||
bool m_templateSelected;
|
bool m_templateSelected;
|
||||||
|
@@ -69,15 +69,13 @@ public:
|
|||||||
QString formWindowContents() const;
|
QString formWindowContents() const;
|
||||||
ResourceHandler *resourceHandler() const;
|
ResourceHandler *resourceHandler() const;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setFilePath(const Utils::FileName &) override;
|
void setFilePath(const Utils::FileName &) override;
|
||||||
void setShouldAutoSave(bool sad = true) { m_shouldAutoSave = sad; }
|
void setShouldAutoSave(bool sad = true) { m_shouldAutoSave = sad; }
|
||||||
void updateIsModified();
|
void updateIsModified();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void slotFormWindowRemoved(QDesignerFormWindowInterface *w);
|
void slotFormWindowRemoved(QDesignerFormWindowInterface *w);
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_suggestedName;
|
QString m_suggestedName;
|
||||||
bool m_shouldAutoSave = false;
|
bool m_shouldAutoSave = false;
|
||||||
// Might actually go out of scope before the IEditor due
|
// Might actually go out of scope before the IEditor due
|
||||||
|
@@ -44,18 +44,16 @@ public:
|
|||||||
|
|
||||||
bool supportsToSlotNavigation() { return true; }
|
bool supportsToSlotNavigation() { return true; }
|
||||||
|
|
||||||
|
void updateSelection() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void creatorHelpRequested(const QUrl &url);
|
void creatorHelpRequested(const QUrl &url);
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void updateSelection() override;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames);
|
void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames);
|
||||||
void slotDesignerHelpRequested(const QString &manual, const QString &document);
|
void slotDesignerHelpRequested(const QString &manual, const QString &document);
|
||||||
void slotSyncSettingsToDesigner();
|
void slotSyncSettingsToDesigner();
|
||||||
|
|
||||||
private:
|
|
||||||
bool navigateToSlot(const QString &objectName,
|
bool navigateToSlot(const QString &objectName,
|
||||||
const QString &signalSignature,
|
const QString &signalSignature,
|
||||||
const QStringList ¶meterNames,
|
const QStringList ¶meterNames,
|
||||||
|
@@ -52,7 +52,6 @@ public:
|
|||||||
explicit ResourceHandler(QDesignerFormWindowInterface *fw);
|
explicit ResourceHandler(QDesignerFormWindowInterface *fw);
|
||||||
virtual ~ResourceHandler();
|
virtual ~ResourceHandler();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void updateResources() { updateResourcesHelper(false); }
|
void updateResources() { updateResourcesHelper(false); }
|
||||||
void updateProjectResources() { updateResourcesHelper(true); }
|
void updateProjectResources() { updateResourcesHelper(true); }
|
||||||
|
|
||||||
|
@@ -59,7 +59,6 @@ public:
|
|||||||
const QString &displayName);
|
const QString &displayName);
|
||||||
static DiffEditorController *controller(Core::IDocument *document);
|
static DiffEditorController *controller(Core::IDocument *document);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void informationForCommitReceived(const QString &output);
|
void informationForCommitReceived(const QString &output);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@@ -77,6 +77,8 @@ public:
|
|||||||
OpenResult open(QString *errorString, const QString &fileName,
|
OpenResult open(QString *errorString, const QString &fileName,
|
||||||
const QString &realFileName) override;
|
const QString &realFileName) override;
|
||||||
bool isReloading() const { return m_isReloading; }
|
bool isReloading() const { return m_isReloading; }
|
||||||
|
void beginReload();
|
||||||
|
void endReload(bool success);
|
||||||
|
|
||||||
QString plainText() const;
|
QString plainText() const;
|
||||||
|
|
||||||
@@ -87,10 +89,6 @@ signals:
|
|||||||
void chunkActionsRequested(QMenu *menu, int diffFileIndex, int chunkIndex);
|
void chunkActionsRequested(QMenu *menu, int diffFileIndex, int chunkIndex);
|
||||||
void requestMoreInformation();
|
void requestMoreInformation();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void beginReload();
|
|
||||||
void endReload(bool success);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setController(DiffEditorController *controller);
|
void setController(DiffEditorController *controller);
|
||||||
|
|
||||||
|
@@ -56,22 +56,23 @@ public:
|
|||||||
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
|
bool initialize(const QStringList &arguments, QString *errorMessage = 0);
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateDiffCurrentFileAction();
|
void updateDiffCurrentFileAction();
|
||||||
void updateDiffOpenFilesAction();
|
void updateDiffOpenFilesAction();
|
||||||
void diffCurrentFile();
|
void diffCurrentFile();
|
||||||
void diffOpenFiles();
|
void diffOpenFiles();
|
||||||
void diffExternalFiles();
|
void diffExternalFiles();
|
||||||
|
|
||||||
|
QAction *m_diffCurrentFileAction = nullptr;
|
||||||
|
QAction *m_diffOpenFilesAction = nullptr;
|
||||||
|
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
private slots:
|
||||||
void testMakePatch_data();
|
void testMakePatch_data();
|
||||||
void testMakePatch();
|
void testMakePatch();
|
||||||
void testReadPatch_data();
|
void testReadPatch_data();
|
||||||
void testReadPatch();
|
void testReadPatch();
|
||||||
#endif // WITH_TESTS
|
#endif // WITH_TESTS
|
||||||
private:
|
|
||||||
QAction *m_diffCurrentFileAction = nullptr;
|
|
||||||
QAction *m_diffOpenFilesAction = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -87,7 +87,6 @@ public:
|
|||||||
void saveState();
|
void saveState();
|
||||||
void restoreState();
|
void restoreState();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setDisplaySettings(const DisplaySettings &ds) override;
|
void setDisplaySettings(const DisplaySettings &ds) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -534,8 +533,8 @@ SideBySideDiffEditorWidget::SideBySideDiffEditorWidget(QWidget *parent)
|
|||||||
|
|
||||||
connect(m_leftEditor, &QPlainTextEdit::cursorPositionChanged,
|
connect(m_leftEditor, &QPlainTextEdit::cursorPositionChanged,
|
||||||
this, &SideBySideDiffEditorWidget::leftCursorPositionChanged);
|
this, &SideBySideDiffEditorWidget::leftCursorPositionChanged);
|
||||||
// connect(m_leftEditor->document()->documentLayout(), SIGNAL(documentSizeChanged(QSizeF)),
|
// connect(m_leftEditor->document()->documentLayout(), &QAbstractTextDocumentLayout::documentSizeChanged,
|
||||||
// this, SLOT(leftDocumentSizeChanged()));
|
// this, &SideBySideDiffEditorWidget::leftDocumentSizeChanged);
|
||||||
|
|
||||||
connect(m_rightEditor->verticalScrollBar(), &QAbstractSlider::valueChanged,
|
connect(m_rightEditor->verticalScrollBar(), &QAbstractSlider::valueChanged,
|
||||||
this, &SideBySideDiffEditorWidget::rightVSliderChanged);
|
this, &SideBySideDiffEditorWidget::rightVSliderChanged);
|
||||||
|
@@ -70,7 +70,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void currentDiffFileIndexChanged(int index);
|
void currentDiffFileIndexChanged(int index);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
||||||
void slotLeftJumpToOriginalFileRequested(int diffFileIndex,
|
void slotLeftJumpToOriginalFileRequested(int diffFileIndex,
|
||||||
int lineNumber, int columnNumber);
|
int lineNumber, int columnNumber);
|
||||||
@@ -87,7 +87,6 @@ private slots:
|
|||||||
void leftCursorPositionChanged();
|
void leftCursorPositionChanged();
|
||||||
void rightCursorPositionChanged();
|
void rightCursorPositionChanged();
|
||||||
|
|
||||||
private:
|
|
||||||
void showDiff();
|
void showDiff();
|
||||||
|
|
||||||
SideDiffEditorWidget *m_leftEditor;
|
SideDiffEditorWidget *m_leftEditor;
|
||||||
|
@@ -64,25 +64,22 @@ public:
|
|||||||
void restoreState();
|
void restoreState();
|
||||||
|
|
||||||
void clear(const QString &message = QString());
|
void clear(const QString &message = QString());
|
||||||
|
void setDisplaySettings(const TextEditor::DisplaySettings &ds) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentDiffFileIndexChanged(int index);
|
void currentDiffFileIndexChanged(int index);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setDisplaySettings(const TextEditor::DisplaySettings &ds) override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
void mouseDoubleClickEvent(QMouseEvent *e) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *e) override;
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
||||||
QString lineNumber(int blockNumber) const override;
|
QString lineNumber(int blockNumber) const override;
|
||||||
int lineNumberDigits() const override;
|
int lineNumberDigits() const override;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
void setFontSettings(const TextEditor::FontSettings &fontSettings);
|
||||||
|
|
||||||
void slotCursorPositionChangedInEditor();
|
void slotCursorPositionChangedInEditor();
|
||||||
|
|
||||||
private:
|
|
||||||
void setLeftLineNumber(int blockNumber, int lineNumber);
|
void setLeftLineNumber(int blockNumber, int lineNumber);
|
||||||
void setRightLineNumber(int blockNumber, int lineNumber);
|
void setRightLineNumber(int blockNumber, int lineNumber);
|
||||||
void setFileInfo(int blockNumber,
|
void setFileInfo(int blockNumber,
|
||||||
|
@@ -49,12 +49,11 @@ public:
|
|||||||
|
|
||||||
void accept() override;
|
void accept() override;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void resetExportSize();
|
void resetExportSize();
|
||||||
void exportWidthChanged(int width);
|
void exportWidthChanged(int width);
|
||||||
void exportHeightChanged(int height);
|
void exportHeightChanged(int height);
|
||||||
|
|
||||||
private:
|
|
||||||
void setExportWidthBlocked(int width);
|
void setExportWidthBlocked(int width);
|
||||||
void setExportHeightBlocked(int height);
|
void setExportHeightBlocked(int height);
|
||||||
|
|
||||||
|
@@ -68,11 +68,6 @@ public:
|
|||||||
void reset();
|
void reset();
|
||||||
void createScene();
|
void createScene();
|
||||||
|
|
||||||
signals:
|
|
||||||
void scaleFactorChanged(qreal factor);
|
|
||||||
void imageSizeChanged(const QSize &size);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void exportImage();
|
void exportImage();
|
||||||
void setViewBackground(bool enable);
|
void setViewBackground(bool enable);
|
||||||
void setViewOutline(bool enable);
|
void setViewOutline(bool enable);
|
||||||
@@ -81,18 +76,19 @@ public slots:
|
|||||||
void resetToOriginalSize();
|
void resetToOriginalSize();
|
||||||
void fitToScreen();
|
void fitToScreen();
|
||||||
|
|
||||||
private slots:
|
signals:
|
||||||
void emitScaleFactor();
|
void scaleFactorChanged(qreal factor);
|
||||||
|
void imageSizeChanged(const QSize &size);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void emitScaleFactor();
|
||||||
|
void doScale(qreal factor);
|
||||||
|
|
||||||
protected:
|
|
||||||
void drawBackground(QPainter *p, const QRectF &rect);
|
void drawBackground(QPainter *p, const QRectF &rect);
|
||||||
void hideEvent(QHideEvent *event);
|
void hideEvent(QHideEvent *event);
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
|
|
||||||
private:
|
|
||||||
void doScale(qreal factor);
|
|
||||||
|
|
||||||
ImageViewerFile *m_file;
|
ImageViewerFile *m_file;
|
||||||
QGraphicsItem *m_imageItem = 0;
|
QGraphicsItem *m_imageItem = 0;
|
||||||
QGraphicsRectItem *m_backgroundItem = 0;
|
QGraphicsRectItem *m_backgroundItem = 0;
|
||||||
|
@@ -54,7 +54,6 @@ public:
|
|||||||
|
|
||||||
IEditor *duplicate() override;
|
IEditor *duplicate() override;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void exportImage();
|
void exportImage();
|
||||||
void imageSizeUpdated(const QSize &size);
|
void imageSizeUpdated(const QSize &size);
|
||||||
void scaleFactorUpdate(qreal factor);
|
void scaleFactorUpdate(qreal factor);
|
||||||
@@ -68,12 +67,10 @@ public slots:
|
|||||||
void updateToolButtons();
|
void updateToolButtons();
|
||||||
void togglePlay();
|
void togglePlay();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void playToggled();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ImageViewer(const QSharedPointer<ImageViewerFile> &document, QWidget *parent = 0);
|
ImageViewer(const QSharedPointer<ImageViewerFile> &document, QWidget *parent = 0);
|
||||||
void ctor();
|
void ctor();
|
||||||
|
void playToggled();
|
||||||
void updatePauseAction();
|
void updatePauseAction();
|
||||||
|
|
||||||
struct ImageViewerPrivate *d;
|
struct ImageViewerPrivate *d;
|
||||||
|
@@ -287,10 +287,9 @@ void MacroManager::startMacro()
|
|||||||
QString executeShortcut = Core::ActionManager::command(Constants::EXECUTE_LAST_MACRO)->keySequence().toString();
|
QString executeShortcut = Core::ActionManager::command(Constants::EXECUTE_LAST_MACRO)->keySequence().toString();
|
||||||
QString help = tr("Macro mode. Type \"%1\" to stop recording and \"%2\" to play the macro.")
|
QString help = tr("Macro mode. Type \"%1\" to stop recording and \"%2\" to play the macro.")
|
||||||
.arg(endShortcut).arg(executeShortcut);
|
.arg(endShortcut).arg(executeShortcut);
|
||||||
Core::EditorManager::showEditorStatusBar(
|
Core::EditorManager::showEditorStatusBar(Constants::M_STATUS_BUFFER, help,
|
||||||
QLatin1String(Constants::M_STATUS_BUFFER),
|
tr("Stop Recording Macro"),
|
||||||
help,
|
this, [this] { endMacro(); });
|
||||||
tr("Stop Recording Macro"), this, SLOT(endMacro()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroManager::endMacro()
|
void MacroManager::endMacro()
|
||||||
|
@@ -56,8 +56,6 @@ public:
|
|||||||
void executeLastMacro();
|
void executeLastMacro();
|
||||||
void saveLastMacro();
|
void saveLastMacro();
|
||||||
bool executeMacro(const QString &name);
|
bool executeMacro(const QString &name);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void endMacro();
|
void endMacro();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -67,7 +67,6 @@ public:
|
|||||||
|
|
||||||
bool sccManaged(const QString &filename);
|
bool sccManaged(const QString &filename);
|
||||||
|
|
||||||
public slots:
|
|
||||||
// To be connected to the HgTask's success signal to emit the repository/
|
// To be connected to the HgTask's success signal to emit the repository/
|
||||||
// files changed signals according to the variant's type:
|
// files changed signals according to the variant's type:
|
||||||
// String -> repository, StringList -> files
|
// String -> repository, StringList -> files
|
||||||
|
@@ -126,7 +126,8 @@ bool MercurialPlugin::initialize(const QStringList & /* arguments */, QString *
|
|||||||
|
|
||||||
addAutoReleasedObject(new OptionsPage(versionControl()));
|
addAutoReleasedObject(new OptionsPage(versionControl()));
|
||||||
|
|
||||||
connect(m_client, SIGNAL(changed(QVariant)), versionControl(), SLOT(changed(QVariant)));
|
connect(m_client, &VcsBaseClient::changed,
|
||||||
|
static_cast<MercurialControl *>(versionControl()), &MercurialControl::changed);
|
||||||
connect(m_client, &MercurialClient::needUpdate, this, &MercurialPlugin::update);
|
connect(m_client, &MercurialClient::needUpdate, this, &MercurialPlugin::update);
|
||||||
|
|
||||||
const auto describeFunc = [this](const QString &source, const QString &id) {
|
const auto describeFunc = [this](const QString &source, const QString &id) {
|
||||||
@@ -164,7 +165,6 @@ void MercurialPlugin::createMenu(const Core::Context &context)
|
|||||||
m_mercurialContainer->addSeparator(context);
|
m_mercurialContainer->addSeparator(context);
|
||||||
createRepositoryActions(context);
|
createRepositoryActions(context);
|
||||||
m_mercurialContainer->addSeparator(context);
|
m_mercurialContainer->addSeparator(context);
|
||||||
createRepositoryManagementActions(context);
|
|
||||||
|
|
||||||
// Request the Tools menu and add the Mercurial menu to it
|
// Request the Tools menu and add the Mercurial menu to it
|
||||||
Core::ActionContainer *toolsMenu = Core::ActionManager::actionContainer(Core::Id(Core::Constants::M_TOOLS));
|
Core::ActionContainer *toolsMenu = Core::ActionManager::actionContainer(Core::Id(Core::Constants::M_TOOLS));
|
||||||
@@ -603,18 +603,6 @@ bool MercurialPlugin::submitEditorAboutToClose()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MercurialPlugin::createRepositoryManagementActions(const Core::Context &context)
|
|
||||||
{
|
|
||||||
//TODO create menu for these options
|
|
||||||
Q_UNUSED(context);
|
|
||||||
return;
|
|
||||||
// auto action = new QAction(tr("Branch"), this);
|
|
||||||
// actionList.append(action);
|
|
||||||
// Core::Command *command = Core::ActionManager::registerAction(action, Constants::BRANCH, context);
|
|
||||||
// // connect(action, SIGNAL(triggered()), this, SLOT(branch()));
|
|
||||||
// m_mercurialContainer->addAction(command);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MercurialPlugin::updateActions(VcsBasePlugin::ActionState as)
|
void MercurialPlugin::updateActions(VcsBasePlugin::ActionState as)
|
||||||
{
|
{
|
||||||
if (!enableMenuAction(as, m_menuAction)) {
|
if (!enableMenuAction(as, m_menuAction)) {
|
||||||
|
@@ -127,7 +127,6 @@ private:
|
|||||||
void createFileActions(const Core::Context &context);
|
void createFileActions(const Core::Context &context);
|
||||||
void createDirectoryActions(const Core::Context &context);
|
void createDirectoryActions(const Core::Context &context);
|
||||||
void createRepositoryActions(const Core::Context &context);
|
void createRepositoryActions(const Core::Context &context);
|
||||||
void createRepositoryManagementActions(const Core::Context &context);
|
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
static MercurialPlugin *m_instance;
|
static MercurialPlugin *m_instance;
|
||||||
|
@@ -71,7 +71,7 @@ public:
|
|||||||
|
|
||||||
void createActions();
|
void createActions();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void undo();
|
void undo();
|
||||||
void redo();
|
void redo();
|
||||||
void cut();
|
void cut();
|
||||||
@@ -88,7 +88,6 @@ private slots:
|
|||||||
void zoomOut();
|
void zoomOut();
|
||||||
void resetZoom();
|
void resetZoom();
|
||||||
|
|
||||||
private:
|
|
||||||
Core::Command *registerCommand(const Core::Id &id, const std::function<void()> &slot,
|
Core::Command *registerCommand(const Core::Id &id, const std::function<void()> &slot,
|
||||||
const Core::Context &context,
|
const Core::Context &context,
|
||||||
bool scriptable = true, const QString &title = QString(),
|
bool scriptable = true, const QString &title = QString(),
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
ElementTasks *elementTasks() const;
|
ElementTasks *elementTasks() const;
|
||||||
PxNodeController *pxNodeController() const;
|
PxNodeController *pxNodeController() const;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void onProjectFileNameChanged(const QString &fileName);
|
void onProjectFileNameChanged(const QString &fileName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -65,7 +65,7 @@ public:
|
|||||||
QString findModel(const qmt::Uid &modelUid);
|
QString findModel(const qmt::Uid &modelUid);
|
||||||
QString findDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid);
|
QString findDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void onProjectAdded(ProjectExplorer::Project *project);
|
void onProjectAdded(ProjectExplorer::Project *project);
|
||||||
void onAboutToRemoveProject(ProjectExplorer::Project *project);
|
void onAboutToRemoveProject(ProjectExplorer::Project *project);
|
||||||
void onProjectFileListChanged(ProjectExplorer::Project *project);
|
void onProjectFileListChanged(ProjectExplorer::Project *project);
|
||||||
|
@@ -60,12 +60,11 @@ public:
|
|||||||
void releaseModel(ExtDocumentController *documentController);
|
void releaseModel(ExtDocumentController *documentController);
|
||||||
void openDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid);
|
void openDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void onAboutToShowContextMenu(ProjectExplorer::Project *project, ProjectExplorer::Node *node);
|
void onAboutToShowContextMenu(ProjectExplorer::Project *project, ProjectExplorer::Node *node);
|
||||||
void onOpenDiagramFromProjectExplorer();
|
void onOpenDiagramFromProjectExplorer();
|
||||||
void onOpenDefaultModel(const qmt::Uid &modelUid);
|
void onOpenDefaultModel(const qmt::Uid &modelUid);
|
||||||
|
|
||||||
private:
|
|
||||||
void openDiagram(ExtDocumentController *documentController, qmt::MDiagram *diagram);
|
void openDiagram(ExtDocumentController *documentController, qmt::MDiagram *diagram);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -54,7 +54,6 @@ public:
|
|||||||
bool hasRightHorizSplitterState() const;
|
bool hasRightHorizSplitterState() const;
|
||||||
QByteArray rightHorizSplitterState() const;
|
QByteArray rightHorizSplitterState() const;
|
||||||
|
|
||||||
public slots:
|
|
||||||
void onRightSplitterChanged(const QByteArray &state);
|
void onRightSplitterChanged(const QByteArray &state);
|
||||||
void onRightHorizSplitterChanged(const QByteArray &state);
|
void onRightHorizSplitterChanged(const QByteArray &state);
|
||||||
void saveSettings(QSettings *settings);
|
void saveSettings(QSettings *settings);
|
||||||
|
@@ -57,21 +57,6 @@ QList<ProjectAction> NimProjectNode::supportedActions(Node *node) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NimProjectNode::addSubProjects(const QStringList &)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NimProjectNode::canAddSubProject(const QString &) const
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NimProjectNode::removeSubProjects(const QStringList &)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool NimProjectNode::addFiles(const QStringList &filePaths, QStringList *)
|
bool NimProjectNode::addFiles(const QStringList &filePaths, QStringList *)
|
||||||
{
|
{
|
||||||
return m_project.addFiles(filePaths);
|
return m_project.addFiles(filePaths);
|
||||||
|
@@ -39,9 +39,6 @@ public:
|
|||||||
NimProjectNode(NimProject &project, const Utils::FileName &projectFilePath);
|
NimProjectNode(NimProject &project, const Utils::FileName &projectFilePath);
|
||||||
|
|
||||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||||
bool canAddSubProject(const QString &) const override;
|
|
||||||
bool addSubProjects(const QStringList &) override;
|
|
||||||
bool removeSubProjects(const QStringList &) override;
|
|
||||||
bool addFiles(const QStringList &filePaths, QStringList *) override;
|
bool addFiles(const QStringList &filePaths, QStringList *) override;
|
||||||
bool removeFiles(const QStringList &filePaths, QStringList *) override;
|
bool removeFiles(const QStringList &filePaths, QStringList *) override;
|
||||||
bool deleteFiles(const QStringList &) override;
|
bool deleteFiles(const QStringList &) override;
|
||||||
|
@@ -993,17 +993,23 @@ PerforceResponse PerforcePlugin::synchronousProcess(const QString &workingDir,
|
|||||||
// connect stderr to the output window if desired
|
// connect stderr to the output window if desired
|
||||||
if (flags & StdErrToWindow) {
|
if (flags & StdErrToWindow) {
|
||||||
process.setStdErrBufferedSignalsEnabled(true);
|
process.setStdErrBufferedSignalsEnabled(true);
|
||||||
connect(&process, SIGNAL(stdErrBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
|
connect(&process, &SynchronousProcess::stdErrBuffered,
|
||||||
|
outputWindow, [outputWindow](const QString &lines) {
|
||||||
|
outputWindow->append(lines);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// connect stdout to the output window if desired
|
// connect stdout to the output window if desired
|
||||||
if (flags & StdOutToWindow) {
|
if (flags & StdOutToWindow) {
|
||||||
process.setStdOutBufferedSignalsEnabled(true);
|
process.setStdOutBufferedSignalsEnabled(true);
|
||||||
if (flags & SilentStdOut) {
|
if (flags & SilentStdOut) {
|
||||||
connect(&process, &SynchronousProcess::stdOutBuffered, outputWindow, &VcsOutputWindow::appendSilently);
|
connect(&process, &SynchronousProcess::stdOutBuffered,
|
||||||
}
|
outputWindow, &VcsOutputWindow::appendSilently);
|
||||||
else {
|
} else {
|
||||||
connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
|
connect(&process, &SynchronousProcess::stdOutBuffered,
|
||||||
|
outputWindow, [outputWindow](const QString &lines) {
|
||||||
|
outputWindow->append(lines);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
process.setTimeOutMessageBoxEnabled(true);
|
process.setTimeOutMessageBoxEnabled(true);
|
||||||
|
@@ -85,6 +85,7 @@ static void replaceAllChildWidgets(QLayout *layout, const QList<QWidget *> &newC
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const char SETTINGS_KEY[] = "ProjectExplorer/AppOutput/Zoom";
|
const char SETTINGS_KEY[] = "ProjectExplorer/AppOutput/Zoom";
|
||||||
|
const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput";
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -425,7 +426,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc)
|
|||||||
}
|
}
|
||||||
// Create new
|
// Create new
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
Core::Id contextId = Core::Id(Constants::C_APP_OUTPUT).withSuffix(counter++);
|
Core::Id contextId = Core::Id(C_APP_OUTPUT).withSuffix(counter++);
|
||||||
Core::Context context(contextId);
|
Core::Context context(contextId);
|
||||||
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
|
Core::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget);
|
||||||
ow->setWindowTitle(tr("Application Output Window"));
|
ow->setWindowTitle(tr("Application Output Window"));
|
||||||
|
@@ -57,6 +57,7 @@ using namespace ProjectExplorer::Internal;
|
|||||||
namespace {
|
namespace {
|
||||||
const int MAX_LINECOUNT = 100000;
|
const int MAX_LINECOUNT = 100000;
|
||||||
const char SETTINGS_KEY[] = "ProjectExplorer/CompileOutput/Zoom";
|
const char SETTINGS_KEY[] = "ProjectExplorer/CompileOutput/Zoom";
|
||||||
|
const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput";
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
@@ -148,7 +149,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) :
|
|||||||
m_zoomOutButton(new QToolButton),
|
m_zoomOutButton(new QToolButton),
|
||||||
m_escapeCodeHandler(new Utils::AnsiEscapeCodeHandler)
|
m_escapeCodeHandler(new Utils::AnsiEscapeCodeHandler)
|
||||||
{
|
{
|
||||||
Core::Context context(Constants::C_COMPILE_OUTPUT);
|
Core::Context context(C_COMPILE_OUTPUT);
|
||||||
m_outputWindow = new CompileOutputTextEdit(context);
|
m_outputWindow = new CompileOutputTextEdit(context);
|
||||||
m_outputWindow->setWindowTitle(displayName());
|
m_outputWindow->setWindowTitle(displayName());
|
||||||
m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
|
m_outputWindow->setWindowIcon(Icons::WINDOW.icon());
|
||||||
|
@@ -34,10 +34,11 @@
|
|||||||
|
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
|
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
|
||||||
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
|
const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList.";
|
||||||
|
const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration";
|
||||||
|
|
||||||
DeployConfiguration::DeployConfiguration(Target *target, Core::Id id) :
|
DeployConfiguration::DeployConfiguration(Target *target, Core::Id id) :
|
||||||
ProjectConfiguration(target, id)
|
ProjectConfiguration(target, id)
|
||||||
@@ -204,12 +205,12 @@ QList<Core::Id> DefaultDeployConfigurationFactory::availableCreationIds(Target *
|
|||||||
{
|
{
|
||||||
if (!canHandle(parent))
|
if (!canHandle(parent))
|
||||||
return QList<Core::Id>();
|
return QList<Core::Id>();
|
||||||
return QList<Core::Id>() << Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
|
return QList<Core::Id>() << Core::Id(DEFAULT_DEPLOYCONFIGURATION_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DefaultDeployConfigurationFactory::displayNameForId(Core::Id id) const
|
QString DefaultDeployConfigurationFactory::displayNameForId(Core::Id id) const
|
||||||
{
|
{
|
||||||
if (id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID)
|
if (id == DEFAULT_DEPLOYCONFIGURATION_ID)
|
||||||
//: Display name of the default deploy configuration
|
//: Display name of the default deploy configuration
|
||||||
return DeployConfigurationFactory::tr("Deploy Configuration");
|
return DeployConfigurationFactory::tr("Deploy Configuration");
|
||||||
return QString();
|
return QString();
|
||||||
@@ -219,7 +220,7 @@ bool DefaultDeployConfigurationFactory::canCreate(Target *parent, Core::Id id) c
|
|||||||
{
|
{
|
||||||
if (!canHandle(parent))
|
if (!canHandle(parent))
|
||||||
return false;
|
return false;
|
||||||
return id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID;
|
return id == DEFAULT_DEPLOYCONFIGURATION_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeployConfiguration *DefaultDeployConfigurationFactory::create(Target *parent, Core::Id id)
|
DeployConfiguration *DefaultDeployConfigurationFactory::create(Target *parent, Core::Id id)
|
||||||
@@ -264,3 +265,5 @@ bool DefaultDeployConfigurationFactory::canHandle(Target *parent) const
|
|||||||
return false;
|
return false;
|
||||||
return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE;
|
return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace ProjectExplorer
|
||||||
|
@@ -148,13 +148,14 @@ void DeviceManager::load()
|
|||||||
|
|
||||||
Utils::PersistentSettingsReader reader;
|
Utils::PersistentSettingsReader reader;
|
||||||
// read devices file from global settings path
|
// read devices file from global settings path
|
||||||
|
QHash<Core::Id, Core::Id> defaultDevices;
|
||||||
QList<IDevice::Ptr> sdkDevices;
|
QList<IDevice::Ptr> sdkDevices;
|
||||||
if (reader.load(systemSettingsFilePath(QLatin1String("/qtcreator/devices.xml"))))
|
if (reader.load(systemSettingsFilePath(QLatin1String("/qtcreator/devices.xml"))))
|
||||||
sdkDevices = fromMap(reader.restoreValues().value(QLatin1String(DeviceManagerKey)).toMap());
|
sdkDevices = fromMap(reader.restoreValues().value(DeviceManagerKey).toMap(), &defaultDevices);
|
||||||
// read devices file from user settings path
|
// read devices file from user settings path
|
||||||
QList<IDevice::Ptr> userDevices;
|
QList<IDevice::Ptr> userDevices;
|
||||||
if (reader.load(settingsFilePath(QLatin1String("/devices.xml"))))
|
if (reader.load(settingsFilePath(QLatin1String("/devices.xml"))))
|
||||||
userDevices = fromMap(reader.restoreValues().value(QLatin1String(DeviceManagerKey)).toMap());
|
userDevices = fromMap(reader.restoreValues().value(DeviceManagerKey).toMap(), &defaultDevices);
|
||||||
// Insert devices into the model. Prefer the higher device version when there are multiple
|
// Insert devices into the model. Prefer the higher device version when there are multiple
|
||||||
// devices with the same id.
|
// devices with the same id.
|
||||||
foreach (IDevice::Ptr device, userDevices) {
|
foreach (IDevice::Ptr device, userDevices) {
|
||||||
@@ -172,18 +173,25 @@ void DeviceManager::load()
|
|||||||
foreach (const IDevice::Ptr &sdkDevice, sdkDevices)
|
foreach (const IDevice::Ptr &sdkDevice, sdkDevices)
|
||||||
addDevice(sdkDevice);
|
addDevice(sdkDevice);
|
||||||
|
|
||||||
ensureOneDefaultDevicePerType();
|
// Overwrite with the saved default devices.
|
||||||
|
for (auto itr = defaultDevices.constBegin(); itr != defaultDevices.constEnd(); ++itr) {
|
||||||
|
IDevice::ConstPtr device = find(itr.value());
|
||||||
|
if (device)
|
||||||
|
d->defaultDevices[device->type()] = device->id();
|
||||||
|
}
|
||||||
|
|
||||||
emit devicesLoaded();
|
emit devicesLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<IDevice::Ptr> DeviceManager::fromMap(const QVariantMap &map)
|
QList<IDevice::Ptr> DeviceManager::fromMap(const QVariantMap &map,
|
||||||
|
QHash<Core::Id, Core::Id> *defaultDevices)
|
||||||
{
|
{
|
||||||
QList<IDevice::Ptr> devices;
|
QList<IDevice::Ptr> devices;
|
||||||
const QVariantMap defaultDevsMap = map.value(QLatin1String(DefaultDevicesKey)).toMap();
|
|
||||||
for (QVariantMap::ConstIterator it = defaultDevsMap.constBegin();
|
if (defaultDevices) {
|
||||||
it != defaultDevsMap.constEnd(); ++it) {
|
const QVariantMap defaultDevsMap = map.value(DefaultDevicesKey).toMap();
|
||||||
d->defaultDevices.insert(Core::Id::fromString(it.key()), Core::Id::fromSetting(it.value()));
|
for (auto it = defaultDevsMap.constBegin(); it != defaultDevsMap.constEnd(); ++it)
|
||||||
|
defaultDevices->insert(Core::Id::fromString(it.key()), Core::Id::fromSetting(it.value()));
|
||||||
}
|
}
|
||||||
const QVariantList deviceList = map.value(QLatin1String(DeviceListKey)).toList();
|
const QVariantList deviceList = map.value(QLatin1String(DeviceListKey)).toList();
|
||||||
foreach (const QVariant &v, deviceList) {
|
foreach (const QVariant &v, deviceList) {
|
||||||
@@ -398,14 +406,6 @@ IDevice::ConstPtr DeviceManager::defaultDevice(Core::Id deviceType) const
|
|||||||
return id.isValid() ? find(id) : IDevice::ConstPtr();
|
return id.isValid() ? find(id) : IDevice::ConstPtr();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceManager::ensureOneDefaultDevicePerType()
|
|
||||||
{
|
|
||||||
foreach (const IDevice::Ptr &device, d->devices) {
|
|
||||||
if (!defaultDevice(device->type()))
|
|
||||||
d->defaultDevices.insert(device->type(), device->id());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QString DeviceManager::hostKeysFilePath()
|
QString DeviceManager::hostKeysFilePath()
|
||||||
{
|
{
|
||||||
return settingsFilePath(QLatin1String("/ssh-hostkeys")).toString();
|
return settingsFilePath(QLatin1String("/ssh-hostkeys")).toString();
|
||||||
|
@@ -85,9 +85,8 @@ private:
|
|||||||
|
|
||||||
void load();
|
void load();
|
||||||
static const IDeviceFactory *restoreFactory(const QVariantMap &map);
|
static const IDeviceFactory *restoreFactory(const QVariantMap &map);
|
||||||
QList<IDevice::Ptr> fromMap(const QVariantMap &map);
|
QList<IDevice::Ptr> fromMap(const QVariantMap &map, QHash<Core::Id, Core::Id> *defaultDevices);
|
||||||
QVariantMap toMap() const;
|
QVariantMap toMap() const;
|
||||||
void ensureOneDefaultDevicePerType();
|
|
||||||
|
|
||||||
// For SettingsWidget.
|
// For SettingsWidget.
|
||||||
IDevice::Ptr mutableDevice(Core::Id id) const;
|
IDevice::Ptr mutableDevice(Core::Id id) const;
|
||||||
|
@@ -175,7 +175,7 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files)
|
|||||||
if (!folder)
|
if (!folder)
|
||||||
return;
|
return;
|
||||||
if (kind == IWizardFactory::ProjectWizard) {
|
if (kind == IWizardFactory::ProjectWizard) {
|
||||||
if (!static_cast<ProjectNode *>(folder)->addSubProjects(QStringList(generatedProject))) {
|
if (!static_cast<ProjectNode *>(folder)->addSubProject(generatedProject)) {
|
||||||
QMessageBox::critical(m_wizard, tr("Failed to Add to Project"),
|
QMessageBox::critical(m_wizard, tr("Failed to Add to Project"),
|
||||||
tr("Failed to add subproject \"%1\"\nto project \"%2\".")
|
tr("Failed to add subproject \"%1\"\nto project \"%2\".")
|
||||||
.arg(QDir::toNativeSeparators(generatedProject))
|
.arg(QDir::toNativeSeparators(generatedProject))
|
||||||
|
@@ -583,18 +583,24 @@ QString Kit::toHtml(const QList<Task> &additional) const
|
|||||||
|
|
||||||
void Kit::setAutoDetected(bool detected)
|
void Kit::setAutoDetected(bool detected)
|
||||||
{
|
{
|
||||||
|
if (d->m_autodetected == detected)
|
||||||
|
return;
|
||||||
d->m_autodetected = detected;
|
d->m_autodetected = detected;
|
||||||
kitUpdated();
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setAutoDetectionSource(const QString &autoDetectionSource)
|
void Kit::setAutoDetectionSource(const QString &autoDetectionSource)
|
||||||
{
|
{
|
||||||
|
if (d->m_autoDetectionSource == autoDetectionSource)
|
||||||
|
return;
|
||||||
d->m_autoDetectionSource = autoDetectionSource;
|
d->m_autoDetectionSource = autoDetectionSource;
|
||||||
kitUpdated();
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setSdkProvided(bool sdkProvided)
|
void Kit::setSdkProvided(bool sdkProvided)
|
||||||
{
|
{
|
||||||
|
if (d->m_sdkProvided == sdkProvided)
|
||||||
|
return;
|
||||||
d->m_sdkProvided = sdkProvided;
|
d->m_sdkProvided = sdkProvided;
|
||||||
kitUpdated();
|
kitUpdated();
|
||||||
}
|
}
|
||||||
@@ -609,6 +615,9 @@ void Kit::makeSticky()
|
|||||||
|
|
||||||
void Kit::setSticky(Id id, bool b)
|
void Kit::setSticky(Id id, bool b)
|
||||||
{
|
{
|
||||||
|
if (d->m_sticky.contains(id) == b)
|
||||||
|
return;
|
||||||
|
|
||||||
if (b)
|
if (b)
|
||||||
d->m_sticky.insert(id);
|
d->m_sticky.insert(id);
|
||||||
else
|
else
|
||||||
@@ -618,12 +627,17 @@ void Kit::setSticky(Id id, bool b)
|
|||||||
|
|
||||||
void Kit::makeUnSticky()
|
void Kit::makeUnSticky()
|
||||||
{
|
{
|
||||||
|
if (d->m_sticky.isEmpty())
|
||||||
|
return;
|
||||||
d->m_sticky.clear();
|
d->m_sticky.clear();
|
||||||
kitUpdated();
|
kitUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Kit::setMutable(Id id, bool b)
|
void Kit::setMutable(Id id, bool b)
|
||||||
{
|
{
|
||||||
|
if (d->m_mutable.contains(id) == b)
|
||||||
|
return;
|
||||||
|
|
||||||
if (b)
|
if (b)
|
||||||
d->m_mutable.insert(id);
|
d->m_mutable.insert(id);
|
||||||
else
|
else
|
||||||
|
@@ -46,6 +46,10 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
const char KITINFORMATION_ID_V1[] = "PE.Profile.ToolChain";
|
||||||
|
const char KITINFORMATION_ID_V2[] = "PE.Profile.ToolChains";
|
||||||
|
const char KITINFORMATION_ID_V3[] = "PE.Profile.ToolChainsV3";
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// SysRootKitInformation:
|
// SysRootKitInformation:
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
@@ -195,8 +199,8 @@ QList<Task> ToolChainKitInformation::validate(const Kit *k) const
|
|||||||
|
|
||||||
void ToolChainKitInformation::upgrade(Kit *k)
|
void ToolChainKitInformation::upgrade(Kit *k)
|
||||||
{
|
{
|
||||||
const Core::Id oldIdV1 = Constants::KITINFORMATION_ID_V1;
|
const Core::Id oldIdV1 = KITINFORMATION_ID_V1;
|
||||||
const Core::Id oldIdV2 = Constants::KITINFORMATION_ID_V2;
|
const Core::Id oldIdV2 = KITINFORMATION_ID_V2;
|
||||||
|
|
||||||
// upgrade <=4.1 to 4.2 (keep old settings around for now)
|
// upgrade <=4.1 to 4.2 (keep old settings around for now)
|
||||||
{
|
{
|
||||||
@@ -373,7 +377,7 @@ QSet<Core::Id> ToolChainKitInformation::availableFeatures(const Kit *k) const
|
|||||||
|
|
||||||
Core::Id ToolChainKitInformation::id()
|
Core::Id ToolChainKitInformation::id()
|
||||||
{
|
{
|
||||||
return Constants::KITINFORMATION_ID_V3;
|
return KITINFORMATION_ID_V3;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolChain *ToolChainKitInformation::toolChain(const Kit *k, Core::Id language)
|
ToolChain *ToolChainKitInformation::toolChain(const Kit *k, Core::Id language)
|
||||||
|
@@ -30,7 +30,6 @@
|
|||||||
#include "kitfeatureprovider.h"
|
#include "kitfeatureprovider.h"
|
||||||
#include "kitmanagerconfigwidget.h"
|
#include "kitmanagerconfigwidget.h"
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
#include "projectexplorerconstants.h"
|
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
@@ -417,13 +417,6 @@ void Project::setDocument(Core::IDocument *doc)
|
|||||||
QTC_ASSERT(doc, return);
|
QTC_ASSERT(doc, return);
|
||||||
QTC_ASSERT(!d->m_document, return);
|
QTC_ASSERT(!d->m_document, return);
|
||||||
d->m_document = doc;
|
d->m_document = doc;
|
||||||
|
|
||||||
if (!d->m_rootProjectNode) {
|
|
||||||
auto newRoot = new ProjectNode(projectDirectory());
|
|
||||||
newRoot->setDisplayName(displayName());
|
|
||||||
newRoot->addNode(new FileNode(projectFilePath(), FileType::Project, false));
|
|
||||||
setRootProjectNode(newRoot);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Project::setRootProjectNode(ProjectNode *root)
|
void Project::setRootProjectNode(ProjectNode *root)
|
||||||
|
@@ -166,6 +166,77 @@ using namespace ProjectExplorer::Internal;
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
namespace Constants {
|
||||||
|
const int P_MODE_SESSION = 85;
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
const char NEWSESSION[] = "ProjectExplorer.NewSession";
|
||||||
|
const char NEWPROJECT[] = "ProjectExplorer.NewProject";
|
||||||
|
const char LOAD[] = "ProjectExplorer.Load";
|
||||||
|
const char UNLOAD[] = "ProjectExplorer.Unload";
|
||||||
|
const char UNLOADCM[] = "ProjectExplorer.UnloadCM";
|
||||||
|
const char CLEARSESSION[] = "ProjectExplorer.ClearSession";
|
||||||
|
const char BUILDPROJECTONLY[] = "ProjectExplorer.BuildProjectOnly";
|
||||||
|
const char BUILDCM[] = "ProjectExplorer.BuildCM";
|
||||||
|
const char BUILDDEPENDCM[] = "ProjectExplorer.BuildDependenciesCM";
|
||||||
|
const char BUILDSESSION[] = "ProjectExplorer.BuildSession";
|
||||||
|
const char REBUILDPROJECTONLY[] = "ProjectExplorer.RebuildProjectOnly";
|
||||||
|
const char REBUILD[] = "ProjectExplorer.Rebuild";
|
||||||
|
const char REBUILDCM[] = "ProjectExplorer.RebuildCM";
|
||||||
|
const char REBUILDDEPENDCM[] = "ProjectExplorer.RebuildDependenciesCM";
|
||||||
|
const char REBUILDSESSION[] = "ProjectExplorer.RebuildSession";
|
||||||
|
const char DEPLOYPROJECTONLY[] = "ProjectExplorer.DeployProjectOnly";
|
||||||
|
const char DEPLOY[] = "ProjectExplorer.Deploy";
|
||||||
|
const char DEPLOYCM[] = "ProjectExplorer.DeployCM";
|
||||||
|
const char DEPLOYSESSION[] = "ProjectExplorer.DeploySession";
|
||||||
|
const char CLEANPROJECTONLY[] = "ProjectExplorer.CleanProjectOnly";
|
||||||
|
const char CLEAN[] = "ProjectExplorer.Clean";
|
||||||
|
const char CLEANCM[] = "ProjectExplorer.CleanCM";
|
||||||
|
const char CLEANDEPENDCM[] = "ProjectExplorer.CleanDependenciesCM";
|
||||||
|
const char CLEANSESSION[] = "ProjectExplorer.CleanSession";
|
||||||
|
const char CANCELBUILD[] = "ProjectExplorer.CancelBuild";
|
||||||
|
const char RUN[] = "ProjectExplorer.Run";
|
||||||
|
const char RUNWITHOUTDEPLOY[] = "ProjectExplorer.RunWithoutDeploy";
|
||||||
|
const char RUNCONTEXTMENU[] = "ProjectExplorer.RunContextMenu";
|
||||||
|
const char ADDNEWFILE[] = "ProjectExplorer.AddNewFile";
|
||||||
|
const char ADDEXISTINGFILES[] = "ProjectExplorer.AddExistingFiles";
|
||||||
|
const char ADDEXISTINGDIRECTORY[] = "ProjectExplorer.AddExistingDirectory";
|
||||||
|
const char ADDNEWSUBPROJECT[] = "ProjectExplorer.AddNewSubproject";
|
||||||
|
const char REMOVEPROJECT[] = "ProjectExplorer.RemoveProject";
|
||||||
|
const char OPENFILE[] = "ProjectExplorer.OpenFile";
|
||||||
|
const char SEARCHONFILESYSTEM[] = "ProjectExplorer.SearchOnFileSystem";
|
||||||
|
const char SHOWINGRAPHICALSHELL[] = "ProjectExplorer.ShowInGraphicalShell";
|
||||||
|
const char OPENTERMIANLHERE[] = "ProjectExplorer.OpenTerminalHere";
|
||||||
|
const char REMOVEFILE[] = "ProjectExplorer.RemoveFile";
|
||||||
|
const char DUPLICATEFILE[] = "ProjectExplorer.DuplicateFile";
|
||||||
|
const char DELETEFILE[] = "ProjectExplorer.DeleteFile";
|
||||||
|
const char RENAMEFILE[] = "ProjectExplorer.RenameFile";
|
||||||
|
const char SETSTARTUP[] = "ProjectExplorer.SetStartup";
|
||||||
|
const char PROJECTTREE_COLLAPSE_ALL[] = "ProjectExplorer.CollapseAll";
|
||||||
|
|
||||||
|
const char SELECTTARGET[] = "ProjectExplorer.SelectTarget";
|
||||||
|
const char SELECTTARGETQUICK[] = "ProjectExplorer.SelectTargetQuick";
|
||||||
|
|
||||||
|
// Action priorities
|
||||||
|
const int P_ACTION_RUN = 100;
|
||||||
|
const int P_ACTION_BUILDPROJECT = 80;
|
||||||
|
|
||||||
|
// Context
|
||||||
|
const char C_PROJECTEXPLORER[] = "Project Explorer";
|
||||||
|
|
||||||
|
// Menus
|
||||||
|
const char M_RECENTPROJECTS[] = "ProjectExplorer.Menu.Recent";
|
||||||
|
const char M_UNLOADPROJECTS[] = "ProjectExplorer.Menu.Unload";
|
||||||
|
const char M_SESSION[] = "ProjectExplorer.Menu.Session";
|
||||||
|
|
||||||
|
// Menu groups
|
||||||
|
const char G_BUILD_RUN[] = "ProjectExplorer.Group.Run";
|
||||||
|
const char G_BUILD_CANCEL[] = "ProjectExplorer.Group.BuildCancel";
|
||||||
|
|
||||||
|
const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
|
||||||
|
|
||||||
|
} // namespace Constants
|
||||||
|
|
||||||
static Target *activeTarget()
|
static Target *activeTarget()
|
||||||
{
|
{
|
||||||
Project *project = ProjectTree::currentProject();
|
Project *project = ProjectTree::currentProject();
|
||||||
@@ -1250,7 +1321,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return projectFilePath.toString();
|
return projectFilePath.toString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTPROJECT_BUILDPATH,
|
expander->registerVariable("CurrentProject:BuildPath",
|
||||||
tr("Full build path of the current project's active build configuration."),
|
tr("Full build path of the current project's active build configuration."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
BuildConfiguration *bc = activeBuildConfiguration();
|
BuildConfiguration *bc = activeBuildConfiguration();
|
||||||
@@ -1285,7 +1356,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return kit ? kit->id().toString() : QString();
|
return kit ? kit->id().toString() : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_HOSTADDRESS,
|
expander->registerVariable("CurrentDevice:HostAddress",
|
||||||
tr("The host address of the device in the currently active kit."),
|
tr("The host address of the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1293,7 +1364,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return device ? device->sshParameters().host : QString();
|
return device ? device->sshParameters().host : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_SSHPORT,
|
expander->registerVariable("CurrentDevice:SshPort",
|
||||||
tr("The SSH port of the device in the currently active kit."),
|
tr("The SSH port of the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1301,7 +1372,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return device ? QString::number(device->sshParameters().port) : QString();
|
return device ? QString::number(device->sshParameters().port) : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_USERNAME,
|
expander->registerVariable("CurrentDevice:UserName",
|
||||||
tr("The username with which to log into the device in the currently active kit."),
|
tr("The username with which to log into the device in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
Kit *kit = currentKit();
|
Kit *kit = currentKit();
|
||||||
@@ -1310,7 +1381,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTDEVICE_PRIVATEKEYFILE,
|
expander->registerVariable("CurrentDevice:PrivateKeyFile",
|
||||||
tr("The private key file with which to authenticate when logging into the device "
|
tr("The private key file with which to authenticate when logging into the device "
|
||||||
"in the currently active kit."),
|
"in the currently active kit."),
|
||||||
[]() -> QString {
|
[]() -> QString {
|
||||||
@@ -1336,7 +1407,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
return QString();
|
return QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
expander->registerFileVariables(Constants::VAR_CURRENTRUN_EXECUTABLE_PREFIX,
|
expander->registerFileVariables("CurrentRun:Executable",
|
||||||
tr("The currently active run configuration's executable (if applicable)"),
|
tr("The currently active run configuration's executable (if applicable)"),
|
||||||
[this]() -> QString {
|
[this]() -> QString {
|
||||||
if (Target *target = activeTarget()) {
|
if (Target *target = activeTarget()) {
|
||||||
@@ -1346,8 +1417,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
},
|
});
|
||||||
true);
|
|
||||||
|
|
||||||
expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE,
|
expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE,
|
||||||
tr("The currently active build configuration's type."),
|
tr("The currently active build configuration's type."),
|
||||||
@@ -3141,7 +3211,7 @@ void ProjectExplorerPluginPrivate::removeProject()
|
|||||||
RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow());
|
RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow());
|
||||||
removeFileDialog.setDeleteFileVisible(false);
|
removeFileDialog.setDeleteFileVisible(false);
|
||||||
if (removeFileDialog.exec() == QDialog::Accepted)
|
if (removeFileDialog.exec() == QDialog::Accepted)
|
||||||
projectNode->removeSubProjects(QStringList() << subProjectNode->filePath().toString());
|
projectNode->removeSubProject(subProjectNode->filePath().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "projectexplorer_export.h"
|
#include "projectexplorer_export.h"
|
||||||
#include "projectexplorerconstants.h"
|
|
||||||
#include "runconfiguration.h"
|
#include "runconfiguration.h"
|
||||||
|
|
||||||
#include <extensionsystem/iplugin.h>
|
#include <extensionsystem/iplugin.h>
|
||||||
|
@@ -32,84 +32,24 @@ namespace Constants {
|
|||||||
|
|
||||||
// Modes and their priorities
|
// Modes and their priorities
|
||||||
const char MODE_SESSION[] = "Project";
|
const char MODE_SESSION[] = "Project";
|
||||||
const int P_MODE_SESSION = 85;
|
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
const char NEWSESSION[] = "ProjectExplorer.NewSession";
|
|
||||||
const char NEWPROJECT[] = "ProjectExplorer.NewProject";
|
|
||||||
const char LOAD[] = "ProjectExplorer.Load";
|
|
||||||
const char UNLOAD[] = "ProjectExplorer.Unload";
|
|
||||||
const char UNLOADCM[] = "ProjectExplorer.UnloadCM";
|
|
||||||
const char CLEARSESSION[] = "ProjectExplorer.ClearSession";
|
|
||||||
const char BUILDPROJECTONLY[] = "ProjectExplorer.BuildProjectOnly";
|
|
||||||
const char BUILD[] = "ProjectExplorer.Build";
|
const char BUILD[] = "ProjectExplorer.Build";
|
||||||
const char BUILDCM[] = "ProjectExplorer.BuildCM";
|
|
||||||
const char BUILDDEPENDCM[] = "ProjectExplorer.BuildDependenciesCM";
|
|
||||||
const char BUILDSESSION[] = "ProjectExplorer.BuildSession";
|
|
||||||
const char REBUILDPROJECTONLY[] = "ProjectExplorer.RebuildProjectOnly";
|
|
||||||
const char REBUILD[] = "ProjectExplorer.Rebuild";
|
|
||||||
const char REBUILDCM[] = "ProjectExplorer.RebuildCM";
|
|
||||||
const char REBUILDDEPENDCM[] = "ProjectExplorer.RebuildDependenciesCM";
|
|
||||||
const char REBUILDSESSION[] = "ProjectExplorer.RebuildSession";
|
|
||||||
const char DEPLOYPROJECTONLY[] = "ProjectExplorer.DeployProjectOnly";
|
|
||||||
const char DEPLOY[] = "ProjectExplorer.Deploy";
|
|
||||||
const char DEPLOYCM[] = "ProjectExplorer.DeployCM";
|
|
||||||
const char DEPLOYSESSION[] = "ProjectExplorer.DeploySession";
|
|
||||||
const char PUBLISH[] = "ProjectExplorer.Publish";
|
|
||||||
const char CLEANPROJECTONLY[] = "ProjectExplorer.CleanProjectOnly";
|
|
||||||
const char CLEAN[] = "ProjectExplorer.Clean";
|
|
||||||
const char CLEANCM[] = "ProjectExplorer.CleanCM";
|
|
||||||
const char CLEANDEPENDCM[] = "ProjectExplorer.CleanDependenciesCM";
|
|
||||||
const char CLEANSESSION[] = "ProjectExplorer.CleanSession";
|
|
||||||
const char CANCELBUILD[] = "ProjectExplorer.CancelBuild";
|
|
||||||
const char RUN[] = "ProjectExplorer.Run";
|
|
||||||
const char RUNWITHOUTDEPLOY[] = "ProjectExplorer.RunWithoutDeploy";
|
|
||||||
const char RUNCONTEXTMENU[] = "ProjectExplorer.RunContextMenu";
|
|
||||||
const char STOP[] = "ProjectExplorer.Stop";
|
const char STOP[] = "ProjectExplorer.Stop";
|
||||||
const char ADDNEWFILE[] = "ProjectExplorer.AddNewFile";
|
|
||||||
const char ADDEXISTINGFILES[] = "ProjectExplorer.AddExistingFiles";
|
|
||||||
const char ADDEXISTINGDIRECTORY[] = "ProjectExplorer.AddExistingDirectory";
|
|
||||||
const char ADDNEWSUBPROJECT[] = "ProjectExplorer.AddNewSubproject";
|
|
||||||
const char REMOVEPROJECT[] = "ProjectExplorer.RemoveProject";
|
|
||||||
const char OPENFILE[] = "ProjectExplorer.OpenFile";
|
|
||||||
const char SEARCHONFILESYSTEM[] = "ProjectExplorer.SearchOnFileSystem";
|
|
||||||
const char SHOWINGRAPHICALSHELL[] = "ProjectExplorer.ShowInGraphicalShell";
|
|
||||||
const char OPENTERMIANLHERE[] = "ProjectExplorer.OpenTerminalHere";
|
|
||||||
const char REMOVEFILE[] = "ProjectExplorer.RemoveFile";
|
|
||||||
const char DUPLICATEFILE[] = "ProjectExplorer.DuplicateFile";
|
|
||||||
const char DELETEFILE[] = "ProjectExplorer.DeleteFile";
|
|
||||||
const char RENAMEFILE[] = "ProjectExplorer.RenameFile";
|
|
||||||
const char SETSTARTUP[] = "ProjectExplorer.SetStartup";
|
|
||||||
const char PROJECTTREE_COLLAPSE_ALL[] = "ProjectExplorer.CollapseAll";
|
|
||||||
|
|
||||||
const char SELECTTARGET[] = "ProjectExplorer.SelectTarget";
|
|
||||||
const char SELECTTARGETQUICK[] = "ProjectExplorer.SelectTargetQuick";
|
|
||||||
|
|
||||||
// Action priorities
|
|
||||||
const int P_ACTION_RUN = 100;
|
|
||||||
const int P_ACTION_BUILDPROJECT = 80;
|
|
||||||
|
|
||||||
// Context
|
// Context
|
||||||
const char C_PROJECTEXPLORER[] = "Project Explorer";
|
|
||||||
const char C_PROJECT_TREE[] = "ProjectExplorer.ProjectTreeContext";
|
const char C_PROJECT_TREE[] = "ProjectExplorer.ProjectTreeContext";
|
||||||
const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput";
|
|
||||||
const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput";
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
const char M_RECENTPROJECTS[] = "ProjectExplorer.Menu.Recent";
|
|
||||||
const char M_UNLOADPROJECTS[] = "ProjectExplorer.Menu.Unload";
|
|
||||||
const char M_BUILDPROJECT[] = "ProjectExplorer.Menu.Build";
|
const char M_BUILDPROJECT[] = "ProjectExplorer.Menu.Build";
|
||||||
const char M_DEBUG[] = "ProjectExplorer.Menu.Debug";
|
const char M_DEBUG[] = "ProjectExplorer.Menu.Debug";
|
||||||
const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging";
|
const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging";
|
||||||
const char M_SESSION[] = "ProjectExplorer.Menu.Session";
|
|
||||||
|
|
||||||
// Menu groups
|
// Menu groups
|
||||||
const char G_BUILD_BUILD[] = "ProjectExplorer.Group.Build";
|
const char G_BUILD_BUILD[] = "ProjectExplorer.Group.Build";
|
||||||
const char G_BUILD_DEPLOY[] = "ProjectExplorer.Group.Deploy";
|
const char G_BUILD_DEPLOY[] = "ProjectExplorer.Group.Deploy";
|
||||||
const char G_BUILD_REBUILD[] = "ProjectExplorer.Group.Rebuild";
|
const char G_BUILD_REBUILD[] = "ProjectExplorer.Group.Rebuild";
|
||||||
const char G_BUILD_CLEAN[] = "ProjectExplorer.Group.Clean";
|
const char G_BUILD_CLEAN[] = "ProjectExplorer.Group.Clean";
|
||||||
const char G_BUILD_RUN[] = "ProjectExplorer.Group.Run";
|
|
||||||
const char G_BUILD_CANCEL[] = "ProjectExplorer.Group.BuildCancel";
|
|
||||||
|
|
||||||
// Context menus
|
// Context menus
|
||||||
const char M_SESSIONCONTEXT[] = "Project.Menu.Session";
|
const char M_SESSIONCONTEXT[] = "Project.Menu.Session";
|
||||||
@@ -141,11 +81,6 @@ const char G_FILE_OPEN[] = "ProjectFile.Group.Open";
|
|||||||
const char G_FILE_OTHER[] = "ProjectFile.Group.Other";
|
const char G_FILE_OTHER[] = "ProjectFile.Group.Other";
|
||||||
const char G_FILE_CONFIG[] = "ProjectFile.Group.Config";
|
const char G_FILE_CONFIG[] = "ProjectFile.Group.Config";
|
||||||
|
|
||||||
const char RUNMENUCONTEXTMENU[] = "Project.RunMenu";
|
|
||||||
|
|
||||||
// File factory
|
|
||||||
const char FILE_FACTORY_ID[] = "ProjectExplorer.FileFactoryId";
|
|
||||||
|
|
||||||
// Mime types
|
// Mime types
|
||||||
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
|
const char C_SOURCE_MIMETYPE[] = "text/x-csrc";
|
||||||
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
|
const char C_HEADER_MIMETYPE[] = "text/x-chdr";
|
||||||
@@ -176,10 +111,6 @@ const char TASK_CATEGORY_COMPILE[] = "Task.Category.Compile";
|
|||||||
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
|
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
|
||||||
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
|
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
|
||||||
|
|
||||||
// Task mark categories
|
|
||||||
const char TASK_MARK_WARNING[] = "Task.Mark.Warning";
|
|
||||||
const char TASK_MARK_ERROR[] = "Task.Mark.Error";
|
|
||||||
|
|
||||||
// Wizard categories
|
// Wizard categories
|
||||||
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
|
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
|
||||||
const char QT_PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
|
const char QT_PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
|
||||||
@@ -202,9 +133,6 @@ const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean";
|
|||||||
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
|
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
|
||||||
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
|
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
|
||||||
|
|
||||||
// Deploy Configuration id:
|
|
||||||
const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration";
|
|
||||||
|
|
||||||
// Language
|
// Language
|
||||||
|
|
||||||
// Keep these short: These constants are exposed to the MacroExplorer!
|
// Keep these short: These constants are exposed to the MacroExplorer!
|
||||||
@@ -234,7 +162,6 @@ const int DESKTOP_PORT_END = 31000;
|
|||||||
|
|
||||||
// Variable Names:
|
// Variable Names:
|
||||||
const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject";
|
const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject";
|
||||||
const char VAR_CURRENTPROJECT_BUILDPATH[] = "CurrentProject:BuildPath";
|
|
||||||
const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name";
|
const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name";
|
||||||
const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name";
|
const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name";
|
||||||
const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
|
const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
|
||||||
@@ -243,19 +170,6 @@ const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name";
|
|||||||
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
|
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
|
||||||
const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env";
|
const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env";
|
||||||
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
|
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
|
||||||
const char VAR_CURRENTRUN_ENV[] = "CurrentRun:Env";
|
|
||||||
const char VAR_CURRENTRUN_EXECUTABLE_PREFIX[] = "CurrentRun:Executable";
|
|
||||||
const char VAR_CURRENTDEVICE_HOSTADDRESS[] = "CurrentDevice:HostAddress";
|
|
||||||
const char VAR_CURRENTDEVICE_SSHPORT[] = "CurrentDevice:SshPort";
|
|
||||||
const char VAR_CURRENTDEVICE_USERNAME[] = "CurrentDevice:UserName";
|
|
||||||
const char VAR_CURRENTDEVICE_PRIVATEKEYFILE[] = "CurrentDevice:PrivateKeyFile";
|
|
||||||
|
|
||||||
const char HIDE_FILE_FILTER_SETTING[] = "GenericProject/FileFilter";
|
|
||||||
const char HIDE_FILE_FILTER_DEFAULT[] = "Makefile*; *.o; *.lo; *.la; *.obj; *~; *.files;"
|
|
||||||
" *.config; *.creator; *.user*; *.includes; *.autosave";
|
|
||||||
|
|
||||||
const char SHOW_FILE_FILTER_SETTING[] = "GenericProject/ShowFileFilter";
|
|
||||||
const char SHOW_FILE_FILTER_DEFAULT[] = "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++; *.h; *.hh; *.hpp; *.hxx;";
|
|
||||||
|
|
||||||
// JsonWizard:
|
// JsonWizard:
|
||||||
const char PAGE_ID_PREFIX[] = "PE.Wizard.Page.";
|
const char PAGE_ID_PREFIX[] = "PE.Wizard.Page.";
|
||||||
@@ -282,10 +196,5 @@ const char FILEOVERLAY_H[]=":/projectexplorer/images/fileoverlay_h.png";
|
|||||||
const char FILEOVERLAY_SCXML[]=":/projectexplorer/images/fileoverlay_scxml.png";
|
const char FILEOVERLAY_SCXML[]=":/projectexplorer/images/fileoverlay_scxml.png";
|
||||||
const char FILEOVERLAY_UNKNOWN[]=":/projectexplorer/images/fileoverlay_unknown.png";
|
const char FILEOVERLAY_UNKNOWN[]=":/projectexplorer/images/fileoverlay_unknown.png";
|
||||||
|
|
||||||
// Kit Information
|
|
||||||
const char KITINFORMATION_ID_V1[] = "PE.Profile.ToolChain";
|
|
||||||
const char KITINFORMATION_ID_V2[] = "PE.Profile.ToolChains";
|
|
||||||
const char KITINFORMATION_ID_V3[] = "PE.Profile.ToolChainsV3";
|
|
||||||
|
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -181,7 +181,7 @@ bool ProjectFileWizardExtension::processProject(
|
|||||||
if (!folder)
|
if (!folder)
|
||||||
return true;
|
return true;
|
||||||
if (m_context->wizard->kind() == IWizardFactory::ProjectWizard) {
|
if (m_context->wizard->kind() == IWizardFactory::ProjectWizard) {
|
||||||
if (!static_cast<ProjectNode *>(folder)->addSubProjects(QStringList(generatedProject))) {
|
if (!static_cast<ProjectNode *>(folder)->addSubProject(generatedProject)) {
|
||||||
*errorMessage = tr("Failed to add subproject \"%1\"\nto project \"%2\".")
|
*errorMessage = tr("Failed to add subproject \"%1\"\nto project \"%2\".")
|
||||||
.arg(generatedProject).arg(folder->filePath().toUserOutput());
|
.arg(generatedProject).arg(folder->filePath().toUserOutput());
|
||||||
return false;
|
return false;
|
||||||
|
@@ -720,15 +720,15 @@ bool ProjectNode::canAddSubProject(const QString &proFilePath) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectNode::addSubProjects(const QStringList &proFilePaths)
|
bool ProjectNode::addSubProject(const QString &proFilePath)
|
||||||
{
|
{
|
||||||
Q_UNUSED(proFilePaths)
|
Q_UNUSED(proFilePath)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectNode::removeSubProjects(const QStringList &proFilePaths)
|
bool ProjectNode::removeSubProject(const QString &proFilePath)
|
||||||
{
|
{
|
||||||
Q_UNUSED(proFilePaths)
|
Q_UNUSED(proFilePath)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@ namespace Utils { class MimeType; }
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class RunConfiguration;
|
class RunConfiguration;
|
||||||
class Project;
|
class SessionManager;
|
||||||
|
|
||||||
enum class NodeType : quint16 {
|
enum class NodeType : quint16 {
|
||||||
File = 1,
|
File = 1,
|
||||||
@@ -278,8 +278,8 @@ public:
|
|||||||
QString vcsTopic() const;
|
QString vcsTopic() const;
|
||||||
|
|
||||||
virtual bool canAddSubProject(const QString &proFilePath) const;
|
virtual bool canAddSubProject(const QString &proFilePath) const;
|
||||||
virtual bool addSubProjects(const QStringList &proFilePaths);
|
virtual bool addSubProject(const QString &proFile);
|
||||||
virtual bool removeSubProjects(const QStringList &proFilePaths);
|
virtual bool removeSubProject(const QString &proFilePath);
|
||||||
|
|
||||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
||||||
@@ -302,7 +302,7 @@ protected:
|
|||||||
// will add the persistent stuff
|
// will add the persistent stuff
|
||||||
explicit ProjectNode(const Utils::FileName &projectFilePath);
|
explicit ProjectNode(const Utils::FileName &projectFilePath);
|
||||||
|
|
||||||
friend class Project;
|
friend class SessionManager;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Documentation inside.
|
// Documentation inside.
|
||||||
|
@@ -225,7 +225,7 @@ void RunConfiguration::ctor()
|
|||||||
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
BuildConfiguration *bc = target()->activeBuildConfiguration();
|
||||||
return bc ? bc->macroExpander() : target()->macroExpander();
|
return bc ? bc->macroExpander() : target()->macroExpander();
|
||||||
});
|
});
|
||||||
expander->registerPrefix(Constants::VAR_CURRENTRUN_ENV, tr("Variables in the current run environment"),
|
expander->registerPrefix("CurrentRun:Env", tr("Variables in the current run environment"),
|
||||||
[this](const QString &var) {
|
[this](const QString &var) {
|
||||||
const auto envAspect = extraAspect<EnvironmentAspect>();
|
const auto envAspect = extraAspect<EnvironmentAspect>();
|
||||||
return envAspect ? envAspect->environment().value(var) : QString();
|
return envAspect ? envAspect->environment().value(var) : QString();
|
||||||
|
@@ -43,6 +43,10 @@
|
|||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
const char HIDE_FILE_FILTER_DEFAULT[] = "Makefile*; *.o; *.lo; *.la; *.obj; *~; *.files;"
|
||||||
|
" *.config; *.creator; *.user*; *.includes; *.autosave";
|
||||||
|
const char SHOW_FILE_FILTER_DEFAULT[] = "*.c; *.cc; *.cpp; *.cp; *.cxx; *.c++; *.h; *.hh; *.hpp; *.hxx;";
|
||||||
|
|
||||||
Tree::~Tree()
|
Tree::~Tree()
|
||||||
{
|
{
|
||||||
qDeleteAll(childDirectories);
|
qDeleteAll(childDirectories);
|
||||||
@@ -550,11 +554,11 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
|
|||||||
m_progressLabel(new QLabel)
|
m_progressLabel(new QLabel)
|
||||||
{
|
{
|
||||||
const QString showFilter
|
const QString showFilter
|
||||||
= Core::ICore::settings()->value(QLatin1String(Constants::SHOW_FILE_FILTER_SETTING),
|
= Core::ICore::settings()->value("GenericProject/ShowFileFilter",
|
||||||
QLatin1String(Constants::SHOW_FILE_FILTER_DEFAULT)).toString();
|
QLatin1String(SHOW_FILE_FILTER_DEFAULT)).toString();
|
||||||
const QString hideFilter
|
const QString hideFilter
|
||||||
= Core::ICore::settings()->value(QLatin1String(Constants::HIDE_FILE_FILTER_SETTING),
|
= Core::ICore::settings()->value("GenericProject/FileFilter",
|
||||||
QLatin1String(Constants::HIDE_FILE_FILTER_DEFAULT)).toString();
|
QLatin1String(HIDE_FILE_FILTER_DEFAULT)).toString();
|
||||||
|
|
||||||
auto layout = new QGridLayout(this);
|
auto layout = new QGridLayout(this);
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
|
@@ -205,7 +205,14 @@ void SessionManager::updateProjectTree(Project *pro)
|
|||||||
return; // Project was already de-registered and is shutting down
|
return; // Project was already de-registered and is shutting down
|
||||||
|
|
||||||
ProjectNode *const oldNode = currentPair->second;
|
ProjectNode *const oldNode = currentPair->second;
|
||||||
ProjectNode *const newNode = pro->rootProjectNode();
|
ProjectNode *newNode = pro->rootProjectNode();
|
||||||
|
|
||||||
|
if (!newNode) {
|
||||||
|
// Set up generic project structure if the project does not provide any!
|
||||||
|
newNode = new ProjectNode(pro->projectDirectory());
|
||||||
|
newNode->setDisplayName(pro->displayName());
|
||||||
|
newNode->addNode(new FileNode(pro->projectFilePath(), FileType::Project, false));
|
||||||
|
}
|
||||||
|
|
||||||
d->m_sessionNode.replaceSubtree(oldNode, newNode);
|
d->m_sessionNode.replaceSubtree(oldNode, newNode);
|
||||||
currentPair->second = newNode;
|
currentPair->second = newNode;
|
||||||
@@ -766,6 +773,10 @@ void SessionManager::removeProjects(QList<Project *> remove)
|
|||||||
pro->saveSettings();
|
pro->saveSettings();
|
||||||
pro->setRootProjectNode(nullptr); // Deregister project with sessionnode!
|
pro->setRootProjectNode(nullptr); // Deregister project with sessionnode!
|
||||||
|
|
||||||
|
// Remove the project node:
|
||||||
|
Node *projectNode = nodeForProject(pro);
|
||||||
|
d->m_sessionNode.removeNode(projectNode);
|
||||||
|
|
||||||
d->m_projects
|
d->m_projects
|
||||||
= Utils::filtered(d->m_projects, [pro](const QPair<Project *, ProjectNode *> &pair)
|
= Utils::filtered(d->m_projects, [pro](const QPair<Project *, ProjectNode *> &pair)
|
||||||
{
|
{
|
||||||
|
@@ -31,7 +31,11 @@
|
|||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
namespace ProjectExplorer {
|
||||||
|
|
||||||
|
// Task mark categories
|
||||||
|
const char TASK_MARK_WARNING[] = "Task.Mark.Warning";
|
||||||
|
const char TASK_MARK_ERROR[] = "Task.Mark.Error";
|
||||||
|
|
||||||
static TaskHub *m_instance = nullptr;
|
static TaskHub *m_instance = nullptr;
|
||||||
QVector<Core::Id> TaskHub::m_registeredCategories;
|
QVector<Core::Id> TaskHub::m_registeredCategories;
|
||||||
@@ -40,9 +44,9 @@ static Core::Id categoryForType(Task::TaskType type)
|
|||||||
{
|
{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Task::Error:
|
case Task::Error:
|
||||||
return Constants::TASK_MARK_ERROR;
|
return TASK_MARK_ERROR;
|
||||||
case Task::Warning:
|
case Task::Warning:
|
||||||
return Constants::TASK_MARK_WARNING;
|
return TASK_MARK_WARNING;
|
||||||
default:
|
default:
|
||||||
return Core::Id();
|
return Core::Id();
|
||||||
}
|
}
|
||||||
@@ -101,12 +105,12 @@ TaskHub::TaskHub()
|
|||||||
m_instance = this;
|
m_instance = this;
|
||||||
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
|
qRegisterMetaType<ProjectExplorer::Task>("ProjectExplorer::Task");
|
||||||
qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>");
|
qRegisterMetaType<QList<ProjectExplorer::Task> >("QList<ProjectExplorer::Task>");
|
||||||
TaskMark::setCategoryColor(Constants::TASK_MARK_ERROR,
|
TaskMark::setCategoryColor(TASK_MARK_ERROR,
|
||||||
Utils::Theme::ProjectExplorer_TaskError_TextMarkColor);
|
Utils::Theme::ProjectExplorer_TaskError_TextMarkColor);
|
||||||
TaskMark::setCategoryColor(Constants::TASK_MARK_WARNING,
|
TaskMark::setCategoryColor(TASK_MARK_WARNING,
|
||||||
Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor);
|
||||||
TaskMark::setDefaultToolTip(Constants::TASK_MARK_ERROR, tr("Error"));
|
TaskMark::setDefaultToolTip(TASK_MARK_ERROR, tr("Error"));
|
||||||
TaskMark::setDefaultToolTip(Constants::TASK_MARK_WARNING, tr("Warning"));
|
TaskMark::setDefaultToolTip(TASK_MARK_WARNING, tr("Warning"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TaskHub::~TaskHub()
|
TaskHub::~TaskHub()
|
||||||
@@ -194,3 +198,5 @@ void TaskHub::requestPopup()
|
|||||||
{
|
{
|
||||||
emit m_instance->popupRequested(Core::IOutputPane::NoModeSwitch);
|
emit m_instance->popupRequested(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace ProjectExplorer
|
||||||
|
@@ -26,7 +26,6 @@
|
|||||||
#include "taskwindow.h"
|
#include "taskwindow.h"
|
||||||
|
|
||||||
#include "itaskhandler.h"
|
#include "itaskhandler.h"
|
||||||
#include "projectexplorerconstants.h"
|
|
||||||
#include "projectexplorericons.h"
|
#include "projectexplorericons.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
|
@@ -32,6 +32,12 @@
|
|||||||
namespace QmakeProjectManager {
|
namespace QmakeProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
// Determine name for Q_EXPORT_PLUGIN
|
||||||
|
static inline QString createPluginName(const QString &prefix)
|
||||||
|
{
|
||||||
|
return prefix.toLower() + QLatin1String("plugin");
|
||||||
|
}
|
||||||
|
|
||||||
CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
|
CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
|
||||||
QWizardPage(parent),
|
QWizardPage(parent),
|
||||||
m_ui(new Ui::CustomWidgetPluginWizardPage),
|
m_ui(new Ui::CustomWidgetPluginWizardPage),
|
||||||
@@ -39,8 +45,19 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) :
|
|||||||
m_complete(false)
|
m_complete(false)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
connect(m_ui->collectionClassEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
|
connect(m_ui->collectionClassEdit, &QLineEdit::textEdited,
|
||||||
connect(m_ui->pluginNameEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
|
this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
|
||||||
|
connect(m_ui->collectionClassEdit, &QLineEdit::textChanged,
|
||||||
|
this, [this](const QString &collectionClass) {
|
||||||
|
m_ui->collectionHeaderEdit->setText(m_fileNamingParameters.headerFileName(collectionClass));
|
||||||
|
m_ui->pluginNameEdit->setText(createPluginName(collectionClass));
|
||||||
|
});
|
||||||
|
connect(m_ui->pluginNameEdit, &QLineEdit::textEdited,
|
||||||
|
this, &CustomWidgetPluginWizardPage::slotCheckCompleteness);
|
||||||
|
connect(m_ui->collectionHeaderEdit, &QLineEdit::textChanged,
|
||||||
|
this, [this](const QString &text) {
|
||||||
|
m_ui->collectionSourceEdit->setText(m_fileNamingParameters.headerToSourceFileName(text));
|
||||||
|
});
|
||||||
|
|
||||||
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Plugin Details"));
|
setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Plugin Details"));
|
||||||
}
|
}
|
||||||
@@ -60,12 +77,6 @@ QString CustomWidgetPluginWizardPage::pluginName() const
|
|||||||
return m_ui->pluginNameEdit->text();
|
return m_ui->pluginNameEdit->text();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine name for Q_EXPORT_PLUGIN
|
|
||||||
static inline QString createPluginName(const QString &prefix)
|
|
||||||
{
|
|
||||||
return prefix.toLower() + QLatin1String("plugin");
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomWidgetPluginWizardPage::init(const CustomWidgetWidgetsWizardPage *widgetsPage)
|
void CustomWidgetPluginWizardPage::init(const CustomWidgetWidgetsWizardPage *widgetsPage)
|
||||||
{
|
{
|
||||||
m_classCount = widgetsPage->classCount();
|
m_classCount = widgetsPage->classCount();
|
||||||
@@ -94,18 +105,6 @@ void CustomWidgetPluginWizardPage::setCollectionEnabled(bool enColl)
|
|||||||
m_ui->collectionSourceEdit->setEnabled(enColl);
|
m_ui->collectionSourceEdit->setEnabled(enColl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomWidgetPluginWizardPage::on_collectionClassEdit_textChanged()
|
|
||||||
{
|
|
||||||
const QString collectionClass = collectionClassName();
|
|
||||||
m_ui->collectionHeaderEdit->setText(m_fileNamingParameters.headerFileName(collectionClass));
|
|
||||||
m_ui->pluginNameEdit->setText(createPluginName(collectionClass));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CustomWidgetPluginWizardPage::on_collectionHeaderEdit_textChanged()
|
|
||||||
{
|
|
||||||
m_ui->collectionSourceEdit->setText(m_fileNamingParameters.headerToSourceFileName(m_ui->collectionHeaderEdit->text()));
|
|
||||||
}
|
|
||||||
|
|
||||||
QSharedPointer<PluginOptions> CustomWidgetPluginWizardPage::basicPluginOptions() const
|
QSharedPointer<PluginOptions> CustomWidgetPluginWizardPage::basicPluginOptions() const
|
||||||
{
|
{
|
||||||
QSharedPointer<PluginOptions> po(new PluginOptions);
|
QSharedPointer<PluginOptions> po(new PluginOptions);
|
||||||
|
@@ -56,12 +56,8 @@ public:
|
|||||||
// Fills the plugin fields, excluding widget list.
|
// Fills the plugin fields, excluding widget list.
|
||||||
QSharedPointer<PluginOptions> basicPluginOptions() const;
|
QSharedPointer<PluginOptions> basicPluginOptions() const;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_collectionClassEdit_textChanged();
|
|
||||||
void on_collectionHeaderEdit_textChanged();
|
|
||||||
void slotCheckCompleteness();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void slotCheckCompleteness();
|
||||||
inline QString collectionClassName() const;
|
inline QString collectionClassName() const;
|
||||||
inline QString pluginName() const;
|
inline QString pluginName() const;
|
||||||
void setCollectionEnabled(bool enColl);
|
void setCollectionEnabled(bool enColl);
|
||||||
|
@@ -156,6 +156,13 @@ void QmakeBuildConfiguration::ctor()
|
|||||||
this, &QmakeBuildConfiguration::emitProFileEvaluateNeeded);
|
this, &QmakeBuildConfiguration::emitProFileEvaluateNeeded);
|
||||||
connect(target(), &Target::kitChanged,
|
connect(target(), &Target::kitChanged,
|
||||||
this, &QmakeBuildConfiguration::kitChanged);
|
this, &QmakeBuildConfiguration::kitChanged);
|
||||||
|
MacroExpander *expander = macroExpander();
|
||||||
|
expander->registerVariable("Qmake:Makefile", "Qmake makefile", [this]() -> QString {
|
||||||
|
const QString file = makefile();
|
||||||
|
if (!file.isEmpty())
|
||||||
|
return file;
|
||||||
|
return QLatin1String("Makefile");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmakeBuildConfiguration::kitChanged()
|
void QmakeBuildConfiguration::kitChanged()
|
||||||
|
@@ -53,8 +53,8 @@ public:
|
|||||||
ProjectExplorer::NamedWidget *createConfigWidget() override;
|
ProjectExplorer::NamedWidget *createConfigWidget() override;
|
||||||
bool isShadowBuild() const;
|
bool isShadowBuild() const;
|
||||||
|
|
||||||
void setSubNodeBuild(QmakeProjectManager::QmakeProFileNode *node);
|
void setSubNodeBuild(QmakeProFileNode *node);
|
||||||
QmakeProjectManager::QmakeProFileNode *subNodeBuild() const;
|
QmakeProFileNode *subNodeBuild() const;
|
||||||
|
|
||||||
ProjectExplorer::FileNode *fileNodeBuild() const;
|
ProjectExplorer::FileNode *fileNodeBuild() const;
|
||||||
void setFileNodeBuild(ProjectExplorer::FileNode *node);
|
void setFileNodeBuild(ProjectExplorer::FileNode *node);
|
||||||
@@ -138,7 +138,7 @@ private:
|
|||||||
bool m_shadowBuild = true;
|
bool m_shadowBuild = true;
|
||||||
bool m_isEnabled = true;
|
bool m_isEnabled = true;
|
||||||
QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration = 0;
|
QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration = 0;
|
||||||
QmakeProjectManager::QmakeProFileNode *m_subNodeBuild = nullptr;
|
QmakeProFileNode *m_subNodeBuild = nullptr;
|
||||||
ProjectExplorer::FileNode *m_fileNodeBuild = nullptr;
|
ProjectExplorer::FileNode *m_fileNodeBuild = nullptr;
|
||||||
|
|
||||||
friend class Internal::QmakeProjectConfigWidget;
|
friend class Internal::QmakeProjectConfigWidget;
|
||||||
|
@@ -148,16 +148,16 @@ bool QmakePriFileNode::canAddSubProject(const QString &proFilePath) const
|
|||||||
return pri ? pri->canAddSubProject(proFilePath) : false;
|
return pri ? pri->canAddSubProject(proFilePath) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmakePriFileNode::addSubProjects(const QStringList &proFilePaths)
|
bool QmakePriFileNode::addSubProject(const QString &proFilePath)
|
||||||
{
|
{
|
||||||
QmakePriFile *pri = priFile();
|
QmakePriFile *pri = priFile();
|
||||||
return pri ? pri->addSubProjects(proFilePaths) : false;
|
return pri ? pri->addSubProject(proFilePath) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmakePriFileNode::removeSubProjects(const QStringList &proFilePaths)
|
bool QmakePriFileNode::removeSubProject(const QString &proFilePath)
|
||||||
{
|
{
|
||||||
QmakePriFile *pri = priFile();
|
QmakePriFile *pri = priFile();
|
||||||
return pri ? pri->removeSubProjects(proFilePaths) : false;
|
return pri ? pri->removeSubProjects(proFilePath) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
|
bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded)
|
||||||
|
@@ -53,8 +53,8 @@ public:
|
|||||||
|
|
||||||
bool canAddSubProject(const QString &proFilePath) const override;
|
bool canAddSubProject(const QString &proFilePath) const override;
|
||||||
|
|
||||||
bool addSubProjects(const QStringList &proFilePaths) override;
|
bool addSubProject(const QString &proFilePath) override;
|
||||||
bool removeSubProjects(const QStringList &proFilePaths) override;
|
bool removeSubProject(const QString &proFilePath) override;
|
||||||
|
|
||||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override;
|
bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override;
|
||||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override;
|
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override;
|
||||||
|
@@ -474,13 +474,11 @@ static QString simplifyProFilePath(const QString &proFilePath)
|
|||||||
return proFilePath;
|
return proFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmakePriFile::addSubProjects(const QStringList &proFilePaths)
|
bool QmakePriFile::addSubProject(const QString &proFile)
|
||||||
{
|
{
|
||||||
QStringList uniqueProFilePaths;
|
QStringList uniqueProFilePaths;
|
||||||
foreach (const QString &proFile, proFilePaths) {
|
if (!m_recursiveEnumerateFiles.contains(FileName::fromString(proFile)))
|
||||||
if (!m_recursiveEnumerateFiles.contains(FileName::fromString(proFile)))
|
uniqueProFilePaths.append(simplifyProFilePath(proFile));
|
||||||
uniqueProFilePaths.append(simplifyProFilePath(proFile));
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList failedFiles;
|
QStringList failedFiles;
|
||||||
changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), uniqueProFilePaths, &failedFiles, AddToProFile);
|
changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), uniqueProFilePaths, &failedFiles, AddToProFile);
|
||||||
@@ -488,10 +486,10 @@ bool QmakePriFile::addSubProjects(const QStringList &proFilePaths)
|
|||||||
return failedFiles.isEmpty();
|
return failedFiles.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmakePriFile::removeSubProjects(const QStringList &proFilePaths)
|
bool QmakePriFile::removeSubProjects(const QString &proFilePath)
|
||||||
{
|
{
|
||||||
QStringList failedOriginalFiles;
|
QStringList failedOriginalFiles;
|
||||||
changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), proFilePaths, &failedOriginalFiles, RemoveFromProFile);
|
changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), QStringList(proFilePath), &failedOriginalFiles, RemoveFromProFile);
|
||||||
|
|
||||||
QStringList simplifiedProFiles = Utils::transform(failedOriginalFiles, &simplifyProFilePath);
|
QStringList simplifiedProFiles = Utils::transform(failedOriginalFiles, &simplifyProFilePath);
|
||||||
|
|
||||||
|
@@ -134,8 +134,8 @@ public:
|
|||||||
// ProjectNode interface
|
// ProjectNode interface
|
||||||
virtual bool canAddSubProject(const QString &proFilePath) const;
|
virtual bool canAddSubProject(const QString &proFilePath) const;
|
||||||
|
|
||||||
virtual bool addSubProjects(const QStringList &proFilePaths);
|
virtual bool addSubProject(const QString &proFile);
|
||||||
virtual bool removeSubProjects(const QStringList &proFilePaths);
|
virtual bool removeSubProjects(const QString &proFilePath);
|
||||||
|
|
||||||
virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr);
|
virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr);
|
||||||
virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr);
|
virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr);
|
||||||
|
@@ -508,7 +508,7 @@ QString QMakeStep::effectiveQMakeCall() const
|
|||||||
|
|
||||||
QString result = qmake;
|
QString result = qmake;
|
||||||
if (qtVersion) {
|
if (qtVersion) {
|
||||||
result += QLatin1Char(' ') + allArguments(qtVersion);
|
result += ' ' + buildConfiguration()->macroExpander()->expand(allArguments(qtVersion));
|
||||||
if (qtVersion->qtVersion() >= QtVersionNumber(5, 0, 0))
|
if (qtVersion->qtVersion() >= QtVersionNumber(5, 0, 0))
|
||||||
result.append(QString::fromLatin1(" && %1 %2").arg(make).arg(makeArguments()));
|
result.append(QString::fromLatin1(" && %1 %2").arg(make).arg(makeArguments()));
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ SelectionContext AbstractAction::selectionContext() const
|
|||||||
DefaultAction::DefaultAction(const QString &description)
|
DefaultAction::DefaultAction(const QString &description)
|
||||||
: QAction(description, 0)
|
: QAction(description, 0)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool)));
|
connect(this, &QAction::triggered, this, &DefaultAction::actionTriggered);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultAction::actionTriggered(bool enable)
|
void DefaultAction::actionTriggered(bool enable)
|
||||||
|
@@ -39,13 +39,13 @@ class QMLDESIGNERCORE_EXPORT DefaultAction : public QAction
|
|||||||
public:
|
public:
|
||||||
DefaultAction(const QString &description);
|
DefaultAction(const QString &description);
|
||||||
|
|
||||||
signals:
|
// virtual function instead of slot
|
||||||
void triggered(bool checked, const SelectionContext &selectionContext);
|
|
||||||
|
|
||||||
public slots: //virtual function instead of slot
|
|
||||||
virtual void actionTriggered(bool enable);
|
virtual void actionTriggered(bool enable);
|
||||||
void setSelectionContext(const SelectionContext &selectionContext);
|
void setSelectionContext(const SelectionContext &selectionContext);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void triggered(bool checked, const SelectionContext &selectionContext);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SelectionContext m_selectionContext;
|
SelectionContext m_selectionContext;
|
||||||
};
|
};
|
||||||
|
@@ -46,10 +46,8 @@ public:
|
|||||||
|
|
||||||
Utils::CrumblePath *crumblePath();
|
Utils::CrumblePath *crumblePath();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void onCrumblePathElementClicked(const QVariant &data);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void onCrumblePathElementClicked(const QVariant &data);
|
||||||
void updateVisibility();
|
void updateVisibility();
|
||||||
void showSaveDialog();
|
void showSaveDialog();
|
||||||
|
|
||||||
|
@@ -107,7 +107,6 @@ public:
|
|||||||
: DefaultAction(description), m_action(action)
|
: DefaultAction(description), m_action(action)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public /*slots*/:
|
|
||||||
virtual void actionTriggered(bool b)
|
virtual void actionTriggered(bool b)
|
||||||
{
|
{
|
||||||
m_selectionContext.setToggled(b);
|
m_selectionContext.setToggled(b);
|
||||||
|
@@ -36,7 +36,8 @@ namespace Internal {
|
|||||||
DebugViewWidget::DebugViewWidget(QWidget *parent) : QWidget(parent)
|
DebugViewWidget::DebugViewWidget(QWidget *parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
m_ui.setupUi(this);
|
m_ui.setupUi(this);
|
||||||
connect(m_ui.enabledCheckBox, SIGNAL(toggled(bool)), this, SLOT(enabledCheckBoxToggled(bool)));
|
connect(m_ui.enabledCheckBox, &QAbstractButton::toggled,
|
||||||
|
this, &DebugViewWidget::enabledCheckBoxToggled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugViewWidget::addLogMessage(const QString &topic, const QString &message, bool highlight)
|
void DebugViewWidget::addLogMessage(const QString &topic, const QString &message, bool highlight)
|
||||||
|
@@ -45,7 +45,6 @@ public:
|
|||||||
|
|
||||||
void setDebugViewEnabled(bool b);
|
void setDebugViewEnabled(bool b);
|
||||||
|
|
||||||
public slots:
|
|
||||||
void enabledCheckBoxToggled(bool b);
|
void enabledCheckBoxToggled(bool b);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -64,7 +64,8 @@ QWidget *BackgroundAction::createWidget(QWidget *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
comboBox->setCurrentIndex(0);
|
comboBox->setCurrentIndex(0);
|
||||||
connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitBackgroundChanged(int)));
|
connect(comboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||||
|
this, &BackgroundAction::emitBackgroundChanged);
|
||||||
|
|
||||||
comboBox->setProperty("hideborder", true);
|
comboBox->setProperty("hideborder", true);
|
||||||
comboBox->setToolTip(tr("Set the color of the canvas."));
|
comboBox->setToolTip(tr("Set the color of the canvas."));
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user