mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #359, log fixes / setup
This commit is contained in:
@@ -413,7 +413,7 @@ namespace BlackCore
|
||||
foreach(QString fileName, fileNames)
|
||||
{
|
||||
if (!QLibrary::isLibrary(fileName)) { continue; }
|
||||
CLogMessage(this).info("Try to load plugin: ") << fileName;
|
||||
CLogMessage(this).info("Try to load plugin: %1") << fileName;
|
||||
QString pluginPath = m_pluginsDir.absoluteFilePath(fileName);
|
||||
QPluginLoader loader(pluginPath);
|
||||
QObject *plugin = loader.instance();
|
||||
@@ -424,7 +424,7 @@ namespace BlackCore
|
||||
{
|
||||
CSimulatorInfo simulatorInfo = factory->getSimulatorInfo();
|
||||
m_simulatorFactories.insert(factory);
|
||||
CLogMessage(this).info("Loaded plugin: ") << simulatorInfo.toQString();
|
||||
CLogMessage(this).info("Loaded plugin: %1") << simulatorInfo.toQString();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -43,6 +43,18 @@ int main(int argc, char *argv[])
|
||||
BlackCore::registerMetadata();
|
||||
// BlackMisc::displayAllUserMetatypesTypes();
|
||||
|
||||
// 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);
|
||||
|
||||
// Translations
|
||||
QFile file(":blackmisc/translations/blackmisc_i18n_de.qm");
|
||||
CLogMessage("swift.standardgui.main").debug() << (file.exists() ? "Found translations in resources" : "No translations in resources");
|
||||
@@ -52,11 +64,6 @@ int main(int argc, char *argv[])
|
||||
CLogMessage("swift.standardgui.main").debug() << "Translator loaded";
|
||||
}
|
||||
|
||||
// application
|
||||
QApplication a(argc, argv);
|
||||
CLogHandler::instance()->install();
|
||||
BlackMisc::CLogHandler::instance()->handlerForCategory(CLogCategory::context())->enableConsoleOutput(false);
|
||||
|
||||
QIcon icon(BlackMisc::CIcons::swift24());
|
||||
QApplication::setWindowIcon(icon);
|
||||
const QString s = CStyleSheetUtility::instance().styles(
|
||||
|
||||
Reference in New Issue
Block a user