mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 07:05:38 +08:00
Core output not via qDebug()
This commit is contained in:
committed by
Roland Winklmeier
parent
4ce5144516
commit
8b002e1510
@@ -33,20 +33,23 @@ int main(int argc, char *argv[])
|
|||||||
// metadata are registered in runtime
|
// metadata are registered in runtime
|
||||||
QApplication a(argc, argv); // not QCoreApplication because of icon, http://qt-project.org/forums/viewthread/15412
|
QApplication a(argc, argv); // not QCoreApplication because of icon, http://qt-project.org/forums/viewthread/15412
|
||||||
CLogHandler::instance()->install();
|
CLogHandler::instance()->install();
|
||||||
|
CLogHandler::instance()->enableConsoleOutput(false); //! \todo How can I change the level only and display info and above?
|
||||||
QIcon icon(BlackMisc::CIcons::swiftNova24());
|
QIcon icon(BlackMisc::CIcons::swiftNova24());
|
||||||
QApplication::setWindowIcon(icon);
|
QApplication::setWindowIcon(icon);
|
||||||
QTextStream cin(stdin);
|
QTextStream cin(stdin);
|
||||||
|
QTextStream cout(stdout);
|
||||||
|
|
||||||
qDebug() << BlackMisc::CProject::version();
|
cout << BlackMisc::CProject::version();
|
||||||
qDebug() << BlackMisc::CProject::compiledInfo();
|
cout << BlackMisc::CProject::compiledInfo();
|
||||||
qDebug();
|
cout << endl;
|
||||||
|
|
||||||
|
cout << "1 + la/ra .. session DBus server (default)" << endl;
|
||||||
|
cout << "2 + la/ra .. system DBus server" << endl;
|
||||||
|
cout << "3 + la/ra .. P2P DBus server" << endl;
|
||||||
|
cout << "la .. local audio, audio runs in this core here (default)" << endl;
|
||||||
|
cout << "ra .. remote audio, audio runs in the GUI or elsewhere" << endl;
|
||||||
|
cout << "x .. exit" << endl;
|
||||||
|
|
||||||
qDebug() << "1 + la/ra .. session DBus server (default)";
|
|
||||||
qDebug() << "2 + la/ra .. system DBus server";
|
|
||||||
qDebug() << "3 + la/ra .. P2P DBus server";
|
|
||||||
qDebug() << "la .. local audio, audio runs in this core here (default)";
|
|
||||||
qDebug() << "ra .. remote audio, audio runs in the GUI or elsewhere";
|
|
||||||
qDebug() << "x .. exit";
|
|
||||||
QString input = cin.readLine().toLower().trimmed();
|
QString input = cin.readLine().toLower().trimmed();
|
||||||
|
|
||||||
// configure DBus server
|
// configure DBus server
|
||||||
@@ -57,8 +60,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else if (input.startsWith("3"))
|
else if (input.startsWith("3"))
|
||||||
{
|
{
|
||||||
qDebug() << "found: " << BlackMisc::CNetworkUtils::getKnownIpAddresses();
|
cout << "found: " << BlackMisc::CNetworkUtils::getKnownIpAddresses().join(' ') << endl;
|
||||||
qDebug() << "enter ip/port, e.g. 127.0.0.1:45000 (default)";
|
cout << "enter ip/port, e.g. 127.0.0.1:45000 (default)" << endl;
|
||||||
dBusAddress = cin.readLine().toLower();
|
dBusAddress = cin.readLine().toLower();
|
||||||
dBusAddress = BlackCore::CDBusServer::p2pAddress(dBusAddress);
|
dBusAddress = BlackCore::CDBusServer::p2pAddress(dBusAddress);
|
||||||
}
|
}
|
||||||
@@ -75,7 +78,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// tool to allow input indepent from event loop
|
// tool to allow input indepent from event loop
|
||||||
QtConcurrent::run(BlackMiscTest::Tool::serverLoop, core); // QFuture<void> future
|
QtConcurrent::run(BlackMiscTest::Tool::serverLoop, core); // QFuture<void> future
|
||||||
qDebug() << "Server event loop, pid:" << BlackMiscTest::Tool::getPid() << "Thread id:" << QThread::currentThreadId();
|
cout << "Server event loop, pid:" << BlackMiscTest::Tool::getPid() << "Thread id:" << QThread::currentThreadId();
|
||||||
|
|
||||||
// end
|
// end
|
||||||
return a.exec();
|
return a.exec();
|
||||||
|
|||||||
Reference in New Issue
Block a user