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