check path
This commit is contained in:
parent
1636f665c3
commit
e2801daf33
@ -148,10 +148,27 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge );
|
connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge );
|
||||||
|
|
||||||
mainLayout->addWidget( m_viewManager->centralWidget() );
|
mainLayout->addWidget( m_viewManager->centralWidget() );
|
||||||
QFile File("/etc/calamares/stylesheet.qss");
|
|
||||||
|
|
||||||
|
|
||||||
|
QString brandingComponentName = Calamares::Settings::instance()->brandingComponentName();
|
||||||
|
if ( brandingComponentName.simplified().isEmpty() )
|
||||||
|
{
|
||||||
|
cError() << "FATAL: branding component not set in settings.conf";
|
||||||
|
::exit( EXIT_FAILURE );
|
||||||
|
}
|
||||||
|
|
||||||
|
QString brandingQSSDescriptorPath = QString( "/etc/calamares/branding/%1/stylesheet.qss" )
|
||||||
|
.arg( brandingComponentName );
|
||||||
|
|
||||||
|
importQSSPath = QFileInfo( brandingQSSDescriptorPath );
|
||||||
|
if ( importQSSPath.exists() && importQSSPath.isReadable() )
|
||||||
|
{
|
||||||
|
QFile File(importQSSPath);
|
||||||
File.open(QFile::ReadOnly);
|
File.open(QFile::ReadOnly);
|
||||||
QString StyleSheet = QLatin1String(File.readAll());
|
QString StyleSheet = QLatin1String(File.readAll());
|
||||||
this->setStyleSheet(StyleSheet);
|
this->setStyleSheet(StyleSheet);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user