[officechooser] Drop hard-coded data
This commit is contained in:
parent
25db582a0a
commit
dce9b215af
@ -184,32 +184,6 @@ PackageChooserViewStep::setConfigurationMap( const QVariantMap& configurationMap
|
|||||||
fillModel( configurationMap.value( "items" ).toList() );
|
fillModel( configurationMap.value( "items" ).toList() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: replace this hard-coded model
|
|
||||||
if ( !m_model )
|
|
||||||
{
|
|
||||||
m_model = new PackageListModel( nullptr );
|
|
||||||
m_model->addPackage( PackageItem { QString(),
|
|
||||||
QString(),
|
|
||||||
"No Office Suite",
|
|
||||||
"Please pick an office suite from the list. "
|
|
||||||
"If you don't want to install an office suite, that's fine, "
|
|
||||||
"you can install one later as needed.",
|
|
||||||
":/images/choose-office.jpg" } );
|
|
||||||
m_model->addPackage( PackageItem { "libreoffice-still",
|
|
||||||
"libreoffice-still",
|
|
||||||
"LibreOffice",
|
|
||||||
"LibreOffice is a powerful and free office suite, used by millions of people around the world. "
|
|
||||||
"Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity.",
|
|
||||||
":/images/LibreOffice.jpg" } );
|
|
||||||
m_model->addPackage( PackageItem { "freeoffice",
|
|
||||||
"freeoffice",
|
|
||||||
"FreeOffice",
|
|
||||||
"FreeOffice 2018 is a full-featured Office suite with word processing, "
|
|
||||||
"spreadsheet and presentation software. It is seamlessly compatible with Microsoft Office. "
|
|
||||||
"(Note: You need to register the product for free longterm usage)",
|
|
||||||
":/images/FreeOffice.jpg" } );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( first_time && m_widget && m_model )
|
if ( first_time && m_widget && m_model )
|
||||||
{
|
{
|
||||||
hookupModel();
|
hookupModel();
|
||||||
|
@ -45,8 +45,18 @@ PackageChooserTests::testBogus()
|
|||||||
void
|
void
|
||||||
PackageChooserTests::testAppData()
|
PackageChooserTests::testAppData()
|
||||||
{
|
{
|
||||||
// Path from the build-dir
|
// Path from the build-dir and from the running-the-test varies,
|
||||||
QString appdataName( "../io.calamares.calamares.appdata.xml" );
|
// for in-source build, for build/, and for tests-in-build/,
|
||||||
|
// so look in multiple places.
|
||||||
|
QString appdataName( "io.calamares.calamares.appdata.xml" );
|
||||||
|
for ( const auto& prefix : QStringList { "", "../", "../../../", "../../../../" } )
|
||||||
|
{
|
||||||
|
if ( QFile::exists( prefix + appdataName ) )
|
||||||
|
{
|
||||||
|
appdataName = prefix + appdataName;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
QVERIFY( QFile::exists( appdataName ) );
|
QVERIFY( QFile::exists( appdataName ) );
|
||||||
|
|
||||||
QVariantMap m;
|
QVariantMap m;
|
||||||
|
Loading…
Reference in New Issue
Block a user