diff options
-rw-r--r-- | core/qthelper.cpp | 7 | ||||
-rw-r--r-- | core/qthelperfromc.h | 1 | ||||
-rw-r--r-- | core/subsurfacestartup.c | 6 | ||||
-rw-r--r-- | subsurface-desktop-main.cpp | 4 |
4 files changed, 13 insertions, 5 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index b7db56a20..628fffa97 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -940,7 +940,7 @@ QString get_dive_duration_string(timestamp_t when, QString hoursText, QString mi .arg(secs).arg(secondsText); } else if (isFreeDive) { // Mixed display (hh:mm / mm only) and freedive < 1h and we have no unit for minutes - // --> Prefix duration with "0:" --> "0:05:35" + // --> Prefix duration with "0:" --> "0:05:35" if (separator == ":") displayTime = QString("%1%2%3%4%5%6").arg(hrs).arg(separator) .arg(fullmins, 2, 10, QChar('0')).arg(separator) .arg(secs, 2, 10, QChar('0')).arg(hoursText); @@ -1728,3 +1728,8 @@ extern "C" void cache_insert(int tissue, int timestep, enum inertgas inertgas, d ++key; factor_cache.insert(key, value); } + +extern "C" void print_qt_versions() +{ + printf("%s\n", QStringLiteral("built with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion()).toUtf8().data()); +} diff --git a/core/qthelperfromc.h b/core/qthelperfromc.h index dc09e224b..44f67199e 100644 --- a/core/qthelperfromc.h +++ b/core/qthelperfromc.h @@ -25,5 +25,6 @@ extern const char *get_current_date(); enum inertgas {N2, HE}; double cache_value(int tissue, int timestep, enum inertgas gas); void cache_insert(int tissue, int timestep, enum inertgas gas, double value); +void print_qt_versions(); #endif // QTHELPERFROMC_H diff --git a/core/subsurfacestartup.c b/core/subsurfacestartup.c index 7fbfbdc57..ca6a198ad 100644 --- a/core/subsurfacestartup.c +++ b/core/subsurfacestartup.c @@ -150,8 +150,12 @@ bool imported = false; static void print_version() { - printf("Subsurface v%s, ", subsurface_git_version()); + printf("Subsurface v%s,\n", subsurface_git_version()); printf("built with libdivecomputer v%s\n", dc_version(NULL)); + print_qt_versions(); + int git_maj, git_min, git_rev; + git_libgit2_version(&git_maj, &git_min, &git_rev); + printf("built with libgit2 %d.%d.%d\n", git_maj, git_min, git_rev); } void print_files() diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index ded3aee1f..18c0f9bec 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -107,10 +107,8 @@ int main(int argc, char **argv) qDebug() << "importing dive data from" << importedFiles; m->importFiles(importedFiles); - if (verbose > 0) { + if (verbose > 0) print_files(); - printf("%s\n", QStringLiteral("build with Qt Version %1, runtime from Qt Version %2").arg(QT_VERSION_STR).arg(qVersion()).toUtf8().data()); - } if (!quit) run_ui(); exit_ui(); |