forked from qt-creator/qt-creator
Tests: Use Qt5-style connects
The heavy lifting was done by clazy. Change-Id: If3332a2b4a6d011d2cb74996f5dd750452093f31 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
4d9f79964d
commit
847637708f
@@ -149,7 +149,7 @@ static QmlDesigner::Model* createModel(const QString &typeName, int major = 2, i
|
|||||||
QmlDesigner::Model *model = QmlDesigner::Model::create(typeName.toUtf8(), major, minor, metaInfoPropxyModel);
|
QmlDesigner::Model *model = QmlDesigner::Model::create(typeName.toUtf8(), major, minor, metaInfoPropxyModel);
|
||||||
|
|
||||||
QPlainTextEdit *textEdit = new QPlainTextEdit;
|
QPlainTextEdit *textEdit = new QPlainTextEdit;
|
||||||
QObject::connect(model, SIGNAL(destroyed()), textEdit, SLOT(deleteLater()));
|
QObject::connect(model, &QObject::destroyed, textEdit, &QObject::deleteLater);
|
||||||
textEdit->setPlainText(QString("import %1 %3.%4; %2{}").arg(typeName.split(".").first())
|
textEdit->setPlainText(QString("import %1 %3.%4; %2{}").arg(typeName.split(".").first())
|
||||||
.arg(typeName.split(".").last())
|
.arg(typeName.split(".").last())
|
||||||
.arg(major)
|
.arg(major)
|
||||||
|
@@ -85,8 +85,8 @@ ModelTestWidget::ModelTestWidget(CallgrindWidgetHandler *handler)
|
|||||||
m_format->addItem("absolute", CostDelegate::FormatAbsolute);
|
m_format->addItem("absolute", CostDelegate::FormatAbsolute);
|
||||||
m_format->addItem("relative", CostDelegate::FormatRelative);
|
m_format->addItem("relative", CostDelegate::FormatRelative);
|
||||||
m_format->addItem("rel. to parent", CostDelegate::FormatRelativeToParent);
|
m_format->addItem("rel. to parent", CostDelegate::FormatRelativeToParent);
|
||||||
connect(m_format, SIGNAL(activated(int)),
|
connect(m_format, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
|
||||||
this, SLOT(formatChanged(int)));
|
this, &ModelTestWidget::formatChanged);
|
||||||
h->addWidget(m_format);
|
h->addWidget(m_format);
|
||||||
|
|
||||||
QDoubleSpinBox *minimumCost = new QDoubleSpinBox;
|
QDoubleSpinBox *minimumCost = new QDoubleSpinBox;
|
||||||
@@ -94,8 +94,8 @@ ModelTestWidget::ModelTestWidget(CallgrindWidgetHandler *handler)
|
|||||||
minimumCost->setRange(0, 1);
|
minimumCost->setRange(0, 1);
|
||||||
minimumCost->setDecimals(4);
|
minimumCost->setDecimals(4);
|
||||||
minimumCost->setSingleStep(0.01);
|
minimumCost->setSingleStep(0.01);
|
||||||
connect(minimumCost, SIGNAL(valueChanged(double)),
|
connect(minimumCost, &QDoubleSpinBox::valueChanged,
|
||||||
m_handler->proxyModel(), SLOT(setMinimumInclusiveCostRatio(double)));
|
m_handler->proxyModel(), &DataProxyModel::setMinimumInclusiveCostRatio);
|
||||||
minimumCost->setValue(0.0001);
|
minimumCost->setValue(0.0001);
|
||||||
h->addWidget(minimumCost);
|
h->addWidget(minimumCost);
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ MyType::MyType(QObject *parent)
|
|||||||
updateTimerText();
|
updateTimerText();
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
m_timer->setInterval(1000);
|
m_timer->setInterval(1000);
|
||||||
connect(m_timer, SIGNAL(timeout()), SLOT(updateTimerText()));
|
connect(m_timer, &QTimer::timeout, this, &MyType::updateTimerText);
|
||||||
m_timer->start();
|
m_timer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,10 +20,9 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void timeChanged(const QString &newText);
|
void timeChanged(const QString &newText);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateTimerText();
|
void updateTimerText();
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_timeText;
|
QString m_timeText;
|
||||||
QTimer *m_timer;
|
QTimer *m_timer;
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ MyType::MyType(QObject *parent)
|
|||||||
updateTimerText();
|
updateTimerText();
|
||||||
m_timer = new QTimer(this);
|
m_timer = new QTimer(this);
|
||||||
m_timer->setInterval(1000);
|
m_timer->setInterval(1000);
|
||||||
connect(m_timer, SIGNAL(timeout()), SLOT(updateTimerText()));
|
connect(m_timer, &QTimer::timeout, this, &MyType::updateTimerText);
|
||||||
m_timer->start();
|
m_timer->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,10 +20,9 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void timeChanged(const QString &newText);
|
void timeChanged(const QString &newText);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateTimerText();
|
void updateTimerText();
|
||||||
|
|
||||||
private:
|
|
||||||
QString m_timeText;
|
QString m_timeText;
|
||||||
QTimer *m_timer;
|
QTimer *m_timer;
|
||||||
|
|
||||||
|
@@ -1792,10 +1792,10 @@ namespace qobject {
|
|||||||
parent.setObjectName("A Parent");
|
parent.setObjectName("A Parent");
|
||||||
QObject child(&parent);
|
QObject child(&parent);
|
||||||
child.setObjectName("A Child");
|
child.setObjectName("A Child");
|
||||||
QObject::connect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));
|
QObject::connect(&child, &QObject::destroyed, &parent, &QObject::deleteLater);
|
||||||
QObject::connect(&child, SIGNAL(destroyed()), &child, SLOT(deleteLater()));
|
QObject::connect(&child, &QObject::destroyed, &child, &QObject::deleteLater);
|
||||||
QObject::disconnect(&child, SIGNAL(destroyed()), &parent, SLOT(deleteLater()));
|
QObject::disconnect(&child, &QObject::destroyed, &parent, &QObject::deleteLater);
|
||||||
QObject::disconnect(&child, SIGNAL(destroyed()), &child, SLOT(deleteLater()));
|
QObject::disconnect(&child, &QObject::destroyed, &child, &QObject::deleteLater);
|
||||||
child.setObjectName("A renamed Child");
|
child.setObjectName("A renamed Child");
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
// Check child "A renamed Child" QObject.
|
// Check child "A renamed Child" QObject.
|
||||||
@@ -1889,11 +1889,11 @@ namespace qobject {
|
|||||||
QObject ob1;
|
QObject ob1;
|
||||||
ob1.setObjectName("Another Object");
|
ob1.setObjectName("Another Object");
|
||||||
|
|
||||||
QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
|
QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
|
||||||
QObject::connect(&ob1, SIGNAL(destroyed()), &ob, SLOT(deleteLater()));
|
QObject::connect(&ob1, &QObject::destroyed, &ob, &QObject::deleteLater);
|
||||||
BREAK_HERE;
|
BREAK_HERE;
|
||||||
QObject::disconnect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
|
QObject::disconnect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
|
||||||
QObject::disconnect(&ob1, SIGNAL(destroyed()), &ob, SLOT(deleteLater()));
|
QObject::disconnect(&ob1, &QObject::destroyed, &ob, &QObject::deleteLater);
|
||||||
dummyStatement(&ob, &ob1);
|
dummyStatement(&ob, &ob1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1930,7 +1930,6 @@ namespace qobject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Receiver() { setObjectName("Receiver"); }
|
Receiver() { setObjectName("Receiver"); }
|
||||||
public slots:
|
|
||||||
void aSlot() {
|
void aSlot() {
|
||||||
QObject *s = sender();
|
QObject *s = sender();
|
||||||
if (s) {
|
if (s) {
|
||||||
@@ -1945,7 +1944,7 @@ namespace qobject {
|
|||||||
{
|
{
|
||||||
Sender sender;
|
Sender sender;
|
||||||
Receiver receiver;
|
Receiver receiver;
|
||||||
QObject::connect(&sender, SIGNAL(aSignal()), &receiver, SLOT(aSlot()));
|
QObject::connect(&sender, &Sender::aSignal, &receiver, &Receiver::aSlot);
|
||||||
// Break here.
|
// Break here.
|
||||||
// Single step through signal emission.
|
// Single step through signal emission.
|
||||||
sender.doEmit();
|
sender.doEmit();
|
||||||
|
@@ -222,8 +222,8 @@ void testObject(int &argc, char *argv[])
|
|||||||
QObject ob1;
|
QObject ob1;
|
||||||
ob1.setObjectName("Another Object");
|
ob1.setObjectName("Another Object");
|
||||||
|
|
||||||
QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
|
QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
|
||||||
QObject::connect(&app, SIGNAL(lastWindowClosed()), &ob, SLOT(deleteLater()));
|
QObject::connect(&app, &QGuiApplication::lastWindowClosed, &ob, &QObject::deleteLater);
|
||||||
|
|
||||||
QList<QObject *> obs;
|
QList<QObject *> obs;
|
||||||
obs.append(&ob);
|
obs.append(&ob);
|
||||||
|
@@ -222,8 +222,8 @@ void testObject(int &argc, char *argv[])
|
|||||||
QObject ob1;
|
QObject ob1;
|
||||||
ob1.setObjectName("Another Object");
|
ob1.setObjectName("Another Object");
|
||||||
|
|
||||||
QObject::connect(&ob, SIGNAL(destroyed()), &ob1, SLOT(deleteLater()));
|
QObject::connect(&ob, &QObject::destroyed, &ob1, &QObject::deleteLater);
|
||||||
QObject::connect(&app, SIGNAL(lastWindowClosed()), &ob, SLOT(deleteLater()));
|
QObject::connect(&app, &QGuiApplication::lastWindowClosed, &ob, &QObject::deleteLater);
|
||||||
|
|
||||||
QList<QObject *> obs;
|
QList<QObject *> obs;
|
||||||
obs.append(&ob);
|
obs.append(&ob);
|
||||||
|
@@ -84,7 +84,6 @@ public:
|
|||||||
: QObject(parent), m_widget(widget), m_mainWindow(mw)
|
: QObject(parent), m_widget(widget), m_mainWindow(mw)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
public slots:
|
|
||||||
void changeSelection(const QList<QTextEdit::ExtraSelection> &s)
|
void changeSelection(const QList<QTextEdit::ExtraSelection> &s)
|
||||||
{
|
{
|
||||||
if (QPlainTextEdit *ed = qobject_cast<QPlainTextEdit *>(m_widget))
|
if (QPlainTextEdit *ed = qobject_cast<QPlainTextEdit *>(m_widget))
|
||||||
@@ -230,19 +229,18 @@ void readFile(FakeVimHandler &handler, const QString &editFileName)
|
|||||||
|
|
||||||
void connectSignals(FakeVimHandler &handler, Proxy &proxy)
|
void connectSignals(FakeVimHandler &handler, Proxy &proxy)
|
||||||
{
|
{
|
||||||
QObject::connect(&handler, SIGNAL(commandBufferChanged(QString,int,int,int,QObject*)),
|
QObject::connect(&handler, &FakeVimHandler::commandBufferChanged,
|
||||||
&proxy, SLOT(changeStatusMessage(QString,int)));
|
&proxy, &Proxy::changeStatusMessage);
|
||||||
QObject::connect(&handler,
|
QObject::connect(&handler, &FakeVimHandler::selectionChanged,
|
||||||
SIGNAL(selectionChanged(QList<QTextEdit::ExtraSelection>)),
|
&proxy, &Proxy::changeSelection);
|
||||||
&proxy, SLOT(changeSelection(QList<QTextEdit::ExtraSelection>)));
|
QObject::connect(&handler, &FakeVimHandler::extraInformationChanged,
|
||||||
QObject::connect(&handler, SIGNAL(extraInformationChanged(QString)),
|
&proxy, &Proxy::changeExtraInformation);
|
||||||
&proxy, SLOT(changeExtraInformation(QString)));
|
QObject::connect(&handler, &FakeVimHandler::statusDataChanged,
|
||||||
QObject::connect(&handler, SIGNAL(statusDataChanged(QString)),
|
&proxy, &Proxy::changeStatusData);
|
||||||
&proxy, SLOT(changeStatusData(QString)));
|
QObject::connect(&handler, &FakeVimHandler::highlightMatches,
|
||||||
QObject::connect(&handler, SIGNAL(highlightMatches(QString)),
|
&proxy, &Proxy::highlightMatches);
|
||||||
&proxy, SLOT(highlightMatches(QString)));
|
QObject::connect(&handler, &FakeVimHandler::handleExCommandRequested,
|
||||||
QObject::connect(&handler, SIGNAL(handleExCommandRequested(bool*,ExCommand)),
|
&proxy, &Proxy::handleExCommand);
|
||||||
&proxy, SLOT(handleExCommand(bool*,ExCommand)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
@@ -38,12 +38,11 @@ class PluginDialog : public QWidget
|
|||||||
public:
|
public:
|
||||||
PluginDialog();
|
PluginDialog();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void updateButtons();
|
void updateButtons();
|
||||||
void openDetails(ExtensionSystem::PluginSpec *spec = nullptr);
|
void openDetails(ExtensionSystem::PluginSpec *spec = nullptr);
|
||||||
void openErrorDetails();
|
void openErrorDetails();
|
||||||
|
|
||||||
private:
|
|
||||||
ExtensionSystem::PluginView *m_view;
|
ExtensionSystem::PluginView *m_view;
|
||||||
|
|
||||||
QPushButton *m_detailsButton;
|
QPushButton *m_detailsButton;
|
||||||
|
@@ -37,7 +37,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
m_logWindow(new QPlainTextEdit)
|
m_logWindow(new QPlainTextEdit)
|
||||||
{
|
{
|
||||||
setCentralWidget(m_logWindow);
|
setCentralWidget(m_logWindow);
|
||||||
QTimer::singleShot(200, this, SLOT(test()));
|
QTimer::singleShot(200, this, &MainWindow::test);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::append(const QString &s)
|
void MainWindow::append(const QString &s)
|
||||||
@@ -54,8 +54,8 @@ void MainWindow::test()
|
|||||||
Utils::SynchronousProcess process;
|
Utils::SynchronousProcess process;
|
||||||
process.setTimeoutS(2);
|
process.setTimeoutS(2);
|
||||||
qDebug() << "Async: " << cmd << args;
|
qDebug() << "Async: " << cmd << args;
|
||||||
connect(&process, SIGNAL(stdOut(QString,bool)), this, SLOT(append(QString)));
|
connect(&process, &Utils::SynchronousProcess::stdOut, this, &MainWindow::append);
|
||||||
connect(&process, SIGNAL(stdErr(QString,bool)), this, SLOT(append(QString)));
|
connect(&process, &Utils::SynchronousProcess::stdErr, this, &MainWindow::append);
|
||||||
const Utils::SynchronousProcessResponse resp = process.run(cmd, args);
|
const Utils::SynchronousProcessResponse resp = process.run(cmd, args);
|
||||||
qDebug() << resp;
|
qDebug() << resp;
|
||||||
}
|
}
|
||||||
|
@@ -37,9 +37,6 @@ Q_OBJECT
|
|||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = 0);
|
explicit MainWindow(QWidget *parent = 0);
|
||||||
|
|
||||||
signals:
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void test();
|
void test();
|
||||||
void append(const QString &s);
|
void append(const QString &s);
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ public:
|
|||||||
delete m_connection;
|
delete m_connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleConnected()
|
void handleConnected()
|
||||||
{
|
{
|
||||||
qDebug("Error: Received unexpected connected() signal.");
|
qDebug("Error: Received unexpected connected() signal.");
|
||||||
@@ -162,7 +162,6 @@ private slots:
|
|||||||
qDebug("Error: The following test timed out: %s", testItem.description);
|
qDebug("Error: The following test timed out: %s", testItem.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
void runNextTest()
|
void runNextTest()
|
||||||
{
|
{
|
||||||
if (m_connection) {
|
if (m_connection) {
|
||||||
@@ -170,10 +169,10 @@ private:
|
|||||||
delete m_connection;
|
delete m_connection;
|
||||||
}
|
}
|
||||||
m_connection = new SshConnection(m_testSet.first().params);
|
m_connection = new SshConnection(m_testSet.first().params);
|
||||||
connect(m_connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(m_connection, &SshConnection::connected, this, &Test::handleConnected);
|
||||||
connect(m_connection, SIGNAL(disconnected()), SLOT(handleDisconnected()));
|
connect(m_connection, &SshConnection::disconnected, this, &Test::handleDisconnected);
|
||||||
connect(m_connection, SIGNAL(dataAvailable(QString)), SLOT(handleDataAvailable(QString)));
|
connect(m_connection, &SshConnection::dataAvailable, this, &Test::handleDataAvailable);
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleError(QSsh::SshError)));
|
connect(m_connection, &SshConnection::error, this, &Test::handleError);
|
||||||
const TestItem &nextItem = m_testSet.first();
|
const TestItem &nextItem = m_testSet.first();
|
||||||
m_timeoutTimer.stop();
|
m_timeoutTimer.stop();
|
||||||
m_timeoutTimer.setInterval(qMax(10000, nextItem.params.timeout * 1000));
|
m_timeoutTimer.setInterval(qMax(10000, nextItem.params.timeout * 1000));
|
||||||
|
@@ -45,7 +45,7 @@ RemoteProcessTest::RemoteProcessTest(const SshConnectionParameters ¶ms)
|
|||||||
m_state(Inactive)
|
m_state(Inactive)
|
||||||
{
|
{
|
||||||
m_timeoutTimer->setInterval(5000);
|
m_timeoutTimer->setInterval(5000);
|
||||||
connect(m_timeoutTimer, SIGNAL(timeout()), SLOT(handleTimeout()));
|
connect(m_timeoutTimer, &QTimer::timeout, this, &RemoteProcessTest::handleTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteProcessTest::~RemoteProcessTest()
|
RemoteProcessTest::~RemoteProcessTest()
|
||||||
@@ -55,14 +55,16 @@ RemoteProcessTest::~RemoteProcessTest()
|
|||||||
|
|
||||||
void RemoteProcessTest::run()
|
void RemoteProcessTest::run()
|
||||||
{
|
{
|
||||||
connect(m_remoteRunner, SIGNAL(connectionError()),
|
connect(m_remoteRunner, &SshRemoteProcessRunner::connectionError,
|
||||||
SLOT(handleConnectionError()));
|
this, &RemoteProcessTest::handleConnectionError);
|
||||||
connect(m_remoteRunner, SIGNAL(processStarted()),
|
connect(m_remoteRunner, &SshRemoteProcessRunner::processStarted,
|
||||||
SLOT(handleProcessStarted()));
|
this, &RemoteProcessTest::handleProcessStarted);
|
||||||
connect(m_remoteRunner, SIGNAL(readyReadStandardOutput()), SLOT(handleProcessStdout()));
|
connect(m_remoteRunner, &SshRemoteProcessRunner::readyReadStandardOutput,
|
||||||
connect(m_remoteRunner, SIGNAL(readyReadStandardError()), SLOT(handleProcessStderr()));
|
this, &RemoteProcessTest::handleProcessStdout);
|
||||||
connect(m_remoteRunner, SIGNAL(processClosed(int)),
|
connect(m_remoteRunner, &SshRemoteProcessRunner::readyReadStandardError,
|
||||||
SLOT(handleProcessClosed(int)));
|
this, &RemoteProcessTest::handleProcessStderr);
|
||||||
|
connect(m_remoteRunner, &SshRemoteProcessRunner::processClosed,
|
||||||
|
this, &RemoteProcessTest::handleProcessClosed);
|
||||||
|
|
||||||
std::cout << "Testing successful remote process... " << std::flush;
|
std::cout << "Testing successful remote process... " << std::flush;
|
||||||
m_state = TestingSuccess;
|
m_state = TestingSuccess;
|
||||||
@@ -91,7 +93,8 @@ void RemoteProcessTest::handleProcessStarted()
|
|||||||
SshRemoteProcessRunner * const killer = new SshRemoteProcessRunner(this);
|
SshRemoteProcessRunner * const killer = new SshRemoteProcessRunner(this);
|
||||||
killer->run("pkill -9 sleep", m_sshParams);
|
killer->run("pkill -9 sleep", m_sshParams);
|
||||||
} else if (m_state == TestingIoDevice) {
|
} else if (m_state == TestingIoDevice) {
|
||||||
connect(m_catProcess.data(), SIGNAL(readyRead()), SLOT(handleReadyRead()));
|
connect(m_catProcess.data(), &QIODevice::readyRead,
|
||||||
|
this, &RemoteProcessTest::handleReadyRead);
|
||||||
m_textStream = new QTextStream(m_catProcess.data());
|
m_textStream = new QTextStream(m_catProcess.data());
|
||||||
*m_textStream << testString();
|
*m_textStream << testString();
|
||||||
m_textStream->flush();
|
m_textStream->flush();
|
||||||
@@ -209,9 +212,10 @@ void RemoteProcessTest::handleProcessClosed(int exitStatus)
|
|||||||
std::cout << "Ok.\nTesting I/O device functionality... " << std::flush;
|
std::cout << "Ok.\nTesting I/O device functionality... " << std::flush;
|
||||||
m_state = TestingIoDevice;
|
m_state = TestingIoDevice;
|
||||||
m_sshConnection = new SshConnection(m_sshParams);
|
m_sshConnection = new SshConnection(m_sshParams);
|
||||||
connect(m_sshConnection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(m_sshConnection, &SshConnection::connected,
|
||||||
connect(m_sshConnection, SIGNAL(error(QSsh::SshError)),
|
this, &RemoteProcessTest::handleConnected);
|
||||||
SLOT(handleConnectionError()));
|
connect(m_sshConnection, &SshConnection::error,
|
||||||
|
this, &RemoteProcessTest::handleConnectionError);
|
||||||
m_sshConnection->connectToHost();
|
m_sshConnection->connectToHost();
|
||||||
m_timeoutTimer->start();
|
m_timeoutTimer->start();
|
||||||
break;
|
break;
|
||||||
@@ -280,8 +284,10 @@ void RemoteProcessTest::handleConnected()
|
|||||||
Q_ASSERT(m_state == TestingIoDevice);
|
Q_ASSERT(m_state == TestingIoDevice);
|
||||||
|
|
||||||
m_catProcess = m_sshConnection->createRemoteProcess(QString::fromLatin1("/bin/cat").toUtf8());
|
m_catProcess = m_sshConnection->createRemoteProcess(QString::fromLatin1("/bin/cat").toUtf8());
|
||||||
connect(m_catProcess.data(), SIGNAL(started()), SLOT(handleProcessStarted()));
|
connect(m_catProcess.data(), &SshRemoteProcess::started,
|
||||||
connect(m_catProcess.data(), SIGNAL(closed(int)), SLOT(handleProcessClosed(int)));
|
this, &RemoteProcessTest::handleProcessStarted);
|
||||||
|
connect(m_catProcess.data(), &SshRemoteProcess::closed,
|
||||||
|
this, &RemoteProcessTest::handleProcessClosed);
|
||||||
m_started = false;
|
m_started = false;
|
||||||
m_timeoutTimer->start();
|
m_timeoutTimer->start();
|
||||||
m_catProcess->start();
|
m_catProcess->start();
|
||||||
@@ -347,11 +353,14 @@ void RemoteProcessTest::handleSuccessfulIoTest()
|
|||||||
m_remoteStderr.clear();
|
m_remoteStderr.clear();
|
||||||
m_echoProcess = m_sshConnection->createRemoteProcess("printf " + StderrOutput + " >&2");
|
m_echoProcess = m_sshConnection->createRemoteProcess("printf " + StderrOutput + " >&2");
|
||||||
m_echoProcess->setReadChannel(QProcess::StandardError);
|
m_echoProcess->setReadChannel(QProcess::StandardError);
|
||||||
connect(m_echoProcess.data(), SIGNAL(started()), SLOT(handleProcessStarted()));
|
connect(m_echoProcess.data(), &SshRemoteProcess::started,
|
||||||
connect(m_echoProcess.data(), SIGNAL(closed(int)), SLOT(handleProcessClosed(int)));
|
this, &RemoteProcessTest::handleProcessStarted);
|
||||||
connect(m_echoProcess.data(), SIGNAL(readyRead()), SLOT(handleReadyRead()));
|
connect(m_echoProcess.data(), &SshRemoteProcess::closed,
|
||||||
connect(m_echoProcess.data(), SIGNAL(readyReadStandardError()),
|
this, &RemoteProcessTest::handleProcessClosed);
|
||||||
SLOT(handleReadyReadStderr()));
|
connect(m_echoProcess.data(), &QIODevice::readyRead,
|
||||||
|
this, &RemoteProcessTest::handleReadyRead);
|
||||||
|
connect(m_echoProcess.data(), &SshRemoteProcess::readyReadStandardError,
|
||||||
|
this, &RemoteProcessTest::handleReadyReadStderr);
|
||||||
m_echoProcess->start();
|
m_echoProcess->start();
|
||||||
m_timeoutTimer->start();
|
m_timeoutTimer->start();
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,12 @@ public:
|
|||||||
~RemoteProcessTest();
|
~RemoteProcessTest();
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
|
enum State {
|
||||||
|
Inactive, TestingSuccess, TestingFailure, TestingCrash, TestingTerminal, TestingIoDevice,
|
||||||
|
TestingProcessChannels
|
||||||
|
};
|
||||||
|
|
||||||
void handleConnectionError();
|
void handleConnectionError();
|
||||||
void handleProcessStarted();
|
void handleProcessStarted();
|
||||||
void handleProcessStdout();
|
void handleProcessStdout();
|
||||||
@@ -52,12 +57,6 @@ private slots:
|
|||||||
void handleReadyReadStderr();
|
void handleReadyReadStderr();
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
|
|
||||||
private:
|
|
||||||
enum State {
|
|
||||||
Inactive, TestingSuccess, TestingFailure, TestingCrash, TestingTerminal, TestingIoDevice,
|
|
||||||
TestingProcessChannels
|
|
||||||
};
|
|
||||||
|
|
||||||
QString testString() const;
|
QString testString() const;
|
||||||
void handleSuccessfulCrashTest();
|
void handleSuccessfulCrashTest();
|
||||||
void handleSuccessfulIoTest();
|
void handleSuccessfulIoTest();
|
||||||
|
@@ -56,9 +56,9 @@ SftpTest::~SftpTest()
|
|||||||
void SftpTest::run()
|
void SftpTest::run()
|
||||||
{
|
{
|
||||||
m_connection = new SshConnection(m_parameters.sshParams);
|
m_connection = new SshConnection(m_parameters.sshParams);
|
||||||
connect(m_connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(m_connection, &SshConnection::connected, this, &SftpTest::handleConnected);
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleError()));
|
connect(m_connection, &SshConnection::error, this, &SftpTest::handleError);
|
||||||
connect(m_connection, SIGNAL(disconnected()), SLOT(handleDisconnected()));
|
connect(m_connection, &SshConnection::disconnected, this, &SftpTest::handleDisconnected);
|
||||||
std::cout << "Connecting to host '"
|
std::cout << "Connecting to host '"
|
||||||
<< qPrintable(m_parameters.sshParams.host) << "'..." << std::endl;
|
<< qPrintable(m_parameters.sshParams.host) << "'..." << std::endl;
|
||||||
m_state = Connecting;
|
m_state = Connecting;
|
||||||
@@ -74,17 +74,17 @@ void SftpTest::handleConnected()
|
|||||||
} else {
|
} else {
|
||||||
std::cout << "Connected. Initializing SFTP channel..." << std::endl;
|
std::cout << "Connected. Initializing SFTP channel..." << std::endl;
|
||||||
m_channel = m_connection->createSftpChannel();
|
m_channel = m_connection->createSftpChannel();
|
||||||
connect(m_channel.data(), SIGNAL(initialized()), this,
|
connect(m_channel.data(), &SftpChannel::initialized,
|
||||||
SLOT(handleChannelInitialized()));
|
this, &SftpTest::handleChannelInitialized);
|
||||||
connect(m_channel.data(), SIGNAL(channelError(QString)), this,
|
connect(m_channel.data(), &SftpChannel::channelError,
|
||||||
SLOT(handleChannelInitializationFailure(QString)));
|
this, &SftpTest::handleChannelInitializationFailure);
|
||||||
connect(m_channel.data(), SIGNAL(finished(QSsh::SftpJobId,QString)),
|
connect(m_channel.data(), &SftpChannel::finished,
|
||||||
this, SLOT(handleJobFinished(QSsh::SftpJobId,QString)));
|
this, static_cast<void (SftpTest::*)(QSsh::SftpJobId, const QString &)>(
|
||||||
connect(m_channel.data(),
|
&SftpTest::handleJobFinished));
|
||||||
SIGNAL(fileInfoAvailable(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>)),
|
connect(m_channel.data(), &SftpChannel::fileInfoAvailable,
|
||||||
SLOT(handleFileInfo(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>)));
|
this, &SftpTest::handleFileInfo);
|
||||||
connect(m_channel.data(), SIGNAL(closed()), this,
|
connect(m_channel.data(), &SftpChannel::closed,
|
||||||
SLOT(handleChannelClosed()));
|
this, &SftpTest::handleChannelClosed);
|
||||||
m_state = InitializingChannel;
|
m_state = InitializingChannel;
|
||||||
m_channel->initialize();
|
m_channel->initialize();
|
||||||
}
|
}
|
||||||
|
@@ -46,16 +46,6 @@ public:
|
|||||||
~SftpTest();
|
~SftpTest();
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void handleConnected();
|
|
||||||
void handleError();
|
|
||||||
void handleDisconnected();
|
|
||||||
void handleChannelInitialized();
|
|
||||||
void handleChannelInitializationFailure(const QString &reason);
|
|
||||||
void handleJobFinished(QSsh::SftpJobId job, const QString &error);
|
|
||||||
void handleFileInfo(QSsh::SftpJobId job, const QList<QSsh::SftpFileInfo> &fileInfoList);
|
|
||||||
void handleChannelClosed();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef QHash<QSsh::SftpJobId, QString> JobMap;
|
typedef QHash<QSsh::SftpJobId, QString> JobMap;
|
||||||
typedef QSharedPointer<QFile> FilePtr;
|
typedef QSharedPointer<QFile> FilePtr;
|
||||||
@@ -65,6 +55,15 @@ private:
|
|||||||
CheckingDirAttributes, CheckingDirContents, RemovingDir, ChannelClosing, Disconnecting
|
CheckingDirAttributes, CheckingDirContents, RemovingDir, ChannelClosing, Disconnecting
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void handleConnected();
|
||||||
|
void handleError();
|
||||||
|
void handleDisconnected();
|
||||||
|
void handleChannelInitialized();
|
||||||
|
void handleChannelInitializationFailure(const QString &reason);
|
||||||
|
void handleJobFinished(QSsh::SftpJobId job, const QString &error);
|
||||||
|
void handleFileInfo(QSsh::SftpJobId job, const QList<QSsh::SftpFileInfo> &fileInfoList);
|
||||||
|
void handleChannelClosed();
|
||||||
|
|
||||||
void removeFile(const FilePtr &filePtr, bool remoteToo);
|
void removeFile(const FilePtr &filePtr, bool remoteToo);
|
||||||
void removeFiles(bool remoteToo);
|
void removeFiles(bool remoteToo);
|
||||||
QString cmpFileName(const QString &localFileName) const;
|
QString cmpFileName(const QString &localFileName) const;
|
||||||
|
@@ -44,8 +44,8 @@ using namespace QSsh;
|
|||||||
SftpFsWindow::SftpFsWindow(QWidget *parent) : QDialog(parent), m_ui(new Ui::Window)
|
SftpFsWindow::SftpFsWindow(QWidget *parent) : QDialog(parent), m_ui(new Ui::Window)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
connect(m_ui->connectButton, SIGNAL(clicked()), SLOT(connectToHost()));
|
connect(m_ui->connectButton, &QAbstractButton::clicked, this, &SftpFsWindow::connectToHost);
|
||||||
connect(m_ui->downloadButton, SIGNAL(clicked()), SLOT(downloadFile()));
|
connect(m_ui->downloadButton, &QAbstractButton::clicked, this, &SftpFsWindow::downloadFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
SftpFsWindow::~SftpFsWindow()
|
SftpFsWindow::~SftpFsWindow()
|
||||||
@@ -67,11 +67,12 @@ void SftpFsWindow::connectToHost()
|
|||||||
m_fsModel = new SftpFileSystemModel(this);
|
m_fsModel = new SftpFileSystemModel(this);
|
||||||
if (m_ui->useModelTesterCheckBox->isChecked())
|
if (m_ui->useModelTesterCheckBox->isChecked())
|
||||||
new ModelTest(m_fsModel, this);
|
new ModelTest(m_fsModel, this);
|
||||||
connect(m_fsModel, SIGNAL(sftpOperationFailed(QString)),
|
connect(m_fsModel, &SftpFileSystemModel::sftpOperationFailed,
|
||||||
SLOT(handleSftpOperationFailed(QString)));
|
this, &SftpFsWindow::handleSftpOperationFailed);
|
||||||
connect(m_fsModel, SIGNAL(connectionError(QString)), SLOT(handleConnectionError(QString)));
|
connect(m_fsModel, &SftpFileSystemModel::connectionError,
|
||||||
connect(m_fsModel, SIGNAL(sftpOperationFinished(QSsh::SftpJobId,QString)),
|
this, &SftpFsWindow::handleConnectionError);
|
||||||
SLOT(handleSftpOperationFinished(QSsh::SftpJobId,QString)));
|
connect(m_fsModel, &SftpFileSystemModel::sftpOperationFinished,
|
||||||
|
this, &SftpFsWindow::handleSftpOperationFinished);
|
||||||
m_fsModel->setSshConnection(sshParams);
|
m_fsModel->setSshConnection(sshParams);
|
||||||
m_ui->fsView->setModel(m_fsModel);
|
m_ui->fsView->setModel(m_fsModel);
|
||||||
}
|
}
|
||||||
|
@@ -40,14 +40,13 @@ public:
|
|||||||
SftpFsWindow(QWidget *parent = 0);
|
SftpFsWindow(QWidget *parent = 0);
|
||||||
~SftpFsWindow();
|
~SftpFsWindow();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void connectToHost();
|
void connectToHost();
|
||||||
void downloadFile();
|
void downloadFile();
|
||||||
void handleConnectionError(const QString &errorMessage);
|
void handleConnectionError(const QString &errorMessage);
|
||||||
void handleSftpOperationFailed(const QString &errorMessage);
|
void handleSftpOperationFailed(const QString &errorMessage);
|
||||||
void handleSftpOperationFinished(QSsh::SftpJobId jobId, const QString &error);
|
void handleSftpOperationFinished(QSsh::SftpJobId jobId, const QString &error);
|
||||||
|
|
||||||
private:
|
|
||||||
QSsh::SftpFileSystemModel *m_fsModel;
|
QSsh::SftpFileSystemModel *m_fsModel;
|
||||||
Ui::Window *m_ui;
|
Ui::Window *m_ui;
|
||||||
};
|
};
|
||||||
|
@@ -42,9 +42,9 @@ Shell::Shell(const SshConnectionParameters ¶meters, QObject *parent)
|
|||||||
m_connection(new SshConnection(parameters)),
|
m_connection(new SshConnection(parameters)),
|
||||||
m_stdin(new QFile(this))
|
m_stdin(new QFile(this))
|
||||||
{
|
{
|
||||||
connect(m_connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(m_connection, &SshConnection::connected, this, &Shell::handleConnected);
|
||||||
connect(m_connection, SIGNAL(dataAvailable(QString)), SLOT(handleShellMessage(QString)));
|
connect(m_connection, &SshConnection::dataAvailable, this, &Shell::handleShellMessage);
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
connect(m_connection, &SshConnection::error, this, &Shell::handleConnectionError);
|
||||||
}
|
}
|
||||||
|
|
||||||
Shell::~Shell()
|
Shell::~Shell()
|
||||||
@@ -77,17 +77,19 @@ void Shell::handleShellMessage(const QString &message)
|
|||||||
void Shell::handleConnected()
|
void Shell::handleConnected()
|
||||||
{
|
{
|
||||||
m_shell = m_connection->createRemoteShell();
|
m_shell = m_connection->createRemoteShell();
|
||||||
connect(m_shell.data(), SIGNAL(started()), SLOT(handleShellStarted()));
|
connect(m_shell.data(), &SshRemoteProcess::started, this, &Shell::handleShellStarted);
|
||||||
connect(m_shell.data(), SIGNAL(readyReadStandardOutput()), SLOT(handleRemoteStdout()));
|
connect(m_shell.data(), &SshRemoteProcess::readyReadStandardOutput,
|
||||||
connect(m_shell.data(), SIGNAL(readyReadStandardError()), SLOT(handleRemoteStderr()));
|
this, &Shell::handleRemoteStdout);
|
||||||
connect(m_shell.data(), SIGNAL(closed(int)), SLOT(handleChannelClosed(int)));
|
connect(m_shell.data(), &SshRemoteProcess::readyReadStandardError,
|
||||||
|
this, &Shell::handleRemoteStderr);
|
||||||
|
connect(m_shell.data(), &SshRemoteProcess::closed, this, &Shell::handleChannelClosed);
|
||||||
m_shell->start();
|
m_shell->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shell::handleShellStarted()
|
void Shell::handleShellStarted()
|
||||||
{
|
{
|
||||||
QSocketNotifier * const notifier = new QSocketNotifier(0, QSocketNotifier::Read, this);
|
QSocketNotifier * const notifier = new QSocketNotifier(0, QSocketNotifier::Read, this);
|
||||||
connect(notifier, SIGNAL(activated(int)), SLOT(handleStdin()));
|
connect(notifier, &QSocketNotifier::activated, this, &Shell::handleStdin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shell::handleRemoteStdout()
|
void Shell::handleRemoteStdout()
|
||||||
|
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
void handleConnectionError();
|
void handleConnectionError();
|
||||||
void handleRemoteStdout();
|
void handleRemoteStdout();
|
||||||
@@ -59,7 +59,6 @@ private slots:
|
|||||||
void handleShellStarted();
|
void handleShellStarted();
|
||||||
void handleStdin();
|
void handleStdin();
|
||||||
|
|
||||||
private:
|
|
||||||
QSsh::SshConnection *m_connection;
|
QSsh::SshConnection *m_connection;
|
||||||
QSharedPointer<QSsh::SshRemoteProcess> m_shell;
|
QSharedPointer<QSsh::SshRemoteProcess> m_shell;
|
||||||
QFile * const m_stdin;
|
QFile * const m_stdin;
|
||||||
|
@@ -47,8 +47,8 @@ DirectTunnel::DirectTunnel(const SshConnectionParameters ¶meters, QObject *p
|
|||||||
m_targetServer(new QTcpServer(this)),
|
m_targetServer(new QTcpServer(this)),
|
||||||
m_expectingChannelClose(false)
|
m_expectingChannelClose(false)
|
||||||
{
|
{
|
||||||
connect(m_connection, SIGNAL(connected()), SLOT(handleConnected()));
|
connect(m_connection, &SshConnection::connected, this, &DirectTunnel::handleConnected);
|
||||||
connect(m_connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
|
connect(m_connection, &SshConnection::error, this, &DirectTunnel::handleConnectionError);
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectTunnel::~DirectTunnel()
|
DirectTunnel::~DirectTunnel()
|
||||||
@@ -77,14 +77,16 @@ void DirectTunnel::handleConnected()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_targetPort = m_targetServer->serverPort();
|
m_targetPort = m_targetServer->serverPort();
|
||||||
connect(m_targetServer, SIGNAL(newConnection()), SLOT(handleNewConnection()));
|
connect(m_targetServer, &QTcpServer::newConnection, this, &DirectTunnel::handleNewConnection);
|
||||||
|
|
||||||
m_tunnel = m_connection->createDirectTunnel(QLatin1String("localhost"), 1024, // made-up values
|
m_tunnel = m_connection->createDirectTunnel(QLatin1String("localhost"), 1024, // made-up values
|
||||||
QLatin1String("localhost"), m_targetPort);
|
QLatin1String("localhost"), m_targetPort);
|
||||||
connect(m_tunnel.data(), SIGNAL(initialized()), SLOT(handleInitialized()));
|
connect(m_tunnel.data(), &SshDirectTcpIpTunnel::initialized,
|
||||||
connect(m_tunnel.data(), SIGNAL(error(QString)), SLOT(handleTunnelError(QString)));
|
this, &DirectTunnel::handleInitialized);
|
||||||
connect(m_tunnel.data(), SIGNAL(readyRead()), SLOT(handleServerData()));
|
connect(m_tunnel.data(), &SshDirectTcpIpTunnel::error,
|
||||||
connect(m_tunnel.data(), SIGNAL(aboutToClose()), SLOT(handleTunnelClosed()));
|
this, &DirectTunnel::handleTunnelError);
|
||||||
|
connect(m_tunnel.data(), &QIODevice::readyRead, this, &DirectTunnel::handleServerData);
|
||||||
|
connect(m_tunnel.data(), &QIODevice::aboutToClose, this, &DirectTunnel::handleTunnelClosed);
|
||||||
|
|
||||||
std::cout << "Initializing tunnel..." << std::endl;
|
std::cout << "Initializing tunnel..." << std::endl;
|
||||||
m_tunnel->initialize();
|
m_tunnel->initialize();
|
||||||
@@ -95,7 +97,7 @@ void DirectTunnel::handleInitialized()
|
|||||||
std::cout << "Writing data into the tunnel..." << std::endl;
|
std::cout << "Writing data into the tunnel..." << std::endl;
|
||||||
m_tunnel->write(TestData);
|
m_tunnel->write(TestData);
|
||||||
QTimer * const timeoutTimer = new QTimer(this);
|
QTimer * const timeoutTimer = new QTimer(this);
|
||||||
connect(timeoutTimer, SIGNAL(timeout()), SLOT(handleTimeout()));
|
connect(timeoutTimer, &QTimer::timeout, this, &DirectTunnel::handleTimeout);
|
||||||
timeoutTimer->start(10000);
|
timeoutTimer->start(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +133,10 @@ void DirectTunnel::handleNewConnection()
|
|||||||
{
|
{
|
||||||
m_targetSocket = m_targetServer->nextPendingConnection();
|
m_targetSocket = m_targetServer->nextPendingConnection();
|
||||||
m_targetServer->close();
|
m_targetServer->close();
|
||||||
connect(m_targetSocket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(handleSocketError()));
|
connect(m_targetSocket,
|
||||||
connect(m_targetSocket, SIGNAL(readyRead()), SLOT(handleClientData()));
|
static_cast<void (QAbstractSocket::*)(QAbstractSocket::SocketError)>(&QAbstractSocket::error),
|
||||||
|
this, &DirectTunnel::handleSocketError);
|
||||||
|
connect(m_targetSocket, &QIODevice::readyRead, this, &DirectTunnel::handleClientData);
|
||||||
handleClientData();
|
handleClientData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void finished(int errorCode);
|
void finished(int errorCode);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
void handleConnectionError();
|
void handleConnectionError();
|
||||||
void handleServerData();
|
void handleServerData();
|
||||||
@@ -63,7 +63,6 @@ private slots:
|
|||||||
void handleClientData();
|
void handleClientData();
|
||||||
void handleTimeout();
|
void handleTimeout();
|
||||||
|
|
||||||
private:
|
|
||||||
QSsh::SshConnection * const m_connection;
|
QSsh::SshConnection * const m_connection;
|
||||||
QSharedPointer<QSsh::SshDirectTcpIpTunnel> m_tunnel;
|
QSharedPointer<QSsh::SshDirectTcpIpTunnel> m_tunnel;
|
||||||
QTcpServer * const m_targetServer;
|
QTcpServer * const m_targetServer;
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void finished(int exitCode);
|
void finished(int exitCode);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
void handleConnectionError(QSsh::SshError error);
|
void handleConnectionError(QSsh::SshError error);
|
||||||
void handleInitialized();
|
void handleInitialized();
|
||||||
@@ -60,7 +60,6 @@ private slots:
|
|||||||
void handleNewConnection();
|
void handleNewConnection();
|
||||||
void handleSocketError();
|
void handleSocketError();
|
||||||
|
|
||||||
private:
|
|
||||||
QSsh::SshConnection * const m_connection;
|
QSsh::SshConnection * const m_connection;
|
||||||
QSharedPointer<QSsh::SshTcpIpForwardServer> m_server;
|
QSharedPointer<QSsh::SshTcpIpForwardServer> m_server;
|
||||||
QTcpSocket *m_targetSocket;
|
QTcpSocket *m_targetSocket;
|
||||||
|
Reference in New Issue
Block a user