Commit 73c3a112 authored by David Jarvie's avatar David Jarvie
Browse files

Krazy fixes

parent bf477af4
......@@ -30,7 +30,7 @@
#else
namespace KCal { class Todo; }
#endif
#include <QString>
#include <QtCore/QString>
class QStringList;
......
......@@ -29,7 +29,7 @@
#include <akonadi/attribute.h>
#include <QColor>
#include <QtGui/QColor>
namespace KAlarmCal
{
......
......@@ -30,8 +30,8 @@
#include <kcalcore/event.h>
#include <akonadi/collection.h>
#endif
#include <QByteArray>
#include <QStringList>
#include <QtCore/QByteArray>
#include <QtCore/QStringList>
#ifndef USE_KRESOURCES
namespace KCalCore {
......
......@@ -39,12 +39,12 @@
#include <kcal/person.h>
#endif
#include <QBitArray>
#include <QColor>
#include <QFont>
#include <QVector>
#include <QtCore/QBitArray>
#include <QtGui/QColor>
#include <QtGui/QFont>
#include <QtCore/QVector>
#ifdef USE_KRESOURCES
#include <QList>
#include <QtCore/QList>
#endif
#include <QtCore/QSharedDataPointer>
#include <QtCore/QMetaType>
......@@ -1032,7 +1032,7 @@ class KALARMCAL_EXPORT KAEvent
* used to specify some monthly or annual recurrences. */
struct MonthPos
{
MonthPos() : days(7) { }
MonthPos() : days(7) {} //krazy:exclude=inline (need default constructor)
int weeknum; //!< Week in month, or < 0 to count from end of month.
QBitArray days; //!< Days in week, element 0 = Monday.
};
......
......@@ -4,19 +4,20 @@
* calendar data.
* Copyright © 2005-2011 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU 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 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 program 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 General Public License for more details.
* 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 General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 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.
*/
#include "karecurrence.h"
......
......@@ -4,23 +4,24 @@
* calendar data.
* Copyright © 2005-2011 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU 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 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 program 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 General Public License for more details.
* 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 General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 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 KALARM_RECURRENCE_H
#define KALARM_RECURRENCE_H
#ifndef KALARM_KARECURRENCE_H
#define KALARM_KARECURRENCE_H
#include "kalarmcal_export.h"
......@@ -512,6 +513,6 @@ class KALARMCAL_EXPORT KARecurrence
} // namespace KAlarmCal
#endif // KALARM_RECURRENCE_H
#endif // KALARM_KARECURRENCE_H
// vim: et sw=4:
......@@ -117,7 +117,7 @@ int Repetition::count() const
return d->mCount;
}
const Duration& Repetition::interval() const
Duration Repetition::interval() const
{
return d->mInterval;
}
......
......@@ -110,7 +110,7 @@ class KALARMCAL_EXPORT Repetition
#ifndef USE_KRESOURCES
/** Return the interval between repetitions. */
const KCalCore::Duration& interval() const;
KCalCore::Duration interval() const;
/** Return the overall duration of the repetition. */
KCalCore::Duration duration() const;
......@@ -121,7 +121,7 @@ class KALARMCAL_EXPORT Repetition
KCalCore::Duration duration(int count) const;
#else
/** Return the interval between repetitions. */
const KCal::Duration& interval() const;
KCal::Duration interval() const;
/** Return the overall duration of the repetition. */
KCal::Duration duration() const;
......
......@@ -4,19 +4,20 @@
* calendar data.
* Copyright © 2002-2007,2011 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU 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 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 program 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 General Public License for more details.
* 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 General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 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.
*/
#include "version.h"
......@@ -24,6 +25,11 @@
namespace KAlarmCal
{
int Version(int major, int minor, int rev)
{
return major*10000 + minor*100 + rev;
}
/******************************************************************************
* Convert the supplied KAlarm version string to a version number.
* Reply = version number (double digit for each of major, minor & issue number,
......
......@@ -4,32 +4,33 @@
* calendar data.
* Copyright © 2005,2009-2011 by David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU 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 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 program 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 General Public License for more details.
* 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 General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 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 KALARM_VERSION_H
#define KALARM_VERSION_H
#include "kalarmcal_export.h"
#include <QString>
#include <QtCore/QString>
namespace KAlarmCal
{
/** Return a specified version as an integer. */
inline int Version(int major, int minor, int rev) { return major*10000 + minor*100 + rev; }
KALARMCAL_EXPORT int Version(int major, int minor, int rev);
/** Convert a version string to an integer. */
KALARMCAL_EXPORT int getVersionNumber(const QString& version, QString* subVersion = 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