Commit afe1aa81 authored by David Jarvie's avatar David Jarvie
Browse files

Change namespace to KAlarmCal, fix build

parent 1f593423
......@@ -11,6 +11,9 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5955)
# KALARM_USE_KRESOURCES - builds to use KResources instead of Akonadi
option(KALARM_USE_KRESOURCES "Build to use KResources" OFF)
if (KDEPIM_NO_KRESOURCES)
set(KALARM_USE_KRESOURCES OFF CACHE BOOL "Build to use KResources")
endif (KDEPIM_NO_KRESOURCES)
########### next target ###############
set(kalarmcal_LIB_SRCS
......@@ -35,16 +38,20 @@ kde4_add_library(kalarmcal ${LIBRARY_TYPE} ${kalarmcal_LIB_SRCS})
if(KALARM_USE_KRESOURCES)
target_link_libraries(kalarmcal
${KDEPIMLIBS_KCAL_LIBS}
${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
${KDEPIMLIBS_KHOLIDAYS_LIBS}
kcal
kholidays
kpimidentities
${KDE4_KDECORE_LIBS}
${QT_QTCORE_LIBRARY}
)
else(KALARM_USE_KRESOURCES)
target_link_libraries(kalarmcal
${KDEPIMLIBS_AKONADI_LIBS}
${KDEPIMLIBS_KCALCORE_LIBS}
${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
${KDEPIMLIBS_KHOLIDAYS_LIBS}
akonadi-kde
kcalcore
kholidays
kpimidentities
${KDE4_KDECORE_LIBS}
${QT_QTCORE_LIBRARY}
)
endif(KALARM_USE_KRESOURCES)
......
......@@ -30,7 +30,7 @@
#include <kglobal.h>
#include <QStringList>
namespace KAlarm
namespace KAlarmCal
{
class AlarmText::Private
......@@ -571,6 +571,6 @@ QString AlarmText::Private::todoTitle(const QString& text)
return QString();
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -33,7 +33,7 @@ namespace KCal { class Todo; }
class QStringList;
namespace KAlarm
namespace KAlarmCal
{
class KAEvent;
......@@ -204,7 +204,7 @@ class KALARM_CAL_EXPORT AlarmText
//@endcond
};
} // namespace KAlarm
} // namespace KAlarmCal
#endif // ALARMTEXT_H
......
......@@ -23,7 +23,7 @@
#include <kdebug.h>
namespace KAlarm
namespace KAlarmCal
{
class CollectionAttribute::Private
......@@ -264,6 +264,6 @@ void CollectionAttribute::deserialize(const QByteArray& data)
}
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -30,7 +30,7 @@
#include <QColor>
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -152,7 +152,7 @@ class KALARM_CAL_EXPORT CollectionAttribute : public Akonadi::Attribute
//@endcond
};
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_COLLECTION_ATTRIBUTE_H
......
......@@ -23,7 +23,7 @@
#include <kdebug.h>
namespace KAlarm
namespace KAlarmCal
{
......@@ -146,6 +146,6 @@ void CompatibilityAttribute::deserialize(const QByteArray& data)
}
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -27,7 +27,7 @@
#include <akonadi/attribute.h>
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -64,12 +64,12 @@ class KALARM_CAL_EXPORT CompatibilityAttribute : public Akonadi::Attribute
void setCompatibility(KACalendar::Compat c);
/** Return the KAlarm version of the backend calendar format.
* @return version number in the format returned by KAlarm::Version().
* @return version number in the format returned by KAlarmCal::Version().
*/
int version() const;
/** Set the KAlarm version of the backend calendar format.
* @param v version number in the format returned by KAlarm::Version().
* @param v version number in the format returned by KAlarmCal::Version().
*/
void setVersion(int v);
......@@ -92,7 +92,7 @@ class KALARM_CAL_EXPORT CompatibilityAttribute : public Akonadi::Attribute
//@endcond
};
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_COMPATIBILITY_ATTRIBUTE_H
......
......@@ -23,7 +23,7 @@
#include <kglobal.h>
#include <klocale.h>
namespace KAlarm
namespace KAlarmCal
{
class DateTime::Private
......@@ -385,6 +385,6 @@ bool operator<(const DateTime& dt1, const DateTime& dt2)
return dt1.d->mDateTime < dt2.d->mDateTime;
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -25,7 +25,7 @@
#include <kdatetime.h>
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -211,10 +211,10 @@ class KALARM_CAL_EXPORT DateTime
/** Compare this value with another. */
KDateTime::Comparison compare(const DateTime &other) const;
KALARM_CAL_EXPORT friend bool operator==(const KAlarm::DateTime& dt1, const KAlarm::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator==(const KDateTime& dt1, const KAlarm::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator<(const KAlarm::DateTime& dt1, const KAlarm::DateTime& dt2);
friend bool operator<(const KDateTime& dt1, const KAlarm::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator==(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator==(const KDateTime& dt1, const KAlarmCal::DateTime& dt2);
KALARM_CAL_EXPORT friend bool operator<(const KAlarmCal::DateTime& dt1, const KAlarmCal::DateTime& dt2);
friend bool operator<(const KDateTime& dt1, const KAlarmCal::DateTime& dt2);
private:
//@cond PRIVATE
......@@ -259,7 +259,7 @@ inline bool operator>=(const KDateTime& dt1, const DateTime& dt2) { return !ope
inline bool operator<=(const DateTime& dt1, const DateTime& dt2) { return !operator<(dt2, dt1); }
inline bool operator<=(const KDateTime& dt1, const DateTime& dt2) { return !operator<(dt2, DateTime(dt1)); }
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_DATETIME_H
......
......@@ -24,7 +24,7 @@
#include <QList>
#include <QByteArray>
namespace KAlarm
namespace KAlarmCal
{
class EventAttribute::Private
......@@ -113,6 +113,6 @@ void EventAttribute::deserialize(const QByteArray& data)
}
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -28,7 +28,7 @@
#include <akonadi/attribute.h>
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -78,7 +78,7 @@ class KALARM_CAL_EXPORT EventAttribute : public Akonadi::Attribute
//@endcond
};
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_EVENT_ATTRIBUTE_H
......
......@@ -27,7 +27,7 @@
static KPIMIdentities::IdentityManager* mIdentityManager = 0;
namespace KAlarm
namespace KAlarmCal
{
namespace Identities
{
......@@ -73,6 +73,6 @@ uint identityUoid(const QString& identityUoidOrName)
} // namespace Identities
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -28,7 +28,7 @@ class QString;
namespace KPIMIdentities { class IdentityManager; }
namespace KAlarm
namespace KAlarmCal
{
/**
......
......@@ -55,7 +55,7 @@ using namespace KCal;
#endif
namespace KAlarm
namespace KAlarmCal
{
#ifndef USE_KRESOURCES
......@@ -147,7 +147,7 @@ int updateVersion(CalendarLocal& calendar, const QString& localFile, QString& ve
const QString localFile = fileStorage->fileName();
#endif
int ver = version;
if (version == KAlarm::Version(0,5,7) && !localFile.isEmpty())
if (version == KAlarmCal::Version(0,5,7) && !localFile.isEmpty())
{
// KAlarm version 0.5.7 - check whether times are stored in UTC, in which
// case it is the KDE 3.0.0 version, which needs adjustment of summer times.
......@@ -264,10 +264,10 @@ int Private::readKAlarmVersion(CalendarLocal& calendar, const QString& localFile
}
if (versionString == KAEvent::currentCalendarVersionString())
return KACalendar::CurrentFormat; // the calendar is in the current KAlarm format
int ver = KAlarm::getVersionNumber(versionString, &subVersion);
int ver = KAlarmCal::getVersionNumber(versionString, &subVersion);
if (ver == KAEvent::currentCalendarVersion())
return KACalendar::CurrentFormat; // the calendar is in the current KAlarm format
return KAlarm::getVersionNumber(versionString, &subVersion);
return KAlarmCal::getVersionNumber(versionString, &subVersion);
}
/******************************************************************************
......@@ -557,6 +557,6 @@ QStringList mimeTypes(Types types)
} // namespace CalEvent
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -45,7 +45,7 @@ namespace KCal {
}
#endif
namespace KAlarm
namespace KAlarmCal
{
#ifndef USE_KRESOURCES
......@@ -189,7 +189,7 @@ namespace CalEvent
Q_DECLARE_OPERATORS_FOR_FLAGS(CalEvent::Types)
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_KACALENDAR_H
......
......@@ -50,7 +50,7 @@ using namespace KCal;
#endif
using namespace KHolidays;
namespace KAlarm
namespace KAlarmCal
{
#ifndef USE_KRESOURCES
......@@ -6383,6 +6383,6 @@ QString reminderToString(int minutes)
return QString("%1%2").arg(count).arg(unit);
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -59,7 +59,7 @@ class AlarmResource;
#endif
class AlarmData;
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -1168,7 +1168,7 @@ class KALARM_CAL_EXPORT KAEvent
void endChanges();
/** Return the current KAlarm calendar storage format version.
* @return version in the format returned by KAlarm::Version().
* @return version in the format returned by KAlarmCal::Version().
*/
static int currentCalendarVersion();
......@@ -1182,7 +1182,7 @@ class KALARM_CAL_EXPORT KAEvent
* is saved, no information is lost or corrupted.
* @param calendar calendar whose events are to be converted.
* @param calendarVersion KAlarm calendar format version of @p calendar, in the
* format returned by KAlarm::Version(). The KDE 3.0.0
* format returned by KAlarmCal::Version(). The KDE 3.0.0
* version 0.5.7 requires a special adjustment for
* summer time and should be passed negated (-507) to
* distinguish it from the KDE 3.0.1 version 0.5.7
......@@ -1208,10 +1208,10 @@ class KALARM_CAL_EXPORT KAEvent
QSharedDataPointer<Private> d;
};
} // namespace KAlarm
} // namespace KAlarmCal
Q_DECLARE_OPERATORS_FOR_FLAGS(KAlarm::KAEvent::Flags)
Q_DECLARE_METATYPE(KAlarm::KAEvent)
Q_DECLARE_OPERATORS_FOR_FLAGS(KAlarmCal::KAEvent::Flags)
Q_DECLARE_METATYPE(KAlarmCal::KAEvent)
#endif // KAEVENT_H
......
......@@ -40,7 +40,7 @@ using namespace KCalCore;
using namespace KCal;
#endif
namespace KAlarm
namespace KAlarmCal
{
class Recurrence_p : public Recurrence
......@@ -1293,6 +1293,6 @@ bool KARecurrence::dailyType(const RecurrenceRule* rrule)
return found;
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
......@@ -33,7 +33,7 @@ namespace KCalCore { class Recurrence; }
namespace KCal { class Recurrence; }
#endif
namespace KAlarm
namespace KAlarmCal
{
/**
......@@ -509,7 +509,7 @@ class KALARM_CAL_EXPORT KARecurrence
//@endcond
};
} // namespace KAlarm
} // namespace KAlarmCal
#endif // KALARM_RECURRENCE_H
......
......@@ -28,7 +28,7 @@ using namespace KCalCore;
using namespace KCal;
#endif
namespace KAlarm
namespace KAlarmCal
{
class Repetition::Private
......@@ -165,6 +165,6 @@ int Repetition::previousRepeatCount(const KDateTime& from, const KDateTime& afte
: static_cast<int>((from.secsTo_long(afterDateTime) - 1) / d->mInterval.asSeconds());
}
} // namespace KAlarm
} // namespace KAlarmCal
// vim: et sw=4:
Supports Markdown
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