diff --git a/qtcreator.pri b/qtcreator.pri index 82d15419d6f..0e9b6299f20 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -4,7 +4,7 @@ QTCREATOR_PRI_INCLUDED = 1 QTCREATOR_VERSION = 4.2.82 QTCREATOR_COMPAT_VERSION = 4.2.82 VERSION = $$QTCREATOR_VERSION -BINARY_ARTIFACTS_BRANCH = master +BINARY_ARTIFACTS_BRANCH = 4.3 CONFIG += c++14 diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp index 4141f6b725c..b71c24ce9b6 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp @@ -473,6 +473,8 @@ QRectF QuickItemNodeInstance::boundingRectWithStepChilds(QQuickItem *parentItem) { QRectF boundingRect = parentItem->boundingRect(); + boundingRect = boundingRect.united(QRectF(QPointF(0, 0), size())); + foreach (QQuickItem *childItem, parentItem->childItems()) { if (!nodeInstanceServer()->hasInstanceForObject(childItem)) { QRectF transformedRect = childItem->mapRectToItem(parentItem, boundingRectWithStepChilds(childItem)); diff --git a/src/libs/cplusplus/OverviewModel.h b/src/libs/cplusplus/OverviewModel.h index 5b958e0ef56..48b29aad1cd 100644 --- a/src/libs/cplusplus/OverviewModel.h +++ b/src/libs/cplusplus/OverviewModel.h @@ -60,8 +60,7 @@ public: QStringList mimeTypes() const; QMimeData *mimeData(const QModelIndexList &indexes) const; -public Q_SLOTS: - void rebuild(CPlusPlus::Document::Ptr doc); + void rebuild(Document::Ptr doc); private: bool hasDocument() const; diff --git a/src/libs/utils/mapreduce.h b/src/libs/utils/mapreduce.h index 9f655a5aa0e..8c5452f79dc 100644 --- a/src/libs/utils/mapreduce.h +++ b/src/libs/utils/mapreduce.h @@ -77,7 +77,8 @@ public: 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(); } diff --git a/src/plugins/baremetal/baremetaldebugsupport.cpp b/src/plugins/baremetal/baremetaldebugsupport.cpp index 6bcc7a2abf0..a7dabf1ce78 100644 --- a/src/plugins/baremetal/baremetaldebugsupport.cpp +++ b/src/plugins/baremetal/baremetaldebugsupport.cpp @@ -148,8 +148,7 @@ void BareMetalDebugSupport::startExecution() auto dev = qSharedPointerCast(m_runControl->device()); QTC_ASSERT(dev, return); - const GdbServerProvider *p = GdbServerProviderManager::instance()->findProvider( - dev->gdbServerProviderId()); + const GdbServerProvider *p = GdbServerProviderManager::findProvider(dev->gdbServerProviderId()); QTC_ASSERT(p, return); m_state = StartingRunner; diff --git a/src/plugins/baremetal/baremetaldebugsupport.h b/src/plugins/baremetal/baremetaldebugsupport.h index 61f649ec651..d683831c377 100644 --- a/src/plugins/baremetal/baremetaldebugsupport.h +++ b/src/plugins/baremetal/baremetaldebugsupport.h @@ -43,7 +43,9 @@ public: explicit BareMetalDebugSupport(Debugger::DebuggerRunControl *runControl); ~BareMetalDebugSupport(); -private slots: +private: + enum State { Inactive, StartingRunner, Running }; + void remoteSetupRequested(); void debuggingFinished(); void remoteOutputMessage(const QByteArray &output); @@ -53,9 +55,6 @@ private slots: void progressReport(const QString &progressOutput); void appRunnerError(const QString &error); -private: - enum State { Inactive, StartingRunner, Running }; - void adapterSetupDone(); void adapterSetupFailed(const QString &error); @@ -66,7 +65,7 @@ private: ProjectExplorer::ApplicationLauncher *m_appLauncher; const QPointer m_runControl; - BareMetalDebugSupport::State m_state; + State m_state; }; } // namespace Internal diff --git a/src/plugins/baremetal/baremetaldevice.cpp b/src/plugins/baremetal/baremetaldevice.cpp index 67c80b7c410..e5b22b5e214 100644 --- a/src/plugins/baremetal/baremetaldevice.cpp +++ b/src/plugins/baremetal/baremetaldevice.cpp @@ -59,6 +59,12 @@ BareMetalDevice::Ptr BareMetalDevice::create(const BareMetalDevice &other) return Ptr(new BareMetalDevice(other)); } +BareMetalDevice::~BareMetalDevice() +{ + if (GdbServerProvider *provider = GdbServerProviderManager::findProvider(m_gdbServerProviderId)) + provider->unregisterDevice(this); +} + QString BareMetalDevice::gdbServerProviderId() const { return m_gdbServerProviderId; @@ -66,8 +72,26 @@ QString BareMetalDevice::gdbServerProviderId() const void BareMetalDevice::setGdbServerProviderId(const QString &id) { + if (id == m_gdbServerProviderId) + return; + if (GdbServerProvider *currentProvider = GdbServerProviderManager::findProvider(m_gdbServerProviderId)) + currentProvider->unregisterDevice(this); 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); const QString channel = provider->channel(); const int colon = channel.indexOf(QLatin1Char(':')); @@ -85,8 +109,7 @@ void BareMetalDevice::fromMap(const QVariantMap &map) QString gdbServerProvider = map.value(QLatin1String(gdbServerProviderIdKeyC)).toString(); if (gdbServerProvider.isEmpty()) { const QString name = displayName(); - if (GdbServerProvider *provider = - GdbServerProviderManager::instance()->findByDisplayName(name)) { + if (GdbServerProvider *provider = GdbServerProviderManager::findByDisplayName(name)) { gdbServerProvider = provider->id(); } else { const QSsh::SshConnectionParameters sshParams = sshParameters(); @@ -94,7 +117,7 @@ void BareMetalDevice::fromMap(const QVariantMap &map) newProvider->setDisplayName(name); newProvider->m_host = sshParams.host; newProvider->m_port = sshParams.port; - if (GdbServerProviderManager::instance()->registerProvider(newProvider)) + if (GdbServerProviderManager::registerProvider(newProvider)) gdbServerProvider = newProvider->id(); else delete newProvider; diff --git a/src/plugins/baremetal/baremetaldevice.h b/src/plugins/baremetal/baremetaldevice.h index c62c83e609a..75d549b2932 100644 --- a/src/plugins/baremetal/baremetaldevice.h +++ b/src/plugins/baremetal/baremetaldevice.h @@ -31,6 +31,8 @@ namespace BareMetal { namespace Internal { +class GdbServerProvider; + class BareMetalDevice : public ProjectExplorer::IDevice { public: @@ -42,6 +44,7 @@ public: Origin origin = ManuallyAdded, Core::Id id = Core::Id()); static Ptr create(const BareMetalDevice &other); + ~BareMetalDevice(); QString displayType() const override; ProjectExplorer::IDeviceWidget *createWidget() override; QList actionIds() const override; @@ -56,6 +59,7 @@ public: QString gdbServerProviderId() const; void setGdbServerProviderId(const QString &id); + void providerUpdated(GdbServerProvider *provider); virtual void fromMap(const QVariantMap &map) override; virtual QVariantMap toMap() const override; @@ -67,6 +71,7 @@ protected: BareMetalDevice(const BareMetalDevice &other); private: + void setChannelByServerProvider(GdbServerProvider *provider); BareMetalDevice &operator=(const BareMetalDevice &); QString m_gdbServerProviderId; }; diff --git a/src/plugins/baremetal/baremetaldeviceconfigurationwidget.h b/src/plugins/baremetal/baremetaldeviceconfigurationwidget.h index 520eeb81d80..7c55b1aa00e 100644 --- a/src/plugins/baremetal/baremetaldeviceconfigurationwidget.h +++ b/src/plugins/baremetal/baremetaldeviceconfigurationwidget.h @@ -42,10 +42,8 @@ public: explicit BareMetalDeviceConfigurationWidget( const ProjectExplorer::IDevice::Ptr &deviceConfig, QWidget *parent = 0); -private slots: - void gdbServerProviderChanged(); - private: + void gdbServerProviderChanged(); void updateDeviceFromUi(); GdbServerProviderChooser *m_gdbServerProviderChooser; diff --git a/src/plugins/baremetal/baremetalgdbcommandsdeploystep.h b/src/plugins/baremetal/baremetalgdbcommandsdeploystep.h index 0c0b610f7db..0278dbc0ac2 100644 --- a/src/plugins/baremetal/baremetalgdbcommandsdeploystep.h +++ b/src/plugins/baremetal/baremetalgdbcommandsdeploystep.h @@ -68,8 +68,6 @@ class BareMetalGdbCommandsDeployStepWidget: public ProjectExplorer::BuildStepCon public: explicit BareMetalGdbCommandsDeployStepWidget(BareMetalGdbCommandsDeployStep &step); - -public slots: void update(); private: diff --git a/src/plugins/baremetal/baremetalplugin.cpp b/src/plugins/baremetal/baremetalplugin.cpp index ddfa55016e3..2413236bc90 100644 --- a/src/plugins/baremetal/baremetalplugin.cpp +++ b/src/plugins/baremetal/baremetalplugin.cpp @@ -67,6 +67,7 @@ bool BareMetalPlugin::initialize(const QStringList &arguments, QString *errorStr addAutoReleasedObject(new BareMetalRunControlFactory); addAutoReleasedObject(new BareMetalRunConfigurationFactory); addAutoReleasedObject(new GdbServerProvidersSettingsPage); + addAutoReleasedObject(new GdbServerProviderManager); return true; } diff --git a/src/plugins/baremetal/baremetalrunconfigurationwidget.h b/src/plugins/baremetal/baremetalrunconfigurationwidget.h index d6c0d5347cb..76f9cc86b77 100644 --- a/src/plugins/baremetal/baremetalrunconfigurationwidget.h +++ b/src/plugins/baremetal/baremetalrunconfigurationwidget.h @@ -50,11 +50,9 @@ public: Q_SLOT void runConfigurationEnabledChange(); -private slots: +private: void updateTargetInformation(); void handleWorkingDirectoryChanged(); - -private: void setLabelText(QLabel &label, const QString ®ularText, const QString &errorText); BareMetalRunConfigurationWidgetPrivate * const d; diff --git a/src/plugins/baremetal/baremetalruncontrolfactory.cpp b/src/plugins/baremetal/baremetalruncontrolfactory.cpp index 240cf35830f..5f04770f520 100644 --- a/src/plugins/baremetal/baremetalruncontrolfactory.cpp +++ b/src/plugins/baremetal/baremetalruncontrolfactory.cpp @@ -103,8 +103,7 @@ RunControl *BareMetalRunControlFactory::create( return 0; } - const GdbServerProvider *p = GdbServerProviderManager::instance()->findProvider( - dev->gdbServerProviderId()); + const GdbServerProvider *p = GdbServerProviderManager::findProvider(dev->gdbServerProviderId()); if (!p) { *errorMessage = tr("Cannot debug: Device has no GDB server provider configuration."); return 0; diff --git a/src/plugins/baremetal/gdbserverprovider.cpp b/src/plugins/baremetal/gdbserverprovider.cpp index 3edad82f2c4..3491ec3ad01 100644 --- a/src/plugins/baremetal/gdbserverprovider.cpp +++ b/src/plugins/baremetal/gdbserverprovider.cpp @@ -25,7 +25,9 @@ #include "gdbserverprovider.h" #include "gdbserverprovidermanager.h" +#include "baremetaldevice.h" +#include #include #include @@ -74,6 +76,9 @@ GdbServerProvider::GdbServerProvider(const GdbServerProvider &other) GdbServerProvider::~GdbServerProvider() { + const QSet devices = m_devices; + for (BareMetalDevice *device : devices) + device->setGdbServerProviderId(QString()); } QString GdbServerProvider::displayName() const @@ -173,9 +178,21 @@ bool GdbServerProvider::canStartupMode(StartupMode m) const return m == NoStartup; } +void GdbServerProvider::registerDevice(BareMetalDevice *device) +{ + m_devices.insert(device); +} + +void GdbServerProvider::unregisterDevice(BareMetalDevice *device) +{ + m_devices.remove(device); +} + 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) diff --git a/src/plugins/baremetal/gdbserverprovider.h b/src/plugins/baremetal/gdbserverprovider.h index aa91100946f..eabac0fa292 100644 --- a/src/plugins/baremetal/gdbserverprovider.h +++ b/src/plugins/baremetal/gdbserverprovider.h @@ -26,8 +26,8 @@ #pragma once #include +#include #include - #include #include @@ -44,6 +44,7 @@ QT_END_NAMESPACE namespace BareMetal { namespace Internal { +class BareMetalDevice; class GdbServerProviderConfigWidget; class GdbServerProviderManager; @@ -85,6 +86,9 @@ public: virtual bool isValid() const; virtual bool canStartupMode(StartupMode) const; + void registerDevice(BareMetalDevice *); + void unregisterDevice(BareMetalDevice *); + protected: explicit GdbServerProvider(const QString &id); explicit GdbServerProvider(const GdbServerProvider &); @@ -103,6 +107,7 @@ private: StartupMode m_startupMode; QString m_initCommands; QString m_resetCommands; + QSet m_devices; friend class GdbServerProviderConfigWidget; }; @@ -145,14 +150,12 @@ public: signals: void dirty(); -protected slots: - void setErrorMessage(const QString &); - void clearErrorMessage(); - protected: virtual void applyImpl() = 0; virtual void discardImpl() = 0; + void setErrorMessage(const QString &); + void clearErrorMessage(); void addErrorLabel(); GdbServerProvider::StartupMode startupModeFromIndex(int idx) const; diff --git a/src/plugins/baremetal/gdbserverproviderchooser.cpp b/src/plugins/baremetal/gdbserverproviderchooser.cpp index 263c27c6adb..ba91637683a 100644 --- a/src/plugins/baremetal/gdbserverproviderchooser.cpp +++ b/src/plugins/baremetal/gdbserverproviderchooser.cpp @@ -105,8 +105,7 @@ void GdbServerProviderChooser::populate() m_chooser->clear(); m_chooser->addItem(tr("None")); - foreach (const GdbServerProvider *p, - GdbServerProviderManager::instance()->providers()) { + for (const GdbServerProvider *p : GdbServerProviderManager::providers()) { if (!providerMatches(p)) continue; m_chooser->addItem(providerText(p), qVariantFromValue(p->id())); diff --git a/src/plugins/baremetal/gdbserverproviderchooser.h b/src/plugins/baremetal/gdbserverproviderchooser.h index a5e090516ad..424d89201e2 100644 --- a/src/plugins/baremetal/gdbserverproviderchooser.h +++ b/src/plugins/baremetal/gdbserverproviderchooser.h @@ -49,22 +49,17 @@ public: QString currentProviderId() const; void setCurrentProviderId(const QString &id); + void populate(); signals: void providerChanged(); -public slots: - void populate(); - -private slots: +private: void currentIndexChanged(int index); void manageButtonClicked(); - -protected: bool providerMatches(const GdbServerProvider *) const; QString providerText(const GdbServerProvider *) const; -private: QComboBox *m_chooser; QPushButton *m_manageButton; }; diff --git a/src/plugins/baremetal/gdbserverprovidermanager.cpp b/src/plugins/baremetal/gdbserverprovidermanager.cpp index 221aa9266ee..6085a513221 100644 --- a/src/plugins/baremetal/gdbserverprovidermanager.cpp +++ b/src/plugins/baremetal/gdbserverprovidermanager.cpp @@ -34,9 +34,10 @@ #include -#include -#include #include +#include +#include +#include #include @@ -63,6 +64,7 @@ GdbServerProviderManager::GdbServerProviderManager(QObject *parent) new OpenOcdGdbServerProviderFactory, new StLinkUtilGdbServerProviderFactory}) { + m_instance = this; m_writer = new Utils::PersistentSettingsWriter( m_configFile, QLatin1String("QtCreatorGdbServerProviders")); @@ -87,8 +89,6 @@ GdbServerProviderManager::~GdbServerProviderManager() GdbServerProviderManager *GdbServerProviderManager::instance() { - if (!m_instance) - m_instance = new GdbServerProviderManager; return m_instance; } @@ -149,60 +149,61 @@ void GdbServerProviderManager::saveProviders() m_writer->save(data, Core::ICore::mainWindow()); } -QList GdbServerProviderManager::providers() const +QList GdbServerProviderManager::providers() { - return m_providers; + return m_instance->m_providers; } -QList GdbServerProviderManager::factories() const +QList 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()) 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()) 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) { - if (!provider || !m_providers.contains(provider)) + if (!provider || !m_instance->m_providers.contains(provider)) return; - emit providerUpdated(provider); + emit m_instance->providerUpdated(provider); } bool GdbServerProviderManager::registerProvider(GdbServerProvider *provider) { - if (!provider || m_providers.contains(provider)) + if (!provider || m_instance->m_providers.contains(provider)) return true; - foreach (const GdbServerProvider *current, m_providers) { + for (const GdbServerProvider *current : Utils::asConst(m_instance->m_providers)) { if (*provider == *current) return false; QTC_ASSERT(current->id() != provider->id(), return false); } - m_providers.append(provider); - emit providerAdded(provider); + m_instance->m_providers.append(provider); + emit m_instance->providerAdded(provider); return true; } void GdbServerProviderManager::deregisterProvider(GdbServerProvider *provider) { - if (!provider || !m_providers.contains(provider)) + if (!provider || !m_instance->m_providers.contains(provider)) return; - m_providers.removeOne(provider); - emit providerRemoved(provider); + m_instance->m_providers.removeOne(provider); + emit m_instance->providerRemoved(provider); delete provider; } diff --git a/src/plugins/baremetal/gdbserverprovidermanager.h b/src/plugins/baremetal/gdbserverprovidermanager.h index 33cbbcea44e..6cac1928926 100644 --- a/src/plugins/baremetal/gdbserverprovidermanager.h +++ b/src/plugins/baremetal/gdbserverprovidermanager.h @@ -47,12 +47,12 @@ public: static GdbServerProviderManager *instance(); ~GdbServerProviderManager(); - QList providers() const; - QList factories() const; - GdbServerProvider *findProvider(const QString &id) const; - GdbServerProvider *findByDisplayName(const QString &displayName) const; - bool registerProvider(GdbServerProvider *); - void deregisterProvider(GdbServerProvider *); + static QList providers(); + static QList factories(); + static GdbServerProvider *findProvider(const QString &id); + static GdbServerProvider *findByDisplayName(const QString &displayName); + static bool registerProvider(GdbServerProvider *); + static void deregisterProvider(GdbServerProvider *); signals: void providerAdded(GdbServerProvider *); @@ -66,7 +66,7 @@ private: explicit GdbServerProviderManager(QObject *parent = 0); void restoreProviders(); - void notifyAboutUpdate(GdbServerProvider *); + static void notifyAboutUpdate(GdbServerProvider *); Utils::PersistentSettingsWriter *m_writer; QList m_providers; diff --git a/src/plugins/baremetal/gdbserverproviderssettingspage.cpp b/src/plugins/baremetal/gdbserverproviderssettingspage.cpp index 2e8dc9e4515..c44dcbf180c 100644 --- a/src/plugins/baremetal/gdbserverproviderssettingspage.cpp +++ b/src/plugins/baremetal/gdbserverproviderssettingspage.cpp @@ -107,7 +107,7 @@ GdbServerProviderModel::GdbServerProviderModel(QObject *parent) connect(manager, &GdbServerProviderManager::providerRemoved, this, &GdbServerProviderModel::removeProvider); - foreach (GdbServerProvider *p, manager->providers()) + for (GdbServerProvider *p : GdbServerProviderManager::providers()) addProvider(p); } @@ -131,7 +131,7 @@ void GdbServerProviderModel::apply() { // Remove unused providers foreach (GdbServerProvider *provider, m_providersToRemove) - GdbServerProviderManager::instance()->deregisterProvider(provider); + GdbServerProviderManager::deregisterProvider(provider); QTC_ASSERT(m_providersToRemove.isEmpty(), m_providersToRemove.clear()); // Update providers @@ -151,7 +151,7 @@ void GdbServerProviderModel::apply() // Add new (and already updated) providers QStringList skippedProviders; foreach (GdbServerProvider *provider, m_providersToAdd) { - if (!GdbServerProviderManager::instance()->registerProvider(provider)) + if (!GdbServerProviderManager::registerProvider(provider)) skippedProviders << provider->displayName(); } @@ -326,7 +326,7 @@ GdbServerProvidersSettingsWidget::GdbServerProvidersSettingsWidget // Set up add menu: auto addMenu = new QMenu(m_addButton); - foreach (const auto f, GdbServerProviderManager::instance()->factories()) { + for (const auto f : GdbServerProviderManager::factories()) { auto action = new QAction(addMenu); action->setText(f->displayName()); connect(action, &QAction::triggered, this, [this, f] { createProvider(f); }); diff --git a/src/plugins/baremetal/openocdgdbserverprovider.h b/src/plugins/baremetal/openocdgdbserverprovider.h index 4b43d89dc11..94481775edb 100644 --- a/src/plugins/baremetal/openocdgdbserverprovider.h +++ b/src/plugins/baremetal/openocdgdbserverprovider.h @@ -95,10 +95,9 @@ class OpenOcdGdbServerProviderConfigWidget : public GdbServerProviderConfigWidge public: explicit OpenOcdGdbServerProviderConfigWidget(OpenOcdGdbServerProvider *); -private slots: +private: void startupModeChanged(); -private: void applyImpl() final; void discardImpl() final; diff --git a/src/plugins/baremetal/stlinkutilgdbserverprovider.h b/src/plugins/baremetal/stlinkutilgdbserverprovider.h index 6b536dd2a56..900e4080286 100644 --- a/src/plugins/baremetal/stlinkutilgdbserverprovider.h +++ b/src/plugins/baremetal/stlinkutilgdbserverprovider.h @@ -101,10 +101,9 @@ class StLinkUtilGdbServerProviderConfigWidget : public GdbServerProviderConfigWi public: explicit StLinkUtilGdbServerProviderConfigWidget(StLinkUtilGdbServerProvider *); -private slots: +private: void startupModeChanged(); -private: void applyImpl() final; void discardImpl() final; diff --git a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h index ad598957641..ee67c1b7f53 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentprocessor.h +++ b/src/plugins/clangcodemodel/clangeditordocumentprocessor.h @@ -91,10 +91,8 @@ public: public: static ClangEditorDocumentProcessor *get(const QString &filePath); -private slots: - void onParserFinished(); - private: + void onParserFinished(); void updateProjectPartAndTranslationUnitForEditor(); void registerTranslationUnitForEditor(CppTools::ProjectPart *projectPart); void updateTranslationUnitIfProjectPartExists(); diff --git a/src/plugins/clangcodemodel/clangprojectsettings.h b/src/plugins/clangcodemodel/clangprojectsettings.h index 4b773f96c94..481f7932dc1 100644 --- a/src/plugins/clangcodemodel/clangprojectsettings.h +++ b/src/plugins/clangcodemodel/clangprojectsettings.h @@ -47,7 +47,6 @@ public: Core::Id warningConfigId() const; void setWarningConfigId(const Core::Id &warningConfigId); -public slots: void load(); void store(); diff --git a/src/plugins/clangcodemodel/clangprojectsettingswidget.h b/src/plugins/clangcodemodel/clangprojectsettingswidget.h index 9cacd18024e..9c636edc1bb 100644 --- a/src/plugins/clangcodemodel/clangprojectsettingswidget.h +++ b/src/plugins/clangcodemodel/clangprojectsettingswidget.h @@ -46,11 +46,9 @@ class ClangProjectSettingsWidget: public QWidget public: explicit ClangProjectSettingsWidget(ProjectExplorer::Project *project); -private slots: +private: void onCurrentWarningConfigChanged(const Core::Id ¤tConfigId); void onCustomWarningConfigsChanged(const CppTools::ClangDiagnosticConfigs &customConfigs); - -private: void refreshDiagnosticConfigsWidgetFromSettings(); void connectToCppCodeModelSettingsChanged(); void disconnectFromCppCodeModelSettingsChanged(); diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp index 78579a56f4c..ece15ae32bc 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index 9339591c939..7310697596c 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -310,13 +310,15 @@ QString CMakeProject::displayName() const QStringList CMakeProject::files(FilesMode fileMode) const { QStringList result; - rootProjectNode()->forEachNode([&](const FileNode *fn) { - const bool isGenerated = fn->isGenerated(); - if (fileMode == Project::SourceFiles && !isGenerated) - result.append(fn->filePath().toString()); - if (fileMode == Project::GeneratedFiles && isGenerated) - result.append(fn->filePath().toString()); - }); + if (ProjectNode *rpn = rootProjectNode()) { + rpn->forEachNode([&](const FileNode *fn) { + const bool isGenerated = fn->isGenerated(); + if (fileMode == Project::SourceFiles && !isGenerated) + result.append(fn->filePath().toString()); + if (fileMode == Project::GeneratedFiles && isGenerated) + result.append(fn->filePath().toString()); + }); + } return result; } diff --git a/src/plugins/coreplugin/coreplugin.h b/src/plugins/coreplugin/coreplugin.h index 8322ba93bdf..7a69887c36a 100644 --- a/src/plugins/coreplugin/coreplugin.h +++ b/src/plugins/coreplugin/coreplugin.h @@ -68,8 +68,8 @@ public: public slots: void fileOpenRequest(const QString&); -private slots: #if defined(WITH_TESTS) +private slots: void testVcsManager_data(); void testVcsManager(); void testSplitLineAndColumnNumber(); diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 9c28b7045da..53fd3ec9dcd 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -2983,12 +2983,14 @@ bool EditorManager::restoreState(const QByteArray &state) } void EditorManager::showEditorStatusBar(const QString &id, - const QString &infoText, - const QString &buttonText, - QObject *object, const char *member) + const QString &infoText, + const QString &buttonText, + QObject *object, + const std::function &function) { - EditorManagerPrivate::currentEditorView()->showEditorStatusBar(id, infoText, buttonText, object, member); + EditorManagerPrivate::currentEditorView()->showEditorStatusBar( + id, infoText, buttonText, object, function); } void EditorManager::hideEditorStatusBar(const QString &id) diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index 8d4908e1deb..5c8c37113d8 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -152,9 +152,10 @@ public: static bool hasSplitter(); static void showEditorStatusBar(const QString &id, - const QString &infoText, - const QString &buttonText = QString(), - QObject *object = 0, const char *member = 0); + const QString &infoText, + const QString &buttonText = QString(), + QObject *object = nullptr, + const std::function &function = nullptr); static void hideEditorStatusBar(const QString &id); static EditorFactoryList editorFactories(const Utils::MimeType &mimeType, bool bestMatchOnly = true); diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 4bbad3ff42f..99556068e1f 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -218,15 +218,15 @@ void EditorView::closeCurrentEditor() void EditorView::showEditorStatusBar(const QString &id, const QString &infoText, const QString &buttonText, - QObject *object, const char *member) + QObject *object, const std::function &function) { m_statusWidgetId = id; m_statusWidgetLabel->setText(infoText); m_statusWidgetButton->setText(buttonText); m_statusWidgetButton->setToolTip(buttonText); m_statusWidgetButton->disconnect(); - if (object && member) - connect(m_statusWidgetButton, SIGNAL(clicked()), object, member); + if (object && function) + connect(m_statusWidgetButton, &QToolButton::clicked, object, function); m_statusWidget->setVisible(true); m_statusHLine->setVisible(true); //m_editorForInfoWidget = currentEditor(); diff --git a/src/plugins/coreplugin/editormanager/editorview.h b/src/plugins/coreplugin/editormanager/editorview.h index df0a62a9cb0..abeb0f125e6 100644 --- a/src/plugins/coreplugin/editormanager/editorview.h +++ b/src/plugins/coreplugin/editormanager/editorview.h @@ -38,6 +38,8 @@ #include #include +#include + QT_BEGIN_NAMESPACE class QAction; class QComboBox; @@ -95,7 +97,7 @@ public: void showEditorStatusBar(const QString &id, const QString &infoText, const QString &buttonText, - QObject *object, const char *member); + QObject *object, const std::function &function); void hideEditorStatusBar(const QString &id); void setCloseSplitEnabled(bool enable); void setCloseSplitIcon(const QIcon &icon); diff --git a/src/plugins/designer/cpp/formclasswizarddialog.h b/src/plugins/designer/cpp/formclasswizarddialog.h index 18c96e0f0f2..9ce0ea0b598 100644 --- a/src/plugins/designer/cpp/formclasswizarddialog.h +++ b/src/plugins/designer/cpp/formclasswizarddialog.h @@ -46,14 +46,12 @@ public: explicit FormClassWizardDialog(const Core::BaseFileWizardFactory *factory, QWidget *parent = 0); QString path() const; + void setPath(const QString &); Designer::FormClassWizardParameters parameters() const; bool validateCurrentPage(); -public slots: - void setPath(const QString &); - protected: void initializePage(int id); diff --git a/src/plugins/designer/cpp/formclasswizardpage.h b/src/plugins/designer/cpp/formclasswizardpage.h index 1f442610a59..a789f414380 100644 --- a/src/plugins/designer/cpp/formclasswizardpage.h +++ b/src/plugins/designer/cpp/formclasswizardpage.h @@ -48,6 +48,8 @@ public: virtual bool isComplete () const; virtual bool validatePage(); + void setClassName(const QString &suggestedClassName); + void setPath(const QString &); QString path() const; // Fill out applicable parameters @@ -58,11 +60,7 @@ public: static bool lowercaseHeaderFiles(); -public slots: - void setClassName(const QString &suggestedClassName); - void setPath(const QString &); - -private slots: +private: void slotValidChanged(); private: diff --git a/src/plugins/designer/editorwidget.h b/src/plugins/designer/editorwidget.h index 76e77665f31..d102eb18519 100644 --- a/src/plugins/designer/editorwidget.h +++ b/src/plugins/designer/editorwidget.h @@ -63,8 +63,6 @@ public: SharedTools::WidgetHost *formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const; EditorData activeEditor() const; - -public slots: void resetToDefaultLayout(); private: diff --git a/src/plugins/designer/formeditorplugin.h b/src/plugins/designer/formeditorplugin.h index 47ecdeda28d..5509c524e63 100644 --- a/src/plugins/designer/formeditorplugin.h +++ b/src/plugins/designer/formeditorplugin.h @@ -47,14 +47,14 @@ public: bool initialize(const QStringList &arguments, QString *errorMessage = 0) override; void extensionsInitialized() override; -private slots: #ifdef WITH_TESTS +private slots: void test_gotoslot(); void test_gotoslot_data(); #endif - void switchSourceForm(); private: + void switchSourceForm(); void initializeTemplates(); QAction *m_actionSwitchSource; diff --git a/src/plugins/designer/formeditorstack.h b/src/plugins/designer/formeditorstack.h index 05258e2aed1..caf8bf5ec6e 100644 --- a/src/plugins/designer/formeditorstack.h +++ b/src/plugins/designer/formeditorstack.h @@ -62,15 +62,13 @@ public: EditorData activeEditor() const; -public slots: void removeFormWindowEditor(QObject *); -private slots: +private: void updateFormWindowSelectionHandles(); void modeAboutToChange(Core::Id mode); void formSizeChanged(int w, int h); -private: inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const; inline int indexOfFormEditor(const QObject *xmlEditor) const; diff --git a/src/plugins/designer/formtemplatewizardpage.h b/src/plugins/designer/formtemplatewizardpage.h index 047ca4667ea..7921148dca3 100644 --- a/src/plugins/designer/formtemplatewizardpage.h +++ b/src/plugins/designer/formtemplatewizardpage.h @@ -68,10 +68,9 @@ public: signals: void templateActivated(); -private slots: +private: void slotCurrentTemplateChanged(bool); -private: QString m_templateContents; QDesignerNewFormWidgetInterface *m_newFormWidget; bool m_templateSelected; diff --git a/src/plugins/designer/formwindowfile.h b/src/plugins/designer/formwindowfile.h index a78d576ad9a..f14a63d780e 100644 --- a/src/plugins/designer/formwindowfile.h +++ b/src/plugins/designer/formwindowfile.h @@ -69,15 +69,13 @@ public: QString formWindowContents() const; ResourceHandler *resourceHandler() const; -public slots: void setFilePath(const Utils::FileName &) override; void setShouldAutoSave(bool sad = true) { m_shouldAutoSave = sad; } void updateIsModified(); -private slots: +private: void slotFormWindowRemoved(QDesignerFormWindowInterface *w); -private: QString m_suggestedName; bool m_shouldAutoSave = false; // Might actually go out of scope before the IEditor due diff --git a/src/plugins/designer/qtcreatorintegration.h b/src/plugins/designer/qtcreatorintegration.h index a00540ba8d0..3b1f25c0f9f 100644 --- a/src/plugins/designer/qtcreatorintegration.h +++ b/src/plugins/designer/qtcreatorintegration.h @@ -44,18 +44,16 @@ public: bool supportsToSlotNavigation() { return true; } + void updateSelection() override; + signals: void creatorHelpRequested(const QUrl &url); -public slots: - void updateSelection() override; - -private slots: +private: void slotNavigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames); void slotDesignerHelpRequested(const QString &manual, const QString &document); void slotSyncSettingsToDesigner(); -private: bool navigateToSlot(const QString &objectName, const QString &signalSignature, const QStringList ¶meterNames, diff --git a/src/plugins/designer/resourcehandler.h b/src/plugins/designer/resourcehandler.h index 530ccbc9757..bf5462c67c2 100644 --- a/src/plugins/designer/resourcehandler.h +++ b/src/plugins/designer/resourcehandler.h @@ -52,7 +52,6 @@ public: explicit ResourceHandler(QDesignerFormWindowInterface *fw); virtual ~ResourceHandler(); -public slots: void updateResources() { updateResourcesHelper(false); } void updateProjectResources() { updateResourcesHelper(true); } diff --git a/src/plugins/diffeditor/diffeditorcontroller.h b/src/plugins/diffeditor/diffeditorcontroller.h index 2a9a49fe399..3a88b914bd7 100644 --- a/src/plugins/diffeditor/diffeditorcontroller.h +++ b/src/plugins/diffeditor/diffeditorcontroller.h @@ -59,7 +59,6 @@ public: const QString &displayName); static DiffEditorController *controller(Core::IDocument *document); -public slots: void informationForCommitReceived(const QString &output); signals: diff --git a/src/plugins/diffeditor/diffeditordocument.h b/src/plugins/diffeditor/diffeditordocument.h index 5e0f6770622..c61d17ad909 100644 --- a/src/plugins/diffeditor/diffeditordocument.h +++ b/src/plugins/diffeditor/diffeditordocument.h @@ -77,6 +77,8 @@ public: OpenResult open(QString *errorString, const QString &fileName, const QString &realFileName) override; bool isReloading() const { return m_isReloading; } + void beginReload(); + void endReload(bool success); QString plainText() const; @@ -87,10 +89,6 @@ signals: void chunkActionsRequested(QMenu *menu, int diffFileIndex, int chunkIndex); void requestMoreInformation(); -public slots: - void beginReload(); - void endReload(bool success); - private: void setController(DiffEditorController *controller); diff --git a/src/plugins/diffeditor/diffeditorplugin.h b/src/plugins/diffeditor/diffeditorplugin.h index 5b19046bdd1..688ba1ccfc3 100644 --- a/src/plugins/diffeditor/diffeditorplugin.h +++ b/src/plugins/diffeditor/diffeditorplugin.h @@ -56,22 +56,23 @@ public: bool initialize(const QStringList &arguments, QString *errorMessage = 0); void extensionsInitialized(); -private slots: +private: void updateDiffCurrentFileAction(); void updateDiffOpenFilesAction(); void diffCurrentFile(); void diffOpenFiles(); void diffExternalFiles(); + QAction *m_diffCurrentFileAction = nullptr; + QAction *m_diffOpenFilesAction = nullptr; + #ifdef WITH_TESTS +private slots: void testMakePatch_data(); void testMakePatch(); void testReadPatch_data(); void testReadPatch(); #endif // WITH_TESTS -private: - QAction *m_diffCurrentFileAction = nullptr; - QAction *m_diffOpenFilesAction = nullptr; }; } // namespace Internal diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp index 40aba5fff86..92f0fdf4aa7 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.cpp @@ -87,7 +87,6 @@ public: void saveState(); void restoreState(); -public slots: void setDisplaySettings(const DisplaySettings &ds) override; signals: @@ -534,8 +533,8 @@ SideBySideDiffEditorWidget::SideBySideDiffEditorWidget(QWidget *parent) connect(m_leftEditor, &QPlainTextEdit::cursorPositionChanged, this, &SideBySideDiffEditorWidget::leftCursorPositionChanged); -// connect(m_leftEditor->document()->documentLayout(), SIGNAL(documentSizeChanged(QSizeF)), -// this, SLOT(leftDocumentSizeChanged())); +// connect(m_leftEditor->document()->documentLayout(), &QAbstractTextDocumentLayout::documentSizeChanged, +// this, &SideBySideDiffEditorWidget::leftDocumentSizeChanged); connect(m_rightEditor->verticalScrollBar(), &QAbstractSlider::valueChanged, this, &SideBySideDiffEditorWidget::rightVSliderChanged); diff --git a/src/plugins/diffeditor/sidebysidediffeditorwidget.h b/src/plugins/diffeditor/sidebysidediffeditorwidget.h index 4fdb97c1544..a80c11aa7cc 100644 --- a/src/plugins/diffeditor/sidebysidediffeditorwidget.h +++ b/src/plugins/diffeditor/sidebysidediffeditorwidget.h @@ -70,7 +70,7 @@ public: signals: void currentDiffFileIndexChanged(int index); -private slots: +private: void setFontSettings(const TextEditor::FontSettings &fontSettings); void slotLeftJumpToOriginalFileRequested(int diffFileIndex, int lineNumber, int columnNumber); @@ -87,7 +87,6 @@ private slots: void leftCursorPositionChanged(); void rightCursorPositionChanged(); -private: void showDiff(); SideDiffEditorWidget *m_leftEditor; diff --git a/src/plugins/diffeditor/unifieddiffeditorwidget.h b/src/plugins/diffeditor/unifieddiffeditorwidget.h index 5ba853e42e4..5812c5b234e 100644 --- a/src/plugins/diffeditor/unifieddiffeditorwidget.h +++ b/src/plugins/diffeditor/unifieddiffeditorwidget.h @@ -64,25 +64,22 @@ public: void restoreState(); void clear(const QString &message = QString()); + void setDisplaySettings(const TextEditor::DisplaySettings &ds) override; signals: void currentDiffFileIndexChanged(int index); -public slots: - void setDisplaySettings(const TextEditor::DisplaySettings &ds) override; - protected: void mouseDoubleClickEvent(QMouseEvent *e) override; void contextMenuEvent(QContextMenuEvent *e) override; QString lineNumber(int blockNumber) const override; int lineNumberDigits() const override; -private slots: +private: void setFontSettings(const TextEditor::FontSettings &fontSettings); void slotCursorPositionChangedInEditor(); -private: void setLeftLineNumber(int blockNumber, int lineNumber); void setRightLineNumber(int blockNumber, int lineNumber); void setFileInfo(int blockNumber, diff --git a/src/plugins/imageviewer/exportdialog.h b/src/plugins/imageviewer/exportdialog.h index 2c929bf4688..246ad211abd 100644 --- a/src/plugins/imageviewer/exportdialog.h +++ b/src/plugins/imageviewer/exportdialog.h @@ -49,12 +49,11 @@ public: void accept() override; -private slots: +private: void resetExportSize(); void exportWidthChanged(int width); void exportHeightChanged(int height); -private: void setExportWidthBlocked(int width); void setExportHeightBlocked(int height); diff --git a/src/plugins/imageviewer/imageview.h b/src/plugins/imageviewer/imageview.h index 9c9020c2c41..4e797b66015 100644 --- a/src/plugins/imageviewer/imageview.h +++ b/src/plugins/imageviewer/imageview.h @@ -68,11 +68,6 @@ public: void reset(); void createScene(); -signals: - void scaleFactorChanged(qreal factor); - void imageSizeChanged(const QSize &size); - -public slots: void exportImage(); void setViewBackground(bool enable); void setViewOutline(bool enable); @@ -81,18 +76,19 @@ public slots: void resetToOriginalSize(); void fitToScreen(); -private slots: - void emitScaleFactor(); +signals: + 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 hideEvent(QHideEvent *event); void showEvent(QShowEvent *event); void wheelEvent(QWheelEvent *event); -private: - void doScale(qreal factor); - ImageViewerFile *m_file; QGraphicsItem *m_imageItem = 0; QGraphicsRectItem *m_backgroundItem = 0; diff --git a/src/plugins/imageviewer/imageviewer.h b/src/plugins/imageviewer/imageviewer.h index 9a4baab18d7..38ee2ab0357 100644 --- a/src/plugins/imageviewer/imageviewer.h +++ b/src/plugins/imageviewer/imageviewer.h @@ -54,7 +54,6 @@ public: IEditor *duplicate() override; -public slots: void exportImage(); void imageSizeUpdated(const QSize &size); void scaleFactorUpdate(qreal factor); @@ -68,12 +67,10 @@ public slots: void updateToolButtons(); void togglePlay(); -private slots: - void playToggled(); - private: ImageViewer(const QSharedPointer &document, QWidget *parent = 0); void ctor(); + void playToggled(); void updatePauseAction(); struct ImageViewerPrivate *d; diff --git a/src/plugins/macros/macromanager.cpp b/src/plugins/macros/macromanager.cpp index cfda1684ffc..81fe1c4d412 100644 --- a/src/plugins/macros/macromanager.cpp +++ b/src/plugins/macros/macromanager.cpp @@ -287,10 +287,9 @@ void MacroManager::startMacro() 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.") .arg(endShortcut).arg(executeShortcut); - Core::EditorManager::showEditorStatusBar( - QLatin1String(Constants::M_STATUS_BUFFER), - help, - tr("Stop Recording Macro"), this, SLOT(endMacro())); + Core::EditorManager::showEditorStatusBar(Constants::M_STATUS_BUFFER, help, + tr("Stop Recording Macro"), + this, [this] { endMacro(); }); } void MacroManager::endMacro() diff --git a/src/plugins/macros/macromanager.h b/src/plugins/macros/macromanager.h index efc3bac6059..9fb6cb18adb 100644 --- a/src/plugins/macros/macromanager.h +++ b/src/plugins/macros/macromanager.h @@ -56,8 +56,6 @@ public: void executeLastMacro(); void saveLastMacro(); bool executeMacro(const QString &name); - -public slots: void endMacro(); protected: diff --git a/src/plugins/mercurial/mercurialcontrol.h b/src/plugins/mercurial/mercurialcontrol.h index 39917063ace..0c395fb059c 100644 --- a/src/plugins/mercurial/mercurialcontrol.h +++ b/src/plugins/mercurial/mercurialcontrol.h @@ -67,7 +67,6 @@ public: bool sccManaged(const QString &filename); -public slots: // To be connected to the HgTask's success signal to emit the repository/ // files changed signals according to the variant's type: // String -> repository, StringList -> files diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index 4acc63fa4c5..8254f91d677 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -126,7 +126,8 @@ bool MercurialPlugin::initialize(const QStringList & /* arguments */, QString * addAutoReleasedObject(new OptionsPage(versionControl())); - connect(m_client, SIGNAL(changed(QVariant)), versionControl(), SLOT(changed(QVariant))); + connect(m_client, &VcsBaseClient::changed, + static_cast(versionControl()), &MercurialControl::changed); connect(m_client, &MercurialClient::needUpdate, this, &MercurialPlugin::update); 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); createRepositoryActions(context); m_mercurialContainer->addSeparator(context); - createRepositoryManagementActions(context); // Request the Tools menu and add the Mercurial menu to it Core::ActionContainer *toolsMenu = Core::ActionManager::actionContainer(Core::Id(Core::Constants::M_TOOLS)); @@ -603,18 +603,6 @@ bool MercurialPlugin::submitEditorAboutToClose() 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) { if (!enableMenuAction(as, m_menuAction)) { diff --git a/src/plugins/mercurial/mercurialplugin.h b/src/plugins/mercurial/mercurialplugin.h index 4a58bc58ceb..231f03effc4 100644 --- a/src/plugins/mercurial/mercurialplugin.h +++ b/src/plugins/mercurial/mercurialplugin.h @@ -127,7 +127,6 @@ private: void createFileActions(const Core::Context &context); void createDirectoryActions(const Core::Context &context); void createRepositoryActions(const Core::Context &context); - void createRepositoryManagementActions(const Core::Context &context); // Variables static MercurialPlugin *m_instance; diff --git a/src/plugins/modeleditor/actionhandler.h b/src/plugins/modeleditor/actionhandler.h index dff6a4ae29c..af2793d3fe8 100644 --- a/src/plugins/modeleditor/actionhandler.h +++ b/src/plugins/modeleditor/actionhandler.h @@ -71,7 +71,7 @@ public: void createActions(); -private slots: +private: void undo(); void redo(); void cut(); @@ -88,7 +88,6 @@ private slots: void zoomOut(); void resetZoom(); -private: Core::Command *registerCommand(const Core::Id &id, const std::function &slot, const Core::Context &context, bool scriptable = true, const QString &title = QString(), diff --git a/src/plugins/modeleditor/extdocumentcontroller.h b/src/plugins/modeleditor/extdocumentcontroller.h index 28f3bed9edd..667403b82e0 100644 --- a/src/plugins/modeleditor/extdocumentcontroller.h +++ b/src/plugins/modeleditor/extdocumentcontroller.h @@ -46,7 +46,7 @@ public: ElementTasks *elementTasks() const; PxNodeController *pxNodeController() const; -private slots: +private: void onProjectFileNameChanged(const QString &fileName); private: diff --git a/src/plugins/modeleditor/modelindexer.h b/src/plugins/modeleditor/modelindexer.h index 19694e60b19..d392f386ea1 100644 --- a/src/plugins/modeleditor/modelindexer.h +++ b/src/plugins/modeleditor/modelindexer.h @@ -65,7 +65,7 @@ public: QString findModel(const qmt::Uid &modelUid); QString findDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid); -private slots: +private: void onProjectAdded(ProjectExplorer::Project *project); void onAboutToRemoveProject(ProjectExplorer::Project *project); void onProjectFileListChanged(ProjectExplorer::Project *project); diff --git a/src/plugins/modeleditor/modelsmanager.h b/src/plugins/modeleditor/modelsmanager.h index 9232f16df37..743a0f3a578 100644 --- a/src/plugins/modeleditor/modelsmanager.h +++ b/src/plugins/modeleditor/modelsmanager.h @@ -60,12 +60,11 @@ public: void releaseModel(ExtDocumentController *documentController); void openDiagram(const qmt::Uid &modelUid, const qmt::Uid &diagramUid); -private slots: +private: void onAboutToShowContextMenu(ProjectExplorer::Project *project, ProjectExplorer::Node *node); void onOpenDiagramFromProjectExplorer(); void onOpenDefaultModel(const qmt::Uid &modelUid); -private: void openDiagram(ExtDocumentController *documentController, qmt::MDiagram *diagram); private: diff --git a/src/plugins/modeleditor/uicontroller.h b/src/plugins/modeleditor/uicontroller.h index 76496be10a6..c31f630bca7 100644 --- a/src/plugins/modeleditor/uicontroller.h +++ b/src/plugins/modeleditor/uicontroller.h @@ -54,7 +54,6 @@ public: bool hasRightHorizSplitterState() const; QByteArray rightHorizSplitterState() const; -public slots: void onRightSplitterChanged(const QByteArray &state); void onRightHorizSplitterChanged(const QByteArray &state); void saveSettings(QSettings *settings); diff --git a/src/plugins/nim/project/nimprojectnode.cpp b/src/plugins/nim/project/nimprojectnode.cpp index c4c306cdf3a..5c22cea185f 100644 --- a/src/plugins/nim/project/nimprojectnode.cpp +++ b/src/plugins/nim/project/nimprojectnode.cpp @@ -57,21 +57,6 @@ QList 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 *) { return m_project.addFiles(filePaths); diff --git a/src/plugins/nim/project/nimprojectnode.h b/src/plugins/nim/project/nimprojectnode.h index 9c124824fba..ba4dd634153 100644 --- a/src/plugins/nim/project/nimprojectnode.h +++ b/src/plugins/nim/project/nimprojectnode.h @@ -39,9 +39,6 @@ public: NimProjectNode(NimProject &project, const Utils::FileName &projectFilePath); QList 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 removeFiles(const QStringList &filePaths, QStringList *) override; bool deleteFiles(const QStringList &) override; diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index ab85764b851..f4b4004ee56 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -993,17 +993,23 @@ PerforceResponse PerforcePlugin::synchronousProcess(const QString &workingDir, // connect stderr to the output window if desired if (flags & StdErrToWindow) { 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 if (flags & StdOutToWindow) { process.setStdOutBufferedSignalsEnabled(true); if (flags & SilentStdOut) { - connect(&process, &SynchronousProcess::stdOutBuffered, outputWindow, &VcsOutputWindow::appendSilently); - } - else { - connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString))); + connect(&process, &SynchronousProcess::stdOutBuffered, + outputWindow, &VcsOutputWindow::appendSilently); + } else { + connect(&process, &SynchronousProcess::stdOutBuffered, + outputWindow, [outputWindow](const QString &lines) { + outputWindow->append(lines); + }); } } process.setTimeOutMessageBoxEnabled(true); diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp index 554c181a48f..4be4b6697de 100644 --- a/src/plugins/projectexplorer/appoutputpane.cpp +++ b/src/plugins/projectexplorer/appoutputpane.cpp @@ -85,6 +85,7 @@ static void replaceAllChildWidgets(QLayout *layout, const QList &newC namespace { const char SETTINGS_KEY[] = "ProjectExplorer/AppOutput/Zoom"; +const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput"; } namespace ProjectExplorer { @@ -425,7 +426,7 @@ void AppOutputPane::createNewOutputWindow(RunControl *rc) } // Create new 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::OutputWindow *ow = new Core::OutputWindow(context, m_tabWidget); ow->setWindowTitle(tr("Application Output Window")); diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp index 0521570a346..e7a175fe272 100644 --- a/src/plugins/projectexplorer/compileoutputwindow.cpp +++ b/src/plugins/projectexplorer/compileoutputwindow.cpp @@ -57,6 +57,7 @@ using namespace ProjectExplorer::Internal; namespace { const int MAX_LINECOUNT = 100000; const char SETTINGS_KEY[] = "ProjectExplorer/CompileOutput/Zoom"; +const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput"; } namespace ProjectExplorer { @@ -148,7 +149,7 @@ CompileOutputWindow::CompileOutputWindow(QAction *cancelBuildAction) : m_zoomOutButton(new QToolButton), 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->setWindowTitle(displayName()); m_outputWindow->setWindowIcon(Icons::WINDOW.icon()); diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp index 7534523b0bc..119d9a057c2 100644 --- a/src/plugins/projectexplorer/deployconfiguration.cpp +++ b/src/plugins/projectexplorer/deployconfiguration.cpp @@ -34,10 +34,11 @@ #include -using namespace ProjectExplorer; +namespace ProjectExplorer { const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount"; const char BUILD_STEP_LIST_PREFIX[] = "ProjectExplorer.BuildConfiguration.BuildStepList."; +const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration"; DeployConfiguration::DeployConfiguration(Target *target, Core::Id id) : ProjectConfiguration(target, id) @@ -204,12 +205,12 @@ QList DefaultDeployConfigurationFactory::availableCreationIds(Target * { if (!canHandle(parent)) return QList(); - return QList() << Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID); + return QList() << Core::Id(DEFAULT_DEPLOYCONFIGURATION_ID); } 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 return DeployConfigurationFactory::tr("Deploy Configuration"); return QString(); @@ -219,7 +220,7 @@ bool DefaultDeployConfigurationFactory::canCreate(Target *parent, Core::Id id) c { if (!canHandle(parent)) return false; - return id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID; + return id == DEFAULT_DEPLOYCONFIGURATION_ID; } DeployConfiguration *DefaultDeployConfigurationFactory::create(Target *parent, Core::Id id) @@ -264,3 +265,5 @@ bool DefaultDeployConfigurationFactory::canHandle(Target *parent) const return false; return DeviceTypeKitInformation::deviceTypeId(parent->kit()) == Constants::DESKTOP_DEVICE_TYPE; } + +} // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp index da3bbfaa01a..b1792e6fd5e 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp @@ -148,13 +148,14 @@ void DeviceManager::load() Utils::PersistentSettingsReader reader; // read devices file from global settings path + QHash defaultDevices; QList sdkDevices; 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 QList userDevices; 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 // devices with the same id. foreach (IDevice::Ptr device, userDevices) { @@ -172,18 +173,25 @@ void DeviceManager::load() foreach (const IDevice::Ptr &sdkDevice, sdkDevices) 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(); } -QList DeviceManager::fromMap(const QVariantMap &map) +QList DeviceManager::fromMap(const QVariantMap &map, + QHash *defaultDevices) { QList devices; - const QVariantMap defaultDevsMap = map.value(QLatin1String(DefaultDevicesKey)).toMap(); - for (QVariantMap::ConstIterator it = defaultDevsMap.constBegin(); - it != defaultDevsMap.constEnd(); ++it) { - d->defaultDevices.insert(Core::Id::fromString(it.key()), Core::Id::fromSetting(it.value())); + + if (defaultDevices) { + const QVariantMap defaultDevsMap = map.value(DefaultDevicesKey).toMap(); + 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(); foreach (const QVariant &v, deviceList) { @@ -398,14 +406,6 @@ IDevice::ConstPtr DeviceManager::defaultDevice(Core::Id deviceType) const 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() { return settingsFilePath(QLatin1String("/ssh-hostkeys")).toString(); diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.h b/src/plugins/projectexplorer/devicesupport/devicemanager.h index 80620616b69..cbfbafb0ce2 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.h +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.h @@ -85,9 +85,8 @@ private: void load(); static const IDeviceFactory *restoreFactory(const QVariantMap &map); - QList fromMap(const QVariantMap &map); + QList fromMap(const QVariantMap &map, QHash *defaultDevices); QVariantMap toMap() const; - void ensureOneDefaultDevicePerType(); // For SettingsWidget. IDevice::Ptr mutableDevice(Core::Id id) const; diff --git a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp index 909f690b227..5f02bc7779d 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonsummarypage.cpp @@ -175,7 +175,7 @@ void JsonSummaryPage::addToProject(const JsonWizard::GeneratorFiles &files) if (!folder) return; if (kind == IWizardFactory::ProjectWizard) { - if (!static_cast(folder)->addSubProjects(QStringList(generatedProject))) { + if (!static_cast(folder)->addSubProject(generatedProject)) { QMessageBox::critical(m_wizard, tr("Failed to Add to Project"), tr("Failed to add subproject \"%1\"\nto project \"%2\".") .arg(QDir::toNativeSeparators(generatedProject)) diff --git a/src/plugins/projectexplorer/kit.cpp b/src/plugins/projectexplorer/kit.cpp index 4fc619d1f42..c6fb97cffed 100644 --- a/src/plugins/projectexplorer/kit.cpp +++ b/src/plugins/projectexplorer/kit.cpp @@ -583,18 +583,24 @@ QString Kit::toHtml(const QList &additional) const void Kit::setAutoDetected(bool detected) { + if (d->m_autodetected == detected) + return; d->m_autodetected = detected; kitUpdated(); } void Kit::setAutoDetectionSource(const QString &autoDetectionSource) { + if (d->m_autoDetectionSource == autoDetectionSource) + return; d->m_autoDetectionSource = autoDetectionSource; kitUpdated(); } void Kit::setSdkProvided(bool sdkProvided) { + if (d->m_sdkProvided == sdkProvided) + return; d->m_sdkProvided = sdkProvided; kitUpdated(); } @@ -609,6 +615,9 @@ void Kit::makeSticky() void Kit::setSticky(Id id, bool b) { + if (d->m_sticky.contains(id) == b) + return; + if (b) d->m_sticky.insert(id); else @@ -618,12 +627,17 @@ void Kit::setSticky(Id id, bool b) void Kit::makeUnSticky() { + if (d->m_sticky.isEmpty()) + return; d->m_sticky.clear(); kitUpdated(); } void Kit::setMutable(Id id, bool b) { + if (d->m_mutable.contains(id) == b) + return; + if (b) d->m_mutable.insert(id); else diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp index 5f4ca64d11f..30c3ad0836a 100644 --- a/src/plugins/projectexplorer/kitinformation.cpp +++ b/src/plugins/projectexplorer/kitinformation.cpp @@ -46,6 +46,10 @@ 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: // -------------------------------------------------------------------------- @@ -195,8 +199,8 @@ QList ToolChainKitInformation::validate(const Kit *k) const void ToolChainKitInformation::upgrade(Kit *k) { - const Core::Id oldIdV1 = Constants::KITINFORMATION_ID_V1; - const Core::Id oldIdV2 = Constants::KITINFORMATION_ID_V2; + const Core::Id oldIdV1 = KITINFORMATION_ID_V1; + const Core::Id oldIdV2 = KITINFORMATION_ID_V2; // upgrade <=4.1 to 4.2 (keep old settings around for now) { @@ -373,7 +377,7 @@ QSet ToolChainKitInformation::availableFeatures(const Kit *k) const Core::Id ToolChainKitInformation::id() { - return Constants::KITINFORMATION_ID_V3; + return KITINFORMATION_ID_V3; } ToolChain *ToolChainKitInformation::toolChain(const Kit *k, Core::Id language) diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp index 286098c8a98..005be16ab83 100644 --- a/src/plugins/projectexplorer/kitmanager.cpp +++ b/src/plugins/projectexplorer/kitmanager.cpp @@ -30,7 +30,6 @@ #include "kitfeatureprovider.h" #include "kitmanagerconfigwidget.h" #include "project.h" -#include "projectexplorerconstants.h" #include "task.h" #include diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index 43870201dbd..7d283d39011 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -417,13 +417,6 @@ void Project::setDocument(Core::IDocument *doc) QTC_ASSERT(doc, return); QTC_ASSERT(!d->m_document, return); 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) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index fbddc1a7a27..64cdb35e841 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -166,6 +166,77 @@ using namespace ProjectExplorer::Internal; 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() { Project *project = ProjectTree::currentProject(); @@ -1250,7 +1321,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er 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."), []() -> QString { BuildConfiguration *bc = activeBuildConfiguration(); @@ -1285,7 +1356,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er 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."), []() -> QString { Kit *kit = currentKit(); @@ -1293,7 +1364,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er 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."), []() -> QString { Kit *kit = currentKit(); @@ -1301,7 +1372,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er 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."), []() -> QString { 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 " "in the currently active kit."), []() -> QString { @@ -1336,7 +1407,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er return QString(); }); - expander->registerFileVariables(Constants::VAR_CURRENTRUN_EXECUTABLE_PREFIX, + expander->registerFileVariables("CurrentRun:Executable", tr("The currently active run configuration's executable (if applicable)"), [this]() -> QString { if (Target *target = activeTarget()) { @@ -1346,8 +1417,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er } } return QString(); - }, - true); + }); expander->registerVariable(Constants::VAR_CURRENTBUILD_TYPE, tr("The currently active build configuration's type."), @@ -3141,7 +3211,7 @@ void ProjectExplorerPluginPrivate::removeProject() RemoveFileDialog removeFileDialog(subProjectNode->filePath().toString(), ICore::mainWindow()); removeFileDialog.setDeleteFileVisible(false); if (removeFileDialog.exec() == QDialog::Accepted) - projectNode->removeSubProjects(QStringList() << subProjectNode->filePath().toString()); + projectNode->removeSubProject(subProjectNode->filePath().toString()); } } diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index 86229da018c..48738167b4c 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -26,7 +26,6 @@ #pragma once #include "projectexplorer_export.h" -#include "projectexplorerconstants.h" #include "runconfiguration.h" #include diff --git a/src/plugins/projectexplorer/projectexplorerconstants.h b/src/plugins/projectexplorer/projectexplorerconstants.h index 9c1d4b4f544..8224965e3c0 100644 --- a/src/plugins/projectexplorer/projectexplorerconstants.h +++ b/src/plugins/projectexplorer/projectexplorerconstants.h @@ -32,84 +32,24 @@ namespace Constants { // Modes and their priorities const char MODE_SESSION[] = "Project"; -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 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 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"; const char C_PROJECT_TREE[] = "ProjectExplorer.ProjectTreeContext"; -const char C_APP_OUTPUT[] = "ProjectExplorer.ApplicationOutput"; -const char C_COMPILE_OUTPUT[] = "ProjectExplorer.CompileOutput"; // 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_DEBUG[] = "ProjectExplorer.Menu.Debug"; const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging"; -const char M_SESSION[] = "ProjectExplorer.Menu.Session"; // Menu groups const char G_BUILD_BUILD[] = "ProjectExplorer.Group.Build"; const char G_BUILD_DEPLOY[] = "ProjectExplorer.Group.Deploy"; const char G_BUILD_REBUILD[] = "ProjectExplorer.Group.Rebuild"; 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 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_CONFIG[] = "ProjectFile.Group.Config"; -const char RUNMENUCONTEXTMENU[] = "Project.RunMenu"; - -// File factory -const char FILE_FACTORY_ID[] = "ProjectExplorer.FileFactoryId"; - // Mime types const char C_SOURCE_MIMETYPE[] = "text/x-csrc"; 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_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 const char QT_PROJECT_WIZARD_CATEGORY[] = "H.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_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy"; -// Deploy Configuration id: -const char DEFAULT_DEPLOYCONFIGURATION_ID[] = "ProjectExplorer.DefaultDeployConfiguration"; - // Language // Keep these short: These constants are exposed to the MacroExplorer! @@ -234,7 +162,6 @@ const int DESKTOP_PORT_END = 31000; // Variable Names: const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject"; -const char VAR_CURRENTPROJECT_BUILDPATH[] = "CurrentProject:BuildPath"; const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name"; const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name"; 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_ENV[] = "CurrentBuild:Env"; 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: 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_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 ProjectExplorer diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index bc8a04382c3..c7bf50e2467 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -181,7 +181,7 @@ bool ProjectFileWizardExtension::processProject( if (!folder) return true; if (m_context->wizard->kind() == IWizardFactory::ProjectWizard) { - if (!static_cast(folder)->addSubProjects(QStringList(generatedProject))) { + if (!static_cast(folder)->addSubProject(generatedProject)) { *errorMessage = tr("Failed to add subproject \"%1\"\nto project \"%2\".") .arg(generatedProject).arg(folder->filePath().toUserOutput()); return false; diff --git a/src/plugins/projectexplorer/projectnodes.cpp b/src/plugins/projectexplorer/projectnodes.cpp index b9491687c21..8557b99003f 100644 --- a/src/plugins/projectexplorer/projectnodes.cpp +++ b/src/plugins/projectexplorer/projectnodes.cpp @@ -720,15 +720,15 @@ bool ProjectNode::canAddSubProject(const QString &proFilePath) const return false; } -bool ProjectNode::addSubProjects(const QStringList &proFilePaths) +bool ProjectNode::addSubProject(const QString &proFilePath) { - Q_UNUSED(proFilePaths) + Q_UNUSED(proFilePath) return false; } -bool ProjectNode::removeSubProjects(const QStringList &proFilePaths) +bool ProjectNode::removeSubProject(const QString &proFilePath) { - Q_UNUSED(proFilePaths) + Q_UNUSED(proFilePath) return false; } diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index 03858db5e73..fb17b4806e8 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -40,7 +40,7 @@ namespace Utils { class MimeType; } namespace ProjectExplorer { class RunConfiguration; -class Project; +class SessionManager; enum class NodeType : quint16 { File = 1, @@ -278,8 +278,8 @@ public: QString vcsTopic() const; virtual bool canAddSubProject(const QString &proFilePath) const; - virtual bool addSubProjects(const QStringList &proFilePaths); - virtual bool removeSubProjects(const QStringList &proFilePaths); + virtual bool addSubProject(const QString &proFile); + virtual bool removeSubProject(const QString &proFilePath); bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override; @@ -302,7 +302,7 @@ protected: // will add the persistent stuff explicit ProjectNode(const Utils::FileName &projectFilePath); - friend class Project; + friend class SessionManager; }; // Documentation inside. diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 5f3e99c0c5d..da5c7b398b9 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -225,7 +225,7 @@ void RunConfiguration::ctor() BuildConfiguration *bc = target()->activeBuildConfiguration(); 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) { const auto envAspect = extraAspect(); return envAspect ? envAspect->environment().value(var) : QString(); diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp index 689cb961868..fa478bb5b0c 100644 --- a/src/plugins/projectexplorer/selectablefilesmodel.cpp +++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp @@ -43,6 +43,10 @@ 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() { qDeleteAll(childDirectories); @@ -550,11 +554,11 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) : m_progressLabel(new QLabel) { const QString showFilter - = Core::ICore::settings()->value(QLatin1String(Constants::SHOW_FILE_FILTER_SETTING), - QLatin1String(Constants::SHOW_FILE_FILTER_DEFAULT)).toString(); + = Core::ICore::settings()->value("GenericProject/ShowFileFilter", + QLatin1String(SHOW_FILE_FILTER_DEFAULT)).toString(); const QString hideFilter - = Core::ICore::settings()->value(QLatin1String(Constants::HIDE_FILE_FILTER_SETTING), - QLatin1String(Constants::HIDE_FILE_FILTER_DEFAULT)).toString(); + = Core::ICore::settings()->value("GenericProject/FileFilter", + QLatin1String(HIDE_FILE_FILTER_DEFAULT)).toString(); auto layout = new QGridLayout(this); layout->setMargin(0); diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 6efdea90190..2e87aef4ff7 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -205,7 +205,14 @@ void SessionManager::updateProjectTree(Project *pro) return; // Project was already de-registered and is shutting down 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); currentPair->second = newNode; @@ -766,6 +773,10 @@ void SessionManager::removeProjects(QList remove) pro->saveSettings(); pro->setRootProjectNode(nullptr); // Deregister project with sessionnode! + // Remove the project node: + Node *projectNode = nodeForProject(pro); + d->m_sessionNode.removeNode(projectNode); + d->m_projects = Utils::filtered(d->m_projects, [pro](const QPair &pair) { diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp index b7163be80bb..7ce2538317e 100644 --- a/src/plugins/projectexplorer/taskhub.cpp +++ b/src/plugins/projectexplorer/taskhub.cpp @@ -31,7 +31,11 @@ #include #include -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; QVector TaskHub::m_registeredCategories; @@ -40,9 +44,9 @@ static Core::Id categoryForType(Task::TaskType type) { switch (type) { case Task::Error: - return Constants::TASK_MARK_ERROR; + return TASK_MARK_ERROR; case Task::Warning: - return Constants::TASK_MARK_WARNING; + return TASK_MARK_WARNING; default: return Core::Id(); } @@ -101,12 +105,12 @@ TaskHub::TaskHub() m_instance = this; qRegisterMetaType("ProjectExplorer::Task"); qRegisterMetaType >("QList"); - TaskMark::setCategoryColor(Constants::TASK_MARK_ERROR, + TaskMark::setCategoryColor(TASK_MARK_ERROR, Utils::Theme::ProjectExplorer_TaskError_TextMarkColor); - TaskMark::setCategoryColor(Constants::TASK_MARK_WARNING, + TaskMark::setCategoryColor(TASK_MARK_WARNING, Utils::Theme::ProjectExplorer_TaskWarn_TextMarkColor); - TaskMark::setDefaultToolTip(Constants::TASK_MARK_ERROR, tr("Error")); - TaskMark::setDefaultToolTip(Constants::TASK_MARK_WARNING, tr("Warning")); + TaskMark::setDefaultToolTip(TASK_MARK_ERROR, tr("Error")); + TaskMark::setDefaultToolTip(TASK_MARK_WARNING, tr("Warning")); } TaskHub::~TaskHub() @@ -194,3 +198,5 @@ void TaskHub::requestPopup() { emit m_instance->popupRequested(Core::IOutputPane::NoModeSwitch); } + +} // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 8a488f684e3..5d0e44e56b3 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -26,7 +26,6 @@ #include "taskwindow.h" #include "itaskhandler.h" -#include "projectexplorerconstants.h" #include "projectexplorericons.h" #include "session.h" #include "task.h" diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp index cd314e0bc77..adea3a3a3d3 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.cpp @@ -32,6 +32,12 @@ namespace QmakeProjectManager { namespace Internal { +// Determine name for Q_EXPORT_PLUGIN +static inline QString createPluginName(const QString &prefix) +{ + return prefix.toLower() + QLatin1String("plugin"); +} + CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) : QWizardPage(parent), m_ui(new Ui::CustomWidgetPluginWizardPage), @@ -39,8 +45,19 @@ CustomWidgetPluginWizardPage::CustomWidgetPluginWizardPage(QWidget *parent) : m_complete(false) { m_ui->setupUi(this); - connect(m_ui->collectionClassEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness); - connect(m_ui->pluginNameEdit, &QLineEdit::textEdited, this, &CustomWidgetPluginWizardPage::slotCheckCompleteness); + connect(m_ui->collectionClassEdit, &QLineEdit::textEdited, + 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")); } @@ -60,12 +77,6 @@ QString CustomWidgetPluginWizardPage::pluginName() const 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) { m_classCount = widgetsPage->classCount(); @@ -94,18 +105,6 @@ void CustomWidgetPluginWizardPage::setCollectionEnabled(bool 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 CustomWidgetPluginWizardPage::basicPluginOptions() const { QSharedPointer po(new PluginOptions); diff --git a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h index 38b8c9c7272..5a712dde3e4 100644 --- a/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h +++ b/src/plugins/qmakeprojectmanager/customwidgetwizard/customwidgetpluginwizardpage.h @@ -56,12 +56,8 @@ public: // Fills the plugin fields, excluding widget list. QSharedPointer basicPluginOptions() const; -private slots: - void on_collectionClassEdit_textChanged(); - void on_collectionHeaderEdit_textChanged(); - void slotCheckCompleteness(); - private: + void slotCheckCompleteness(); inline QString collectionClassName() const; inline QString pluginName() const; void setCollectionEnabled(bool enColl); diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp index 14609144f32..e95fcdd86ca 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.cpp @@ -156,6 +156,13 @@ void QmakeBuildConfiguration::ctor() this, &QmakeBuildConfiguration::emitProFileEvaluateNeeded); connect(target(), &Target::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() diff --git a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h index 6251cc87ba4..c526760c62e 100644 --- a/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h +++ b/src/plugins/qmakeprojectmanager/qmakebuildconfiguration.h @@ -53,8 +53,8 @@ public: ProjectExplorer::NamedWidget *createConfigWidget() override; bool isShadowBuild() const; - void setSubNodeBuild(QmakeProjectManager::QmakeProFileNode *node); - QmakeProjectManager::QmakeProFileNode *subNodeBuild() const; + void setSubNodeBuild(QmakeProFileNode *node); + QmakeProFileNode *subNodeBuild() const; ProjectExplorer::FileNode *fileNodeBuild() const; void setFileNodeBuild(ProjectExplorer::FileNode *node); @@ -138,7 +138,7 @@ private: bool m_shadowBuild = true; bool m_isEnabled = true; QtSupport::BaseQtVersion::QmakeBuildConfigs m_qmakeBuildConfiguration = 0; - QmakeProjectManager::QmakeProFileNode *m_subNodeBuild = nullptr; + QmakeProFileNode *m_subNodeBuild = nullptr; ProjectExplorer::FileNode *m_fileNodeBuild = nullptr; friend class Internal::QmakeProjectConfigWidget; diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 1f19b76a9ed..b2ea316330b 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -148,16 +148,16 @@ bool QmakePriFileNode::canAddSubProject(const QString &proFilePath) const return pri ? pri->canAddSubProject(proFilePath) : false; } -bool QmakePriFileNode::addSubProjects(const QStringList &proFilePaths) +bool QmakePriFileNode::addSubProject(const QString &proFilePath) { 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(); - return pri ? pri->removeSubProjects(proFilePaths) : false; + return pri ? pri->removeSubProjects(proFilePath) : false; } bool QmakePriFileNode::addFiles(const QStringList &filePaths, QStringList *notAdded) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index 89f6039dd6e..b04751809ac 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -53,8 +53,8 @@ public: bool canAddSubProject(const QString &proFilePath) const override; - bool addSubProjects(const QStringList &proFilePaths) override; - bool removeSubProjects(const QStringList &proFilePaths) override; + bool addSubProject(const QString &proFilePath) override; + bool removeSubProject(const QString &proFilePath) override; bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr) override; bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr) override; diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 8b555df827a..5abc263c6da 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -474,13 +474,11 @@ static QString simplifyProFilePath(const QString &proFilePath) return proFilePath; } -bool QmakePriFile::addSubProjects(const QStringList &proFilePaths) +bool QmakePriFile::addSubProject(const QString &proFile) { QStringList uniqueProFilePaths; - foreach (const QString &proFile, proFilePaths) { - if (!m_recursiveEnumerateFiles.contains(FileName::fromString(proFile))) - uniqueProFilePaths.append(simplifyProFilePath(proFile)); - } + if (!m_recursiveEnumerateFiles.contains(FileName::fromString(proFile))) + uniqueProFilePaths.append(simplifyProFilePath(proFile)); QStringList failedFiles; changeFiles(QLatin1String(Constants::PROFILE_MIMETYPE), uniqueProFilePaths, &failedFiles, AddToProFile); @@ -488,10 +486,10 @@ bool QmakePriFile::addSubProjects(const QStringList &proFilePaths) return failedFiles.isEmpty(); } -bool QmakePriFile::removeSubProjects(const QStringList &proFilePaths) +bool QmakePriFile::removeSubProjects(const QString &proFilePath) { 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); diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index 228a92876eb..a1ad876f76a 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -134,8 +134,8 @@ public: // ProjectNode interface virtual bool canAddSubProject(const QString &proFilePath) const; - virtual bool addSubProjects(const QStringList &proFilePaths); - virtual bool removeSubProjects(const QStringList &proFilePaths); + virtual bool addSubProject(const QString &proFile); + virtual bool removeSubProjects(const QString &proFilePath); virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = nullptr); virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = nullptr); diff --git a/src/plugins/qmakeprojectmanager/qmakestep.cpp b/src/plugins/qmakeprojectmanager/qmakestep.cpp index 5250042ca27..440df96c28a 100644 --- a/src/plugins/qmakeprojectmanager/qmakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakestep.cpp @@ -508,7 +508,7 @@ QString QMakeStep::effectiveQMakeCall() const QString result = qmake; if (qtVersion) { - result += QLatin1Char(' ') + allArguments(qtVersion); + result += ' ' + buildConfiguration()->macroExpander()->expand(allArguments(qtVersion)); if (qtVersion->qtVersion() >= QtVersionNumber(5, 0, 0)) result.append(QString::fromLatin1(" && %1 %2").arg(make).arg(makeArguments())); } diff --git a/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp b/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp index f9c35e607e3..b439abbf23c 100644 --- a/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/abstractaction.cpp @@ -76,7 +76,7 @@ SelectionContext AbstractAction::selectionContext() const DefaultAction::DefaultAction(const QString &description) : QAction(description, 0) { - connect(this, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool))); + connect(this, &QAction::triggered, this, &DefaultAction::actionTriggered); } void DefaultAction::actionTriggered(bool enable) diff --git a/src/plugins/qmldesigner/components/componentcore/abstractaction.h b/src/plugins/qmldesigner/components/componentcore/abstractaction.h index 0c347b5d232..be62198af4b 100644 --- a/src/plugins/qmldesigner/components/componentcore/abstractaction.h +++ b/src/plugins/qmldesigner/components/componentcore/abstractaction.h @@ -39,13 +39,13 @@ class QMLDESIGNERCORE_EXPORT DefaultAction : public QAction public: DefaultAction(const QString &description); -signals: - void triggered(bool checked, const SelectionContext &selectionContext); - -public slots: //virtual function instead of slot + // virtual function instead of slot virtual void actionTriggered(bool enable); void setSelectionContext(const SelectionContext &selectionContext); +signals: + void triggered(bool checked, const SelectionContext &selectionContext); + protected: SelectionContext m_selectionContext; }; diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.h b/src/plugins/qmldesigner/components/componentcore/crumblebar.h index a5d6ed3c2df..5443d22bdd7 100644 --- a/src/plugins/qmldesigner/components/componentcore/crumblebar.h +++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.h @@ -46,10 +46,8 @@ public: Utils::CrumblePath *crumblePath(); -private slots: - void onCrumblePathElementClicked(const QVariant &data); - private: + void onCrumblePathElementClicked(const QVariant &data); void updateVisibility(); void showSaveDialog(); diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h index 8a47119689d..45c6ab326d7 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h +++ b/src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.h @@ -107,7 +107,6 @@ public: : DefaultAction(description), m_action(action) { } -public /*slots*/: virtual void actionTriggered(bool b) { m_selectionContext.setToggled(b); diff --git a/src/plugins/qmldesigner/components/debugview/debugviewwidget.cpp b/src/plugins/qmldesigner/components/debugview/debugviewwidget.cpp index 269fbf7c3df..920ab50de5c 100644 --- a/src/plugins/qmldesigner/components/debugview/debugviewwidget.cpp +++ b/src/plugins/qmldesigner/components/debugview/debugviewwidget.cpp @@ -36,7 +36,8 @@ namespace Internal { DebugViewWidget::DebugViewWidget(QWidget *parent) : QWidget(parent) { 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) diff --git a/src/plugins/qmldesigner/components/debugview/debugviewwidget.h b/src/plugins/qmldesigner/components/debugview/debugviewwidget.h index ca6cdfb8fae..ad71227e125 100644 --- a/src/plugins/qmldesigner/components/debugview/debugviewwidget.h +++ b/src/plugins/qmldesigner/components/debugview/debugviewwidget.h @@ -45,7 +45,6 @@ public: void setDebugViewEnabled(bool b); -public slots: void enabledCheckBoxToggled(bool b); private: diff --git a/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp b/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp index 45d93e67dfe..a4064d7a71d 100644 --- a/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/backgroundaction.cpp @@ -64,7 +64,8 @@ QWidget *BackgroundAction::createWidget(QWidget *parent) } comboBox->setCurrentIndex(0); - connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitBackgroundChanged(int))); + connect(comboBox, static_cast(&QComboBox::currentIndexChanged), + this, &BackgroundAction::emitBackgroundChanged); comboBox->setProperty("hideborder", true); comboBox->setToolTip(tr("Set the color of the canvas.")); diff --git a/src/plugins/qmldesigner/components/formeditor/backgroundaction.h b/src/plugins/qmldesigner/components/formeditor/backgroundaction.h index 007c2800457..26458f6f9f8 100644 --- a/src/plugins/qmldesigner/components/formeditor/backgroundaction.h +++ b/src/plugins/qmldesigner/components/formeditor/backgroundaction.h @@ -46,7 +46,7 @@ signals: protected: QWidget *createWidget(QWidget *parent); -private slots: +private: void emitBackgroundChanged(int index); private: diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h index 83fe127f413..f6f34256592 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h @@ -84,7 +84,6 @@ public: void highlightBoundingRect(FormEditorItem *formEditorItem); -public slots: void setShowBoundingRects(bool show); bool showBoundingRects() const; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index add833f5b18..af1ffeebd38 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -607,7 +607,7 @@ bool FormEditorView::isMoveToolAvailable() const void FormEditorView::reset() { - QTimer::singleShot(200, this, SLOT(delayedReset())); + QTimer::singleShot(200, this, &FormEditorView::delayedReset); } void FormEditorView::delayedReset() diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.h b/src/plugins/qmldesigner/components/formeditor/formeditorview.h index 560c8be1e6a..d63672f98d3 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.h @@ -120,8 +120,6 @@ public: protected: void reset(); - -protected slots: void delayedReset(); bool isMoveToolAvailable() const; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index cbd82b0c639..12bb8245e41 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -120,13 +120,15 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) m_rootWidthAction = new LineEditAction(tr("Override Width"), this); m_rootWidthAction->setToolTip(tr("Override width of root item.")); - connect(m_rootWidthAction.data(), SIGNAL(textChanged(QString)), this, SLOT(changeRootItemWidth(QString))); + connect(m_rootWidthAction.data(), &LineEditAction::textChanged, + this, &FormEditorWidget::changeRootItemWidth); addAction(m_rootWidthAction.data()); upperActions.append(m_rootWidthAction.data()); m_rootHeightAction = new LineEditAction(tr("Override Height"), this); m_rootHeightAction->setToolTip(tr("Override height of root item.")); - connect(m_rootHeightAction.data(), SIGNAL(textChanged(QString)), this, SLOT(changeRootItemHeight(QString))); + connect(m_rootHeightAction.data(), &LineEditAction::textChanged, + this, &FormEditorWidget::changeRootItemHeight); addAction(m_rootHeightAction.data()); upperActions.append(m_rootHeightAction.data()); @@ -150,7 +152,8 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) m_toolBox->addRightSideAction(m_backgroundAction.data()); m_zoomAction = new ZoomAction(m_toolActionGroup.data()); - connect(m_zoomAction.data(), SIGNAL(zoomLevelChanged(double)), SLOT(setZoomLevel(double))); + connect(m_zoomAction.data(), &ZoomAction::zoomLevelChanged, + this, &FormEditorWidget::setZoomLevel); addAction(m_zoomAction.data()); upperActions.append(m_zoomAction.data()); m_toolBox->addRightSideAction(m_zoomAction.data()); @@ -159,7 +162,7 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) m_resetAction->setShortcut(Qt::Key_R); m_resetAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); m_resetAction->setIcon(Utils::Icons::RESET_TOOLBAR.icon()); - connect(m_resetAction.data(), SIGNAL(triggered(bool)), this, SLOT(resetNodeInstanceView())); + connect(m_resetAction.data(), &QAction::triggered, this, &FormEditorWidget::resetNodeInstanceView); addAction(m_resetAction.data()); upperActions.append(m_resetAction.data()); m_toolBox->addRightSideAction(m_resetAction.data()); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h index e83ff36e4bb..261816ddffa 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h @@ -88,7 +88,7 @@ protected: QActionGroup *toolActionGroup() const; DocumentWarningWidget *errorWidget(); -private slots: +private: void changeTransformTool(bool checked); void setZoomLevel(double zoomLevel); void changeRootItemWidth(const QString &widthText); diff --git a/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp b/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp index bd7dad23eaf..ee6c110ce09 100644 --- a/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/lineeditaction.cpp @@ -57,9 +57,9 @@ QWidget *LineEditAction::createWidget(QWidget *parent) lineEdit->setFont(font); lineEdit->setValidator(new QIntValidator(0, 4096, this)); - connect(lineEdit, SIGNAL(textEdited(QString)), this, SIGNAL(textChanged(QString))); - connect(this, SIGNAL(lineEditTextClear()), lineEdit, SLOT(clear())); - connect(this, SIGNAL(lineEditTextChange(QString)), lineEdit, SLOT(setText(QString))); + connect(lineEdit, &QLineEdit::textEdited, this, &LineEditAction::textChanged); + connect(this, &LineEditAction::lineEditTextClear, lineEdit, &QLineEdit::clear); + connect(this, &LineEditAction::lineEditTextChange, lineEdit, &QLineEdit::setText); return lineEdit; } diff --git a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp index 8c176a3a34f..ae651f99f16 100644 --- a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.cpp @@ -59,7 +59,8 @@ QWidget *NumberSeriesAction::createWidget(QWidget *parent) comboBox->setModel(m_comboBoxModel.data()); comboBox->setCurrentIndex(m_comboBoxModelIndex); - connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitValueChanged(int))); + connect(comboBox, static_cast(&QComboBox::currentIndexChanged), + this, &NumberSeriesAction::emitValueChanged); return comboBox; } diff --git a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h index d58be7ea857..9d835fd9fa2 100644 --- a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h +++ b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h @@ -50,7 +50,7 @@ protected: signals: void valueChanged(const QVariant &value); -private slots: +private: void emitValueChanged(int index); private: diff --git a/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp b/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp index 64c3e689793..864da175157 100644 --- a/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp +++ b/src/plugins/qmldesigner/components/formeditor/zoomaction.cpp @@ -91,8 +91,9 @@ QWidget *ZoomAction::createWidget(QWidget *parent) } comboBox->setCurrentIndex(8); - connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitZoomLevelChanged(int))); - connect(this, SIGNAL(indexChanged(int)), comboBox, SLOT(setCurrentIndex(int))); + connect(comboBox, static_cast(&QComboBox::currentIndexChanged), + this, &ZoomAction::emitZoomLevelChanged); + connect(this, &ZoomAction::indexChanged, comboBox, &QComboBox::setCurrentIndex); comboBox->setProperty("hideborder", true); return comboBox; diff --git a/src/plugins/qmldesigner/components/formeditor/zoomaction.h b/src/plugins/qmldesigner/components/formeditor/zoomaction.h index cf55ed4c116..8cba2609b7c 100644 --- a/src/plugins/qmldesigner/components/formeditor/zoomaction.h +++ b/src/plugins/qmldesigner/components/formeditor/zoomaction.h @@ -51,7 +51,8 @@ protected: signals: void zoomLevelChanged(double zoom); void indexChanged(int); -private slots: + +private: void emitZoomLevelChanged(int index); private: diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.cpp b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp index 9df2a77c3a9..d0e61d37026 100644 --- a/src/plugins/qmldesigner/components/importmanager/importlabel.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp @@ -47,7 +47,7 @@ ImportLabel::ImportLabel(QWidget *parent) : m_removeButton->setFocusPolicy(Qt::NoFocus); m_removeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_removeButton->setToolTip(tr("Remove Import")); - connect(m_removeButton, SIGNAL(clicked()), this, SLOT(emitRemoveImport())); + connect(m_removeButton, &QAbstractButton::clicked, this, [this] { emit removeImport(m_import); }); layout->addWidget(m_removeButton); m_importLabel = new QLabel(this); @@ -75,9 +75,4 @@ void ImportLabel::setReadOnly(bool readOnly) const : Utils::Icons::CLOSE_TOOLBAR.icon()); } -void ImportLabel::emitRemoveImport() -{ - emit removeImport(m_import); -} - } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.h b/src/plugins/qmldesigner/components/importmanager/importlabel.h index 6df9e0286cb..ed4e2067615 100644 --- a/src/plugins/qmldesigner/components/importmanager/importlabel.h +++ b/src/plugins/qmldesigner/components/importmanager/importlabel.h @@ -45,9 +45,6 @@ public: signals: void removeImport(const Import &import); -private slots: - void emitRemoveImport(); - private: Import m_import; QLabel *m_importLabel; diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp index 101805c1cbe..6f4fa9bebb0 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp @@ -52,8 +52,8 @@ WidgetInfo ImportManagerView::widgetInfo() { if (m_importsWidget == 0) { m_importsWidget = new ImportsWidget; - connect(m_importsWidget, SIGNAL(removeImport(Import)), this, SLOT(removeImport(Import))); - connect(m_importsWidget, SIGNAL(addImport(Import)), this, SLOT(addImport(Import))); + connect(m_importsWidget.data(), &ImportsWidget::removeImport, this, &ImportManagerView::removeImport); + connect(m_importsWidget.data(), &ImportsWidget::addImport, this, &ImportManagerView::addImport); if (model()) m_importsWidget->setImports(model()->imports()); diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h index 340f81fd650..e629f6bfefb 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h +++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h @@ -50,7 +50,7 @@ public: void importsChanged(const QList &addedImports, const QList &removedImports) override; -private slots: +private: void removeImport(const Import &import); void addImport(const Import &import); diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp index 625c5d0497f..f9fe8540a19 100644 --- a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp @@ -39,7 +39,8 @@ ImportsWidget::ImportsWidget(QWidget *parent) : { setWindowTitle(tr("Import Manager")); m_addImportComboBox = new ImportManagerComboBox(this); - connect(m_addImportComboBox, SIGNAL(activated(int)), this, SLOT(addSelectedImport(int))); + connect(m_addImportComboBox, static_cast(&QComboBox::activated), + this, &ImportsWidget::addSelectedImport); } void ImportsWidget::removeImports() @@ -126,7 +127,7 @@ void ImportsWidget::setImports(const QList &imports) ImportLabel *importLabel = new ImportLabel(this); importLabel->setImport(import); m_importLabels.append(importLabel); - connect(importLabel, SIGNAL(removeImport(Import)), this, SIGNAL(removeImport(Import))); + connect(importLabel, &ImportLabel::removeImport, this, &ImportsWidget::removeImport); } updateLayout(); diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.h b/src/plugins/qmldesigner/components/importmanager/importswidget.h index bfac06f75c4..bfe33775950 100644 --- a/src/plugins/qmldesigner/components/importmanager/importswidget.h +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.h @@ -59,7 +59,7 @@ signals: protected: void updateLayout(); -private slots: +private: void addSelectedImport(int addImportComboBoxIndex); private: diff --git a/src/plugins/qmldesigner/components/integration/componentaction.cpp b/src/plugins/qmldesigner/components/integration/componentaction.cpp index d04f84da5fe..59226d78d3c 100644 --- a/src/plugins/qmldesigner/components/integration/componentaction.cpp +++ b/src/plugins/qmldesigner/components/integration/componentaction.cpp @@ -53,8 +53,9 @@ QWidget *ComponentAction::createWidget(QWidget *parent) comboBox->setToolTip(tr("Edit sub components defined in this file.")); comboBox->setModel(m_componentView->standardItemModel()); comboBox->setCurrentIndex(-1); - connect(comboBox, SIGNAL(activated(int)), SLOT(emitCurrentComponentChanged(int))); - connect(this, SIGNAL(currentIndexChanged(int)), comboBox, SLOT(setCurrentIndex(int))); + connect(comboBox, static_cast(&QComboBox::activated), + this, &ComponentAction::emitCurrentComponentChanged); + connect(this, &ComponentAction::currentIndexChanged, comboBox, &QComboBox::setCurrentIndex); return comboBox; } diff --git a/src/plugins/qmldesigner/components/integration/componentaction.h b/src/plugins/qmldesigner/components/integration/componentaction.h index f6cc02b3031..c5d282d7b3e 100644 --- a/src/plugins/qmldesigner/components/integration/componentaction.h +++ b/src/plugins/qmldesigner/components/integration/componentaction.h @@ -44,7 +44,7 @@ class ComponentAction : public QWidgetAction public: ComponentAction(ComponentView *componentView); void setCurrentIndex(int index); - + void emitCurrentComponentChanged(int index); protected: QWidget *createWidget(QWidget *parent); @@ -54,9 +54,6 @@ signals: void changedToMaster(); void currentIndexChanged(int index); -public slots: - void emitCurrentComponentChanged(int index); - private: QPointer m_componentView; bool dontEmitCurrentComponentChanged; diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 84a390a184e..c338a3b0c59 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -235,12 +235,12 @@ void DesignDocument::loadDocument(QPlainTextEdit *edit) { Q_CHECK_PTR(edit); - connect(edit, SIGNAL(undoAvailable(bool)), - this, SIGNAL(undoAvailable(bool))); - connect(edit, SIGNAL(redoAvailable(bool)), - this, SIGNAL(redoAvailable(bool))); - connect(edit, SIGNAL(modificationChanged(bool)), - this, SIGNAL(dirtyStateChanged(bool))); + connect(edit, &QPlainTextEdit::undoAvailable, + this, &DesignDocument::undoAvailable); + connect(edit, &QPlainTextEdit::redoAvailable, + this, &DesignDocument::redoAvailable); + connect(edit, &QPlainTextEdit::modificationChanged, + this, &DesignDocument::dirtyStateChanged); m_documentTextModifier.reset(new BaseTextEditModifier(dynamic_cast(plainTextEdit()))); diff --git a/src/plugins/qmldesigner/components/integration/designdocument.h b/src/plugins/qmldesigner/components/integration/designdocument.h index 8dc06aaac17..ad110bfca4c 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.h +++ b/src/plugins/qmldesigner/components/integration/designdocument.h @@ -106,7 +106,7 @@ signals: void designDocumentClosed(); void qmlErrorsChanged(const QList &errors); -public slots: +public: void deleteSelected(); void copySelected(); void cutSelected(); @@ -119,10 +119,9 @@ public slots: void changeToSubComponent(const ModelNode &componentNode); void changeToMaster(); -private slots: +private: // functions void updateFileName(const Utils::FileName &oldFileName, const Utils::FileName &newFileName); -private: // functions void changeToInFileComponentModel(ComponentTextModifier *textModifer); void updateQrcFiles(); diff --git a/src/plugins/qmldesigner/components/integration/integration.pri b/src/plugins/qmldesigner/components/integration/integration.pri index b2750813172..8b5c98c55b6 100644 --- a/src/plugins/qmldesigner/components/integration/integration.pri +++ b/src/plugins/qmldesigner/components/integration/integration.pri @@ -6,8 +6,7 @@ SOURCES += \ utilitypanelcontroller.cpp \ stackedutilitypanelcontroller.cpp \ componentaction.cpp \ - componentview.cpp \ - xuifiledialog.cpp + componentview.cpp HEADERS += \ designdocumentview.h \ @@ -15,6 +14,4 @@ HEADERS += \ utilitypanelcontroller.h \ stackedutilitypanelcontroller.h \ componentaction.h \ - componentview.h \ - xuifiledialog.h - + componentview.h diff --git a/src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h b/src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h index ecbedacc9eb..f49d98e1f24 100644 --- a/src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h +++ b/src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h @@ -43,7 +43,6 @@ class StackedUtilityPanelController : public UtilityPanelController public: StackedUtilityPanelController(QObject* parent = 0); -public slots: void show(DesignDocument* DesignDocument); void close(DesignDocument* DesignDocument); diff --git a/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp b/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp deleted file mode 100644 index fe0067d9eeb..00000000000 --- a/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "xuifiledialog.h" -#include - -#include -#include -#include -#include - -namespace QmlDesigner { - -void XUIFileDialog::runOpenFileDialog(const QString& path, QWidget* parent, QObject* receiver, const char* member) -{ - QString dir = path; - if (dir.isNull()) - dir = XUIFileDialog::defaultFolder(); - - QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Open File"); - QString fileName = QFileDialog::getOpenFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(QLatin1String(";;")), 0, QFileDialog::ReadOnly); - - QmlDesigner::Internal::SignalEmitter emitter; - QObject::connect(&emitter, SIGNAL(fileNameSelected(QString)), receiver, member); - emitter.emitFileNameSelected(fileName); -} - -void XUIFileDialog::runSaveFileDialog(const QString& path, QWidget* parent, QObject* receiver, const char* member) -{ - QString dir = path; - if (dir.isNull()) - dir = XUIFileDialog::defaultFolder(); - - if (Utils::HostOsInfo::isMacHost()) { - QFileDialog *dialog = new QFileDialog(parent, Qt::Sheet); - dialog->setFileMode(QFileDialog::AnyFile); - dialog->setAcceptMode(QFileDialog::AcceptSave); - dialog->setNameFilters(XUIFileDialog::fileNameFilters()); - dialog->setDirectory(dir); - dialog->open(receiver, member); - } else { - QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Save File"); - QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(QLatin1String(";;"))); - - QmlDesigner::Internal::SignalEmitter emitter; - QObject::connect(&emitter, SIGNAL(fileNameSelected(QString)), receiver, member); - emitter.emitFileNameSelected(fileName); - } -} - -QStringList XUIFileDialog::fileNameFilters() -{ - QStringList filters; - - filters - << QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Declarative UI files (*.qml)") - << QCoreApplication::translate("QmlDesigner::XUIFileDialog", "All files (*)"); - - return filters; -} - -QString XUIFileDialog::defaultFolder() -{ - return QDir::currentPath(); -} - -} // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/integration/xuifiledialog.h b/src/plugins/qmldesigner/components/integration/xuifiledialog.h deleted file mode 100644 index 1ac647322ee..00000000000 --- a/src/plugins/qmldesigner/components/integration/xuifiledialog.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include -#include - -#include - -namespace QmlDesigner { - -class XUIFileDialog -{ -public: - static void runOpenFileDialog(const QString& path, QWidget* parent, QObject* receiver, const char* member); - static void runSaveFileDialog(const QString& path, QWidget* parent, QObject* receiver, const char* member); - - static QStringList fileNameFilters(); - static QString defaultFolder(); -}; - -namespace Internal { -class SignalEmitter: public QObject -{ - Q_OBJECT - -public: - void emitFileNameSelected(const QString& fileName) { emit fileNameSelected(fileName); } - -signals: - void fileNameSelected(const QString&); -}; - -} // namespace Internal -} // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h index b4d5bc1d704..a61937d9c31 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h @@ -69,7 +69,6 @@ public: ItemLibrarySection *sectionByName(const QString §ionName); -public slots: void setSearchText(const QString &searchText); void setExpanded(bool, const QString §ion); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index e4c7c5baf57..5b2dc1034c1 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -100,8 +100,8 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) : tabBar->addTab(tr("Resources", "Title of library resources view")); tabBar->addTab(tr("Imports", "Title of library imports view")); tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(setCurrentIndexOfStackedWidget(int))); - connect(tabBar, SIGNAL(currentChanged(int)), this, SLOT(updateSearch())); + connect(tabBar, &QTabBar::currentChanged, this, &ItemLibraryWidget::setCurrentIndexOfStackedWidget); + connect(tabBar, &QTabBar::currentChanged, this, &ItemLibraryWidget::updateSearch); m_filterLineEdit = new Utils::FancyLineEdit(this); m_filterLineEdit->setObjectName(QStringLiteral("itemLibrarySearchInput")); @@ -119,7 +119,7 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) : lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 0); lineEditLayout->addWidget(m_filterLineEdit.data(), 1, 1, 1, 1); lineEditLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Fixed, QSizePolicy::Fixed), 1, 2); - connect(m_filterLineEdit.data(), SIGNAL(filterChanged(QString)), this, SLOT(setSearchFilter(QString))); + connect(m_filterLineEdit.data(), &Utils::FancyLineEdit::filterChanged, this, &ItemLibraryWidget::setSearchFilter); m_stackedWidget = new QStackedWidget(this); @@ -145,9 +145,9 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) : m_resourcesView->setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))))); m_qmlSourceUpdateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F5), this); - connect(m_qmlSourceUpdateShortcut, SIGNAL(activated()), this, SLOT(reloadQmlSource())); + connect(m_qmlSourceUpdateShortcut, &QShortcut::activated, this, &ItemLibraryWidget::reloadQmlSource); - connect(&m_compressionTimer, SIGNAL(timeout()), this, SLOT(updateModel())); + connect(&m_compressionTimer, &QTimer::timeout, this, &ItemLibraryWidget::updateModel); // init the first load of the QML UI elements reloadQmlSource(); @@ -159,12 +159,12 @@ void ItemLibraryWidget::setItemLibraryInfo(ItemLibraryInfo *itemLibraryInfo) return; if (m_itemLibraryInfo) - disconnect(m_itemLibraryInfo.data(), SIGNAL(entriesChanged()), - this, SLOT(delayedUpdateModel())); + disconnect(m_itemLibraryInfo.data(), &ItemLibraryInfo::entriesChanged, + this, &ItemLibraryWidget::delayedUpdateModel); m_itemLibraryInfo = itemLibraryInfo; if (itemLibraryInfo) - connect(m_itemLibraryInfo.data(), SIGNAL(entriesChanged()), - this, SLOT(delayedUpdateModel())); + connect(m_itemLibraryInfo.data(), &ItemLibraryInfo::entriesChanged, + this, &ItemLibraryWidget::delayedUpdateModel); delayedUpdateModel(); } diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h index 399f3bf0ef5..7d24c842d1c 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.h @@ -75,7 +75,6 @@ public: static QString qmlSourcesPath(); void clearSearchFilter(); -public slots: void setSearchFilter(const QString &searchFilter); void delayedUpdateModel(); void updateModel(); @@ -94,7 +93,7 @@ protected: signals: void itemActivated(const QString& itemName); -private slots: +private: void setCurrentIndexOfStackedWidget(int index); void reloadQmlSource(); diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index d722bb123bd..6f8968cda26 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -115,8 +115,8 @@ NavigatorTreeModel::NavigatorTreeModel(QObject *parent) setColumnCount(2); # endif - connect(this, SIGNAL(itemChanged(QStandardItem*)), - this, SLOT(handleChangedItem(QStandardItem*))); + connect(this, &QStandardItemModel::itemChanged, + this, &NavigatorTreeModel::handleChangedItem); } NavigatorTreeModel::~NavigatorTreeModel() diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h index f879393e860..1bd433d5136 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.h @@ -123,10 +123,9 @@ public: ItemRow itemRowForNode(const ModelNode &node); bool blockItemChangedSignal(bool block); -private slots: +private: void handleChangedItem(QStandardItem *item); -private: ItemRow createItemRow(const ModelNode &node); void updateItemRow(const ModelNode &node, ItemRow row); void handleChangedIdItem(QStandardItem *idItem, ModelNode &modelNode); diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp index c2e5f6f0abc..0d0e8243f3e 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp @@ -74,12 +74,12 @@ NavigatorView::NavigatorView(QObject* parent) : m_widget->setTreeModel(m_treeModel.data()); - connect(treeWidget()->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(changeSelection(QItemSelection,QItemSelection))); + connect(treeWidget()->selectionModel(), &QItemSelectionModel::selectionChanged, this, &NavigatorView::changeSelection); - connect(m_widget.data(), SIGNAL(leftButtonClicked()), this, SLOT(leftButtonClicked())); - connect(m_widget.data(), SIGNAL(rightButtonClicked()), this, SLOT(rightButtonClicked())); - connect(m_widget.data(), SIGNAL(downButtonClicked()), this, SLOT(downButtonClicked())); - connect(m_widget.data(), SIGNAL(upButtonClicked()), this, SLOT(upButtonClicked())); + connect(m_widget.data(), &NavigatorWidget::leftButtonClicked, this, &NavigatorView::leftButtonClicked); + connect(m_widget.data(), &NavigatorWidget::rightButtonClicked, this, &NavigatorView::rightButtonClicked); + connect(m_widget.data(), &NavigatorWidget::downButtonClicked, this, &NavigatorView::downButtonClicked); + connect(m_widget.data(), &NavigatorWidget::upButtonClicked, this, &NavigatorView::upButtonClicked); treeWidget()->setIndentation(treeWidget()->indentation() * 0.5); diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.h b/src/plugins/qmldesigner/components/navigator/navigatorview.h index 03f0631c978..5d719890e57 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorview.h +++ b/src/plugins/qmldesigner/components/navigator/navigatorview.h @@ -74,7 +74,7 @@ public: void bindingPropertiesChanged(const QList &propertyList, PropertyChangeFlags) override; -private slots: +private: void changeSelection(const QItemSelection &selected, const QItemSelection &deselected); void updateItemSelection(); void changeToComponent(const QModelIndex &index); diff --git a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp index d3b062b854c..4e09c4a891d 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatorwidget.cpp @@ -82,25 +82,25 @@ QList NavigatorWidget::createToolBarWidgets() buttons.last()->setIcon(Icons::ARROW_LEFT.icon()); buttons.last()->setToolTip(tr("Become last sibling of parent (CTRL + Left).")); buttons.last()->setShortcut(QKeySequence(Qt::Key_Left | Qt::CTRL)); - connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(leftButtonClicked())); + connect(buttons.last(), &QAbstractButton::clicked, this, &NavigatorWidget::leftButtonClicked); buttons.append(new QToolButton()); buttons.last()->setIcon(Icons::ARROW_RIGHT.icon()); buttons.last()->setToolTip(tr("Become child of last sibling (CTRL + Right).")); buttons.last()->setShortcut(QKeySequence(Qt::Key_Right | Qt::CTRL)); - connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(rightButtonClicked())); + connect(buttons.last(), &QAbstractButton::clicked, this, &NavigatorWidget::rightButtonClicked); buttons.append(new QToolButton()); buttons.last()->setIcon(Icons::ARROW_DOWN.icon()); buttons.last()->setToolTip(tr("Move down (CTRL + Down).")); buttons.last()->setShortcut(QKeySequence(Qt::Key_Down | Qt::CTRL)); - connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(downButtonClicked())); + connect(buttons.last(), &QAbstractButton::clicked, this, &NavigatorWidget::downButtonClicked); buttons.append(new QToolButton()); buttons.last()->setIcon(Icons::ARROW_UP.icon()); buttons.last()->setToolTip(tr("Move up (CTRL + Up).")); buttons.last()->setShortcut(QKeySequence(Qt::Key_Up | Qt::CTRL)); - connect(buttons.last(), SIGNAL(clicked()), this, SIGNAL(upButtonClicked())); + connect(buttons.last(), &QAbstractButton::clicked, this, &NavigatorWidget::upButtonClicked); return buttons; } diff --git a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h index 37faaa9baf3..db0dec21056 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h +++ b/src/plugins/qmldesigner/components/propertyeditor/fileresourcesmodel.h @@ -65,8 +65,6 @@ signals: void modelNodeBackendChanged(); void fileModelChanged(); -public slots: - private: QVariant modelNodeBackend() const; diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h b/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h index 56d8ce914da..39f1b576984 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h +++ b/src/plugins/qmldesigner/components/propertyeditor/gradientmodel.h @@ -69,8 +69,6 @@ signals: void anchorBackendChanged(); void hasGradientChanged(); -public slots: - private: void setupModel(); void setAnchorBackend(const QVariant &anchorBackend); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 41560014e4f..e7a25498e08 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -106,7 +106,8 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE m_contextObject->setModel(propertyEditor->model()); m_contextObject->insertInQmlContext(context()); - QObject::connect(&m_backendValuesPropertyMap, &DesignerPropertyMap::valueChanged, propertyEditor, &PropertyEditorView::changeValue); + QObject::connect(&m_backendValuesPropertyMap, &DesignerPropertyMap::valueChanged, + propertyEditor, &PropertyEditorView::changeValue); } PropertyEditorQmlBackend::~PropertyEditorQmlBackend() diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h index 9a1ddca9bd4..ec0f2e1f88f 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditortransaction.h @@ -35,9 +35,9 @@ class PropertyEditorTransaction : public QObject public: PropertyEditorTransaction(QmlDesigner::PropertyEditorView *propertyEditor); -public slots: - void start(); - void end(); + Q_INVOKABLE void start(); + Q_INVOKABLE void end(); + protected: void timerEvent(QTimerEvent *event); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index 909adf82fc5..f4cc31f56ed 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -355,7 +355,7 @@ void PropertyEditorValue::registerDeclarativeTypes() PropertyEditorNodeWrapper::PropertyEditorNodeWrapper(PropertyEditorValue* parent) : QObject(parent), m_valuesPropertyMap(this) { m_editorValue = parent; - connect(m_editorValue, SIGNAL(modelNodeChanged()), this, SLOT(update())); + connect(m_editorValue, &PropertyEditorValue::modelNodeChanged, this, &PropertyEditorNodeWrapper::update); } PropertyEditorNodeWrapper::PropertyEditorNodeWrapper(QObject *parent) : QObject(parent), m_editorValue(NULL) @@ -466,12 +466,12 @@ void PropertyEditorNodeWrapper::setup() PropertyEditorValue *valueObject = new PropertyEditorValue(&m_valuesPropertyMap); valueObject->setName(propertyName); valueObject->setValue(qmlObjectNode.instanceValue(propertyName)); - connect(valueObject, SIGNAL(valueChanged(QString,QVariant)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString,QVariant))); + connect(valueObject, &PropertyEditorValue::valueChanged, &m_valuesPropertyMap, &QQmlPropertyMap::valueChanged); m_valuesPropertyMap.insert(QString::fromUtf8(propertyName), QVariant::fromValue(valueObject)); } } } - connect(&m_valuesPropertyMap, SIGNAL(valueChanged(QString,QVariant)), this, SLOT(changeValue(QString))); + connect(&m_valuesPropertyMap, &QQmlPropertyMap::valueChanged, this, &PropertyEditorNodeWrapper::changeValue); emit propertiesChanged(); emit existsChanged(); diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp index 14db61f8e32..ab3b19c840b 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.cpp @@ -80,13 +80,13 @@ PropertyEditorView::PropertyEditorView(QWidget *parent) : m_qmlDir = PropertyEditorQmlBackend::propertyEditorResourcesPath(); m_updateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F3), m_stackedWidget); - connect(m_updateShortcut, SIGNAL(activated()), this, SLOT(reloadQml())); + connect(m_updateShortcut, &QShortcut::activated, this, &PropertyEditorView::reloadQml); m_stackedWidget->setStyleSheet(Theme::replaceCssColors( QString::fromUtf8(Utils::FileReader::fetchQrc(QStringLiteral(":/qmldesigner/stylesheet.css"))))); m_stackedWidget->setMinimumWidth(320); m_stackedWidget->move(0, 0); - connect(m_stackedWidget, SIGNAL(resized()), this, SLOT(updateSize())); + connect(m_stackedWidget, &PropertyEditorWidget::resized, this, &PropertyEditorView::updateSize); m_stackedWidget->insertWidget(0, new QWidget(m_stackedWidget)); @@ -531,7 +531,7 @@ void PropertyEditorView::modelAttached(Model *model) if (!m_setupCompleted) { m_singleShotTimer->setSingleShot(true); m_singleShotTimer->setInterval(100); - connect(m_singleShotTimer, SIGNAL(timeout()), this, SLOT(setupPanes())); + connect(m_singleShotTimer, &QTimer::timeout, this, &PropertyEditorView::setupPanes); m_singleShotTimer->start(); } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h index b6788d22576..07073976234 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorview.h @@ -87,7 +87,6 @@ public: const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange) override; -public slots: void changeValue(const QString &name); void changeExpression(const QString &name); void exportPopertyAsAlias(const QString &name); @@ -98,13 +97,11 @@ protected: void setupPane(const TypeName &typeName); void setValue(const QmlObjectNode &fxObjectNode, const PropertyName &name, const QVariant &value); -private slots: +private: //functions void reloadQml(); void updateSize(); void setupPanes(); -private: //functions - void select(const ModelNode& node); void delayedResetView(); diff --git a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h index f60e4ce024c..a70f90d04f8 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h +++ b/src/plugins/qmldesigner/components/propertyeditor/qmlmodelnodeproxy.h @@ -56,8 +56,6 @@ signals: void selectionToBeChanged(); void selectionChanged(); -public slots: - private: QmlItemNode m_qmlItemNode; }; diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp index 84550107876..1500cfd380a 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.cpp @@ -91,7 +91,7 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State engine()->addImportPath(qmlSourcesPath()); m_qmlSourceUpdateShortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_F4), this); - connect(m_qmlSourceUpdateShortcut, SIGNAL(activated()), this, SLOT(reloadQmlSource())); + connect(m_qmlSourceUpdateShortcut, &QShortcut::activated, this, &StatesEditorWidget::reloadQmlSource); setResizeMode(QQuickWidget::SizeRootObjectToView); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h index 7387c9ba6ef..231f4bfb431 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorwidget.h @@ -61,9 +61,9 @@ public: void toggleStatesViewExpanded(); -private slots: +private: void reloadQmlSource(); - void handleExpandedChanged(); + Q_SLOT void handleExpandedChanged(); private: QPointer m_statesEditorView; diff --git a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp index eef455ecb8c..2076525c5ff 100644 --- a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp +++ b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.cpp @@ -57,7 +57,7 @@ bool isTabAndParentIsTabView(const ModelNode &modelNode) AddTabDesignerAction::AddTabDesignerAction() : AbstractAction(QCoreApplication::translate("TabViewToolAction","Add Tab...")) { - connect(action(), SIGNAL(triggered()), this, SLOT(addNewTab())); + connect(action(), &QAction::triggered, this, &AddTabDesignerAction::addNewTab); } QByteArray AddTabDesignerAction::category() const diff --git a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h index 66b8a19b82e..93eae8153fa 100644 --- a/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h +++ b/src/plugins/qmldesigner/componentsplugin/addtabdesigneraction.h @@ -44,7 +44,7 @@ protected: bool isVisible(const SelectionContext &selectionContext) const; bool isEnabled(const SelectionContext &selectionContext) const; -private slots: +private: void addNewTab(); }; diff --git a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp index c45b14ddedf..956f26c453b 100644 --- a/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp +++ b/src/plugins/qmldesigner/componentsplugin/entertabdesigneraction.cpp @@ -44,7 +44,7 @@ public: : DefaultAction(description) { } -public /*slots*/: +public: void actionTriggered(bool) override { DocumentManager::goIntoComponent(m_selectionContext.targetNode()); diff --git a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h index fc9821864f6..239b1caebac 100644 --- a/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/componenttextmodifier.h @@ -61,9 +61,6 @@ public: bool moveToComponent(int /* nodeOffset */) override { return false; } -public slots: - void contentsChange(int position, int charsRemoved, int charsAdded); - private: TextModifier *m_originalModifier; int m_componentStartOffset; diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h index 86c734083e0..800ef1baadd 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstanceview.h @@ -183,7 +183,7 @@ private: // functions void restartProcess(); void delayedRestartProcess(); -private slots: +private: void handleCrash(); private: //variables diff --git a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h index c6cc51911e7..391c91c9979 100644 --- a/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h +++ b/src/plugins/qmldesigner/designercore/include/plaintexteditmodifier.h @@ -80,10 +80,8 @@ protected: QPlainTextEdit *plainTextEdit() const { return m_textEdit; } -private slots: - void textEditChanged(); - private: + void textEditChanged(); void runRewriting(Utils::ChangeSet *writer); private: diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h index 9d6e29d8fbd..53f40452646 100644 --- a/src/plugins/qmldesigner/designercore/include/rewriterview.h +++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h @@ -159,7 +159,6 @@ public: void setWidgetStatusCallback(std::function setWidgetStatusCallback); -public slots: void qmlTextChanged(); void delayedSetup(); diff --git a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h index 3058ac93765..640b97e1aa7 100644 --- a/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h +++ b/src/plugins/qmldesigner/designercore/include/subcomponentmanager.h @@ -52,12 +52,11 @@ public: QStringList qmlFiles() const; QStringList directories() const; -private slots: +private: // functions void parseDirectory(const QString &canonicalDirPath, bool addToLibrary = true, const TypeName &qualification = TypeName()); void parseFile(const QString &canonicalFilePath, bool addToLibrary, const QString&); void parseFile(const QString &canonicalFilePath); -private: // functions void addImport(int pos, const Import &import); void removeImport(int pos); void parseDirectories(); diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp index 6ec7ce89e12..9f4d24c03f8 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp @@ -172,7 +172,8 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV if (connectedToPuppet) { m_firstSocket = m_localServer->nextPendingConnection(); - connect(m_firstSocket.data(), SIGNAL(readyRead()), this, SLOT(readFirstDataStream())); + connect(m_firstSocket.data(), &QIODevice::readyRead, this, + &NodeInstanceServerProxy::readFirstDataStream); if (runModus == NormalModus) { if (!m_localServer->hasPendingConnections()) @@ -180,7 +181,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV if (connectedToPuppet) { m_secondSocket = m_localServer->nextPendingConnection(); - connect(m_secondSocket.data(), SIGNAL(readyRead()), this, SLOT(readSecondDataStream())); + connect(m_secondSocket.data(), &QIODevice::readyRead, this, &NodeInstanceServerProxy::readSecondDataStream); if (!m_localServer->hasPendingConnections()) connectedToPuppet = m_localServer->waitForNewConnection(waitConstant / 4); @@ -188,7 +189,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV qCInfo(instanceViewBenchmark) << "puppets connected:" << m_benchmarkTimer.elapsed(); if (connectedToPuppet) { m_thirdSocket = m_localServer->nextPendingConnection(); - connect(m_thirdSocket.data(), SIGNAL(readyRead()), this, SLOT(readThirdDataStream())); + connect(m_thirdSocket.data(), &QIODevice::readyRead, this, &NodeInstanceServerProxy::readThirdDataStream); } else { showCannotConnectToPuppetWarningAndSwitchToEditMode(); } @@ -252,18 +253,18 @@ NodeInstanceServerProxy::~NodeInstanceServerProxy() } if (m_qmlPuppetEditorProcess) { - QTimer::singleShot(3000, m_qmlPuppetEditorProcess.data(), SLOT(terminate())); - QTimer::singleShot(6000, m_qmlPuppetEditorProcess.data(), SLOT(kill())); + QTimer::singleShot(3000, m_qmlPuppetEditorProcess.data(), &QProcess::terminate); + QTimer::singleShot(6000, m_qmlPuppetEditorProcess.data(), &QProcess::kill); } if (m_qmlPuppetPreviewProcess) { - QTimer::singleShot(3000, m_qmlPuppetPreviewProcess.data(), SLOT(terminate())); - QTimer::singleShot(6000, m_qmlPuppetPreviewProcess.data(), SLOT(kill())); + QTimer::singleShot(3000, m_qmlPuppetPreviewProcess.data(), &QProcess::terminate); + QTimer::singleShot(6000, m_qmlPuppetPreviewProcess.data(), &QProcess::kill); } if (m_qmlPuppetRenderProcess) { - QTimer::singleShot(3000, m_qmlPuppetRenderProcess.data(), SLOT(terminate())); - QTimer::singleShot(6000, m_qmlPuppetRenderProcess.data(), SLOT(kill())); + QTimer::singleShot(3000, m_qmlPuppetRenderProcess.data(), &QProcess::terminate); + QTimer::singleShot(6000, m_qmlPuppetRenderProcess.data(), &QProcess::kill); } } diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index a491ca9d058..dd9b66d57b6 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -151,9 +151,10 @@ bool isSkippedNode(const ModelNode &node) void NodeInstanceView::modelAttached(Model *model) { AbstractView::modelAttached(model); - m_nodeInstanceServer = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject); + auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject); + m_nodeInstanceServer = server; m_lastCrashTime.start(); - connect(m_nodeInstanceServer.data(), SIGNAL(processCrashed()), this, SLOT(handleCrash())); + connect(server, &NodeInstanceServerProxy::processCrashed, this, &NodeInstanceView::handleCrash); if (!isSkippedRootNode(rootModelNode())) nodeInstanceServer()->createScene(createCreateSceneCommand()); @@ -204,8 +205,9 @@ void NodeInstanceView::restartProcess() if (model()) { delete nodeInstanceServer(); - m_nodeInstanceServer = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject); - connect(m_nodeInstanceServer.data(), SIGNAL(processCrashed()), this, SLOT(handleCrash())); + auto server = new NodeInstanceServerProxy(this, m_runModus, m_currentKit, m_currentProject); + m_nodeInstanceServer = server; + connect(server, &NodeInstanceServerProxy::processCrashed, this, &NodeInstanceView::handleCrash); if (!isSkippedRootNode(rootModelNode())) nodeInstanceServer()->createScene(createCreateSceneCommand()); diff --git a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.cpp b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.cpp index 3777fa3633e..51d0242a1f5 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.cpp @@ -43,7 +43,7 @@ PuppetBuildProgressDialog::PuppetBuildProgressDialog() : setWindowModality(Qt::ApplicationModal); ui->setupUi(this); ui->buildProgressBar->setMaximum(85); - connect(ui->useFallbackPuppetPushButton, SIGNAL(clicked()), this, SLOT(setUseFallbackPuppet())); + connect(ui->useFallbackPuppetPushButton, &QAbstractButton::clicked, this, &PuppetBuildProgressDialog::setUseFallbackPuppet); } PuppetBuildProgressDialog::~PuppetBuildProgressDialog() @@ -71,7 +71,7 @@ void PuppetBuildProgressDialog::setErrorMessage(const QString &message) { ui->label->setText(QString::fromLatin1("%1").arg(message)); ui->useFallbackPuppetPushButton->setText(tr("OK")); - connect(ui->useFallbackPuppetPushButton, SIGNAL(clicked()), this, SLOT(accept())); + connect(ui->useFallbackPuppetPushButton, &QAbstractButton::clicked, this, &QDialog::accept); } void PuppetBuildProgressDialog::setUseFallbackPuppet() diff --git a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h index 4952335f238..7bd5859a407 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h +++ b/src/plugins/qmldesigner/designercore/instances/puppetbuildprogressdialog.h @@ -48,7 +48,7 @@ public: void setErrorOutputFile(const QString &filePath); void setErrorMessage(const QString &message); -private slots: +private: void setUseFallbackPuppet(); private: diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index 67a2764215d..84b4cef69c4 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -197,7 +197,7 @@ QProcess *PuppetCreator::puppetProcess(const QString &puppetPath, puppetProcess->setObjectName(puppetMode); puppetProcess->setProcessEnvironment(processEnvironment()); - QObject::connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), puppetProcess, SLOT(kill())); + QObject::connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, puppetProcess, &QProcess::kill); QObject::connect(puppetProcess, SIGNAL(finished(int,QProcess::ExitStatus)), handlerObject, finishSlot); #ifndef QMLDESIGNER_TEST diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp index 4d127504d5d..63fa98d5397 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp @@ -63,7 +63,8 @@ SubComponentManager::SubComponentManager(Model *model, QObject *parent) : QObject(parent), m_model(model) { - connect(&m_watcher, SIGNAL(directoryChanged(QString)), this, SLOT(parseDirectory(QString))); + connect(&m_watcher, &QFileSystemWatcher::directoryChanged, + this, [this](const QString &path) { parseDirectory(path); }); } void SubComponentManager::addImport(int pos, const Import &import) diff --git a/src/plugins/qmldesigner/designercore/model/componenttextmodifier.cpp b/src/plugins/qmldesigner/designercore/model/componenttextmodifier.cpp index 257c6e67f7c..f104842995e 100644 --- a/src/plugins/qmldesigner/designercore/model/componenttextmodifier.cpp +++ b/src/plugins/qmldesigner/designercore/model/componenttextmodifier.cpp @@ -33,10 +33,10 @@ ComponentTextModifier::ComponentTextModifier(TextModifier *originalModifier, int m_componentEndOffset(componentEndOffset), m_rootStartOffset(rootStartOffset) { - connect(m_originalModifier, SIGNAL(textChanged()), this, SIGNAL(textChanged())); + connect(m_originalModifier, &TextModifier::textChanged, this, &TextModifier::textChanged); - connect(m_originalModifier, SIGNAL(replaced(int,int,int)), this, SIGNAL(replaced(int,int,int))); - connect(m_originalModifier, SIGNAL(moved(TextModifier::MoveInfo)), this, SIGNAL(moved(TextModifier::MoveInfo))); + connect(m_originalModifier, &TextModifier::replaced, this, &TextModifier::replaced); + connect(m_originalModifier, &TextModifier::moved, this, &TextModifier::moved); } ComponentTextModifier::~ComponentTextModifier() @@ -148,7 +148,3 @@ void ComponentTextModifier::reactivateChangeSignals() { m_originalModifier->reactivateChangeSignals(); } - -void ComponentTextModifier::contentsChange(int /*position*/, int /*charsRemoved*/, int /*charsAdded*/) -{ -} diff --git a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.cpp b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.cpp index ede2e2f0846..e70103807e7 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.cpp @@ -34,8 +34,8 @@ void ModelNodePositionRecalculator::connectTo(TextModifier *textModifier) { Q_ASSERT(textModifier); - connect(textModifier, SIGNAL(moved(TextModifier::MoveInfo)), this, SLOT(moved(TextModifier::MoveInfo))); - connect(textModifier, SIGNAL(replaced(int,int,int)), this, SLOT(replaced(int,int,int))); + connect(textModifier, &TextModifier::moved, this, &ModelNodePositionRecalculator::moved); + connect(textModifier, &TextModifier::replaced, this, &ModelNodePositionRecalculator::replaced); } void ModelNodePositionRecalculator::moved(const TextModifier::MoveInfo &moveInfo) diff --git a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h index d71956df3ef..c40fb633461 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h +++ b/src/plugins/qmldesigner/designercore/model/modelnodepositionrecalculator.h @@ -49,7 +49,6 @@ public: QMap dirtyAreas() const { return m_dirtyAreas; } -public slots: void replaced(int offset, int oldLength, int newLength); void moved(const TextModifier::MoveInfo &moveInfo); diff --git a/src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp b/src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp index 700afd7a429..f6aa4caf1c6 100644 --- a/src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp +++ b/src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp @@ -44,8 +44,8 @@ PlainTextEditModifier::PlainTextEditModifier(QPlainTextEdit *textEdit): { Q_ASSERT(textEdit); - connect(m_textEdit, SIGNAL(textChanged()), - this, SLOT(textEditChanged())); + connect(m_textEdit, &QPlainTextEdit::textChanged, + this, &PlainTextEditModifier::textEditChanged); } PlainTextEditModifier::~PlainTextEditModifier() diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp index 1eff8b446fa..6996a3f00b8 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp @@ -344,12 +344,12 @@ TextModifier *RewriterView::textModifier() const void RewriterView::setTextModifier(TextModifier *textModifier) { if (m_textModifier) - disconnect(m_textModifier, SIGNAL(textChanged()), this, SLOT(qmlTextChanged())); + disconnect(m_textModifier, &TextModifier::textChanged, this, &RewriterView::qmlTextChanged); m_textModifier = textModifier; if (m_textModifier) - connect(m_textModifier, SIGNAL(textChanged()), this, SLOT(qmlTextChanged())); + connect(m_textModifier, &TextModifier::textChanged, this, &RewriterView::qmlTextChanged); } QString RewriterView::textModifierContent() const diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 2732caa6ebb..c910249976e 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -713,7 +713,7 @@ TextToModelMerger::TextToModelMerger(RewriterView *reWriterView) : { Q_ASSERT(reWriterView); m_setupTimer.setSingleShot(true); - RewriterView::connect(&m_setupTimer, SIGNAL(timeout()), reWriterView, SLOT(delayedSetup())); + RewriterView::connect(&m_setupTimer, &QTimer::timeout, reWriterView, &RewriterView::delayedSetup); } void TextToModelMerger::setActive(bool active) diff --git a/src/plugins/qmldesigner/designercore/model/viewmanager.cpp b/src/plugins/qmldesigner/designercore/model/viewmanager.cpp index ef3afc5dabe..bd7aa0185e6 100644 --- a/src/plugins/qmldesigner/designercore/model/viewmanager.cpp +++ b/src/plugins/qmldesigner/designercore/model/viewmanager.cpp @@ -214,14 +214,18 @@ void ViewManager::detachAdditionalViews() void ViewManager::attachComponentView() { documentModel()->attachView(&d->componentView); - QObject::connect(d->componentView.action(), SIGNAL(currentComponentChanged(ModelNode)), currentDesignDocument(), SLOT(changeToSubComponent(ModelNode))); - QObject::connect(d->componentView.action(), SIGNAL(changedToMaster()), currentDesignDocument(), SLOT(changeToMaster())); + QObject::connect(d->componentView.action(), &ComponentAction::currentComponentChanged, + currentDesignDocument(), &DesignDocument::changeToSubComponent); + QObject::connect(d->componentView.action(), &ComponentAction::changedToMaster, + currentDesignDocument(), &DesignDocument::changeToMaster); } void ViewManager::detachComponentView() { - QObject::disconnect(d->componentView.action(), SIGNAL(currentComponentChanged(ModelNode)), currentDesignDocument(), SLOT(changeToSubComponent(ModelNode))); - QObject::disconnect(d->componentView.action(), SIGNAL(changedToMaster()), currentDesignDocument(), SLOT(changeToMaster())); + QObject::disconnect(d->componentView.action(), &ComponentAction::currentComponentChanged, + currentDesignDocument(), &DesignDocument::changeToSubComponent); + QObject::disconnect(d->componentView.action(), &ComponentAction::changedToMaster, + currentDesignDocument(), &DesignDocument::changeToMaster); documentModel()->detachView(&d->componentView); } diff --git a/src/plugins/qmldesigner/designmodewidget.h b/src/plugins/qmldesigner/designmodewidget.h index e9828204908..b6dbce5fb84 100644 --- a/src/plugins/qmldesigner/designmodewidget.h +++ b/src/plugins/qmldesigner/designmodewidget.h @@ -84,19 +84,17 @@ public: CrumbleBar* crumbleBar() const; void showInternalTextEditor(); -public slots: void restoreDefaultView(); void toggleSidebars(); void toggleLeftSidebar(); void toggleRightSidebar(); -private slots: - void toolBarOnGoBackClicked(); - void toolBarOnGoForwardClicked(); - private: // functions enum InitializeStatus { NotInitialized, Initializing, Initialized }; + void toolBarOnGoBackClicked(); + void toolBarOnGoForwardClicked(); + void setup(); bool isInNodeDefinition(int nodeOffset, int nodeLength, int cursorPos) const; QmlDesigner::ModelNode nodeForPosition(int cursorPos) const; diff --git a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.cpp b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.cpp index 40019c09bf5..6020a66a2d9 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.cpp @@ -178,9 +178,9 @@ void ColorTool::selectedItemsChanged(const QList &itemList) m_colorDialog = new QColorDialog(view()->formEditorWidget()->parentWidget()); m_colorDialog.data()->setCurrentColor(m_oldColor); - connect(m_colorDialog.data(), SIGNAL(accepted()), SLOT(colorDialogAccepted())); - connect(m_colorDialog.data(), SIGNAL(rejected()), SLOT(colorDialogRejected())); - connect(m_colorDialog.data(), SIGNAL(currentColorChanged(QColor)), SLOT(currentColorChanged(QColor))); + connect(m_colorDialog.data(), &QDialog::accepted, this, &ColorTool::colorDialogAccepted); + connect(m_colorDialog.data(), &QDialog::rejected, this, &ColorTool::colorDialogRejected); + connect(m_colorDialog.data(), &QColorDialog::currentColorChanged, this, &ColorTool::currentColorChanged); m_colorDialog.data()->exec(); } diff --git a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h index 439971855e1..ae5164ccbb1 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h +++ b/src/plugins/qmldesigner/qmldesignerextension/colortool/colortool.h @@ -75,7 +75,7 @@ public: QString name() const override; -private slots: +private: void colorDialogAccepted(); void colorDialogRejected(); void currentColorChanged(const QColor &color); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/backendmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/backendmodel.h index c9355699c18..8abbbe77fa1 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/backendmodel.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/backendmodel.h @@ -61,7 +61,7 @@ public: protected: void updatePropertyName(int rowNumber); -private slots: +private: void handleDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight); private: diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp index ab917cc7ad9..7bc7f55dff8 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.cpp @@ -228,7 +228,7 @@ void BindingModel::addBindingForCurrentNode() modelNode.bindingProperty(unusedProperty(modelNode)).setExpression(QLatin1String("none.none")); } catch (RewritingException &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &BindingModel::handleException); } } } else { @@ -309,7 +309,7 @@ void BindingModel::updateExpression(int row) transaction.commit(); //committing in the try block } catch (Exception &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &BindingModel::handleException); } } @@ -335,7 +335,7 @@ void BindingModel::updatePropertyName(int rowNumber) transaction.commit(); //committing in the try block } catch (Exception &e) { //better save then sorry m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &BindingModel::handleException); } QStandardItem* idItem = item(rowNumber, 0); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h index d79158c05a0..c6f5b03a15b 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/bindingmodel.h @@ -75,7 +75,7 @@ protected: void updateDisplayRole(int row, int columns, const QString &string); -private slots: +private: void handleDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight); void handleException(); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp index 43dccf5628e..58af1da41cb 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.cpp @@ -174,7 +174,7 @@ void ConnectionModel::updateSource(int row) } catch (Exception &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &ConnectionModel::handleException); } } diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h index 38ac6fe1e6e..e4000dc1698 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionmodel.h @@ -74,7 +74,7 @@ protected: void updateCustomData(QStandardItem *item, const SignalHandlerProperty &signalHandlerProperty); QStringList getPossibleSignalsForConnection(const ModelNode &connection) const; -private slots: +private: void handleDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight); void handleException(); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.cpp index 2ae56104951..7bd706f834d 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.cpp @@ -81,11 +81,11 @@ ConnectionViewWidget::ConnectionViewWidget(QWidget *parent) : ui->backendView->setStyleSheet(Theme::replaceCssColors( QLatin1String(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/scrollbar.css"))))); - connect(ui->tabBar, SIGNAL(currentChanged(int)), - ui->stackedWidget, SLOT(setCurrentIndex(int))); + connect(ui->tabBar, &QTabBar::currentChanged, + ui->stackedWidget, &QStackedWidget::setCurrentIndex); - connect(ui->tabBar, SIGNAL(currentChanged(int)), - this, SLOT(handleTabChanged(int))); + connect(ui->tabBar, &QTabBar::currentChanged, + this, &ConnectionViewWidget::handleTabChanged); ui->stackedWidget->setCurrentIndex(0); } @@ -145,15 +145,15 @@ QList ConnectionViewWidget::createToolBarWidgets() buttons << new QToolButton(); buttons.last()->setIcon(Utils::Icons::PLUS_TOOLBAR.icon()); buttons.last()->setToolTip(tr("Add binding or connection.")); - connect(buttons.last(), SIGNAL(clicked()), this, SLOT(addButtonClicked())); - connect(this, SIGNAL(setEnabledAddButton(bool)), buttons.last(), SLOT(setEnabled(bool))); + connect(buttons.last(), &QAbstractButton::clicked, this, &ConnectionViewWidget::addButtonClicked); + connect(this, &ConnectionViewWidget::setEnabledAddButton, buttons.last(), &QWidget::setEnabled); buttons << new QToolButton(); buttons.last()->setIcon(Utils::Icons::MINUS.icon()); buttons.last()->setToolTip(tr("Remove selected binding or connection.")); buttons.last()->setShortcut(QKeySequence(Qt::Key_Delete)); - connect(buttons.last(), SIGNAL(clicked()), this, SLOT(removeButtonClicked())); - connect(this, SIGNAL(setEnabledRemoveButton(bool)), buttons.last(), SLOT(setEnabled(bool))); + connect(buttons.last(), &QAbstractButton::clicked, this, &ConnectionViewWidget::removeButtonClicked); + connect(this, &ConnectionViewWidget::setEnabledRemoveButton, buttons.last(), &QWidget::setEnabled); return buttons; } diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h index 285d7847bf4..0f28dd26da2 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/connectionviewwidget.h @@ -79,7 +79,6 @@ public: QTableView *dynamicPropertiesTableView() const; QTableView *backendView() const; -public slots: void bindingTableViewSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous); void connectionTableViewSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous); void dynamicPropertiesTableViewSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous); @@ -89,7 +88,7 @@ signals: void setEnabledAddButton(bool enabled); void setEnabledRemoveButton(bool enabled); -private slots: +private: void handleTabChanged(int i); void removeButtonClicked(); void addButtonClicked(); diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp index bab87817dca..a903747adc2 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.cpp @@ -271,7 +271,7 @@ void DynamicPropertiesModel::addDynamicPropertyForCurrentNode() modelNode.variantProperty(unusedProperty(modelNode)).setDynamicTypeNameAndValue("string", QLatin1String("none.none")); } catch (RewritingException &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &DynamicPropertiesModel::handleException); } } } else { @@ -437,7 +437,7 @@ void DynamicPropertiesModel::updateValue(int row) transaction.commit(); //committing in the try block } catch (Exception &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &DynamicPropertiesModel::handleException); } return; } @@ -453,7 +453,7 @@ void DynamicPropertiesModel::updateValue(int row) transaction.commit(); //committing in the try block } catch (Exception &e) { m_exceptionError = e.description(); - QTimer::singleShot(200, this, SLOT(handleException())); + QTimer::singleShot(200, this, &DynamicPropertiesModel::handleException); } } } diff --git a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h index 86a94a96962..976fe754f97 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h +++ b/src/plugins/qmldesigner/qmldesignerextension/connectioneditor/dynamicpropertiesmodel.h @@ -87,7 +87,7 @@ protected: void updateDisplayRole(int row, int columns, const QString &string); -private slots: +private: void handleDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight); void handleException(); diff --git a/src/plugins/qmldesigner/qmldesignerplugin.qbs b/src/plugins/qmldesigner/qmldesignerplugin.qbs index 27473386b70..8078a1de9e0 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.qbs +++ b/src/plugins/qmldesigner/qmldesignerplugin.qbs @@ -512,8 +512,6 @@ Project { "integration/stackedutilitypanelcontroller.h", "integration/utilitypanelcontroller.cpp", "integration/utilitypanelcontroller.h", - "integration/xuifiledialog.cpp", - "integration/xuifiledialog.h", "itemlibrary/itemlibrary.qrc", "itemlibrary/itemlibraryimageprovider.cpp", "itemlibrary/itemlibraryimageprovider.h", diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp index e5d775d81fc..3a68952530b 100644 --- a/src/plugins/qmldesigner/shortcutmanager.cpp +++ b/src/plugins/qmldesigner/shortcutmanager.cpp @@ -122,7 +122,7 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex QmlDesignerPlugin::instance()->mainWidget(), &Internal::DesignModeWidget::restoreDefaultView); - connect(&m_goIntoComponentAction, SIGNAL(triggered()), SLOT(goIntoComponent())); + connect(&m_goIntoComponentAction, &QAction::triggered, this, &ShortCutManager::goIntoComponent); connect(&m_toggleLeftSidebarAction, &QAction::triggered, @@ -371,16 +371,16 @@ void ShortCutManager::toggleRightSidebar() void ShortCutManager::connectUndoActions(DesignDocument *designDocument) { if (designDocument) { - connect(designDocument, SIGNAL(undoAvailable(bool)), this, SLOT(undoAvailable(bool))); - connect(designDocument, SIGNAL(redoAvailable(bool)), this, SLOT(redoAvailable(bool))); + connect(designDocument, &DesignDocument::undoAvailable, this, &ShortCutManager::undoAvailable); + connect(designDocument, &DesignDocument::redoAvailable, this, &ShortCutManager::redoAvailable); } } void ShortCutManager::disconnectUndoActions(DesignDocument *designDocument) { if (currentDesignDocument()) { - disconnect(designDocument, SIGNAL(undoAvailable(bool)), this, SLOT(undoAvailable(bool))); - disconnect(designDocument, SIGNAL(redoAvailable(bool)), this, SLOT(redoAvailable(bool))); + disconnect(designDocument, &DesignDocument::undoAvailable, this, &ShortCutManager::undoAvailable); + disconnect(designDocument, &DesignDocument::redoAvailable, this, &ShortCutManager::redoAvailable); } } diff --git a/src/plugins/qmldesigner/shortcutmanager.h b/src/plugins/qmldesigner/shortcutmanager.h index 6636bb93e4c..bf273e853e3 100644 --- a/src/plugins/qmldesigner/shortcutmanager.h +++ b/src/plugins/qmldesigner/shortcutmanager.h @@ -54,10 +54,9 @@ public: void updateUndoActions(DesignDocument *designDocument); DesignDocument *currentDesignDocument() const; -public slots: void updateActions(Core::IEditor* editor); -private slots: +private: void undo(); void redo(); void deleteSelected(); diff --git a/src/plugins/qmljstools/qmljstoolsplugin.cpp b/src/plugins/qmljstools/qmljstoolsplugin.cpp index 74b64ed6e51..66d805dcd5d 100644 --- a/src/plugins/qmljstools/qmljstoolsplugin.cpp +++ b/src/plugins/qmljstools/qmljstoolsplugin.cpp @@ -72,12 +72,12 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error) // Objects m_modelManager = new ModelManager(this); -// VCSManager *vcsManager = core->vcsManager(); -// DocumentManager *fileManager = core->fileManager(); -// connect(vcsManager, SIGNAL(repositoryChanged(QString)), -// m_modelManager, SLOT(updateModifiedSourceFiles())); -// connect(fileManager, SIGNAL(filesChangedInternally(QStringList)), -// m_modelManager, SLOT(updateSourceFiles(QStringList))); +// Core::VcsManager *vcsManager = Core::VcsManager::instance(); +// Core::DocumentManager *documentManager = Core::DocumentManager::instance(); +// connect(vcsManager, &Core::VcsManager::repositoryChanged, +// m_modelManager, &ModelManager::updateModifiedSourceFiles); +// connect(documentManager, &DocumentManager::filesChangedInternally, +// m_modelManager, &ModelManager::updateSourceFiles); LocatorData *locatorData = new LocatorData; addAutoReleasedObject(locatorData); diff --git a/src/plugins/qtsupport/qtkitconfigwidget.cpp b/src/plugins/qtsupport/qtkitconfigwidget.cpp index 1a6cd65145e..d9dfca08fc4 100644 --- a/src/plugins/qtsupport/qtkitconfigwidget.cpp +++ b/src/plugins/qtsupport/qtkitconfigwidget.cpp @@ -30,7 +30,6 @@ #include "qtversionmanager.h" #include -#include #include #include diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index 3b856ba7244..09a4001ff69 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -89,10 +89,12 @@ ResourceEditorW::ResourceEditorW(const Core::Context &context, m_toolBar->addWidget(refreshButton); m_resourceEditor->setResourceDragEnabled(true); - m_contextMenu->addAction(tr("Open File"), this, SLOT(openCurrentFile())); + m_contextMenu->addAction(tr("Open File"), this, &ResourceEditorW::openCurrentFile); m_openWithMenu = m_contextMenu->addMenu(tr("Open With")); - m_renameAction = m_contextMenu->addAction(tr("Rename File..."), this, SLOT(renameCurrentFile())); - m_copyFileNameAction = m_contextMenu->addAction(tr("Copy Resource Path to Clipboard"), this, SLOT(copyCurrentResourcePath())); + m_renameAction = m_contextMenu->addAction(tr("Rename File..."), this, + &ResourceEditorW::renameCurrentFile); + m_copyFileNameAction = m_contextMenu->addAction(tr("Copy Resource Path to Clipboard"), + this, &ResourceEditorW::copyCurrentResourcePath); connect(m_resourceDocument, &ResourceEditorDocument::loaded, m_resourceEditor, &QrcEditor::loaded); diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h index 3d8d139e3c2..cbc4715dacd 100644 --- a/src/plugins/resourceeditor/resourceeditorw.h +++ b/src/plugins/resourceeditor/resourceeditorw.h @@ -92,7 +92,7 @@ public: Core::IDocument *document() override { return m_resourceDocument; } QWidget *toolBar() override; -private slots: +private: void onUndoStackChanged(bool canUndo, bool canRedo); void showContextMenu(const QPoint &globalPoint, const QString &fileName); void openCurrentFile(); @@ -100,7 +100,6 @@ private slots: void renameCurrentFile(); void copyCurrentResourcePath(); -private: const QString m_extension; const QString m_fileFilter; QString m_displayName; @@ -114,10 +113,8 @@ private: QAction *m_renameAction; QAction *m_copyFileNameAction; -public slots: - void onRefresh(); - public: + void onRefresh(); void onUndo(); void onRedo(); diff --git a/src/plugins/scxmleditor/common/stateview.cpp b/src/plugins/scxmleditor/common/stateview.cpp index 273749cb0ef..8a310c97fb9 100644 --- a/src/plugins/scxmleditor/common/stateview.cpp +++ b/src/plugins/scxmleditor/common/stateview.cpp @@ -89,7 +89,7 @@ void StateView::setDocument(ScxmlDocument *doc) m_scene->setDocument(doc); m_ui.m_graphicsView->setDocument(doc); if (doc) - connect(doc, SIGNAL(colorThemeChanged()), m_scene, SLOT(invalidate())); + connect(doc, &ScxmlDocument::colorThemeChanged, m_scene, [this] { m_scene->invalidate(); }); } StateItem *StateView::parentState() const diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index 2c625f0303a..e038ecf4f8c 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -51,7 +51,6 @@ public: QPointer doc; - void _q_reformatBlocks(int from, int charsRemoved, int charsAdded); void reformatBlocks(int from, int charsRemoved, int charsAdded); void reformatBlock(const QTextBlock &block, int from, int charsRemoved, int charsAdded); @@ -63,13 +62,6 @@ public: inReformatBlocks = false; } - inline void _q_delayedRehighlight() { - if (!rehighlightPending) - return; - rehighlightPending = false; - q_func()->rehighlight(); - } - void applyFormatChanges(int from, int charsRemoved, int charsAdded); void updateFormatsForCategories(const FontSettings &fontSettings); @@ -94,6 +86,15 @@ static bool adjustRange(QTextLayout::FormatRange &range, int from, int charsRemo return false; } +void SyntaxHighlighter::delayedRehighlight() +{ + Q_D(SyntaxHighlighter); + if (!d->rehighlightPending) + return; + d->rehighlightPending = false; + rehighlight(); +} + void SyntaxHighlighterPrivate::applyFormatChanges(int from, int charsRemoved, int charsAdded) { bool formatsChanged = false; @@ -172,10 +173,11 @@ void SyntaxHighlighterPrivate::applyFormatChanges(int from, int charsRemoved, in } } -void SyntaxHighlighterPrivate::_q_reformatBlocks(int from, int charsRemoved, int charsAdded) +void SyntaxHighlighter::reformatBlocks(int from, int charsRemoved, int charsAdded) { - if (!inReformatBlocks) - reformatBlocks(from, charsRemoved, charsAdded); + Q_D(SyntaxHighlighter); + if (!d->inReformatBlocks) + d->reformatBlocks(from, charsRemoved, charsAdded); } void SyntaxHighlighterPrivate::reformatBlocks(int from, int charsRemoved, int charsAdded) @@ -310,8 +312,7 @@ void SyntaxHighlighter::setDocument(QTextDocument *doc) { Q_D(SyntaxHighlighter); if (d->doc) { - disconnect(d->doc, SIGNAL(contentsChange(int,int,int)), - this, SLOT(_q_reformatBlocks(int,int,int))); + disconnect(d->doc, &QTextDocument::contentsChange, this, &SyntaxHighlighter::reformatBlocks); QTextCursor cursor(d->doc); cursor.beginEditBlock(); @@ -321,10 +322,9 @@ void SyntaxHighlighter::setDocument(QTextDocument *doc) } d->doc = doc; if (d->doc) { - connect(d->doc, SIGNAL(contentsChange(int,int,int)), - this, SLOT(_q_reformatBlocks(int,int,int))); + connect(d->doc, &QTextDocument::contentsChange, this, &SyntaxHighlighter::reformatBlocks); d->rehighlightPending = true; - QTimer::singleShot(0, this, SLOT(_q_delayedRehighlight())); + QTimer::singleShot(0, this, &SyntaxHighlighter::delayedRehighlight); d->foldValidator.setup(qobject_cast(doc->documentLayout())); } } diff --git a/src/plugins/texteditor/syntaxhighlighter.h b/src/plugins/texteditor/syntaxhighlighter.h index 32593134d1d..064c5aaa775 100644 --- a/src/plugins/texteditor/syntaxhighlighter.h +++ b/src/plugins/texteditor/syntaxhighlighter.h @@ -64,7 +64,8 @@ public: // Don't call in constructors of derived classes virtual void setFontSettings(const TextEditor::FontSettings &fontSettings); -public Q_SLOTS: + +public slots: void rehighlight(); void rehighlightBlock(const QTextBlock &block); @@ -90,8 +91,8 @@ protected: QTextBlock currentBlock() const; private: - Q_PRIVATE_SLOT(d_ptr, void _q_reformatBlocks(int from, int charsRemoved, int charsAdded)) - Q_PRIVATE_SLOT(d_ptr, void _q_delayedRehighlight()) + void reformatBlocks(int from, int charsRemoved, int charsAdded); + void delayedRehighlight(); QScopedPointer d_ptr; }; diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h index 880df92b442..d4caffc0f66 100644 --- a/src/plugins/texteditor/texteditor.h +++ b/src/plugins/texteditor/texteditor.h @@ -340,7 +340,6 @@ public: virtual void encourageApply(); -public slots: // Qt4-style connect used in EditorConfiguration virtual void setDisplaySettings(const TextEditor::DisplaySettings &); virtual void setMarginSettings(const TextEditor::MarginSettings &); void setBehaviorSettings(const TextEditor::BehaviorSettings &); @@ -349,7 +348,6 @@ public slots: // Qt4-style connect used in EditorConfiguration void setCompletionSettings(const TextEditor::CompletionSettings &); void setExtraEncodingSettings(const TextEditor::ExtraEncodingSettings &); -public: void circularPaste(); void switchUtf8bom(); @@ -589,7 +587,7 @@ signals: void tooltipRequested(const QPoint &globalPos, int position); void activateEditor(); -protected slots: +protected: virtual void slotCursorPositionChanged(); // Used in VcsBase virtual void slotCodeStyleSettingsChanged(const QVariant &); // Used in CppEditor diff --git a/src/plugins/valgrind/callgrind/callgrindcontroller.h b/src/plugins/valgrind/callgrind/callgrindcontroller.h index 373b4c87a0a..a1e06fe4456 100644 --- a/src/plugins/valgrind/callgrind/callgrindcontroller.h +++ b/src/plugins/valgrind/callgrind/callgrindcontroller.h @@ -68,22 +68,20 @@ public: */ void getLocalDataFile(); -Q_SIGNALS: +signals: void finished(Valgrind::Callgrind::CallgrindController::Option option); void localParseDataAvailable(const QString &file); void statusMessage(const QString &msg); -private Q_SLOTS: +private: void processError(QProcess::ProcessError); void processFinished(int, QProcess::ExitStatus); void foundRemoteFile(); void sftpInitialized(); void sftpJobFinished(QSsh::SftpJobId job, const QString &error); - -private: void cleanupTempFile(); // callgrind_control process diff --git a/src/plugins/valgrind/callgrind/callgrinddatamodel.h b/src/plugins/valgrind/callgrind/callgrinddatamodel.h index 3daaf77d396..b1df49d9177 100644 --- a/src/plugins/valgrind/callgrind/callgrinddatamodel.h +++ b/src/plugins/valgrind/callgrind/callgrinddatamodel.h @@ -78,7 +78,6 @@ public: FileNameRole }; -public slots: /// enable/disable cycle detection void enableCycleDetection(bool enabled); void setShortenTemplates(bool enabled); diff --git a/src/plugins/valgrind/callgrind/callgrindparser.h b/src/plugins/valgrind/callgrind/callgrindparser.h index 2b36da5e4c0..76f1430a2e0 100644 --- a/src/plugins/valgrind/callgrind/callgrindparser.h +++ b/src/plugins/valgrind/callgrind/callgrindparser.h @@ -56,13 +56,11 @@ public: // get and take ownership of the parsing results. If this function is not called the repository // will be destroyed when the parser is destroyed. Subsequent calls return null. ParseData *takeData(); + void parse(QIODevice *stream); signals: void parserDataReady(); -public Q_SLOTS: - void parse(QIODevice *stream); - private: class Private; Private *const d; diff --git a/src/plugins/valgrind/callgrind/callgrindproxymodel.h b/src/plugins/valgrind/callgrind/callgrindproxymodel.h index d8f17d883f3..12a5213a277 100644 --- a/src/plugins/valgrind/callgrind/callgrindproxymodel.h +++ b/src/plugins/valgrind/callgrind/callgrindproxymodel.h @@ -49,7 +49,6 @@ public: /// Only functions with an inclusive cost ratio above this minimum will be shown in the model double minimumInclusiveCostRatio() const { return m_minimumInclusiveCostRatio; } -public Q_SLOTS: /// This will filter out all entries that are not located within \param baseDir void setFilterBaseDir(const QString& baseDir); void setFilterFunction(const Function *call); @@ -59,7 +58,7 @@ public Q_SLOTS: /// by this model. If @c 0 is passed as argument, all rows will be shown. void setMinimumInclusiveCostRatio(double minimumInclusiveCost); -Q_SIGNALS: +signals: void filterFunctionChanged(const Function *previous, const Function *current); void filterMaximumRowsChanged(int rows); diff --git a/src/plugins/valgrind/callgrind/callgrindstackbrowser.h b/src/plugins/valgrind/callgrind/callgrindstackbrowser.h index 35f91bc5ca7..b886b90d145 100644 --- a/src/plugins/valgrind/callgrind/callgrindstackbrowser.h +++ b/src/plugins/valgrind/callgrind/callgrindstackbrowser.h @@ -46,7 +46,6 @@ public: bool hasPrevious() const { return !m_stack.isEmpty(); } bool hasNext() const { return !m_redoStack.isEmpty(); } -public slots: void goBack(); void goNext(); diff --git a/src/plugins/valgrind/callgrindengine.h b/src/plugins/valgrind/callgrindengine.h index a9aa3ab47a3..352c7bf3059 100644 --- a/src/plugins/valgrind/callgrindengine.h +++ b/src/plugins/valgrind/callgrindengine.h @@ -44,7 +44,6 @@ public: Valgrind::Callgrind::ParseData *takeParserData(); -public slots: /// controller actions void dump(); void reset(); diff --git a/src/plugins/valgrind/callgrindvisualisation.h b/src/plugins/valgrind/callgrindvisualisation.h index ee920b74701..cbb38ca6e51 100644 --- a/src/plugins/valgrind/callgrindvisualisation.h +++ b/src/plugins/valgrind/callgrindvisualisation.h @@ -57,17 +57,14 @@ public: void setMinimumInclusiveCostRatio(double ratio); -public slots: void setText(const QString &message); signals: void functionActivated(const Valgrind::Callgrind::Function *); void functionSelected(const Valgrind::Callgrind::Function *); -protected slots: - void populateScene(); - protected: + void populateScene(); void mousePressEvent(QMouseEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); void resizeEvent(QResizeEvent *event); diff --git a/src/plugins/valgrind/memcheck/memcheckrunner.h b/src/plugins/valgrind/memcheck/memcheckrunner.h index 58f55f904f6..de8cecf5380 100644 --- a/src/plugins/valgrind/memcheck/memcheckrunner.h +++ b/src/plugins/valgrind/memcheck/memcheckrunner.h @@ -51,14 +51,13 @@ public: signals: void logMessageReceived(const QByteArray &); -private slots: +private: void localHostAddressRetrieved(const QHostAddress &localHostAddress); void xmlSocketConnected(); void logSocketConnected(); void readLogSocket(); -private: QString tool() const; bool startServers(const QHostAddress &localHostAddress); diff --git a/src/plugins/valgrind/memcheckerrorview.h b/src/plugins/valgrind/memcheckerrorview.h index 244f7df1577..2cc44392683 100644 --- a/src/plugins/valgrind/memcheckerrorview.h +++ b/src/plugins/valgrind/memcheckerrorview.h @@ -46,14 +46,10 @@ public: void setDefaultSuppressionFile(const QString &suppFile); QString defaultSuppressionFile() const; ValgrindBaseSettings *settings() const { return m_settings; } - -public slots: void settingsChanged(ValgrindBaseSettings *settings); -private slots: - void suppressError(); - private: + void suppressError(); QList customActions() const override; QAction *m_suppressAction; diff --git a/src/plugins/valgrind/suppressiondialog.h b/src/plugins/valgrind/suppressiondialog.h index 70a5ee7ff22..5b1a91720c2 100644 --- a/src/plugins/valgrind/suppressiondialog.h +++ b/src/plugins/valgrind/suppressiondialog.h @@ -52,10 +52,8 @@ public: const QList &errors); static void maybeShow(MemcheckErrorView *view); -private slots: - void validate(); - private: + void validate(); void accept(); void reject(); diff --git a/src/plugins/valgrind/valgrindconfigwidget.h b/src/plugins/valgrind/valgrindconfigwidget.h index 5f31a28d4ee..c37d5c04c1a 100644 --- a/src/plugins/valgrind/valgrindconfigwidget.h +++ b/src/plugins/valgrind/valgrindconfigwidget.h @@ -50,17 +50,15 @@ public: void setSuppressions(const QStringList &files); QStringList suppressions() const; -public Q_SLOTS: void slotAddSuppression(); void slotRemoveSuppression(); void slotSuppressionsRemoved(const QStringList &files); void slotSuppressionsAdded(const QStringList &files); void slotSuppressionSelectionChanged(); -private slots: +private: void updateUi(); -private: ValgrindBaseSettings *m_settings; Ui::ValgrindConfigWidget *m_ui; QStandardItemModel *m_model; diff --git a/src/plugins/valgrind/valgrindmemcheckparsertest.h b/src/plugins/valgrind/valgrindmemcheckparsertest.h index 7f51f61ce46..b431047ed03 100644 --- a/src/plugins/valgrind/valgrindmemcheckparsertest.h +++ b/src/plugins/valgrind/valgrindmemcheckparsertest.h @@ -69,7 +69,7 @@ public: QVector > errorcounts; QVector > suppcounts; -public Q_SLOTS: +public: void error(const Valgrind::XmlProtocol::Error &err) { errors.append(err); @@ -108,7 +108,6 @@ public: this, &RunnerDumper::processErrorReceived); } -public slots: void error(const Valgrind::XmlProtocol::Error &e) { qDebug() << "error received"; diff --git a/src/plugins/valgrind/valgrindrunner.h b/src/plugins/valgrind/valgrindrunner.h index 97c3f8703f6..97ead3f8867 100644 --- a/src/plugins/valgrind/valgrindrunner.h +++ b/src/plugins/valgrind/valgrindrunner.h @@ -67,16 +67,14 @@ public: ValgrindProcess *valgrindProcess() const; -protected: - virtual QString tool() const = 0; - signals: void processOutputReceived(const QString &, Utils::OutputFormat); void processErrorReceived(const QString &, QProcess::ProcessError); void started(); void finished(); -protected slots: +protected: + virtual QString tool() const = 0; virtual void processError(QProcess::ProcessError); virtual void processFinished(int, QProcess::ExitStatus); virtual void localHostAddressRetrieved(const QHostAddress &localHostAddress); diff --git a/src/plugins/valgrind/valgrindsettings.h b/src/plugins/valgrind/valgrindsettings.h index 252b8191346..b0d62e83172 100644 --- a/src/plugins/valgrind/valgrindsettings.h +++ b/src/plugins/valgrind/valgrindsettings.h @@ -74,7 +74,6 @@ public: QString valgrindExecutable() const; SelfModifyingCodeDetection selfModifyingCodeDetection() const; -public slots: void setValgrindExecutable(const QString &); void setSelfModifyingCodeDetection(int); @@ -102,7 +101,6 @@ public: virtual void addSuppressionFiles(const QStringList &) = 0; virtual void removeSuppressionFiles(const QStringList &) = 0; -public slots: void setNumCallers(int); void setLeakCheckOnFinish(int); void setShowReachable(bool); @@ -144,7 +142,6 @@ public: /// \return Minimum cost ratio, range [0.0..100.0] double visualisationMinimumInclusiveCostRatio() const { return m_visualisationMinimumInclusiveCostRatio; } -public slots: void setEnableCacheSim(bool enable); void setEnableBranchSim(bool enable); void setCollectSystime(bool collect); @@ -226,7 +223,6 @@ public: bool detectCycles() const; bool shortenTemplates() const; -public slots: void setCostFormat(Valgrind::Internal::CostDelegate::CostFormat format); void setDetectCycles(bool on); void setShortenTemplates(bool on); diff --git a/src/plugins/valgrind/xmlprotocol/parser.h b/src/plugins/valgrind/xmlprotocol/parser.h index 4ed7d820289..6bc9f1fac0a 100644 --- a/src/plugins/valgrind/xmlprotocol/parser.h +++ b/src/plugins/valgrind/xmlprotocol/parser.h @@ -58,11 +58,9 @@ public: ~Parser(); QString errorString() const; - -public Q_SLOTS: void parse(QIODevice *stream); -Q_SIGNALS: +signals: void status(const Valgrind::XmlProtocol::Status &status); void error(const Valgrind::XmlProtocol::Error &error); void internalError(const QString &errorString); diff --git a/src/plugins/valgrind/xmlprotocol/stackmodel.h b/src/plugins/valgrind/xmlprotocol/stackmodel.h index a948b13bdcb..6bcd4b1075e 100644 --- a/src/plugins/valgrind/xmlprotocol/stackmodel.h +++ b/src/plugins/valgrind/xmlprotocol/stackmodel.h @@ -67,8 +67,6 @@ public: int columnCount(const QModelIndex &parent = QModelIndex()) const; void clear(); - -public Q_SLOTS: void setError(const Valgrind::XmlProtocol::Error &error); private: diff --git a/src/plugins/valgrind/xmlprotocol/threadedparser.h b/src/plugins/valgrind/xmlprotocol/threadedparser.h index 5e749494743..339255d7ad2 100644 --- a/src/plugins/valgrind/xmlprotocol/threadedparser.h +++ b/src/plugins/valgrind/xmlprotocol/threadedparser.h @@ -56,14 +56,13 @@ public: bool waitForFinished(); bool isRunning() const; -public Q_SLOTS: ///@warning will move @p stream to a different thread and take ownership of it void parse(QIODevice *stream); -private Q_SLOTS: +private: void slotInternalError(const QString &errorString); -Q_SIGNALS: +signals: void status(const Valgrind::XmlProtocol::Status &status); void error(const Valgrind::XmlProtocol::Error &error); void internalError(const QString &errorString); diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp b/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp deleted file mode 100644 index d0ec9ab9d9c..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include "qtsinglecoreapplication.h" -#include "qtlocalpeer.h" - -namespace SharedTools { - -QtSingleCoreApplication::QtSingleCoreApplication(int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this); - connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString))); -} - - -QtSingleCoreApplication::QtSingleCoreApplication(const QString &appId, int &argc, char **argv) - : QCoreApplication(argc, argv) -{ - peer = new QtLocalPeer(this, appId); - connect(peer, SIGNAL(messageReceived(QString)), SIGNAL(messageReceived(QString))); -} - - -bool QtSingleCoreApplication::isRunning() -{ - return peer->isClient(); -} - - -bool QtSingleCoreApplication::sendMessage(const QString &message, int timeout) -{ - return peer->sendMessage(message, timeout); -} - - -QString QtSingleCoreApplication::id() const -{ - return peer->applicationId(); -} - -} // namespace SharedTools diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.h b/src/shared/qtsingleapplication/qtsinglecoreapplication.h deleted file mode 100644 index bf9f8e095c7..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#include - -namespace SharedTools { - -class QtLocalPeer; - -class QtSingleCoreApplication : public QCoreApplication -{ - Q_OBJECT - -public: - QtSingleCoreApplication(int &argc, char **argv); - QtSingleCoreApplication(const QString &id, int &argc, char **argv); - - bool isRunning(); - QString id() const; - -public Q_SLOTS: - bool sendMessage(const QString &message, int timeout = 5000); - - -Q_SIGNALS: - void messageReceived(const QString &message); - - -private: - QtLocalPeer* peer; -}; - -} // namespace SharedTools diff --git a/src/shared/qtsingleapplication/qtsinglecoreapplication.pri b/src/shared/qtsingleapplication/qtsinglecoreapplication.pri deleted file mode 100644 index 3d6301b29c4..00000000000 --- a/src/shared/qtsingleapplication/qtsinglecoreapplication.pri +++ /dev/null @@ -1,14 +0,0 @@ -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD -HEADERS += $$PWD/qtsinglecoreapplication.h $$PWD/qtlocalpeer.h -SOURCES += $$PWD/qtsinglecoreapplication.cpp $$PWD/qtlocalpeer.cpp - -QT *= network - -gotqtlockedfile = $$find(HEADERS, .*qtlockedfile.h) -isEmpty(gotqtlockedfile):include(../qtlockedfile/qtlockedfile.pri) - - -win32:contains(TEMPLATE, lib):contains(CONFIG, shared) { - DEFINES += QT_QTSINGLECOREAPPLICATION_EXPORT=__declspec(dllexport) -} diff --git a/tests/system/objects.map b/tests/system/objects.map index edca350ceca..f4179184d68 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -2,18 +2,12 @@ :*Qt Creator.Cancel Build_QToolButton {text='Cancel Build' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Continue_Core::Internal::FancyToolButton {toolTip?='Continue *' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:*Qt Creator.Events_QDockWidget {name='QmlProfilerStatisticsViewDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:*Qt Creator.Events_QTabBar {aboveWidget=':*Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Find_Find::Internal::FindToolBar {name='Core__Internal__FindWidget' type='Core::Internal::FindToolBar' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Find'} :*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack {name='FormEditorStack' type='Designer::Internal::FormEditorStack' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Interrupt_Core::Internal::FancyToolButton {toolTip='Interrupt' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:*Qt Creator.JavaScript_QDockWidget {name='QmlProfilerV8ProfileViewDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='V8'} -:*Qt Creator.JavaScript_QTabBar {aboveWidget=':*Qt Creator.JavaScript_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.ProjectSelectorDockWidget_QDockWidget {name='ProjectSelectorDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Run_Core::Internal::FancyToolButton {text='Run' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Start Debugging_Core::Internal::FancyToolButton {toolTip?='Start Debugging *' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:*Qt Creator.Timeline_QDockWidget {name='QML ProfilerDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Timeline'} -:*Qt Creator.Timeline_QTabBar {aboveWidget=':*Qt Creator.Timeline_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Widget Box_QDockWidget {name='WidgetBoxDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Widget Box'} :*Qt Creator.findEdit_Utils::FilterLineEdit {name='findEdit' type='Utils::FancyLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator_Core::Internal::FancyToolButton {occurrence='3' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -73,7 +67,7 @@ :Dialog_Debugger::Internal::SymbolPathsDialog {name='Debugger__Internal__SymbolPathsDialog' type='Debugger::Internal::SymbolPathsDialog' visible='1' windowTitle='Dialog'} :Dialog_QmlJSEditor::Internal::ComponentNameDialog {name='QmlJSEditor__Internal__ComponentNameDialog' type='QmlJSEditor::Internal::ComponentNameDialog' visible='1' windowTitle='Move Component into Separate File'} :Edit Environment_ProjectExplorer::EnvironmentItemsDialog {type='ProjectExplorer::EnvironmentItemsDialog' unnamed='1' visible='1' windowTitle='Edit Environment'} -:Events.QmlProfilerEventsTable_QmlProfiler::Internal::QmlProfilerEventsMainView {container=':*Qt Creator.Events_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QmlProfilerStatisticsMainView' visible='1'} +:Events.QmlProfilerEventsTable_QmlProfiler::Internal::QmlProfilerEventsMainView {container=':Qt Creator.Events_QDockWidget' name='QmlProfilerEventsTable' type='QmlProfiler::Internal::QmlProfilerStatisticsMainView' visible='1'} :Executable:_Utils::PathChooser {buddy=':scrollArea.Executable:_QLabel' type='Utils::PathChooser' unnamed='1' visible='1'} :Failed to start application_QMessageBox {type='QMessageBox' unnamed='1' visible='1' windowTitle='Failed to start application'} :File has been removed.Close_QPushButton {text='Close' type='QPushButton' unnamed='1' visible='1' window=':File has been removed_QMessageBox'} @@ -128,6 +122,8 @@ :Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'} :Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Events_QDockWidget {name='QmlProfiler.Statistics.DockDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Events_QTabBar {aboveWidget=':Qt Creator.Events_QDockWidget' type='QTabBar' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} :Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'} :Qt Creator.Project.Menu.Folder_QMenu {name='Project.Menu.Folder' type='QMenu' visible='1'} @@ -136,6 +132,8 @@ :Qt Creator.Replace All_QToolButton {name='replaceAllButton' text='Replace All' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Replace_QToolButton {name='replaceButton' text='Replace' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Stop_QToolButton {text='Stop' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} +:Qt Creator.Timeline_QDockWidget {container=':Qt Creator.DebugModeWidget_QSplitter' name='QmlProfiler.Timeline.DockDockWidget' type='QDockWidget' visible='1'} +:Qt Creator.Timeline_QTabBar {aboveWidget=':Qt Creator.Timeline_QDockWidget' container=':Qt Creator.DebugModeWidget_QSplitter' type='QTabBar' unnamed='1' visible='1'} :Qt Creator.replaceEdit_Utils::FilterLineEdit {name='replaceEdit' type='Utils::FancyLineEdit' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.scrollArea_QScrollArea {type='ProjectExplorer::PanelsWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.splitter_QSplitter {name='splitter' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} diff --git a/tests/system/shared/workarounds.py b/tests/system/shared/workarounds.py index cd28f4b877b..82eff0e09ca 100644 --- a/tests/system/shared/workarounds.py +++ b/tests/system/shared/workarounds.py @@ -255,15 +255,9 @@ class JIRA: # for later lookup which function to call for which bug # ALWAYS update this dict when adding a new function for a workaround! def __initBugDict__(self): - self.__bugs__= { - 'QTCREATORBUG-6853':self._workaroundCreator6853_, - } + self.__bugs__= {} # helper function - will be called if no workaround for the requested bug is deposited def _exitFatal_(self, bugType, number): test.fatal("No workaround found for bug %s-%d" % (bugType, number)) ############### functions that hold workarounds ################################# - - def _workaroundCreator6853_(self, *args): - if "Release" in args[0] and platform.system() == "Linux": - snooze(2) diff --git a/tests/system/suite_debugger/tst_cli_output_console/test.py b/tests/system/suite_debugger/tst_cli_output_console/test.py index 97dd1a69375..81b0d1e56a5 100644 --- a/tests/system/suite_debugger/tst_cli_output_console/test.py +++ b/tests/system/suite_debugger/tst_cli_output_console/test.py @@ -28,9 +28,6 @@ source("../../shared/qtcreator.py") project = "untitled" def main(): - if platform.system() == "Darwin" and JIRA.isBugStillOpen(6853, JIRA.Bug.CREATOR): - test.xfail("This test is unstable on Mac, see QTCREATORBUG-6853.") - return outputQDebug = "Output from qDebug()." outputStdOut = "Output from std::cout." outputStdErr = "Output from std::cerr." @@ -88,7 +85,6 @@ def main(): test.log("Debugging application") isMsvc = isMsvcConfig(len(checkedTargets), kit) invokeMenuItem("Debug", "Start Debugging", "Start Debugging") - JIRA.performWorkaroundForBug(6853, JIRA.Bug.CREATOR, config) handleDebuggerWarnings(config, isMsvc) ensureChecked(":Qt Creator_AppOutput_Core::Internal::OutputPaneToggleButton") outputWindow = waitForObject(":Qt Creator_Core::OutputWindow") diff --git a/tests/system/suite_debugger/tst_simple_analyze/test.py b/tests/system/suite_debugger/tst_simple_analyze/test.py index 15f938d7083..f8ed64a3b2c 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/test.py +++ b/tests/system/suite_debugger/tst_simple_analyze/test.py @@ -111,7 +111,7 @@ def performTest(workingDir, projectName, targetCount, availableConfigs): # cannot run following test on colShortest (unstable) for i in [colTotal, colMean, colMedian, colLongest]: for item in dumpItems(model, column=i)[1:5]: - test.verify(item.endswith(' ms'), "Verify that '%s' ends with ' ms'" % item) + test.verify(item.endswith('ms'), "Verify that '%s' ends with 'ms'" % item) for i in [colTotal, colMean, colMedian, colLongest, colShortest]: for item in dumpItems(model, column=i): test.verify(not item.startswith('0.000 '), @@ -158,9 +158,8 @@ def containsOnce(tuple, items): return True def safeClickTab(tab): - for bar in [":*Qt Creator.JavaScript_QTabBar", - ":*Qt Creator.Events_QTabBar", - ":*Qt Creator.Timeline_QTabBar"]: + for bar in [":Qt Creator.Events_QTabBar", + ":Qt Creator.Timeline_QTabBar"]: try: clickOnTab(bar, tab, 1000) return True diff --git a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv index f59b0df27eb..7e1b41e3422 100644 --- a/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv +++ b/tests/system/suite_debugger/tst_simple_analyze/testdata/events_qt5.tsv @@ -1,20 +1,20 @@ "0" "1" "6" "11" "" "" "1" "Main Program" -"main.qml:15" "Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" +"main.qml:15" "Handling Signal" "2" "onTriggered: { runCount += 1; var i; for (i = 1; i < 2500; ++i) { var j = i * i; console.log(j); } }" "main.qml:15" "JavaScript" "2" "onTriggered" -"main.qml:4" "Create" "2" "QtQuick.Window/Window" -"main.qml:33" "Create" "2" "QtQuick/TextEdit" -"main.qml:1" "Compile" "1" "main.qml" -"main.qml:10" "Create" "2" "QtQuick/Timer" +"main.qml:4" "Creating" "2" "QtQuick.Window/Window" +"main.qml:33" "Creating" "2" "QtQuick/TextEdit" +"main.qml:1" "Compiling" "1" "main.qml" +"main.qml:10" "Creating" "2" "QtQuick/Timer" "main.qml:37" "Binding" "1" "anchors.top: parent.top" -"main.qml:40" "Create" "2" "QtQuick/Rectangle" +"main.qml:40" "Creating" "2" "QtQuick/Rectangle" "main.qml:37" "JavaScript" "1" "expression for top" "main.qml:14" "Binding" "3" "running: runCount < 2" -"main.qml:26" "Create" "2" "QtQuick/MouseArea" +"main.qml:26" "Creating" "2" "QtQuick/MouseArea" "main.qml:38" "Binding" "1" "anchors.horizontalCenter: parent.horizontalCenter" "main.qml:38" "JavaScript" "1" "expression for horizontalCenter" "main.qml:41" "Binding" "1" "anchors.fill: parent" "main.qml:27" "Binding" "1" "anchors.fill: parent" "main.qml:14" "JavaScript" "3" "expression for running" -"main.qml:41" JavaScript "1" "expression for fill" -"main.qml:27" JavaScript "1" "expression for fill" +"main.qml:41" "JavaScript" "1" "expression for fill" +"main.qml:27" "JavaScript" "1" "expression for fill"