mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #635, init metadata in CApplication / CGuiApplication
This commit is contained in:
@@ -39,12 +39,14 @@ namespace BlackGui
|
||||
return l;
|
||||
}
|
||||
|
||||
CGuiApplication::CGuiApplication(const QString &applicationName, const QPixmap &icon) : CApplication(applicationName)
|
||||
CGuiApplication::CGuiApplication(const QString &applicationName, const QPixmap &icon) :
|
||||
CApplication(applicationName, false)
|
||||
{
|
||||
if (!sGui)
|
||||
{
|
||||
registerMetadata();
|
||||
setWindowIcon(icon);
|
||||
CGuiApplication::registerMetadata();
|
||||
CApplication::init(false); // base class without metadata
|
||||
this->setWindowIcon(icon);
|
||||
sGui = this;
|
||||
connect(sGui, &CGuiApplication::styleSheetsChanged, this, &CGuiApplication::styleSheetsChanged);
|
||||
}
|
||||
@@ -55,6 +57,12 @@ namespace BlackGui
|
||||
sGui = nullptr;
|
||||
}
|
||||
|
||||
void CGuiApplication::registerMetadata()
|
||||
{
|
||||
CApplication::registerMetadata();
|
||||
BlackGui::registerMetadata();
|
||||
}
|
||||
|
||||
void CGuiApplication::addWindowModeOption()
|
||||
{
|
||||
this->m_cmdWindowMode = QCommandLineOption(QStringList() << "w" << "window",
|
||||
|
||||
@@ -158,6 +158,9 @@ namespace BlackGui
|
||||
//! Handle paring of special GUI cmd arguments
|
||||
virtual bool parsingHookIn() override;
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
private:
|
||||
QPixmap m_windowIcon;
|
||||
QCommandLineOption m_cmdWindowStateMinimized { "empty" }; //!< window state (minimized)
|
||||
|
||||
Reference in New Issue
Block a user