Changeset View
Changeset View
Standalone View
Standalone View
tests/khotnewstuff_test.h
- This file was moved from tests/knewstuff2_test.h.
Context not available. | |||||
19 | #ifndef KNEWSTUFF2_TEST_TEST_H | 19 | #ifndef KNEWSTUFF2_TEST_TEST_H | ||
---|---|---|---|---|---|
20 | #define KNEWSTUFF2_TEST_TEST_H | 20 | #define KNEWSTUFF2_TEST_TEST_H | ||
21 | 21 | | |||
22 | #include <knewstuff2/core/provider.h> | 22 | #include <KNSCore/Provider> | ||
23 | #include <knewstuff2/core/entry.h> | 23 | #include <KNSCore/EntryInternal> | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QStandardItemModel> | ||||
26 | 27 | | |||
27 | namespace KNS | 28 | namespace KNSCore | ||
28 | { | 29 | { | ||
29 | class CoreEngine; | 30 | class Engine; | ||
30 | } | 31 | } | ||
31 | 32 | | |||
32 | class KNewStuff2Test : public QObject | 33 | class KNewStuff2Test : public QObject | ||
33 | { | 34 | { | ||
34 | Q_OBJECT | 35 | Q_OBJECT | ||
36 | Q_PROPERTY(bool testAll READ testAll WRITE setTestAll NOTIFY testAllChanged) | ||||
35 | public: | 37 | public: | ||
36 | KNewStuff2Test(); | 38 | KNewStuff2Test(const QString& configFile); | ||
39 | | ||||
37 | void setTestAll(bool testall); | 40 | void setTestAll(bool testall); | ||
38 | void entryTest(); | 41 | bool testAll() const; | ||
39 | void providerTest(); | 42 | Q_SIGNAL void testAllChanged(); | ||
40 | void engineTest(); | 43 | | ||
44 | Q_INVOKABLE void entryTest(); | ||||
45 | Q_INVOKABLE void providerTest(); | ||||
46 | Q_INVOKABLE void engineTest(); | ||||
47 | | ||||
48 | Q_INVOKABLE QObject* messages(); | ||||
49 | void addMessage(const QString& message, const QString& iconName = QStringLiteral()); | ||||
50 | | ||||
41 | public Q_SLOTS: | 51 | public Q_SLOTS: | ||
42 | void slotProviderLoaded(KNS::Provider *provider); | 52 | void slotProvidersLoaded(); | ||
43 | void slotProvidersFailed(); | 53 | void slotEngineError(const QString& error); | ||
44 | void slotEntryLoaded(KNS::Entry *entry, const KNS::Feed *feed, const KNS::Provider *provider); | 54 | void slotEntriesLoaded(const KNSCore::EntryInternal::List &entries); | ||
45 | void slotEntriesFailed(); | | |||
46 | void slotEntriesFinished(); | | |||
47 | void slotPayloadLoaded(QUrl payload); | | |||
48 | void slotPayloadFailed(); | | |||
49 | void slotInstallationFinished(); | 55 | void slotInstallationFinished(); | ||
50 | void slotInstallationFailed(); | 56 | | ||
51 | private: | 57 | private: | ||
52 | void quitTest(); | 58 | KNSCore::Engine *m_engine; | ||
53 | KNS::CoreEngine *m_engine; | | |||
54 | bool m_testall; | 59 | bool m_testall; | ||
60 | QString m_configFile; | ||||
61 | QStandardItemModel* m_messages; | ||||
55 | }; | 62 | }; | ||
56 | 63 | | |||
57 | #endif | 64 | #endif | ||
Context not available. |