[network/ruqola] src/rocketchatrestapi-qt: Rename class

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit e3a6228b1295166ccff3dc4587606a972aa1865b by Laurent Montel.
Committed on 06/08/2026 at 17:30.
Pushed by mlaurent into branch 'master'.

Rename class

R  +11   -11   src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.cpp [from: src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.cpp - 060% similarity]
R  +3    -3    src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.h [from: src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.h - 058% similarity]
R  +11   -11   src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.cpp [from: src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.cpp - 066% similarity]
R  +3    -3    src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.h [from: src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.h - 079% similarity]

https://invent.kde.org/network/ruqola/-/commit/e3a6228b1295166ccff3dc4587606a972aa1865b

diff --git a/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.cpp b/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.cpp
similarity index 60%
rename from src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.cpp
rename to src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.cpp
index 5744cb9c51..f2955d7f6f 100644
--- a/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.cpp
+++ b/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.cpp
@@ -4,23 +4,23 @@
    SPDX-License-Identifier: LGPL-2.0-or-later
 */
 
-#include "getusersofroomwithoutkeytest.h"
-using namespace Qt::Literals::StringLiterals;
+#include "getusersofroomwithoutkeyjobtest.h"
 
-#include "e2e/getusersofroomwithoutkey.h"
+#include "e2e/getusersofroomwithoutkeyjob.h"
 #include "restapimethod.h"
 #include <QTest>
 
-QTEST_GUILESS_MAIN(GetUsersOfRoomWithoutKeyTest)
+QTEST_GUILESS_MAIN(GetUsersOfRoomWithoutKeyJobTest)
 using namespace RocketChatRestApi;
-GetUsersOfRoomWithoutKeyTest::GetUsersOfRoomWithoutKeyTest(QObject *parent)
+using namespace Qt::Literals::StringLiterals;
+GetUsersOfRoomWithoutKeyJobTest::GetUsersOfRoomWithoutKeyJobTest(QObject *parent)
     : QObject(parent)
 {
 }
 
-void GetUsersOfRoomWithoutKeyTest::shouldHaveDefaultValue()
+void GetUsersOfRoomWithoutKeyJobTest::shouldHaveDefaultValue()
 {
-    GetUsersOfRoomWithoutKey job;
+    GetUsersOfRoomWithoutKeyJob job;
     QVERIFY(!job.restApiMethod());
     QVERIFY(!job.networkAccessManager());
     QVERIFY(!job.start());
@@ -29,15 +29,15 @@ void GetUsersOfRoomWithoutKeyTest::shouldHaveDefaultValue()
     QVERIFY(!job.hasQueryParameterSupport());
 }
 
-void GetUsersOfRoomWithoutKeyTest::shouldGenerateRequest()
+void GetUsersOfRoomWithoutKeyJobTest::shouldGenerateRequest()
 {
-    GetUsersOfRoomWithoutKey job;
+    GetUsersOfRoomWithoutKeyJob job;
     job.setRoomId("foo"_ba);
     RestApiMethod method;
     method.setServerUrl(u"http://www.kde.org"_s);
     job.setRestApiMethod(&method);
     const QNetworkRequest request = job.request();
-    QCOMPARE(request.url(), QUrl(u"http://www.kde.org/api/v1/e2e.getUsersOfRoomWithoutKey?roomId=foo"_s));
+    QCOMPARE(request.url(), QUrl(u"http://www.kde.org/api/v1/e2e.getUsersOfRoomWithoutKey?rid=foo"_s));
 }
 
-#include "moc_getusersofroomwithoutkeytest.cpp"
+#include "moc_getusersofroomwithoutkeyjobtest.cpp"
diff --git a/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.h b/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.h
similarity index 58%
rename from src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.h
rename to src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.h
index 518eda83a6..a4352cea3c 100644
--- a/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeytest.h
+++ b/src/rocketchatrestapi-qt/autotests/getusersofroomwithoutkeyjobtest.h
@@ -8,12 +8,12 @@
 
 #include <QObject>
 
