diff options
| author | Pekka Vuorela <pvuorela@iki.fi> | 2025-11-28 11:17:46 +0200 |
|---|---|---|
| committer | Pekka Vuorela <pvuorela@iki.fi> | 2025-12-02 13:51:54 +0200 |
| commit | 3450d003f13b7ff1ff11589b0abaf98533d74f1b (patch) | |
| tree | d2853c1e18bb7325060cb0ede9f58580e9217c6f | |
| parent | 2781f486b27b80c0bf29bc9bc1a6bbf5b4d29431 (diff) | |
Remove public cmake dbus declaration and usage in unit test
Especially the part at the end of the unit test using
QMailStoreNullImplementation seemed pointless when nothing was
really checked from it.
For the rest, the account addition is already tested so just
removing the whole test method.
Change-Id: Iec2110df67e66514f4853ea985e8e38fe198f37a
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: <matti.viljanen@kapsi.fi>
Reviewed-by: Pekka Vuorela <pvuorela@iki.fi>
| -rw-r--r-- | src/libraries/qmfclient/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | tests/tst_qmailstore/tst_qmailstore.cpp | 35 |
2 files changed, 2 insertions, 37 deletions
diff --git a/src/libraries/qmfclient/CMakeLists.txt b/src/libraries/qmfclient/CMakeLists.txt index 9eb339aa..c514f689 100644 --- a/src/libraries/qmfclient/CMakeLists.txt +++ b/src/libraries/qmfclient/CMakeLists.txt @@ -137,8 +137,8 @@ add_library(QmfClient SHARED ${SRC} ${GENERATED_SOURCES} ${PUBLIC_HEADERS} ${PRI target_compile_definitions(QmfClient PRIVATE QMF_INTERNAL) target_include_directories(QmfClient PRIVATE support) target_link_libraries(QmfClient - PRIVATE Qt6::Sql Qt6::Network Qt6::Core5Compat - PUBLIC Qt6::Core Qt6::DBus) + PRIVATE Qt6::Sql Qt6::Network Qt6::Core5Compat Qt6::DBus + PUBLIC Qt6::Core) set_target_properties(QmfClient PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION} diff --git a/tests/tst_qmailstore/tst_qmailstore.cpp b/tests/tst_qmailstore/tst_qmailstore.cpp index 534d8b7d..287befa7 100644 --- a/tests/tst_qmailstore/tst_qmailstore.cpp +++ b/tests/tst_qmailstore/tst_qmailstore.cpp @@ -38,7 +38,6 @@ #include <qmailaccount.h> #include <qmailstore.h> #include <qmailnamespace.h> -#include <qmailstoreimplementation_p.h> /* Unit test for QMailStore class. @@ -74,7 +73,6 @@ private slots: void remove1000Messages(); void removeMessageWithInResponse(); void message(); - void implementationbase(); }; #define CRLF "\015\012" @@ -1793,39 +1791,6 @@ void tst_QMailStore::message() QCOMPARE(QMailStore::instance()->message(msg2.id()).partCount(), 2u); } -void tst_QMailStore::implementationbase() -{ - QMailAccount account1; - account1.setName("Account 10"); - account1.setFromAddress(QMailAddress("Account 10", "account10@example.org")); - account1.setStatus(QMailAccount::SynchronizationEnabled, true); - account1.setStatus(QMailAccount::Synchronized, false); - account1.setStandardFolder(QMailFolder::SentFolder, QMailFolderId(333)); - account1.setStandardFolder(QMailFolder::TrashFolder, QMailFolderId(666)); - account1.setCustomField("question", "What is your dog's name?"); - account1.setCustomField("answer", "Fido"); - - QMailAccountConfiguration config1; - config1.addServiceConfiguration("imap4"); - if (QMailAccountConfiguration::ServiceConfiguration *svcCfg = &config1.serviceConfiguration("imap4")) { - svcCfg->setValue("server", "mail.example.org"); - svcCfg->setValue("username", "account10"); - } - config1.addServiceConfiguration("smtp"); - if (QMailAccountConfiguration::ServiceConfiguration *svcCfg = &config1.serviceConfiguration("smtp")) { - svcCfg->setValue("server", "mail.example.org"); - svcCfg->setValue("username", "account10"); - } - QVERIFY(QMailStore::instance()->addAccount(&account1, &config1)); - - QMailStoreNullImplementation impl(QMailStore::instance()); - QVERIFY(!impl.asynchronousEmission()); - impl.flushIpcNotifications(); - - impl.setRetrievalInProgress(QMailAccountIdList()<<account1.id()); - impl.notifyRetrievalInProgress(QMailAccountIdList()<<account1.id()); -} - QTEST_MAIN(tst_QMailStore) #include "tst_qmailstore.moc" |
