mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Replace remaining qDebug()s by report_info()
The only case left is in android.cpp, though that is only compiled when compiling the full desktop app on Android. I.e. never. So don't bother for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
8867edffe8
commit
b320942343
8 changed files with 18 additions and 18 deletions
|
@ -4,7 +4,7 @@
|
|||
#include "divelist.h"
|
||||
#include "divelog.h"
|
||||
#include "subsurface-string.h"
|
||||
#include "errorhelper.h" // for verbose flag
|
||||
#include "errorhelper.h"
|
||||
#include "selection.h"
|
||||
#include "core/settings/qPrefDiveComputer.h"
|
||||
|
||||
|
@ -60,9 +60,9 @@ void device::showchanges(const std::string &n) const
|
|||
{
|
||||
if (nickName != n) {
|
||||
if (!n.empty())
|
||||
qDebug("new nickname %s for DC model %s serial %s", n.c_str(), model.c_str(), serialNumber.c_str());
|
||||
report_info("new nickname %s for DC model %s serial %s", n.c_str(), model.c_str(), serialNumber.c_str());
|
||||
else
|
||||
qDebug("deleted nickname %s for DC model %s serial %s", nickName.c_str(), model.c_str(), serialNumber.c_str());
|
||||
report_info("deleted nickname %s for DC model %s serial %s", nickName.c_str(), model.c_str(), serialNumber.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "errorhelper.h"
|
||||
#include "subsurface-string.h"
|
||||
#include "qthelper.h"
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
|
@ -124,7 +123,6 @@ taxonomy_data reverseGeoLookup(degrees_t latitude, degrees_t longitude)
|
|||
}
|
||||
} else {
|
||||
report_error("geonames.org did not provide reverse lookup information");
|
||||
//qDebug() << "no reverse geo lookup; geonames returned\n" << fullReply;
|
||||
}
|
||||
|
||||
return taxonomy;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "dive.h"
|
||||
#include "metrics.h"
|
||||
#include "divelist.h"
|
||||
#include "errorhelper.h"
|
||||
#include "qthelper.h"
|
||||
#include "imagedownloader.h"
|
||||
#include "videoframeextractor.h"
|
||||
|
@ -56,7 +57,7 @@ void ImageDownloader::saveImage(QNetworkReply *reply)
|
|||
hash.addData(filename.toUtf8());
|
||||
QFile imageFile(path.append("/").append(hash.result().toHex()));
|
||||
if (imageFile.open(QIODevice::WriteOnly)) {
|
||||
qDebug() << "Write image to" << imageFile.fileName();
|
||||
report_info("Write image to %s", qPrintable(imageFile.fileName()));
|
||||
QDataStream stream(&imageFile);
|
||||
stream.writeRawData(imageData.data(), imageData.length());
|
||||
imageFile.waitForBytesWritten(-1);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "uploadDiveLogsDE.h"
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
#include <QTemporaryFile>
|
||||
#include <zip.h>
|
||||
#include <errno.h>
|
||||
|
@ -72,7 +71,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
|
||||
xslt = get_stylesheet("divelogs-export.xslt");
|
||||
if (!xslt) {
|
||||
qDebug() << errPrefix << "missing stylesheet";
|
||||
report_info("%s missing stylesheet", errPrefix);
|
||||
report_error("%s", qPrintable(tr("Stylesheet to export to divelogs.de is not found")));
|
||||
return false;
|
||||
}
|
||||
|
@ -143,7 +142,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
*/
|
||||
xmlDoc *doc = xmlReadMemory(mb.buffer, mb.len, "divelog", NULL, XML_PARSE_HUGE);
|
||||
if (!doc) {
|
||||
qWarning() << errPrefix << "could not parse back into memory the XML file we've just created!";
|
||||
report_info("%s could not parse back into memory the XML file we've just created!", errPrefix);
|
||||
report_error("%s", qPrintable(tr("internal error")));
|
||||
zip_close(zip);
|
||||
QFile::remove(tempfile);
|
||||
|
@ -156,7 +155,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
transformed = xsltApplyStylesheet(xslt, doc, xml_params_get(params));
|
||||
free_xml_params(params);
|
||||
if (!transformed) {
|
||||
qWarning() << errPrefix << "XSLT transform failed for dive: " << i;
|
||||
report_info("%s XSLT transform failed for dive: %d", errPrefix, i);
|
||||
report_error("%s", qPrintable(tr("Conversion of dive %1 to divelogs.de format failed").arg(i)));
|
||||
continue;
|
||||
}
|
||||
|
@ -172,7 +171,7 @@ bool uploadDiveLogsDE::prepareDives(const QString &tempfile, bool selected)
|
|||
if (s) {
|
||||
int64_t ret = zip_add(zip, filename, s);
|
||||
if (ret == -1)
|
||||
qDebug() << errPrefix << "failed to include dive:" << i;
|
||||
report_info("%s failed to include dive: %d", errPrefix, i);
|
||||
}
|
||||
}
|
||||
xsltFreeStylesheet(xslt);
|
||||
|
@ -228,7 +227,7 @@ void uploadDiveLogsDE::uploadDives(const QString &filename, const QString &useri
|
|||
cleanupTempFile();
|
||||
tempFile.setFileName(filename);
|
||||
if (!tempFile.open(QIODevice::ReadOnly)) {
|
||||
qDebug() << "ERROR opening zip file: " << filename;
|
||||
report_info("ERROR opening zip file: %s", qPrintable(filename));
|
||||
return;
|
||||
}
|
||||
part1.setBodyDevice(&tempFile);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "core/divesite.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/device.h"
|
||||
#include "core/errorhelper.h"
|
||||
#include "core/trip.h"
|
||||
#include "core/import-csv.h"
|
||||
#include "core/xmlparams.h"
|
||||
|
@ -518,7 +519,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
|||
headers.append("Sample pressure");
|
||||
} else {
|
||||
// We do not know about this value
|
||||
qDebug() << "Seabear import found an un-handled field: " << columnText;
|
||||
report_info("Seabear import found an un-handled field: %s", qPrintable(columnText));
|
||||
headers.append("");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace {
|
|||
extern "C" int updateProgress(const char *text)
|
||||
{
|
||||
if (verbose)
|
||||
qDebug() << "git storage:" << text;
|
||||
report_info("git storage: %s", text);
|
||||
if (progressDialog) {
|
||||
// apparently we don't always get enough space to show the full label
|
||||
// so let's manually make enough space (but don't shrink the existing size)
|
||||
|
@ -1567,7 +1567,7 @@ void MainWindow::hideProgressBar()
|
|||
void MainWindow::divesChanged(const QVector<dive *> &dives, DiveField)
|
||||
{
|
||||
for (struct dive *d: dives) {
|
||||
qDebug() << "dive #" << d->number << "changed, cache is" << (dive_cache_is_valid(d) ? "valid" : "invalidated");
|
||||
report_info("dive #%d changed, cache is %s", d->number, dive_cache_is_valid(d) ? "valid" : "invalidated");
|
||||
// a brute force way to deal with that would of course be to call
|
||||
// invalidate_dive_cache(d);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <QQmlContext>
|
||||
#include <QDebug>
|
||||
#include <QQuickItem>
|
||||
#include <QModelIndex>
|
||||
|
||||
#include "mapwidget.h"
|
||||
#include "core/divesite.h"
|
||||
#include "core/errorhelper.h"
|
||||
#include "core/selection.h"
|
||||
#include "map-widget/qmlmapwidgethelper.h"
|
||||
#include "qt-models/maplocationmodel.h"
|
||||
|
@ -37,7 +37,7 @@ void MapWidget::doneLoading(QQuickWidget::Status status)
|
|||
{
|
||||
// the default map widget QML failed; load the error QML.
|
||||
if (source() == urlMapWidget && status != QQuickWidget::Ready) {
|
||||
qDebug() << urlMapWidget << "failed to load with status:" << status;
|
||||
report_info("%s failed to load with status: %d", qPrintable(urlMapWidget.toString()), static_cast<int>(status));
|
||||
setSource(urlMapWidgetError);
|
||||
return;
|
||||
} else if (source() == urlMapWidgetError) { // the error QML finished loading.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "divepixmapcache.h"
|
||||
#include "core/errorhelper.h"
|
||||
#include "core/metrics.h"
|
||||
#include "core/color.h"
|
||||
|
||||
|
@ -23,7 +24,7 @@ DivePixmaps::DivePixmaps(int dpr) : dpr(dpr)
|
|||
sz_bigger = lrint(sz_bigger * dprf);
|
||||
int sz_pix = sz_bigger / 2; // ex 20px
|
||||
if (verbose)
|
||||
qDebug("%s DPR: %f metrics: %d %d sz_bigger: %d", __FUNCTION__, dprf, metrics.sz_med, metrics.sz_small, sz_bigger);
|
||||
report_info("%s DPR: %f metrics: %d %d sz_bigger: %d", __func__, dprf, metrics.sz_med, metrics.sz_small, sz_bigger);
|
||||
|
||||
warning = createPixmap(":status-warning-icon", sz_pix);
|
||||
info = createPixmap(":status-info-icon", sz_pix);
|
||||
|
|
Loading…
Add table
Reference in a new issue