Commit cc7aaa31 authored by Laurent Montel's avatar Laurent Montel 😁

Add namespace

parent 777fee1f
/*
Copyright (c) 2014 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef FOLLOWUPREMINDER_EXPORT_H
#define FOLLOWUPREMINDER_EXPORT_H
#include <kdemacros.h>
#ifndef FOLLOWUPREMINDER_EXPORT
# if defined(KDEPIM_STATIC_LIBS)
/* No export/import for static libraries */
# define FOLLOWUPREMINDER_EXPORT
# elif defined(MAKE_FOLLOWUPREMINDER_LIB)
/* We are building this library */
# define FOLLOWUPREMINDER_EXPORT KDE_EXPORT
# else
/* We are using this library */
# define FOLLOWUPREMINDER_EXPORT KDE_IMPORT
# endif
#endif
#endif
......@@ -18,7 +18,7 @@
#include "followupreminderinfo.h"
#include <KConfigGroup>
using namespace FollowUpReminder;
FollowUpReminderInfo::FollowUpReminderInfo()
: mId(-1)
......
......@@ -20,8 +20,10 @@
#include <Akonadi/Item>
#include <QDateTime>
#include "followupreminder_export.h"
class KConfigGroup;
class FollowUpReminderInfo
namespace FollowUpReminder {
class FOLLOWUPREMINDER_EXPORT FollowUpReminderInfo
{
public:
FollowUpReminderInfo();
......@@ -52,5 +54,5 @@ private:
QDateTime mFollowUpReminderDate;
QString mTo;
};
}
#endif // FOLLOWUPREMINDERINFO_H
......@@ -53,7 +53,7 @@ FollowUpReminderInfoWidget::~FollowUpReminderInfoWidget()
{
}
void FollowUpReminderInfoWidget::setInfo(const QList<FollowUpReminderInfo *> &info)
void FollowUpReminderInfoWidget::setInfo(const QList<FollowUpReminder::FollowUpReminderInfo *> &info)
{
//TODO
}
......
......@@ -21,7 +21,9 @@
#include <QWidget>
#include <KConfigGroup>
class QTreeWidget;
namespace FollowUpReminder {
class FollowUpReminderInfo;
}
class FollowUpReminderInfoWidget : public QWidget
{
Q_OBJECT
......@@ -32,7 +34,7 @@ public:
void restoreTreeWidgetHeader(const QByteArray &data);
void saveTreeWidgetHeader(KConfigGroup &group);
void setInfo(const QList<FollowUpReminderInfo *> &info);
void setInfo(const QList<FollowUpReminder::FollowUpReminderInfo *> &info);
private slots:
void customContextMenuRequested(const QPoint &pos);
void slotRemoveItem();
......
......@@ -26,6 +26,7 @@
#include <KConfig>
#include <knotification.h>
#include <KLocalizedString>
using namespace FollowUpReminder;
FollowUpReminderManager::FollowUpReminderManager(QObject *parent)
: QObject(parent)
......
......@@ -22,7 +22,9 @@
#include <KSharedConfig>
#include <Akonadi/Item>
#include <QPointer>
namespace FollowUpReminder {
class FollowUpReminderInfo;
}
class FollowUpReminderNoAnswerDialog;
class FollowUpReminderManager : public QObject
{
......@@ -40,7 +42,7 @@ private slots:
private:
void answerReceived(const QString &from);
KSharedConfig::Ptr mConfig;
QList<FollowUpReminderInfo*> mFollowUpReminderInfoList;
QList<FollowUpReminder::FollowUpReminderInfo*> mFollowUpReminderInfoList;
QPointer<FollowUpReminderNoAnswerDialog> mNoAnswerDialog;
};
......
......@@ -53,7 +53,7 @@ FollowUpReminderNoAnswerDialog::~FollowUpReminderNoAnswerDialog()
writeConfig();
}
void FollowUpReminderNoAnswerDialog::setInfo(const QList<FollowUpReminderInfo *> &info)
void FollowUpReminderNoAnswerDialog::setInfo(const QList<FollowUpReminder::FollowUpReminderInfo *> &info)
{
//mWidget->setInfo(info);
}
......
......@@ -19,8 +19,9 @@
#define FOLLOWUPREMINDERNOANSWERDIALOG_H
#include <KDialog>
namespace FollowUpReminder {
class FollowUpReminderInfo;
}
class FollowUpReminderInfoWidget;
class FollowUpReminderNoAnswerDialog : public KDialog
{
......@@ -29,7 +30,7 @@ public:
explicit FollowUpReminderNoAnswerDialog(QWidget *parent = 0);
~FollowUpReminderNoAnswerDialog();
void setInfo(const QList<FollowUpReminderInfo *> &info);
void setInfo(const QList<FollowUpReminder::FollowUpReminderInfo *> &info);
private:
void readConfig();
......
......@@ -25,7 +25,7 @@ FollowUpReminderInfoTest::FollowUpReminderInfoTest()
void FollowUpReminderInfoTest::shouldHaveDefaultValue()
{
FollowUpReminderInfo info;
FollowUpReminder::FollowUpReminderInfo info;
QCOMPARE(info.id(), Akonadi::Item::Id(-1));
QCOMPARE(info.messageId(), QString());
QCOMPARE(info.isValid(), false);
......@@ -34,7 +34,7 @@ void FollowUpReminderInfoTest::shouldHaveDefaultValue()
void FollowUpReminderInfoTest::shoudBeNotValid()
{
FollowUpReminderInfo info;
FollowUpReminder::FollowUpReminderInfo info;
//We need a Akonadi::Id valid and a messageId not empty and a valid date and a "To" not empty
info.setMessageId(QLatin1String("foo"));
QCOMPARE(info.isValid(), false);
......
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