Commit adb99336 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use namespace

parent e790da7c
......@@ -50,24 +50,24 @@ KCMAkregatorUserFeedBackConfig::KCMAkregatorUserFeedBackConfig(QWidget *parent,
connect(mUserFeedbackWidget, &KUserFeedback::FeedbackConfigWidget::configurationChanged, this, &KCMAkregatorUserFeedBackConfig::markAsChanged);
lay->addWidget(mUserFeedbackWidget);
mUserFeedbackWidget->setFeedbackProvider(UserFeedBackManager::self()->userFeedbackProvider());
mUserFeedbackWidget->setFeedbackProvider(Akregator::UserFeedBackManager::self()->userFeedbackProvider());
}
void KCMAkregatorUserFeedBackConfig::save()
{
UserFeedBackManager::self()->userFeedbackProvider()->setTelemetryMode(mUserFeedbackWidget->telemetryMode());
UserFeedBackManager::self()->userFeedbackProvider()->setSurveyInterval(mUserFeedbackWidget->surveyInterval());
Akregator::UserFeedBackManager::self()->userFeedbackProvider()->setTelemetryMode(mUserFeedbackWidget->telemetryMode());
Akregator::UserFeedBackManager::self()->userFeedbackProvider()->setSurveyInterval(mUserFeedbackWidget->surveyInterval());
}
void KCMAkregatorUserFeedBackConfig::load()
{
mUserFeedbackWidget->setFeedbackProvider(UserFeedBackManager::self()->userFeedbackProvider());
mUserFeedbackWidget->setFeedbackProvider(Akregator::UserFeedBackManager::self()->userFeedbackProvider());
}
void KCMAkregatorUserFeedBackConfig::defaults()
{
//TODO fixme default values
mUserFeedbackWidget->setFeedbackProvider(UserFeedBackManager::self()->userFeedbackProvider());
mUserFeedbackWidget->setFeedbackProvider(Akregator::UserFeedBackManager::self()->userFeedbackProvider());
}
#include "akregator_config_userfeedback.moc"
......@@ -27,7 +27,7 @@
#include <KUserFeedback/StartCountSource>
#include <KUserFeedback/UsageTimeSource>
#include <KUserFeedback/LocaleInfoSource>
using namespace Akregator;
AkregatorUserFeedbackProvider::AkregatorUserFeedbackProvider(QObject *parent)
: KUserFeedback::Provider(parent)
{
......
......@@ -23,7 +23,7 @@
#include <KUserFeedback/Provider>
#include "akregatorinterfaces_export.h"
namespace Akregator {
class AKREGATORINTERFACES_EXPORT AkregatorUserFeedbackProvider : public KUserFeedback::Provider
{
Q_OBJECT
......@@ -31,5 +31,5 @@ public:
explicit AkregatorUserFeedbackProvider(QObject *parent = nullptr);
~AkregatorUserFeedbackProvider();
};
}
#endif // AKREGATORUSERFEEDBACKPROVIDER_H
......@@ -19,15 +19,7 @@
#include "akregatoruserfeedbackprovider.h"
#include "userfeedbackmanager.h"
#include <KUserFeedback/ApplicationVersionSource>
#include <KUserFeedback/PlatformInfoSource>
#include <KUserFeedback/ScreenInfoSource>
#include <KUserFeedback/QtVersionSource>
#include <KUserFeedback/Provider>
#include <KUserFeedback/StartCountSource>
#include <KUserFeedback/UsageTimeSource>
#include <KUserFeedback/LocaleInfoSource>
using namespace Akregator;
UserFeedBackManager::UserFeedBackManager(QObject *parent)
: QObject(parent)
{
......
......@@ -26,6 +26,7 @@
namespace KUserFeedback {
class Provider;
}
namespace Akregator {
class AKREGATORINTERFACES_EXPORT UserFeedBackManager : public QObject
{
Q_OBJECT
......@@ -38,5 +39,5 @@ public:
private:
KUserFeedback::Provider *mUserFeedbackProvider = nullptr;
};
}
#endif // USERFEEDBACKMANAGER_H
......@@ -104,7 +104,7 @@ int main(int argc, char **argv)
#ifdef WITH_KUSERFEEDBACK
if(cmdArgs->isSet(QStringLiteral("feedback"))) {
AkregatorUserFeedbackProvider *userFeedBack = new AkregatorUserFeedbackProvider(nullptr);
Akregator::AkregatorUserFeedbackProvider *userFeedBack = new Akregator::AkregatorUserFeedbackProvider(nullptr);
QTextStream(stdout) << userFeedBack->describeDataSources() << '\n';
delete userFeedBack;
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment