From ef005dd56ed3fe68498a91c96f724ff4c8168fe5 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 21 Jul 2023 09:21:20 +0200 Subject: [PATCH] RemoteLinux: Unexport some classes And move them into Internal namespace. Change-Id: Ic3cc92b8250413f46f597f99fe0f1e4c8ef68950 Reviewed-by: hjk --- src/plugins/remotelinux/linuxdevice.cpp | 2 +- src/plugins/remotelinux/makeinstallstep.cpp | 4 ++-- src/plugins/remotelinux/makeinstallstep.h | 9 +++------ .../remotelinux/publickeydeploymentdialog.cpp | 8 ++------ .../remotelinux/publickeydeploymentdialog.h | 15 +++++++-------- src/plugins/remotelinux/rsyncdeploystep.cpp | 4 ++-- src/plugins/remotelinux/rsyncdeploystep.h | 9 +++------ src/plugins/remotelinux/sshdevicewizard.cpp | 4 ++-- 8 files changed, 22 insertions(+), 33 deletions(-) diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 0db57bd3133..ce233f2e46b 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -952,7 +952,7 @@ LinuxDevice::LinuxDevice() setSshParameters(sshParams); addDeviceAction({Tr::tr("Deploy Public Key..."), [](const IDevice::Ptr &device, QWidget *parent) { - if (auto d = PublicKeyDeploymentDialog::createDialog(device, parent)) { + if (auto d = Internal::PublicKeyDeploymentDialog::createDialog(device, parent)) { d->exec(); delete d; } diff --git a/src/plugins/remotelinux/makeinstallstep.cpp b/src/plugins/remotelinux/makeinstallstep.cpp index 9aa548c8e76..022dc9fd7cf 100644 --- a/src/plugins/remotelinux/makeinstallstep.cpp +++ b/src/plugins/remotelinux/makeinstallstep.cpp @@ -30,7 +30,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace RemoteLinux { +namespace RemoteLinux::Internal { class MakeInstallStep : public MakeStep { @@ -275,4 +275,4 @@ MakeInstallStepFactory::MakeInstallStepFactory() setDisplayName(Tr::tr("Install into temporary host directory")); } -} // RemoteLinux +} // RemoteLinux::Internal diff --git a/src/plugins/remotelinux/makeinstallstep.h b/src/plugins/remotelinux/makeinstallstep.h index 564a262abcd..d2ffed1356a 100644 --- a/src/plugins/remotelinux/makeinstallstep.h +++ b/src/plugins/remotelinux/makeinstallstep.h @@ -3,17 +3,14 @@ #pragma once -#include "remotelinux_export.h" - #include -namespace RemoteLinux { +namespace RemoteLinux::Internal { -class REMOTELINUX_EXPORT MakeInstallStepFactory - : public ProjectExplorer::BuildStepFactory +class MakeInstallStepFactory : public ProjectExplorer::BuildStepFactory { public: MakeInstallStepFactory(); }; -} // namespace RemoteLinux +} // namespace RemoteLinux::Internal diff --git a/src/plugins/remotelinux/publickeydeploymentdialog.cpp b/src/plugins/remotelinux/publickeydeploymentdialog.cpp index c7b4a548103..f06f28790d9 100644 --- a/src/plugins/remotelinux/publickeydeploymentdialog.cpp +++ b/src/plugins/remotelinux/publickeydeploymentdialog.cpp @@ -17,8 +17,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace RemoteLinux { -namespace Internal { +namespace RemoteLinux::Internal { class PublicKeyDeploymentDialogPrivate { @@ -26,9 +25,6 @@ public: Process m_process; bool m_done; }; -} // namespace Internal; - -using namespace Internal; PublicKeyDeploymentDialog *PublicKeyDeploymentDialog::createDialog( const IDevice::ConstPtr &deviceConfig, QWidget *parent) @@ -128,4 +124,4 @@ void PublicKeyDeploymentDialog::handleDeploymentDone(bool succeeded, const QStri d->m_done = true; } -} // namespace RemoteLinux +} // namespace RemoteLinux::Internal diff --git a/src/plugins/remotelinux/publickeydeploymentdialog.h b/src/plugins/remotelinux/publickeydeploymentdialog.h index 285e4a1fa82..8177e58935e 100644 --- a/src/plugins/remotelinux/publickeydeploymentdialog.h +++ b/src/plugins/remotelinux/publickeydeploymentdialog.h @@ -3,24 +3,23 @@ #pragma once -#include "remotelinux_export.h" - #include #include namespace Utils { class FilePath; } -namespace RemoteLinux { -namespace Internal { class PublicKeyDeploymentDialogPrivate; } +namespace RemoteLinux::Internal { -class REMOTELINUX_EXPORT PublicKeyDeploymentDialog : public QProgressDialog +class PublicKeyDeploymentDialogPrivate; + +class PublicKeyDeploymentDialog : public QProgressDialog { Q_OBJECT public: // Asks for public key and returns null if the file dialog is canceled. - static PublicKeyDeploymentDialog *createDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig, - QWidget *parent = nullptr); + static PublicKeyDeploymentDialog *createDialog( + const ProjectExplorer::IDeviceConstPtr &deviceConfig, QWidget *parent = nullptr); PublicKeyDeploymentDialog(const ProjectExplorer::IDeviceConstPtr &deviceConfig, const Utils::FilePath &publicKeyFileName, QWidget *parent = nullptr); @@ -33,4 +32,4 @@ private: Internal::PublicKeyDeploymentDialogPrivate * const d; }; -} // namespace RemoteLinux +} // namespace RemoteLinux::Internal diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp index ae496279094..203fed34643 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.cpp +++ b/src/plugins/remotelinux/rsyncdeploystep.cpp @@ -26,7 +26,7 @@ using namespace ProjectExplorer; using namespace Tasking; using namespace Utils; -namespace RemoteLinux { +namespace RemoteLinux::Internal { // RsyncDeployStep @@ -205,4 +205,4 @@ RsyncDeployStepFactory::RsyncDeployStepFactory() setDisplayName(Tr::tr("Deploy files via rsync")); } -} // RemoteLinux +} // RemoteLinux::Internal diff --git a/src/plugins/remotelinux/rsyncdeploystep.h b/src/plugins/remotelinux/rsyncdeploystep.h index 7450d84fcb6..20a16e9597a 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.h +++ b/src/plugins/remotelinux/rsyncdeploystep.h @@ -3,17 +3,14 @@ #pragma once -#include "remotelinux_export.h" - #include -namespace RemoteLinux { +namespace RemoteLinux::Internal { -class REMOTELINUX_EXPORT RsyncDeployStepFactory - : public ProjectExplorer::BuildStepFactory +class RsyncDeployStepFactory : public ProjectExplorer::BuildStepFactory { public: RsyncDeployStepFactory(); }; -} // namespace RemoteLinux +} // namespace RemoteLinux::Internal diff --git a/src/plugins/remotelinux/sshdevicewizard.cpp b/src/plugins/remotelinux/sshdevicewizard.cpp index f23db7b4035..7a2f48b359d 100644 --- a/src/plugins/remotelinux/sshdevicewizard.cpp +++ b/src/plugins/remotelinux/sshdevicewizard.cpp @@ -118,8 +118,8 @@ public: m_keyFileChooser.setPromptDialogTitle(Tr::tr("Choose a Private Key File")); auto const deployButton = new QPushButton(Tr::tr("Deploy Public Key"), this); connect(deployButton, &QPushButton::clicked, this, [this] { - PublicKeyDeploymentDialog dlg(m_device, - m_keyFileChooser.filePath().stringAppended(".pub"), this); + Internal::PublicKeyDeploymentDialog dlg( + m_device, m_keyFileChooser.filePath().stringAppended(".pub"), this); m_iconLabel.setPixmap((dlg.exec() == QDialog::Accepted ? Icons::OK : Icons::BROKEN).pixmap()); }); auto const createButton = new QPushButton(Tr::tr("Create New Key Pair"), this);