mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #359, fixed loghandler, removed / fine tuning of some output / log messages
see also discussion in #359
This commit is contained in:
@@ -100,8 +100,7 @@ namespace BlackGui
|
||||
bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0;
|
||||
if (hasData && !this->isVisibleWidget())
|
||||
{
|
||||
// KWB remove: qDebug() will be removed soon
|
||||
qDebug() << this->objectName() << "Skipping update, not visible";
|
||||
// Update skipped, as not visible
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,8 +60,7 @@ namespace BlackGui
|
||||
bool withData = countUsers() > 0 || countClients() > 0;
|
||||
if (withData && !isVisibleWidget())
|
||||
{
|
||||
// KWB remove: qDebug() will be removed soo
|
||||
qDebug() << this->objectName() << "Skipping update";
|
||||
// Skip update, invisible
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@ namespace BlackMisc
|
||||
|
||||
if (m_handler)
|
||||
{
|
||||
if (! m_inheritFallThrough) { m_handler->inheritConsoleOutput(); }
|
||||
m_handler->disconnect(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,7 @@ namespace BlackMisc
|
||||
|
||||
bool canBeDeleted()
|
||||
{
|
||||
if (! m_inheritFallThrough) { return false; }
|
||||
static const auto signal = QMetaMethod::fromSignal(&CLogPatternHandler::messageLogged);
|
||||
return ! isSignalConnected(signal);
|
||||
}
|
||||
|
||||
@@ -39,9 +39,7 @@ int main(int argc, char *argv[])
|
||||
QTextStream cin(stdin);
|
||||
QTextStream cout(stdout);
|
||||
|
||||
cout << BlackMisc::CProject::version();
|
||||
cout << BlackMisc::CProject::compiledInfo();
|
||||
cout << endl;
|
||||
cout << BlackMisc::CProject::version() << " " << BlackMisc::CProject::compiledInfo() << endl;
|
||||
|
||||
cout << "1 + la/ra .. session DBus server (default)" << endl;
|
||||
cout << "2 + la/ra .. system DBus server" << endl;
|
||||
@@ -78,7 +76,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// tool to allow input indepent from event loop
|
||||
QtConcurrent::run(BlackMiscTest::Tool::serverLoop, core); // QFuture<void> future
|
||||
cout << "Server event loop, pid:" << BlackMiscTest::Tool::getPid() << "Thread id:" << QThread::currentThreadId();
|
||||
cout << "Server event loop, pid: " << BlackMiscTest::Tool::getPid() << " Thread id: " << QThread::currentThreadId() << endl;
|
||||
|
||||
// end
|
||||
return a.exec();
|
||||
|
||||
@@ -46,14 +46,13 @@ int main(int argc, char *argv[])
|
||||
// application
|
||||
QApplication a(argc, argv);
|
||||
CLogHandler::instance()->install();
|
||||
CLogHandler::instance()->enableConsoleOutput(false);
|
||||
|
||||
// CLogHandler::instance()->handlerForPattern(
|
||||
// CLogPattern::anyOf({ CLogCategory::contextSlot(), CLogCategory::context() })
|
||||
// )->enableConsoleOutput(false);
|
||||
// CLogHandler::instance()->handlerForPattern(
|
||||
// CLogPattern::anyOf({ CLogCategory::contextSlot(), CLogCategory::context() }).withSeverityAtOrAbove(CStatusMessage::SeverityInfo)
|
||||
// )->enableConsoleOutput(true);
|
||||
CLogHandler::instance()->enableConsoleOutput(true);
|
||||
CLogHandler::instance()->handlerForPattern(
|
||||
CLogPattern::anyOf({ CLogCategory::contextSlot(), CLogCategory::context() })
|
||||
)->enableConsoleOutput(false);
|
||||
CLogHandler::instance()->handlerForPattern(
|
||||
CLogPattern::anyOf({ CLogCategory::contextSlot(), CLogCategory::context() }).withSeverityAtOrAbove(CStatusMessage::SeverityInfo)
|
||||
)->enableConsoleOutput(true);
|
||||
|
||||
// Translations
|
||||
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
|
||||
|
||||
Reference in New Issue
Block a user