-class GetUsersOfRoomWithoutKeyTest : public QObject
+class GetUsersOfRoomWithoutKeyJobTest : public QObject
 {
     Q_OBJECT
 public:
-    explicit GetUsersOfRoomWithoutKeyTest(QObject *parent = nullptr);
-    ~GetUsersOfRoomWithoutKeyTest() override = default;
+    explicit GetUsersOfRoomWithoutKeyJobTest(QObject *parent = nullptr);
+    ~GetUsersOfRoomWithoutKeyJobTest() override = default;
 private Q_SLOTS:
     void shouldHaveDefaultValue();
     void shouldGenerateRequest();
diff --git a/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.cpp b/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.cpp
similarity index 66%
rename from src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.cpp
rename to src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.cpp
index 519061daf2..19c74c9750 100644
--- a/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.cpp
+++ b/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.cpp
@@ -4,7 +4,7 @@
    SPDX-License-Identifier: LGPL-2.0-or-later
 */
 
-#include "getusersofroomwithoutkey.h"
+#include "getusersofroomwithoutkeyjob.h"
 
 #include "restapimethod.h"
 #include <QJsonDocument>
@@ -14,14 +14,14 @@
 
 using namespace RocketChatRestApi;
 using namespace Qt::Literals::StringLiterals;
-GetUsersOfRoomWithoutKey::GetUsersOfRoomWithoutKey(QObject *parent)
+GetUsersOfRoomWithoutKeyJob::GetUsersOfRoomWithoutKeyJob(QObject *parent)
     : RestApiAbstractJob(parent)
 {
 }
 
-GetUsersOfRoomWithoutKey::~GetUsersOfRoomWithoutKey() = default;
+GetUsersOfRoomWithoutKeyJob::~GetUsersOfRoomWithoutKeyJob() = default;
 
-bool GetUsersOfRoomWithoutKey::start()
+bool GetUsersOfRoomWithoutKeyJob::start()
 {
     if (!canStart()) {
         deleteLater();
@@ -34,7 +34,7 @@ bool GetUsersOfRoomWithoutKey::start()
     return true;
 }
 
-void GetUsersOfRoomWithoutKey::onGetRequestResponse(const QString &replyErrorString, const QJsonDocument &replyJson)
+void GetUsersOfRoomWithoutKeyJob::onGetRequestResponse(const QString &replyErrorString, const QJsonDocument &replyJson)
 {
     const QJsonObject replyObject = replyJson.object();
 
@@ -47,21 +47,21 @@ void GetUsersOfRoomWithoutKey::onGetRequestResponse(const QString &replyErrorStr
     }
 }
 
-QByteArray GetUsersOfRoomWithoutKey::roomId() const
+QByteArray GetUsersOfRoomWithoutKeyJob::roomId() const
 {
     return mRoomId;
 }
 
-void GetUsersOfRoomWithoutKey::setRoomId(const QByteArray &newRoomId)
+void GetUsersOfRoomWithoutKeyJob::setRoomId(const QByteArray &newRoomId)
 {
     mRoomId = newRoomId;
 }
 
-QNetworkRequest GetUsersOfRoomWithoutKey::request() const
+QNetworkRequest GetUsersOfRoomWithoutKeyJob::request() const
 {
     QUrl url = mRestApiMethod->generateUrl(RestApiUtil::RestApiUrlType::E2EGetUsersOfRoomWithoutKey);
     QUrlQuery queryUrl;
-    queryUrl.addQueryItem(u"roomId"_s, QLatin1StringView(mRoomId));
+    queryUrl.addQueryItem(u"rid"_s, QLatin1StringView(mRoomId));
     addQueryParameter(queryUrl);
     url.setQuery(queryUrl);
 
@@ -71,9 +71,9 @@ QNetworkRequest GetUsersOfRoomWithoutKey::request() const
     return request;
 }
 
-bool GetUsersOfRoomWithoutKey::requireHttpAuthentication() const
+bool GetUsersOfRoomWithoutKeyJob::requireHttpAuthentication() const
 {
     return true;
 }
 
-#include "moc_getusersofroomwithoutkey.cpp"
+#include "moc_getusersofroomwithoutkeyjob.cpp"
diff --git a/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.h b/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.h
similarity index 79%
rename from src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.h
rename to src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.h
index 1ae04bc341..35ae7c616f 100644
--- a/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkey.h
+++ b/src/rocketchatrestapi-qt/e2e/getusersofroomwithoutkeyjob.h
@@ -11,12 +11,12 @@
 
 namespace RocketChatRestApi
 {
-class LIBROCKETCHATRESTAPI_QT_EXPORT GetUsersOfRoomWithoutKey : public RestApiAbstractJob
+class LIBROCKETCHATRESTAPI_QT_EXPORT GetUsersOfRoomWithoutKeyJob : public RestApiAbstractJob
 {
     Q_OBJECT
 public:
-    explicit GetUsersOfRoomWithoutKey(QObject *parent = nullptr);
-    ~GetUsersOfRoomWithoutKey() override;
+    explicit GetUsersOfRoomWithoutKeyJob(QObject *parent = nullptr);
+    ~GetUsersOfRoomWithoutKeyJob() override;
 
     [[nodiscard]] bool start() override;
     [[nodiscard]] bool requireHttpAuthentication() const override;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.