mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[keyboard] Improve debug-logging for writing etc/default
This commit is contained in:
parent
cbc376a206
commit
705e6dd8d6
1 changed files with 9 additions and 3 deletions
|
@ -310,8 +310,14 @@ SetKeyboardLayoutJob::writeX11Data( const QString& keyboardConfPath ) const
|
||||||
bool
|
bool
|
||||||
SetKeyboardLayoutJob::writeDefaultKeyboardData( const QString& defaultKeyboardPath ) const
|
SetKeyboardLayoutJob::writeDefaultKeyboardData( const QString& defaultKeyboardPath ) const
|
||||||
{
|
{
|
||||||
|
cDebug() << "Writing default keyboard data to" << defaultKeyboardPath;
|
||||||
|
|
||||||
QFile file( defaultKeyboardPath );
|
QFile file( defaultKeyboardPath );
|
||||||
file.open( QIODevice::WriteOnly | QIODevice::Text );
|
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
|
||||||
|
{
|
||||||
|
cError() << "Could not open" << defaultKeyboardPath << "for writing";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
QTextStream stream( &file );
|
QTextStream stream( &file );
|
||||||
|
|
||||||
stream << "# KEYBOARD CONFIGURATION FILE\n\n"
|
stream << "# KEYBOARD CONFIGURATION FILE\n\n"
|
||||||
|
@ -326,8 +332,8 @@ SetKeyboardLayoutJob::writeDefaultKeyboardData( const QString& defaultKeyboardPa
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
cDebug() << "Written XKBMODEL" << m_model << "; XKBLAYOUT" << m_layout << "; XKBVARIANT" << m_variant
|
cDebug() << Logger::SubEntry << "Written XKBMODEL" << m_model << "; XKBLAYOUT" << m_layout << "; XKBVARIANT" << m_variant
|
||||||
<< "to /etc/default/keyboard file" << defaultKeyboardPath;
|
<< "to /etc/default/keyboard file" << defaultKeyboardPath << stream.status();
|
||||||
|
|
||||||
return ( stream.status() == QTextStream::Ok );
|
return ( stream.status() == QTextStream::Ok );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue