mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Simplified Ctor for application with CApplicationInfo::Application
This commit is contained in:
committed by
Mathew Sutcliffe
parent
272fa95576
commit
705e83e156
@@ -33,7 +33,7 @@ int main(int argc, char *argv[])
|
|||||||
// I use CGuiApplication and not core application
|
// I use CGuiApplication and not core application
|
||||||
// otherwise no QPixmap metadata (metadata sample)
|
// otherwise no QPixmap metadata (metadata sample)
|
||||||
QCoreApplication qa(argc, argv);
|
QCoreApplication qa(argc, argv);
|
||||||
CApplication a;
|
CApplication a(CApplicationInfo::Sample);
|
||||||
Q_UNUSED(qa);
|
Q_UNUSED(qa);
|
||||||
Q_UNUSED(a);
|
Q_UNUSED(a);
|
||||||
QTextStream qtout(stdout);
|
QTextStream qtout(stdout);
|
||||||
|
|||||||
@@ -88,6 +88,10 @@ static const QString &swiftDataRoot()
|
|||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
{
|
{
|
||||||
|
CApplication::CApplication(CApplicationInfo::Application application, bool init) :
|
||||||
|
CApplication(executable(), application, init)
|
||||||
|
{ }
|
||||||
|
|
||||||
CApplication::CApplication(const QString &applicationName, CApplicationInfo::Application application, bool init) :
|
CApplication::CApplication(const QString &applicationName, CApplicationInfo::Application application, bool init) :
|
||||||
m_cookieManager( {}, this), m_applicationName(applicationName), m_application(application), m_coreFacadeConfig(CCoreFacadeConfig::allEmpty())
|
m_cookieManager( {}, this), m_applicationName(applicationName), m_application(application), m_coreFacadeConfig(CCoreFacadeConfig::allEmpty())
|
||||||
{
|
{
|
||||||
@@ -234,6 +238,8 @@ namespace BlackCore
|
|||||||
if (a.contains("core")) { return CApplicationInfo::PilotClientCore; }
|
if (a.contains("core")) { return CApplicationInfo::PilotClientCore; }
|
||||||
if (a.contains("launcher")) { return CApplicationInfo::Laucher; }
|
if (a.contains("launcher")) { return CApplicationInfo::Laucher; }
|
||||||
if (a.contains("gui")) { return CApplicationInfo::PilotClientGui; }
|
if (a.contains("gui")) { return CApplicationInfo::PilotClientGui; }
|
||||||
|
if (a.contains("test")) { return CApplicationInfo::UnitTest; }
|
||||||
|
if (a.contains("sample")) { return CApplicationInfo::Sample; }
|
||||||
if (a.contains("data") || a.contains("mapping")) { return CApplicationInfo::MappingTool; }
|
if (a.contains("data") || a.contains("mapping")) { return CApplicationInfo::MappingTool; }
|
||||||
return CApplicationInfo::Unknown;
|
return CApplicationInfo::Unknown;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,6 +101,9 @@ namespace BlackCore
|
|||||||
//! Own log categories
|
//! Own log categories
|
||||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
|
|
||||||
|
//! Constructor
|
||||||
|
CApplication(BlackMisc::CApplicationInfo::Application application, bool init = true);
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CApplication(const QString &applicationName = executable(), BlackMisc::CApplicationInfo::Application application = BlackMisc::CApplicationInfo::Unknown, bool init = true);
|
CApplication(const QString &applicationName = executable(), BlackMisc::CApplicationInfo::Application application = BlackMisc::CApplicationInfo::Unknown, bool init = true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user