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

Astyle kdelibs

parent ad33e1bc
......@@ -29,7 +29,6 @@ public:
QStringList regionCodes;
};
HolidayRegionsDeclarativeModel::HolidayRegionsDeclarativeModel(QObject *parent)
: QAbstractListModel(parent),
d(new Private())
......@@ -62,12 +61,12 @@ QVariant HolidayRegionsDeclarativeModel::data(const QModelIndex &index, int role
const QString regionCode = d->regionCodes.at(index.row());
switch (role) {
case HolidayRegionsDeclarativeModel::RegionRole:
return regionCode;
case HolidayRegionsDeclarativeModel::NameRole:
return KHolidays::HolidayRegion::name(regionCode);
case HolidayRegionsDeclarativeModel::DescriptionRole:
return KHolidays::HolidayRegion::description(regionCode);
case HolidayRegionsDeclarativeModel::RegionRole:
return regionCode;
case HolidayRegionsDeclarativeModel::NameRole:
return KHolidays::HolidayRegion::name(regionCode);
case HolidayRegionsDeclarativeModel::DescriptionRole:
return KHolidays::HolidayRegion::description(regionCode);
}
return QVariant();
......
......@@ -43,7 +43,7 @@ public:
private:
class Private;
Private * const d;
Private *const d;
};
#endif
......@@ -24,7 +24,7 @@
#include <qqml.h>
void KHolidaysDeclarativePlugin::registerTypes(const char* uri)
void KHolidaysDeclarativePlugin::registerTypes(const char *uri)
{
qmlRegisterType<HolidayRegionsDeclarativeModel>(uri, 1, 0, "HolidayRegionsModel");
}
......@@ -26,10 +26,10 @@
class KHolidaysDeclarativePlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
virtual void registerTypes(const char* uri);
virtual void registerTypes(const char *uri);
};
#endif // KHOLIDAYSDECLARATIVEPLUGIN_H
......@@ -173,7 +173,7 @@ HolidayParserPlan::yytnamerr_(const char *yystr)
case '"':
return yyr;
}
do_not_strip_quotes: ;
do_not_strip_quotes:;
}
return yystr;
......
......@@ -523,7 +523,7 @@ static yyconst flex_int16_t yy_accept[982] = {
137, 196, 0, 0, 0, 0, 145, 0, 0, 0,
52, 0, 146, 0, 155, 154, 157, 161, 0, 147,
0
} ;
};
static yyconst flex_int32_t yy_ec[256] = {
0,
......@@ -555,7 +555,7 @@ static yyconst flex_int32_t yy_ec[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
};
static yyconst flex_int32_t yy_meta[70] = {
0,
......@@ -566,7 +566,7 @@ static yyconst flex_int32_t yy_meta[70] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1
} ;
};
static yyconst flex_int16_t yy_base[985] = {
0,
......@@ -678,7 +678,7 @@ static yyconst flex_int16_t yy_base[985] = {
2013, 2013, 1934, 1939, 1929, 1942, 2013, 1944, 1934, 1936,
2013, 1945, 2013, 1953, 2013, 2013, 2013, 2013, 1960, 2013,
2013, 102, 100, 99
} ;
};
static yyconst flex_int16_t yy_def[985] = {
0,
......@@ -790,7 +790,7 @@ static yyconst flex_int16_t yy_def[985] = {
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
0, 981, 981, 981
} ;
};
static yyconst flex_int16_t yy_nxt[2083] = {
0,
......@@ -1023,7 +1023,7 @@ static yyconst flex_int16_t yy_nxt[2083] = {
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
981, 981
} ;
};
static yyconst flex_int16_t yy_chk[2083] = {
0,
......@@ -1256,7 +1256,7 @@ static yyconst flex_int16_t yy_chk[2083] = {
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
981, 981, 981, 981, 981, 981, 981, 981, 981, 981,
981, 981
} ;
};
static yyconst flex_int16_t yy_rule_linenum[202] = {
0,
......@@ -1283,7 +1283,7 @@ static yyconst flex_int16_t yy_rule_linenum[202] = {
309, 310, 311, 313, 314, 315, 316, 317, 318, 319,
321
} ;
};
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
......
......@@ -180,8 +180,9 @@ QTime KHolidays::SunRiseSet::utcSunrise(const QDate &date, double latitude, doub
double hourAngle = calcHourAngleSunrise(latitude, solarDec);
double delta = longitude + radToDeg(hourAngle);
QTime timeUTC(0, 0);
if (std::isnan(delta))
if (std::isnan(delta)) {
return timeUTC;
}
timeUTC = timeUTC.addSecs((720 - (4.0 * delta) - eqTime) * 60);
return QTime(timeUTC.hour(),
timeUTC.second() > 29 ? timeUTC.minute() + 1 : timeUTC.minute(),
......@@ -199,8 +200,9 @@ QTime KHolidays::SunRiseSet::utcSunset(const QDate &date, double latitude, doubl
double hourAngle = -calcHourAngleSunrise(latitude, solarDec);
double delta = longitude + radToDeg(hourAngle);
QTime timeUTC(0, 0);
if (std::isnan(delta))
if (std::isnan(delta)) {
return timeUTC;
}
timeUTC = timeUTC.addSecs((720 - (4.0 * delta) - eqTime) * 60);
return QTime(timeUTC.hour(),
timeUTC.second() > 29 ? timeUTC.minute() + 1 : timeUTC.minute(),
......
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