mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
qWarning() mesage formating cleanup
This commit is contained in:
parent
351fc0309a
commit
9bae94f30d
@ -98,9 +98,9 @@ bool Data::loadFile(const QString &fileName)
|
||||
file.reset();
|
||||
}
|
||||
|
||||
qWarning("Error loading data file: %s:\n", qPrintable(fileName));
|
||||
qWarning("Error loading data file: %s:", qPrintable(fileName));
|
||||
for (it = _parsers.begin(); it != _parsers.end(); it++)
|
||||
qWarning("%s: line %d: %s\n", qPrintable(it.key()),
|
||||
qWarning("%s: line %d: %s", qPrintable(it.key()),
|
||||
it.value()->errorLine(), qPrintable(it.value()->errorString()));
|
||||
|
||||
_errorLine = 0;
|
||||
|
@ -3,7 +3,7 @@
|
||||
void SLFParser::warning(const char *text) const
|
||||
{
|
||||
const QFile *file = static_cast<QFile *>(_reader.device());
|
||||
qWarning("%s:%lld: %s\n", qPrintable(file->fileName()),
|
||||
qWarning("%s:%lld: %s", qPrintable(file->fileName()),
|
||||
_reader.lineNumber(), text);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
void TCXParser::warning(const char *text) const
|
||||
{
|
||||
const QFile *file = static_cast<QFile *>(_reader.device());
|
||||
qWarning("%s:%lld: %s\n", qPrintable(file->fileName()),
|
||||
qWarning("%s:%lld: %s", qPrintable(file->fileName()),
|
||||
_reader.lineNumber(), text);
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ bool Downloader::doDownload(const Download &dl,
|
||||
QUrl url(dl.url());
|
||||
|
||||
if (!url.isValid() || !(url.scheme() == "http" || url.scheme() == "https")) {
|
||||
qWarning("%s: Invalid URL\n", qPrintable(url.toString()));
|
||||
qWarning("%s: Invalid URL", qPrintable(url.toString()));
|
||||
if (redirect)
|
||||
_errorDownloads.insert(redirect->origin(), RETRIES);
|
||||
return false;
|
||||
@ -138,7 +138,7 @@ bool Downloader::saveToDisk(const QString &filename, QIODevice *data)
|
||||
QFile file(filename);
|
||||
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
qWarning("Error writing file: %s: %s\n",
|
||||
qWarning("Error writing file: %s: %s",
|
||||
qPrintable(filename), qPrintable(file.errorString()));
|
||||
return false;
|
||||
}
|
||||
@ -166,11 +166,11 @@ void Downloader::downloadFinished(QNetworkReply *reply)
|
||||
QUrl origin = reply->request().attribute(ATTR_ORIGIN).toUrl();
|
||||
if (origin.isEmpty()) {
|
||||
insertError(url, error);
|
||||
qWarning("Error downloading file: %s: %s\n",
|
||||
qWarning("Error downloading file: %s: %s",
|
||||
url.toEncoded().constData(), qPrintable(reply->errorString()));
|
||||
} else {
|
||||
insertError(origin, error);
|
||||
qWarning("Error downloading file: %s -> %s: %s\n",
|
||||
qWarning("Error downloading file: %s -> %s: %s",
|
||||
origin.toEncoded().constData(), url.toEncoded().constData(),
|
||||
qPrintable(reply->errorString()));
|
||||
}
|
||||
@ -186,7 +186,7 @@ void Downloader::downloadFinished(QNetworkReply *reply)
|
||||
if (level >= MAX_REDIRECT_LEVEL) {
|
||||
_errorDownloads.insert(origin, RETRIES);
|
||||
qWarning("Error downloading file: %s: "
|
||||
"redirect level limit reached (redirect loop?)\n",
|
||||
"redirect level limit reached (redirect loop?)",
|
||||
origin.toEncoded().constData());
|
||||
} else {
|
||||
QUrl redirectUrl;
|
||||
|
@ -96,7 +96,7 @@ bool Tar::loadTmi(const QString &path)
|
||||
QByteArray line = file.readLine();
|
||||
int pos = line.indexOf(':');
|
||||
if (line.size() < 10 || pos < 7 || !line.startsWith("block")) {
|
||||
qWarning("%s:%d: syntax error\n", qPrintable(path), ln);
|
||||
qWarning("%s:%d: syntax error", qPrintable(path), ln);
|
||||
_index.clear();
|
||||
return false;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
static bool loadTileFile(Tile &tile, const QString &file)
|
||||
{
|
||||
if (!tile.pixmap().load(file)) {
|
||||
qWarning("%s: error loading tile file\n", qPrintable(file));
|
||||
qWarning("%s: error loading tile file", qPrintable(file));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ TileLoader::TileLoader(const QString &dir, QObject *parent)
|
||||
: QObject(parent), _dir(dir)
|
||||
{
|
||||
if (!QDir().mkpath(_dir))
|
||||
qWarning("%s: %s\n", qPrintable(_dir), "Error creating tiles directory");
|
||||
qWarning("%s: %s", qPrintable(_dir), "Error creating tiles directory");
|
||||
|
||||
_downloader = new Downloader(this);
|
||||
connect(_downloader, SIGNAL(finished()), this, SIGNAL(finished()));
|
||||
|
@ -118,7 +118,7 @@ void WMSMap::clearCache()
|
||||
_zoom = 0;
|
||||
|
||||
if (!loadWMS())
|
||||
qWarning("%s: %s\n", qPrintable(_name), qPrintable(_errorString));
|
||||
qWarning("%s: %s", qPrintable(_name), qPrintable(_errorString));
|
||||
}
|
||||
|
||||
QRectF WMSMap::bounds()
|
||||
|
@ -52,7 +52,7 @@ void WMTSMap::clearCache()
|
||||
_zoom = 0;
|
||||
|
||||
if (!loadWMTS())
|
||||
qWarning("%s: %s\n", qPrintable(_name), qPrintable(_errorString));
|
||||
qWarning("%s: %s", qPrintable(_name), qPrintable(_errorString));
|
||||
}
|
||||
|
||||
QString WMTSMap::tilesDir() const
|
||||
|
Loading…
Reference in New Issue
Block a user