Skip to content

Commit

Permalink
Re-instate some code (since the previous commit worked)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Nov 17, 2023
1 parent 7400a05 commit ee0c038
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <Windows.h>
#endif

//static Q_LOGGING_CATEGORY(lc, "dokit.cli.main", QtInfoMsg);
static Q_LOGGING_CATEGORY(lc, "dokit.cli.main", QtInfoMsg);

inline bool haveConsole()
{
Expand Down Expand Up @@ -311,23 +311,23 @@ int main(int argc, char *argv[])
QCoreApplication::installTranslator(&libTranslator);
}

return 0;
// Parse the command line.
const QStringList appArguments = QCoreApplication::arguments();
QCommandLineParser parser;
/*const Command commandType = */parseCommandLine(appArguments, parser);
qCDebug(lc).noquote() << QCoreApplication::applicationName() << QCoreApplication::applicationVersion();
qCDebug(lc).noquote() << "Qt" << qVersion() << "(runtime) [" QT_VERSION_STR " compile-time]";
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) // QTranslator::filePath() added in Qt 5.15.
qCDebug(lc).noquote() << "App translations:" <<
(appTranslator.filePath().isEmpty() ? QStringLiteral("<none>") : appTranslator.filePath());
qCDebug(lc).noquote() << "Library translations:" <<
(libTranslator.filePath().isEmpty() ? QStringLiteral("<none>") : libTranslator.filePath());
#else
qCDebug(lc).noquote() << "App translations:" << (!appTranslator.isEmpty());
qCDebug(lc).noquote() << "Lib translations:" << (!libTranslator.isEmpty());
#endif

// // Parse the command line.
// const QStringList appArguments = QCoreApplication::arguments();
// QCommandLineParser parser;
// const Command commandType = parseCommandLine(appArguments, parser);
// qCDebug(lc).noquote() << QCoreApplication::applicationName() << QCoreApplication::applicationVersion();
// qCDebug(lc).noquote() << "Qt" << qVersion() << "(runtime) [" QT_VERSION_STR " compile-time]";
//#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) // QTranslator::filePath() added in Qt 5.15.
// qCDebug(lc).noquote() << "App translations:" <<
// (appTranslator.filePath().isEmpty() ? QStringLiteral("<none>") : appTranslator.filePath());
// qCDebug(lc).noquote() << "Library translations:" <<
// (libTranslator.filePath().isEmpty() ? QStringLiteral("<none>") : libTranslator.filePath());
//#else
// qCDebug(lc).noquote() << "App translations:" << (!appTranslator.isEmpty());
// qCDebug(lc).noquote() << "Lib translations:" << (!libTranslator.isEmpty());
//#endif
return 0;

// // Handle the given command.
// AbstractCommand * const command = getCommandObject(commandType, &app);
Expand Down

0 comments on commit ee0c038

Please sign in to comment.