forked from qt-creator/qt-creator
Remove unused SshConnection::dataAvailable() signal
Change-Id: I1e12965931a7623ed03d0e703b275eb02ddaf6c7 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -127,7 +127,6 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void connected();
|
void connected();
|
||||||
void disconnected();
|
void disconnected();
|
||||||
void dataAvailable(const QString &message);
|
|
||||||
void errorOccurred();
|
void errorOccurred();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -183,13 +183,10 @@ void tst_Ssh::errorHandling()
|
|||||||
SshConnection connection(params);
|
SshConnection connection(params);
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
bool disconnected = false;
|
bool disconnected = false;
|
||||||
QString dataReceived;
|
|
||||||
QObject::connect(&connection, &SshConnection::connected, &loop, &QEventLoop::quit);
|
QObject::connect(&connection, &SshConnection::connected, &loop, &QEventLoop::quit);
|
||||||
QObject::connect(&connection, &SshConnection::errorOccurred, &loop, &QEventLoop::quit);
|
QObject::connect(&connection, &SshConnection::errorOccurred, &loop, &QEventLoop::quit);
|
||||||
QObject::connect(&connection, &SshConnection::disconnected,
|
QObject::connect(&connection, &SshConnection::disconnected,
|
||||||
[&disconnected] { disconnected = true; });
|
[&disconnected] { disconnected = true; });
|
||||||
QObject::connect(&connection, &SshConnection::dataAvailable,
|
|
||||||
[&dataReceived](const QString &data) { dataReceived = data; });
|
|
||||||
QTimer timer;
|
QTimer timer;
|
||||||
QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
|
QObject::connect(&timer, &QTimer::timeout, &loop, &QEventLoop::quit);
|
||||||
timer.setSingleShot(true);
|
timer.setSingleShot(true);
|
||||||
@@ -202,7 +199,6 @@ void tst_Ssh::errorHandling()
|
|||||||
: SshConnection::Unconnected);
|
: SshConnection::Unconnected);
|
||||||
QCOMPARE(connection.errorString().isEmpty(), expectConnected);
|
QCOMPARE(connection.errorString().isEmpty(), expectConnected);
|
||||||
QVERIFY(!disconnected);
|
QVERIFY(!disconnected);
|
||||||
QVERIFY2(dataReceived.isEmpty(), qPrintable(dataReceived));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_Ssh::pristineConnectionObject()
|
void tst_Ssh::pristineConnectionObject()
|
||||||
|
|||||||
Reference in New Issue
Block a user