mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
kdecore: log KSystemTimeZones and KTimeZone messages to the correct debug area
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b2db2e1c36
commit
97b1ea46c1
2 changed files with 10 additions and 10 deletions
|
@ -160,7 +160,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
const QString zonetab = m_zoneinfoDir + QLatin1String("/zone.tab");
|
||||
QFile zonetabfile(zonetab);
|
||||
if (!zonetabfile.open(QFile::ReadOnly)) {
|
||||
kWarning() << "Could not open zone.tab" << zonetab;
|
||||
kWarning(161) << "Could not open zone.tab" << zonetab;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
m_watcher->addPaths(watchlist);
|
||||
connect(m_watcher, SIGNAL(fileChanged(QString)), this, SLOT(update(QString)));
|
||||
|
||||
kDebug() << "Parsing" << zonetab;
|
||||
kDebug(161) << "Parsing" << zonetab;
|
||||
char zonecode[4];
|
||||
char zonecoordinates[32];
|
||||
char zonename[128];
|
||||
|
@ -202,7 +202,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
);
|
||||
|
||||
if (Q_UNLIKELY(sscanfresult < 3 || sscanfresult > 4)) {
|
||||
kWarning() << "Invalid zone.tab entry" << zonetabline;
|
||||
kWarning(161) << "Invalid zone.tab entry" << zonetabline;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
);
|
||||
if (Q_UNLIKELY(zonetabcoordinates.first == KTimeZone::UNKNOWN
|
||||
|| zonetabcoordinates.second == KTimeZone::UNKNOWN)) {
|
||||
kWarning() << "Invalid zone.tab coordinates" << zonetabline;
|
||||
kWarning(161) << "Invalid zone.tab coordinates" << zonetabline;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
const QString localtz = reallocaltime.mid(zonediroffset, reallocaltime.size() - zonediroffset);
|
||||
m_localtz = findZone(localtz);
|
||||
#ifndef NDEBUG
|
||||
kDebug() << "Zones update took" << updatetimer.elapsed() << "ms";
|
||||
kDebug(161) << "Zones update took" << updatetimer.elapsed() << "ms";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ void KSystemTimeZonesPrivate::update(const QString &path)
|
|||
if (zone.abbreviations().contains(localtz)) {
|
||||
m_localtz = zone;
|
||||
#ifndef NDEBUG
|
||||
kDebug() << "Zones update took" << updatetimer.elapsed() << "ms";
|
||||
kDebug(161) << "Zones update took" << updatetimer.elapsed() << "ms";
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -147,11 +147,11 @@ KTimeZonePrivate::KTimeZonePrivate(const QString &nam,
|
|||
|
||||
QFile tzfile(zoneinfoDir() + QDir::separator() + name);
|
||||
if (!tzfile.open(QFile::ReadOnly)) {
|
||||
kWarning() << "Could not open" << tzfile.fileName();
|
||||
kWarning(161) << "Could not open" << tzfile.fileName();
|
||||
return;
|
||||
}
|
||||
|
||||
kDebug() << "Parsing" << tzfile.fileName();
|
||||
kDebug(161) << "Parsing" << tzfile.fileName();
|
||||
QDataStream tzstream(&tzfile);
|
||||
tzstream.setByteOrder(QDataStream::BigEndian);
|
||||
|
||||
|
@ -159,7 +159,7 @@ KTimeZonePrivate::KTimeZonePrivate(const QString &nam,
|
|||
::memset(tzmagic, 0, sizeof(tzmagic) * sizeof(char));
|
||||
tzstream.readRawData(tzmagic, 4);
|
||||
if (qstrcmp(tzmagic, "TZif") != 0) {
|
||||
kWarning() << "Invalid magic bits" << tzfile.fileName() << tzmagic;
|
||||
kWarning(161) << "Invalid magic bits" << tzfile.fileName() << tzmagic;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ KTimeZonePrivate::KTimeZonePrivate(const QString &nam,
|
|||
|
||||
// NOTE: should not be less than or equal to zero
|
||||
if (Q_UNLIKELY(tzh_typecnt <= 0)) {
|
||||
kWarning() << "Invalid number of local time types" << tzfile.fileName();
|
||||
kWarning(161) << "Invalid number of local time types" << tzfile.fileName();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue