Merge PR #186: Add some better debug prints

This commit is contained in:
Jenkins 2019-05-18 02:38:41 +02:00
commit d97c1f6abf
4 changed files with 6 additions and 6 deletions

View File

@ -311,6 +311,7 @@ void JsonRpcClient::sendRequest(const QVariantMap &request)
void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
{
if (!connected) {
qDebug() << "JsonRpcClient: Transport disconnected.";
m_initialSetupRequired = false;
m_authenticationRequired = false;
if (m_connected) {
@ -318,6 +319,7 @@ void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
emit connectedChanged(false);
}
} else {
qDebug() << "JsonRpcClient: Transport connected. Starting handshake.";
QVariantMap params;
params.insert("locale", QLocale().name());
sendCommand("JSONRPC.Hello", params, this, "helloReply");

View File

@ -30,7 +30,6 @@ AppLogController::AppLogController(QObject *parent) : QAbstractListModel(parent)
QString fileName = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/nymea-app.log";
m_logFile.setFileName(fileName);
qDebug() << "App log file:" << fileName;
if (QFile::exists(fileName)) {
if (QFile::exists(fileName + ".old")) {
@ -44,7 +43,6 @@ AppLogController::AppLogController(QObject *parent) : QAbstractListModel(parent)
return;
}
qDebug() << "Logging is" << (enabled() ? "enabled" : "disabled");
if (enabled()) {
activate();
}
@ -143,7 +141,8 @@ void AppLogController::append(const QString &message, AppLogController::Type typ
void AppLogController::activate()
{
qDebug() << "Activating log file writing";
qDebug() << "Activating log file writing to" << m_logFile.fileName();
s_oldLogMessageHandler = qInstallMessageHandler(&logMessageHandler);
}

View File

@ -89,6 +89,7 @@ int main(int argc, char *argv[])
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
application.installTranslator(&qtTranslator);
qDebug() << "nymea:app" << APP_VERSION << "running on" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion();
qDebug() << "Locale info:" << QLocale() << QLocale().name() << QLocale().language() << QLocale().system();
QTranslator appTranslator;
@ -100,8 +101,6 @@ int main(int argc, char *argv[])
}
application.installTranslator(&appTranslator);
qDebug() << "Running on" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion();
registerQmlTypes();
QQmlApplicationEngine *engine = new QQmlApplicationEngine();

View File

@ -21,7 +21,7 @@ Page {
// This one prefers https over http...
// if (config === null || (!config.sslEnabled && tmp.sslEnabled)) {
// ...but for now, prefer http because some things won't work with self signed certs etc...
// ...but for now, prefer http because self signed certs cause trouble and this is meant for local debugging only anyways...
if (config === null || (config.sslEnabled && !tmp.sslEnabled)) {
config = tmp;
}