Merge pull request #1243 from stikonas/master
QLatin1Literal->QLatin1String.
This commit is contained in:
commit
5d0a5c035d
@ -67,7 +67,7 @@ public:
|
||||
* en_US and en (American English) is defined as English. The Queen's
|
||||
* English -- proper English -- is relegated to non-English status.
|
||||
*/
|
||||
bool isEnglish() const { return m_localeId == QLatin1Literal( "en_US" ) || m_localeId == QLatin1Literal( "en" ); }
|
||||
bool isEnglish() const { return m_localeId == QLatin1String( "en_US" ) || m_localeId == QLatin1String( "en" ); }
|
||||
|
||||
/** @brief Get the human-readable name for this locale. */
|
||||
QString label() const { return m_label; }
|
||||
|
@ -131,8 +131,8 @@ findInCommands( const CommandList& l, const QString& needle )
|
||||
Calamares::JobResult
|
||||
CommandList::run()
|
||||
{
|
||||
QLatin1Literal rootMagic( "@@ROOT@@" );
|
||||
QLatin1Literal userMagic( "@@USER@@" );
|
||||
QLatin1String rootMagic( "@@ROOT@@" );
|
||||
QLatin1String userMagic( "@@USER@@" );
|
||||
|
||||
System::RunLocation location = m_doChroot ? System::RunLocation::RunInTarget : System::RunLocation::RunInHost;
|
||||
|
||||
|
@ -275,12 +275,12 @@ ViewManager::onInitFailed( const QStringList& modules )
|
||||
{
|
||||
description.append( tr( "<br/>The following modules could not be loaded:" ) );
|
||||
QStringList details;
|
||||
details << QLatin1Literal( "<ul>" );
|
||||
details << QLatin1String( "<ul>" );
|
||||
for ( const auto& m : modules )
|
||||
{
|
||||
details << QLatin1Literal( "<li>" ) << m << QLatin1Literal( "</li>" );
|
||||
details << QLatin1String( "<li>" ) << m << QLatin1String( "</li>" );
|
||||
}
|
||||
details << QLatin1Literal( "</ul>" );
|
||||
details << QLatin1String( "</ul>" );
|
||||
detailString = details.join( QString() );
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ ModuleManager::doInit()
|
||||
bool success = currentDir.cd( subdir );
|
||||
if ( success )
|
||||
{
|
||||
QFileInfo descriptorFileInfo( currentDir.absoluteFilePath( QLatin1Literal( "module.desc" ) ) );
|
||||
QFileInfo descriptorFileInfo( currentDir.absoluteFilePath( QLatin1String( "module.desc" ) ) );
|
||||
if ( !descriptorFileInfo.exists() )
|
||||
{
|
||||
cDebug() << "ModuleManager expected descriptor is missing:"
|
||||
|
@ -137,7 +137,7 @@ PythonQtViewModule::loadSelf()
|
||||
return;
|
||||
}
|
||||
|
||||
static const QLatin1Literal calamares_module_annotation(
|
||||
static const QLatin1String calamares_module_annotation(
|
||||
"_calamares_module_typename = ''\n"
|
||||
"def calamares_module(viewmodule_type):\n"
|
||||
" global _calamares_module_typename\n"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "utils/Logger.h"
|
||||
|
||||
// static
|
||||
const QLatin1Literal DracutLuksCfgJob::CONFIG_FILE( "/etc/dracut.conf.d/calamares-luks.conf" );
|
||||
const QLatin1String DracutLuksCfgJob::CONFIG_FILE( "/etc/dracut.conf.d/calamares-luks.conf" );
|
||||
|
||||
// static
|
||||
const char *DracutLuksCfgJob::CONFIG_FILE_HEADER =
|
||||
@ -50,7 +50,7 @@ const char *DracutLuksCfgJob::CONFIG_FILE_CRYPTTAB_LINE =
|
||||
"install_items+=\" /etc/crypttab \"\n";
|
||||
|
||||
// static
|
||||
const QLatin1Literal DracutLuksCfgJob::CONFIG_FILE_SWAPLINE( "# enable automatic resume from swap\nadd_device+=\" /dev/disk/by-uuid/%1 \"\n" );
|
||||
const QLatin1String DracutLuksCfgJob::CONFIG_FILE_SWAPLINE( "# enable automatic resume from swap\nadd_device+=\" /dev/disk/by-uuid/%1 \"\n" );
|
||||
|
||||
// static
|
||||
QString
|
||||
|
@ -42,11 +42,11 @@ public:
|
||||
Calamares::JobResult exec() override;
|
||||
|
||||
private:
|
||||
static const QLatin1Literal CONFIG_FILE;
|
||||
static const QLatin1String CONFIG_FILE;
|
||||
static const char *CONFIG_FILE_HEADER;
|
||||
static const char *CONFIG_FILE_CRYPTTAB_KEYFILE_LINE;
|
||||
static const char *CONFIG_FILE_CRYPTTAB_LINE;
|
||||
static const QLatin1Literal CONFIG_FILE_SWAPLINE;
|
||||
static const QLatin1String CONFIG_FILE_SWAPLINE;
|
||||
|
||||
static QString rootMountPoint();
|
||||
static QVariantList partitions();
|
||||
|
@ -241,7 +241,7 @@ LocalePage::init( const QString& initialRegion, const QString& initialZone, cons
|
||||
<< "\n\t "
|
||||
<< "* a well-formed" << supported.fileName() << "\n\tOR"
|
||||
<< "* a well-formed"
|
||||
<< ( localeGenPath.isEmpty() ? QLatin1Literal( "/etc/locale.gen" ) : localeGenPath ) << "\n\tOR"
|
||||
<< ( localeGenPath.isEmpty() ? QLatin1String( "/etc/locale.gen" ) : localeGenPath ) << "\n\tOR"
|
||||
<< "* a complete pre-compiled locale-gen database which allows complete locale -a output.";
|
||||
return; // something went wrong and there's nothing we can do about it.
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ constexpr static double MATH_PI = 3.14159265;
|
||||
|
||||
#ifdef DEBUG_TIMEZONES
|
||||
// Adds a label to the timezone with this name
|
||||
constexpr static QLatin1Literal ZONE_NAME( "zone" );
|
||||
constexpr static QLatin1String ZONE_NAME( "zone" );
|
||||
#endif
|
||||
|
||||
TimeZoneWidget::TimeZoneWidget( QWidget* parent ) :
|
||||
|
@ -45,7 +45,7 @@ PackageTreeItem::PackageTreeItem::PackageTreeItem() :
|
||||
PackageTreeItem( QString(), nullptr )
|
||||
{
|
||||
m_data.selected = Qt::Checked;
|
||||
m_data.name = QLatin1Literal( "<root>" );
|
||||
m_data.name = QLatin1String( "<root>" );
|
||||
}
|
||||
|
||||
PackageTreeItem::~PackageTreeItem()
|
||||
|
@ -450,7 +450,7 @@ isEfiBootable( const Partition* candidate )
|
||||
QString
|
||||
findFS( QString fsName, FileSystem::Type* fsType )
|
||||
{
|
||||
QStringList fsLanguage { QLatin1Literal( "C" ) }; // Required language list to turn off localization
|
||||
QStringList fsLanguage { QLatin1String( "C" ) }; // Required language list to turn off localization
|
||||
if ( fsName.isEmpty() )
|
||||
fsName = QStringLiteral( "ext4" );
|
||||
|
||||
|
@ -646,7 +646,7 @@ PartitionViewStep::checkRequirements()
|
||||
Calamares::RequirementsList l;
|
||||
l.append(
|
||||
{
|
||||
QLatin1Literal( "partitions" ),
|
||||
QLatin1String( "partitions" ),
|
||||
[]{ return tr( "has at least one disk device available." ); },
|
||||
[]{ return tr( "There are no partitons to install on." ); },
|
||||
m_core->deviceModel()->rowCount() > 0, // satisfied
|
||||
|
@ -52,7 +52,7 @@ QString targetPrefix()
|
||||
}
|
||||
}
|
||||
|
||||
return QLatin1Literal( "/" );
|
||||
return QLatin1String( "/" );
|
||||
}
|
||||
|
||||
QString atReplacements( QString s )
|
||||
|
@ -173,7 +173,7 @@ UsersViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
}
|
||||
}
|
||||
|
||||
QString shell( QLatin1Literal( "/bin/bash" ) ); // as if it's not set at all
|
||||
QString shell( QLatin1String( "/bin/bash" ) ); // as if it's not set at all
|
||||
if ( configurationMap.contains( "userShell" ) )
|
||||
shell = CalamaresUtils::getString( configurationMap, "userShell" );
|
||||
// Now it might be explicitly set to empty, which is ok
|
||||
|
Loading…
Reference in New Issue
Block a user